Let's say I have a math book with practice problems.. I'd want something like:
Code: Select all
3 \times 2 = \answersheet{6}
Does that make sense?
Code: Select all
3 \times 2 = \answersheet{6}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Code: Select all
\newcommand{\answers}{yes}
\newcommand{\answer}[1]{\ifthenelse{\equal{\answers}{yes}}{#1}{??}}
Code: Select all
\answer{insert answer here}
Code: Select all
\documentclass{article}
\usepackage{ifthen}
\newcommand{\answers}{yes}
\newcommand{\answer}[1]{\ifthenelse{\equal{\answers}{yes}}{#1}{??}}
\begin{document}
3 \times 2 = \answer{6}
\renewcommand{\answers}{no}
3 \times 2 = \answer{6}
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p