[ Previous  |  Next ]     [ Up  |  First  |  Last ]     (Article 7 of 8)

preprocessor.pp

These are comment lines:
Here you can use any variables, that are recognized by preprocessor_subs.pl.
'>>> followed by some post-preprocessing command' is optional.

Here we have something:
%#UPDATEON: OFFICEPC42 "$SPC_PATH\thesis.tex" >>> winedt.exe "[UpdateFile(|$SPC_PATH\thesis.tex|)]"
%#UPDATE: "$SPC_PATH\chapter1.tex" >>> winedt.exe "[UpdateFile(|$SPC_PATH\chapter1.tex|)]"
--%#UPDATE: "$SPC_PATH\chapter2.tex" >>> winedt.exe "[UpdateFile(|$SPC_PATH\chapter2.tex|)]"
%#WRITEPP: "$SPC_PATH\chapter2 .tex" In case, we rather not UPDATE chapter2.tex, but WRITEPP chapter2_pp.tex, we can simply change the syntax in any way so that that entry will be ignored by PreProcessor. In this case don't forget to include chapter2_pp.tex in the main file (eg. thesis.tex) instead of chapter2.tex. So that inverse and forward search would work and point to chapter2.tex and not to chapter2_pp.tex, we need to configure WinEdt and Yap accordingly. We need the post-preprocessing commands in the above example so that the given files would appear updated in the editor as well. Otherwise we could overwrite the updated versions when saving them next time within WinEdt. thesis.tex %#DEFON= ""s⁄input\{\w(.+%#input)⁄input\{$ENV_WORKDRIVE$1⁄g"" %#DEFON= ""s⁄bibliographystyle\{\w(.+%#biblio)⁄bibliographystyle\{$ENV_WORKDRIVE$1⁄"" \input{B:⁄Work⁄LaTex⁄include_general.tex}%#input \input{B:⁄Work⁄LaTex⁄include_math_tools.tex}%#input \bibliographystyle{B:⁄Work⁄LaTex⁄mybst}%#biblio chapter1.tex %#VAR_HEIGHT=""259pt"" %#VAR_TRIM=""15"" %#VAR_CAPTION=""Long description about lots of figures which appear on several pages with the same caption. %2nd line of the long description."" %#DEF 1 = ""s⁄(\\includegraphics$height=).*?(,trim=).*?( 0 0 0$.+?%#M1)⁄$1$VAR_HEIGHT$2$VAR_TRIM$3⁄g""
\includegraphics[height=259pt,trim=15 0 0 0]{some_figure.eps}}%#M1

%#DEF 2 = ""s⁄(%#&\n\\caption\{\\small )[^&]*?(\}%#M2)⁄$1$VAR_CAPTION$2⁄sg"" %#& \caption{\small Long description about lots of figures which appear on several pages with the same caption. 2nd line of the long description.}%#M2 \includegraphics[height=259pt,trim=15 0 0 0]{some_figure.eps}}%#M1 %#& \caption{\small Long description about lots of figures which appear on several pages with the same caption. 2nd line of the long description.}%#M2 \includegraphics[height=259pt,trim=15 0 0 0]{some_figure.eps}}%#M1 %#& \caption{\small Long description about lots of figures which appear on several pages with the same caption. 2nd line of the long description.}%#M2 ... %#VAR_VS1=""3mm"" %#DEF 3 = ""s⁄(\\vspace\*\{)\w+?(\}%#M3)⁄$1$VAR_VS1$2⁄g""

\vspace*{3mm}%#M3

\vspace*{3mm}%#M3

...

chapter2.tex >> ...

%#VAR_HEIGHT=""259pt""
%#VAR_TRIM=""15""

\includegraphics[height=$VAR_HEIGHT,trim=$VAR_TRIM 0 0 0]{some_figure.eps}}

\includegraphics[height=$VAR_HEIGHT,trim=$VAR_TRIM 0 0 0]{some_figure.eps}}

...

... >> chapter2_pp.tex

%#VAR_HEIGHT=""259pt""
%#VAR_TRIM=""15""

\includegraphics[height=259pt,trim=15 0 0 0]{some_figure.eps}}

\includegraphics[height=259pt,trim=15 0 0 0]{some_figure.eps}}

...