Having invoked Splice[main.mtex]
,
% main.mtex
\documentclass[preview,border=12pt,12pt]{standalone}
\usepackage{amsmath}
% <* f[x_] := x^2 - 5 x +6 *>
\begin{document}
\section{Problem}
Evaluate $ <* f[x] *> $ for $x=\frac 1 2$.
\section{Solution}
$$ <* f[1/2] *> $$
\end{document}
we have main.tex
% main.mtex
\documentclass[preview,border=12pt,12pt]{standalone}
\usepackage{amsmath}
% \text{Null}
\begin{document}
\section{Problem}
Evaluate $ x^2-5 x+6 $ for $x=\frac 1 2$.
\section{Solution}
$$ \frac{15}{4} $$
\end{document}
that will produce the following output when compiled with pdflatex
.
Question
How to use FileTemplate
instead of Splice
that has been superseded by FileTemplate
?
f
in the question. I never used splice but I`m puzzled how you ended up with a decimal from exact input. $\endgroup$