Document (globalcampus.site/namespace.stxt): Chapter 4: Documents Without Namespace Default: Title: STXT: The Book Navigation: Previous: Previous (03-ai-powered) Next: Next (05-ns-docs) Header: Documents Without Namespace Content: I believe it’s already clear what documents without a namespace are like. Example: Code: Recipe: Macaroni Recipe Description: :This is the description of the macaroni recipe. :Bla, bla, bla :Bla, bla, bla Servings: 3 Difficulty: easy Ingredients: Ingredient: (100g) Tomato Ingredient: (240g) Macaroni Steps: Step: (1) Make the sauce Step: (2) Boil the macaroni Step: (3) Mix the macaroni with the sauce and serve Content: Let's delve a little deeper. Header: Encoding Assert: UTF-8 Encoding Always Content: The end. It’s a good rule, and I’m very happy with it. Nowadays, it’s the most acceptable, most universal, and most implemented encoding. I don’t think this will change in the coming years. Header: Identifiers Assert: Identifiers are CASE-INSENSITIVE Assert: Spaces are allowed in names. \ Why not? Just to seem more technical?\ Times are changing :-D Header: Escape Characters Assert: There are no escape characters Content: I think this is the best thing I’ve heard in a long time. **There are no escape characters** _because they aren’t necessary_. Due to the structure, they aren’t needed. Header: Comments Content: All tech-savvy individuals know what comments are in any language. For any beginners, I’ll explain that comments are text that’s only there to comment or add some observation, but they don’t influence the document itself. Assert: In @STxT@, comments are all lines that start with the character # Content: Comments don’t need any specific format; they’re free text that the document author can include. Moreover, they don’t need to be placed in any specific part of the document. Any line that starts with # will be treated as a comment, and won’t be considered by programs or in communications. Example: Code: Recipe: Macaroni Recipe ***# (1) This is a comment*** ***# (2) This is also a comment*** ***# (3) This is also a comment*** Description: :This is the description of the macaroni recipe. :Bla, bla, bla ***# (4) This is a comment*** :Bla, bla, bla ***# (5) This is NOT a comment*** Servings: 3 Difficulty: easy Ingredients: Ingredient: (100g) Tomato Ingredient: (240g) Macaroni Steps: Step: (1) Make the sauce Step: (2) Boil the macaroni Step: (3) Mix the macaroni with the sauce and serve Content: It’s worth noting that `(1),(2),(3) and (4)` are comments, while `(5)` is not, as it is within the indented text. Header: Nodes and Indentation Content: We mentioned earlier that an @STxT@ document is a set of nested nodes. Indentation is very similar to other languages, and tabs or spaces can be used. Assert: 4 spaces are equivalent to one tab It’s better not to mix documents with tabs and spaces Subheader: Multiline Nodes Content: These nodes allow for **complete texts across multiple lines**. In documents with namespaces, they will be equivalent to `TEXT` type nodes. They are constructed with lines that start with `:`, but without a preceding label. Example: Code: Recipe: Macaroni Recipe ***Description:*** ***:This is the description of the macaroni recipe.*** ***:Bla, bla, bla*** ***:Bla, bla, bla*** Servings: 3 Difficulty: easy Ingredients: Ingredient: (100g) Tomato Ingredient: (240g) Macaroni Steps: Step: (1) Make the sauce Step: (2) Boil the macaroni Step: (3) Mix the macaroni with the sauce and serve Content: We’ve just seen that the `Description` node is a MULTILINE node. Header: (Prefix) Central (Suffix) Content: Although it’s not part of the language, it’s common practice that simple fields are structured with `(prefix) central (suffix)`. All three can appear, or just 1 or 2 of them. Example: Code: Recipe: Macaroni Recipe Description: :This is the description of the macaroni recipe. :Bla, bla, bla :Bla, bla, bla Servings: 3 Difficulty: easy Ingredients: Ingredient: ***(100g) Tomato*** Ingredient: ***(240g) Macaroni*** Steps: Step: ***(1) Make the sauce*** Step: ***(2) Boil the macaroni*** Step: ***(3) Mix the macaroni with the sauce and serve***