About
Shop
LaTeX
Software
Books
Gallery
News
Contact
Blog
Settings
Account
Latest news 2024-12-13: Ebook sale (12th December 2024 – 1st January 2025): cybercrime fiction short stories Unsocial Media and Smile for the Camera free; crime fiction short story The Briefcase free; short story noir crime fiction I’ve Heard the Mermaid Sing free; crime fiction novel The Private Enemy US$1.99; illustrated children’s story The Foolish Hedgehog US$0.99.

Exercise 12: Cross-Referencing (Solution)

This is the solution to Exercise 12.
\documentclass[11pt]{scrreprt}

\usepackage{datetime}

\title{A Simple Document}
\author{Me}

\begin{document}

\maketitle

\tableofcontents

\begin{abstract}
A brief document to
illustrate how to use \LaTeX.
\end{abstract}

\chapter{Introduction}
\label{ch:intro}

\section{The First Section}

This is a simple \LaTeX\ document.
Here is the first paragraph.
The next chapter is Chapter~\ref{ch:another}
and is on page~\pageref{ch:another}.
The next section is Section~\ref{sec:next}.

\section{The Next Section}
\label{sec:next}

Here is the second paragraph\footnote{with a footnote}. 
As you can see it's a rather short paragraph, but not 
as short as the previous one. This document was 
created on: \today\ at \currenttime.

\chapter{Another Chapter}
\label{ch:another}

Here's another very interesting chapter.
We're going to put a picture here later.
See Chapter~\ref{ch:intro} for an 
introduction.

\chapter*{Acknowledgements}

I would like to acknowledge all those
very helpful people who have assisted
me in my work.

\appendix
\chapter{Tables}

We will turn this tabular environment into a table later.

\begin{tabular}{lrr}
 & \multicolumn{2}{c}{\bfseries Expenditure}\\
 & \multicolumn{1}{c}{Year1} & \multicolumn{1}{c}{Year2}\\
\bfseries Travel & 100,000 & 110,000\\
\bfseries Equipment & 50,000 & 60,000
\end{tabular}

\end{document}
© 2012 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Cookies Site Map FAQs