3

Thanks a lot for the help in advance. This might be a stupid question, or a potential overkill for this kind of forum, but the situation is as follows:

I'm writing my dissertation and - of course - my university would like the file printed differently for the anonymous copy, as compared to the bound ones, as compared to the electronic copy (and frankly, I have my own style to use for my personal copy).

I am looking for an easy way to produce 3 runs of the same file, with 3 different options on each. Such options include line spacing, and the use of packages such as chngcntr and fancyheadr

Each of the PDFs should be named differently, like:

  1. Dissertation-for_submission.pdf
  2. Dissertation-for_binding.pdf
  3. Dissertation-personal.pdf

Thank you for your help anyway.

  • Welcome to TeX.SX! Well, I had to do the same like you. In my case I created 2 copies of the main file (submission) and I rename the copies and edited them to get the versions I need. The trick is to keep most of the packages and identical settings before making copies. And afterward make appropriate modifications in each case. The different name also helps to not mix and confuse them. – Aradnix Sep 11 '14 at 20:50
  • 1
    Thanks, Aradnix! This sounds logical and would have been by Option B – Orestes Adamou Sep 11 '14 at 20:59
  • 2
    @Aradnix Better to use wrappers around a main file so that you only make corrections to one copy (at least in the vast majority of cases). – cfr Sep 12 '14 at 00:23
  • I have not learned that technique, but I will read your answer, thanks. – Aradnix Sep 12 '14 at 00:30

1 Answers1

7

I would set up one wrapper .tex file for each variant. This should contain only those things from the preamble which you need to change. Everything else goes in the main .tex file so that you do not need to worry about keeping things in sync when you make modifications to the content. Then \input the main file.

For example:

%% diss-1.tex
\documentclass[10pt]{book}
\usepackage[scale=.8,a5paper]{geometry}
\input{diss-main}

will provide the (slightly bizarre) A5 version.

%%diss-2.tex
\documentclass[12pt]{book}
\usepackage[scale=.8,a4paper]{geometry}
\input{diss-main}

will get you the standard 12pt version on A4.

%%diss-3.tex
\documentclass[11pt]{book}
\usepackage[scale=.75,a4paper]{geometry}
\input{diss-main}

will get you a smaller font with larger margins.

%% diss-main.tex
\usepackage[utf8]{inputenc}
\usepackage{cfr-lm}
\author{Me}
\title{My Dissertation}
\begin{document}
The purpose of this project is to explain why I am right.
\include{ch1}
\end{document}

contains the structure of the project.

%% ch1.tex 
\chapter{My Rightness}

has the first chapter. You keep everything you can in the chapter files and the main file to avoid duplicating work and introducing inconsistencies. Don't rely on remembering to make corrections to every copy in the same way. Make sure you don't need to.

To compile, you compile the relevant one of diss-1.tex, diss-2.tex etc. This then pulls in diss-main.tex which draws in the chapters.

cfr
  • 198,882