Generalusing \newcommand with \include

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
nickd_1999
Posts: 1
Joined: Sat Feb 09, 2008 8:42 pm

using \newcommand with \include

Post by nickd_1999 »

Hi,
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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

using \newcommand with \include

Post by localghost »

nickd_1999 wrote:[…] Any help gratefully appreciated. […]
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.


Best regards and welcome on Board
Thorsten
Post Reply