#Cyclic Import Behaviour

1 messages · Page 1 of 1 (latest)

cursive solstice
#

If you have two files like this:

// "first.typ"
#let first() = {
  import "second.typ": second
  second()
}

#let third() = {
  "3"
}

and

// "second.typ"
#let second() = {
 import "first.typ": third
 third()
}

It works but if the import of third in "second.typ" is outside of the second function call it causes a cyclic error? WHY?

timid ravine
cursive solstice
#

ah sorry I don't think I put the import "second.typ" in the right place, it should be outside the function

#

I think my question is how can you have a cyclic import within a function? I understand why for a cyclic import outside the functions

timid ravine