General ⇒ using \newcommand with \include
-
- Posts: 1
- Joined: Sat Feb 09, 2008 8:42 pm
using \newcommand with \include
I'm trying to write a document (thesis) where I have defined lots of \newcommand shortcuts. Currently these are defined in the 'master' .tex file, however I use the \include command to add each chapter's .tex file. Unfortunately I'm having problems as when I try to use a shortcut defined in the \newcommand within each chapter the latex compiler doesn't seem to know about it!
Any help gratefully appreciated.
Thanks,
Nick
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
using \newcommand with \include
You better define new commands and declare settings in the preamble of your master file to make them global. That also would be much more clear. Make sure that your new commands are not defined within an environment.nickd_1999 wrote:[…] Any help gratefully appreciated. […]
Best regards and welcome on Board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10