typst/tests/typ/code/include.typ
2021-07-08 20:03:13 +02:00

24 lines
423 B
Typst

// Test include statements.
---
= Document
// Include a file
#include "importable/chap1.typ"
// The variables of the file should not appear in this scope.
// Error: 1-6 unknown variable
#name
// Expression as a file name.
#let chap2 = include "import" + "able/chap" + "2.typ"
-- _Intermission_ --
#chap2
{
// Expressions, code mode.
// Error: 21-43 file not found
let x = include "importable/chap3.typ"
}