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
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- 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