summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--library/src/meta/counter.rs4
-rw-r--r--library/src/meta/state.rs4
2 files changed, 8 insertions, 0 deletions
diff --git a/library/src/meta/counter.rs b/library/src/meta/counter.rs
index fb656c76..1d8e642d 100644
--- a/library/src/meta/counter.rs
+++ b/library/src/meta/counter.rs
@@ -583,6 +583,10 @@ struct DisplayElem {
impl Show for DisplayElem {
fn show(&self, vt: &mut Vt, styles: StyleChain) -> SourceResult<Content> {
+ if !vt.introspector.init() {
+ return Ok(Content::empty());
+ }
+
let location = self.0.location().unwrap();
let counter = self.counter();
let numbering = self
diff --git a/library/src/meta/state.rs b/library/src/meta/state.rs
index 11073594..3e6d65b2 100644
--- a/library/src/meta/state.rs
+++ b/library/src/meta/state.rs
@@ -393,6 +393,10 @@ struct DisplayElem {
impl Show for DisplayElem {
fn show(&self, vt: &mut Vt, _: StyleChain) -> SourceResult<Content> {
+ if !vt.introspector.init() {
+ return Ok(Content::empty());
+ }
+
let location = self.0.location().unwrap();
let value = self.state().at(vt, location)?;
Ok(match self.func() {