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.