auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] subfiles, private macros, scan the master file


From: Uwe Brauer
Subject: Re: [AUCTeX-devel] subfiles, private macros, scan the master file
Date: Mon, 07 Nov 2016 09:52:59 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

    > Hi Uwe,
    > 2016-11-02 9:34 GMT+01:00 Uwe Brauer <address@hidden>:

    > Sorry, I don't know the subfiles class, so I don't completely
    > understand what you're asking.  You would like to run the Emacs style
    > file associated to "main.tex" but not make "main.tex" the
    > `TeX-master'?

Right I attach below a latex solution of my problem.


    > This is possible with a subfiles style files which
    > takes care of running "main.tex"'s hook (the name of the file is
    > available in `LaTeX-provided-class-options' variable).

Excellent, thanks,
I just run describe-variable in the file: file1.tex
and it returned

LaTeX-provided-class-options is a variable defined in ‘latex.el’.
Its value is (("subfiles" "main.tex"))
Local in buffer file1.tex; global value is nil

Which seems to be what I needed. I try to hack something up and report
back


Uwe 

Here comes my Latex solution of my problem

Main.tex

\documentclass[12pt]{article}
\usepackage{subfiles}
\usepackage{mypub}
\newif\ifusepkg
\usepkgfalse
\begin{document}
\subfile{file1.tex}
\end{document}


file1.tex

\documentclass[main.tex]{subfiles}

\ifusepkg
\usepackage{mypub}
\fi
\begin{document}
Text
\end{document}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]