General ⇒ Referring to miscellaneous chunks of LaTeX code
Referring to miscellaneous chunks of LaTeX code
I hope this request makes sense, essentially im building a large document with a lot of flow charts, im using the tikzpicture environment for the flowcharts but it upsets the main document (and me!) including all the tikz code, id like to keep that in a seperate document and just call the chunks of code.
I know i can use \input{} command and keep the tikz code for each flowchart in a seperate .tex file but id like to have them all in the one tikzflowcharts.tex document and call them from main.tex document.
Thanks for any help
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Referring to miscellaneous chunks of LaTeX code
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Referring to miscellaneous chunks of LaTeX code
Code: Select all
\newcommand{\myfirstchart}{%% code for the first chart goes here%}\newcommand{\anotherchart}{%% code for another chart goes here%}
Another thing to consider would be to use an editor that does code folding.
Re: Referring to miscellaneous chunks of LaTeX code
Many thanks
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Referring to miscellaneous chunks of LaTeX code
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10