help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to use a common file containing all required package details?


From: Jorge A. Alfaro-Murillo
Subject: Re: How to use a common file containing all required package details?
Date: Tue, 05 May 2015 14:07:08 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Sharon Kimble writes:

I'm trying to have one common file containing all my preamble for a latex document up to \begin{document}, which will appear as - --8<---------------cut here---------------start------------->8--- \documentclass[a4paper,12pt]{report} %% works \input{/home/boudiccas/research/masterlatex} \include{ob2014-title} \begin{document} --8<---------------cut here---------------end--------------->8--- Doing this will mean that I only have one file to keep current of all package changes but will be able to be used for all my latex projects. It works and loads it, 'it' being "masterlatex.tex", but when it reaches the end of "masterlatex" it stops at \documentclass just before "masterlatex" being loaded and goes no further. How can I get it to continue please, and load the rest of the project main file, and ultimately build a pdf?

What are you using? Plain emacs? For LaTeX you certainly want to install AUCTeX: M-x package-install<ENTER>auctex<ENTER>

This gives you, among many other things, the ability to define in each document which file is the master file.

That said, the way you describe it, makes me think that you have a call to documentclass twice, which would be a mistake. What you call masterlatex.tex is not really the master file, but the file with your options, and should not have any call to documentclass or begin{document}, just your LaTeX preamble.

Or is there a existing package that will allow me to list all the packages I want to use, along with the required options?

AUCTeX, check the variable LaTeX-default-options.

Best,

--
Jorge.




reply via email to

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