Some LaTeX Tweaks…

Here are some \LaTeX tweaks I used to prepare a template for one of our lab reports recently. Most of the help was received from http://tex.stackexchange.com/.

Adding more columns to the index page than the default ‘Chapter No.- Chapter Name- Page’

\documentclass[10pt,letterpaper]{article}
\usepackage{lipsum,titletoc}

\titlecontents{section}
[0em]
{}
{}
{}
{\titlerule*[0.5em]{.}\contentspage}

\begin{document}

 \noindent\begin{minipage}[c]{0.7\textwidth}
\renewcommand{\contentsname}{\Large \centerline{CONTENTS}}
\tableofcontents

\addtocontents{toc}{\textbf{No.}\hspace{2cm}\textbf{Experiment}~\hfill\textbf{Page}\par}

\end{minipage}
%
\hspace{0.05\textwidth}
%
\begin{minipage}[c]{0.2\textwidth}
\begin{tabular}{lr}
\textbf{Date} & \textbf{Signature} \\[1em]

\end{tabular}
\vspace{3.02in}  %adjust this to align date & sign in the contents page
\end{minipage}$

Putting a Border Around Each Page

\begin{document}
\fancypage{%
\setlength{\fboxsep}{10pt}\doublebox}{}

Preventing \chapter{} from beginning on a new page

\makeatletter
 \patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}
 \makeatother

\begin{document}
.......................
Advertisements
Tagged

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: