Question: I work with many documents which I hope will have the same style throughout.. When making a decision about the design, I want that to be applied to all of the documents uniformly. I've created 1 file that has the start and ending code. Then, all of my other files just have the text, and some minimal code (defining things like chapters and sections). E.g.:

```
\documentclass{article}

\title{The First Document}
%\title{The Second Document}
%\title{The Third Document}

\begin{document}

    \input{document01}
    %\input{document02}
    %\input{document03}

\end{document}

```

To compile a different document, I just move the `%`'s to another line and run `pdflatex` on this file.

* Is there a better system for managing these?
* Can I put some details, such as the `\title` information in the beginning of each document (`document01.tex`, etc.)
* Is there any way to compile all of the documents at once as separate PDFs?

Answer: 
It is not necessary to include the `\title{<title>}` command in the main document preamble. That is, you might just as well include `\title{<title>}` as part of your `document?.tex` file2. As such, I have the following suggestion or sequence of steps:

1. Create your style by inserting everything into a style file, say `mystyle.sty`1. This should include everything that you need, like all the packages and formatting that you want to apply to your separate documents.
2. Create your documents using a common filename structure, like `document??.tex` where `??` represents some identifier that separates the document.
3. Write a script that cycles through `document??.tex` in the current folder, and executes

```
pdflatex \documentclass{article}\usepackage{mystyle}\begin{document}\input{<doc>}\end{document}

```

where `<doc>` is the current file being processed. The output of each processing will be stores in `article.pdf`, which you can then rename/move to `<doc>.pdf`. Since I am running Windows, here is a minimal batch file that would accomplish this:

```
@echo off
for /f %%a in ('dir /b document??.tex') do (
  echo %%a
  pdflatex \documentclass{article}\usepackage{mystyle}\begin{document}\input{%%a}\end{document}
  move /y article.pdf %%~na.pdf
)

```

The list of files being processed is given by `dir /b document??.tex`, where `??` represents a wildcard (anything). `/b` strips the `dir` command from the headers, footers and all other file-related contents, thereby only leaving the file name. The above script starts out by called the "currently processed file" `%%a`. Then it prints out the file name (`echo %%a`) and runs `pdflatex` on the following generic document structure:

```
\documentclass{article}
\usepackage{mystyle}% Your generic style file
\begin{document}
  \input{document??}
\end{document}

```

Finally, the `article.pdf` output is moved to `document??.pdf`. A similar approach could be followed on other operating systems.

This procedure would generalise your procedure of creating multiple documents at once3.

---

1 This somewhat addresses your first request.

2 This addresses your second request.

3 This addresses your third request.
Like Werner already wrote, you may put `\title{<title>}` into the document files itself instead of the preamble. If you are using, e.g. babel shorthand at the title, this is even a very good idea. Otherwise you'd have to activate the shorthand before the title and deactivate it after the title. So moving `\title{<title>}` (and `\author{<author>}`) after `\begin{document}` should be recommended.

Instead of creating a package (aka style) you can even create a wrapper class `myclass.cls`. To do so begin with:

```
\ProvideClass{myclass}[2011/11/07 v0.1 my first class]
\LoadClassWithOptions{article}

```

With this, your class is similar to article, because it simply loads class article with all the options given to your class. We call such a class *wrapper class*.

Now copy everything in the preamble of your document to `myclass.cls`. Next you should replace `\usepackage` by `\RequirePackage` at `myclass.cls`. And you should remove loading of the package `inputenc` because the encoding is not an attribute of a class but of a document. Because `inputenc` has been removed from your class you should make it 7-bit-clean. This means you should e.g. replace `ä` by `\"a`. Maybe `\RequirePackage[<language>]{babel}` should be removed from your class too. But if the class supports only the languages you've given as option there, this is not a must.

At last you should add `\endinput` at the end of the class file. This is not a must, but it's nice to have.

After this, all your files may be:

```
\documentclass{myclass}
\usepackage{selinput}
\SelectInputMappings{
  adieresis={ä},
  germandbls={ß},
  Euro={€},
}
\usepackage[english]{babel}% use every language you want
% You need nothing else, because everything else is at `myclass.cls`.
\begin{document}
  \title{Title <nr>}
  \maketitle
  Text of document <nr>% or \input{document<nr>}
\end{document}

```

I've used `selinput` instead of `inputenc`, because it's very nice even if you do not know the encoding of your editor.