General ⇒ Is there a way of linking equations to a different tex file?
-
- Posts: 3
- Joined: Thu Oct 21, 2010 5:54 am
Is there a way of linking equations to a different tex file?
most of the time a model is an extension of an already existing one for which there is already a tex file with description. so, the equations describing a new model are equation from the old one + some extra stuff.
instead of just copying/pasting tex code, is there a way of creating a link (reference) to an equation in other tex file?
thanks
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
Re: Is there a way of linking equations to a different tex f
\newcommand{\codeA}{Here comes my code}.
The second option is that you define the different fragments in a dedicated files and include them with \input{codeA}.
There are also possibilities to do this with if-else statements, but it is rarely worth the effort.
-
- Posts: 3
- Joined: Thu Oct 21, 2010 5:54 am
Re: Is there a way of linking equations to a different tex f
i'm not sure though how to use a newcommand in file model2.tex that was defined in model1.tex?
Is there a way of linking equations to a different tex file?
-
- Posts: 3
- Joined: Thu Oct 21, 2010 5:54 am
Re: Is there a way of linking equations to a different tex f
looks like xr package only allows referencing from external files.
I think method using \input{..} would do the trick.