Latte logo

Latte home

User manual

API manual



Latte News


Build notes



Latte Frequently Asked Questions

  1. Why doesn't \href=\var.html work?

    When assigning a value to a named parameter, remember that the value must be a single Latte expression. In this example, \var.html is two expressions: a reference to the variable named var, and the string .html. Use braces to group these into a single expression: \href={\var.html}.

  2. Why does only part of my function's output appear?

    As of Latte 2.0, the output of a function is the value of only the last subexpression in its body (after all the other expressions are evaluated). So if you have a function that looks like this:

    {\def {\function ...}
      {\b Here is a picture:}
      {\img ...}}

    its output is only <img ...>, because the {\b ...} expression is evaluated and then discarded. To include both expressions in the function's output, make them a single expression by wrapping them in an extra pair of braces:

    {\def {\function ...}
      {{\b Here is a picture:}
       {\img ...}}}

  3. How do I separate a variable reference from text that immediately follows it?

    In other words, if you have a variable \foo and would like to include its value immediately followed by the string bar, you can't simply write \foobar, because it will be interpreted as a reference to a variable named foobar.

    There are many ways to address this problem:

    • \foo{}bar
    • {\foo}bar
    • \foo{bar}
    • \foo \/bar
    • \foo\"bar\"

    Note that these tricks aren't necessary when the string following the variable reference cannot be mistaken for part of the variable name (because of the rules about what characters are permitted in variable names).

  4. Why is the Latte documentation not in Latte format?

    The Latte documentation is written in "Texinfo" format because that gave us the greatest number of options for producing the documentation in different forms: as browsable "Info" pages on character displays and within Emacs; as online web pages in HTML form; and as printed documentation created by TeX.

    Making all these options possible from a single source document is, of course, the ultimate goal of Latte. Furthermore, Texinfo is highly specialized for writing technical manuals and isn't as general as Latte is. Unfortunately, Latte isn't ready yet to produce any kind of output other than HTML (but see the Plans page). As soon as Latte can subsume the role of Texinfo, we'll convert the documentation to Latte format.

This document was produced by Latte from the file faq.latte (with extra definitions from style.latte).

Copyright © 1998,1999 Zanshin, Inc.