Skip to content

Commit

Permalink
refactor(tex): keep moving tex files and misc tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed May 28, 2024
1 parent debfe86 commit 5a05083
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
File renamed without changes.
8 changes: 3 additions & 5 deletions trees/latex-preamble.tree
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,23 @@

\p{These LaTeX preambles are used by [[macros]].}

\p{We place LaTeX preambles in the directory \code{trees} along with the other \code{.trees} files, but we need to refer to them \code{../tex/name.tex}, because LaTeX is running in \code{build} directory.}

\p{We mark every preamble line with a comment \code{texstrip}, so that we can strip it out when we convert the whole page to an actual LaTeX document, or render individual snippets via MathJax etc.}
\p{We place LaTeX preambles in the directory \code{tex} which is at the same level of the directory \code{trees}, but we need to refer to them \code{../tex/name.tex}, because LaTeX is running in \code{build} directory.}

\p{Here we define:}

\p{\code{latex-preamble/common}: Common LaTeX preambles in \code{preamble.tex}.}

\def\latex-preamble/common{
\startverb
\input{../tex/preamble} % texstrip
\input{../tex/preamble}
\stopverb
}

\p{\code{latex-preamble/minipage}: LaTeX preambles for embeding LaTeX in minipage.}

\def\latex-preamble/minipage{
\startverb
\input{../tex/a_minipage} % texstrip
\input{../tex/a_minipage}
\stopverb
}

Expand Down
9 changes: 4 additions & 5 deletions trees/macros.tree
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,11 @@ so the text size almost matches the size output by native forester code. This do
\latex-preamble/minipage
}
\tex{\get\base/tex-preamble}{
% \begin{minipage}{5.8in}\texstrip
\begin{minipage}{0.97\linewidth}\texstrip
\vspace{4ex}\texstrip
\setlength{\parskip}{3ex plus 0.5ex minus 0.2ex}\texstrip
\begin{minipage}{0.97\linewidth}
\vspace{4ex}
\setlength{\parskip}{3ex plus 0.5ex minus 0.2ex}
\body
\end{minipage}\texstrip
\end{minipage}
}
}
}
Expand Down

0 comments on commit 5a05083

Please sign in to comment.