0

I want to let latex only run one of my defined commands and output results to a tax file.

For example, the following tex file:

\documentclass{article}
\usepackage[usenames,dvipsnames]{xcolor}

\newcommand{\note}[3][]{{\color{Orange}#1}{\color{Red}#2}{\color{Cyan}#3}}

\begin{document}

\note[text1]{text2}{text3}

hello world \textbf{here} .

\end{document}

I want latex to only run the \note command and output the results:

\documentclass{article}
\usepackage[usenames,dvipsnames]{xcolor}

\newcommand{\note}[3][]{{\color{Orange}#1}{\color{Red}#2}{\color{Cyan}#3}}

\begin{document}

{\color{Orange}text1}{\color{Red}text2}{\color{Cyan}text3}

hello world \textbf{here} .

\end{document}

into a new tex file for example compiled.tax

Is there anyway to achieve this?

Thanks in advance.

David Carlisle
  • 757,742

0 Answers0