Change. Forester 3.1 › Removal of \texpackage and changes to \tex [00LR]
In Forester 2.1, the \texpackage frontmatter command was added in order to accumulate a list of packages that are then used automatically when rendering \tex{code...}. From Forester 3.1, this feature is removed and to embed \LaTeX code, you must explicitly specify the preamble as follows:
\tex{
\usepackage{mypackage1}
\usepackage{mypackage2}
}{
my code goes here
}Of course, within a single project (or even forest), you may have a relatively stable set of \LaTeX packages that you need. In this case, it is recommended to wrap \tex in your own macro:
\def\my-tex[body]{
\tex{
\usepackage{mypackage1}
\usepackage{mypackage2}
}{\body}
}An even more sophisticated approach might use fluid bindings to allow local customisation of packages in use:
\alloc\my-tex-preamble
\def\my-tex[body]{
\scope{
\put?\my-tex-preamble{}
\tex{\get\my-tex-preamble}{\body}
}
}