Here's the framework for an answer, based on @Ignasi's suggestion. Documentation for the combine
package (http://tug.ctan.org/tex-archive/macros/latex/contrib/combine/combine.pdf) will help you play with formatting, make the toc work, even generate an index and a table of figures.
The student gets two files, preamble.tex
(read only if possible) and template.tex
. She fills in the template, compiles it and submits it with a new name along with her image files (you have to establish the naming conventions).
The preamble:
% preamble.tex
% provided to students, read only
\documentclass[12pt,notitlepage]{article}
\usepackage{graphicx}
\newcommand{\theschool}{to be renewed}
\newcommand{\school}[1]{%
\renewcommand{\theschool}{#1}
}
\newcommand{\theteacher}{to be renewed}
\newcommand{\teacher}[1]{%
\renewcommand{\theteacher}{#1}
}
% hack the \date field of \maketitle
\date{School: \theschool{} -- Teacher: \theteacher{}}
\newcommand{\myfigure}[2]{%
\centering
\includegraphics[height=3cm]{#1}\\
Caption: #2
}
\begin{document}
\newcommand{\alldone}{\end{document}}
template.tex
, saved as plato.tex
:
% template for students to fill in
%
\input{preamble}
\author{Plato}
\title{The Republic}
\school{Athens}
\teacher{Socrates}
\maketitle
\begin{abstract}
\emph{The Republic} in one short paragraph \ldots
\end{abstract}
% first argument is image (.jpg, .png, .pdf)
% second argument is figure caption
\myfigure{therepublic}{Image from wikipedia}
\alldone
Compiles to

The wrapper is putittogether.tex
, in the directory with student submissions and an empty preamble.tex
. I compiled and tested it with a second saved template - code not included here.
% putittogether.tex
\documentclass[12pt]{combine}
% macros from the preamble seen by the students
\usepackage{graphicx}
\newcommand{\theschool}{to be renewed}
\newcommand{\school}[1]{%
\renewcommand{\theschool}{#1}
}
\newcommand{\theteacher}{to be renewed}
\newcommand{\teacher}[1]{%
\renewcommand{\theteacher}{#1}
}
\newcommand{\hackdate}{%
\date{School: \theschool{} -- Teacher: \theteacher{}}
}
\newcommand{\myfigure}[2]{%
\centering
\includegraphics[height=3cm]{#1}\\
Caption: #2
}
% The \date must be renewed between \imports
\newcommand{\goget}[1]{%
\hackdate{}\import{#1}
}
\newcommand{\alldone}{} % do nothing
% Combine package configuration
\title{All Together Now}
\author{many authors}
\date{\today}
\begin{document}
\pagestyle{combine} % use the combine page style
\maketitle % main title
\tableofcontents % main ToC
\clearpage
% The files to glue together - all in this directory,
% along with all graphics files required.
%
% Generate this list with a script, then \include it here.
\goget{plato}
\goget{vonneumann}
\end{document}
This was accomplished using a combination of the everypage
package and TikZ.



To build, run
pdflatex -recorder <file>
pdflatex <file>
The first run with -recorder
is to generate the files needed for the currfile
package (to automate the bottom left).
The second run is to sort out TikZ issues and to resolve labels used for the bottom right.
(Some odd behavior can be seen after the first run.)
And here is how you can use it:
\documentclass{wordreport}
\usepackage{mwe}
\address{123 Main St.}
{City, State}
{ZIP}
\phone{(777) 777-7777}
\fax{(777) 777-7777}
\webaddress{tex.stackexchange.com}
\title{TEST REPORT}
\preparedfor{--prepared--}
\poreference{--PO--}
\projectnumber{--project-number--}
\testreportnumber{--test-report-number--}
\logoimage{example-image-a}
\begin{document}
\lipsum[1-20]
\end{document}
The Class File
Since this is a Word template, it is appropriate to create a document class for it:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{wordreport}[2014/01/01 A domain-specific, Word-like report template]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\ProcessOptions*
\LoadClass{report}
\RequirePackage{tikz}
\usetikzlibrary{calc}
\RequirePackage[abspath]{currfile}
\RequirePackage{lastpage}
\RequirePackage{everypage}
\RequirePackage{marvosym}
\def\address#1#2#3{%
\gdef\@addressA{#1}%
\gdef\@addressB{#2}%
\gdef\@addressC{#3}}
\def\phone#1{%
\gdef\@phone{#1}}
\def\fax#1{%
\gdef\@fax{#1}}
\def\webaddress#1{%
\gdef\@webaddress{#1}}
\def\preparedfor#1{%
\gdef\@prepared@for{#1}}
\def\poreference#1{%
\gdef\@po@reference{#1}}
\def\projectnumber#1{%
\gdef\@project@number{#1}}
\def\testreportnumber#1{%
\gdef\@test@report@number{#1}}
\def\logoimage#1{%
\gdef\@logoimage{#1}}
\def\phonesymbol#1{%
\gdef\@symbol@phone{#1}}
\def\faxsymbol#1{%
\gdef\@symbol@fax{#1}}
\def\webaddresssymbol#1{%
\gdef\@symbol@webaddress{#1}}
\def\@symbol@phone{\Telefon}
\def\@symbol@fax{\Faxmachine}
\def\@symbol@webaddress{\Lightning}
\tikzset{
report blue/.style={
color=blue!50!white,
},
report gray/.style={
color=gray,
},
report frame/.style={
thick,
report blue,
},
}
\AddEverypageHook{%
\begin{tikzpicture}[remember picture, overlay]
\coordinate (top left) at ($ (current page.north west) + (1cm, -1cm) $);
\coordinate (top right) at ($ (current page.north east) + (-1cm, -1cm) $);
\coordinate (bottom left) at ($ (current page.south west) + (1cm, 1cm) $);
\coordinate (bottom right) at ($ (current page.south east) + (-1cm, 1cm) $);
%
\coordinate (frame top left) at ($ (top left) - (0, 2.5cm) $);
\coordinate (frame top right) at ($ (top right) - (0, 2.5cm) $);
\coordinate (frame bottom left) at ($ (bottom left) + (0, .5cm)$);
\coordinate (frame bottom right) at ($ (bottom right) + (0, .5cm)$);
%
\coordinate (frame title mid left) at ($ (frame top left) + (1cm, 0) $);
\coordinate (frame title mid right) at ($ (frame top right) + (-1cm, 0) $);
\coordinate (frame title top left) at ($ (frame title mid left) + (0, 3mm) $);
\coordinate (frame title top right) at ($ (frame title mid right) + (0, 3mm) $);
\coordinate (frame title bottom left) at ($ (frame title mid left) - (0, 10mm) $);
\coordinate (frame title bottom right) at ($ (frame title mid right) - (0, 10mm) $);
%
\node [opacity=0.5] at (top left) [below right]
{%
\includegraphics[width=2cm]{\@logoimage}%
};
\node [report blue] at ($ (top left) + (0cm, -1.9cm) $) [right]
{%
\sffamily TEST REPORT%
};
\node [report blue] at ($ (top right) + (3mm, -2mm) $) [below left]
{%
\sffamily
\footnotesize
\begin{tabular}{lcl}
Address Information. & \\[.5ex]
\@addressA & \@symbol@phone & \@phone \\ %marvosym
\@addressB & \@symbol@fax & \@fax \\ %marvosym
\@addressC & \@symbol@webaddress & \@webaddress
\end{tabular}
};
\node [opacity=0.5, report blue] at ($ (frame bottom left) - (3mm, 0) $) [below right]
{%
\begin{tabular}{l}
\sffamily
\footnotesize
COMPANY CONFIDENTIAL \\[-1ex]
\scriptsize\ttfamily
\currfileabspath
\end{tabular}
};
\node [opacity=0.5, report blue] at ($ (frame bottom right) + (2mm - 2pt, 0) $) [below left]
{%
\sffamily
\footnotesize
Page \thepage\ of \pageref{LastPage}
};
\node [report gray] at ($ (frame top right)!.5!(frame top left) $) [below]
{%
\sffamily
\@title
};
\node [report gray] at ($ (frame title bottom left) - (3mm, 0) $) [below right]
{%
\sffamily
\footnotesize
\begin{tabular}{rl}
Prepared for: & \@prepared@for \\
PO Reference: & \@po@reference
\end{tabular}
};
\node [report gray] at ($ (frame title bottom right) + (3mm, 0) $) [below left]
{%
\sffamily
\footnotesize
\begin{tabular}{rr}
Project Number: & \@project@number \\
Test Report Number: & \@test@report@number
\end{tabular}
};
%
\draw[report frame]
(frame bottom left) --
(frame bottom right);
\draw[report frame]
($ (frame bottom left) + (0cm, 1mm) $) --
(frame top left) --
(frame title mid left);
\draw[report frame]
($ (frame bottom right) + (0cm, 1mm) $) --
(frame top right) --
(frame title mid right);
\draw[report frame]
(frame title top left) rectangle (frame title bottom right);
\end{tikzpicture}
}
\pagestyle{empty}
\RequirePackage[top=5.5cm,
left=2cm,
right=2cm,
bottom=2cm]{geometry}
As successive edits to this question will CW it, see the gist for any future revisions.
Best Answer
The simplest way for modifying the phrase is to add a couple of lines to the
.tex
document.I'll take the example document as a basis, you find the change between self-explaining comments:
No other change is needed.
A problem with these templates is that they use the
vmargin
package, which may cause issues with other packages, notablypdfpages
. Another problem is the choice of colors.