# LaTeX template for book reading?

Is there any LaTeX template such that in each section I can write down my reading notes ......?

-
This is a very vague question. Would you care to elaborate on your requirements? –  qubyte Dec 18 '11 at 4:34
So I could take notes and know which page on the book this note is related to. –  user10130 Dec 18 '11 at 4:37

The best method for class notes was developed by E.W. Djikstra and hung in his office for many years.1 In his memory here is a short hack to produce notes, in his style, using the LaTeX standard book class. It is a bit rough around the edges but can give you an idea for further development.

\documentclass{book}
\usepackage{lipsum}
\makeatletter
\pagestyle{plain}
%% Redefine chapter
\vspace*{10\p@}%
{\parindent \z@ \centering \reset@font
{\huge\hfill\hfill \bfseries EWD-\thechapter \\
\hfill\hfill\huge \bfseries #1\par\nobreak}
\par\nobreak
\vspace*{2\p@}%
\vskip 100\p@
}}

\begin{document}
\chapter{The Real Numbers}
\lipsum[1-2]
\chapter{The Imaginary Numbers}
\section{Test section}
\lipsum[1-2]
\end{document}


1 In his office Edsger had a pencil dangling from a string with a sign pointing to it saying "Word Processor" (See vanenmden).

-

As note-taking is something very personal and you are not very specific about what you want, there are very many possibilities one could suggest, but here is what one could do:

\documentclass{article}

\usepackage{xcolor}
\usepackage{xspace}

\newcommand{\mypage}[1]{{\color{blue}(see p.~#1)}\xspace}
\newcommand{\mycomment}[1]{{\color{red}-- #1}\xspace}

\begin{document}

This is a summary of some part of the book~\mypage{1}; then, the author says this and that~\mypage{2--3}.~\mycomment{He is wrong, check this other book for an explanation.}

The next section describes something very interesting~\mypage{5}~\mycomment{NB!}, and the following one has very beautiful tables~\mypage{6}.

\end{document}


It simply typesets your text (which is meant to be a summary of the book), the page number where you give it ("see p. x", in blue and in parentheses), and the personal comments you might want to add (in red, introduced by an en-dash) – I find it better to distinguish between the "objective" from the "subjective" part in my own note-taking.

Then, I suppose any template could be improved by using an existing class or package to typeset the whole thing better, for instance by including a full reference to the book you are reading, somewhere in the header – so as to avoid mixing up the notes if you don't pin the pages together. I am thinking, for instance, on a customised version of the grid package. For an example of how to modify it (though it is not specifically for reading notes in that case), you could check this post by Gonzalo Medina.

-

The question is vague, and therefore a specific solution via a template is probably not available. Here is one way, by virtue of a minimal working example, of "[taking] notes and [knowing] which page [...] the note is related to".

\documentclass{article}
\newcounter{mynote}% Phantom counter
\newcommand{\mymark}[1]{\refstepcounter{mynote}\label{#1}}% Marker
\newcommand{\myref}[1]{\pageref{#1}}% Page reference
\begin{document}
\section{First section}
Here is some text. \mymark{interesting1}

\noindent \textbf{Notes:} Remember to check out page~\myref{interesting2}.

\clearpage

\section{Second section}
Here is some text that is even more interesting. \mymark{interesting2}

\noindent \textbf{Notes:} It may also be interesting to reread everything on page~\myref{interesting1}.
\end{document}


The "phantom counter" mynote is merely used to mark a location in your document for referencing purposes. \mymark{<label>} is used to mark the location with a label <label>. Then, \myref{<label>} references the page that <label> is on. Since this technique uses labels, you need to compile at least twice in order for the references to "settle."

If hyperlinks are required, it would be easy to include the hyperref package, which also provides \phantomsection; a macro providing a similar functionality to my "phantom counter."

-

I'm not entirely sure I've understood the question, but it sounds like you want a package that enables you to keep track of notes, similar to 'to do notes'.

If so, then there are a lot of packages that can help, for example

• pdfcomment
• todo
• fixme

Some good sample uses of these packages (and others) are demonstrated in the following posts:

Of course, if you just want something simple, then you can make your own, something like the following which writes the page reference into the margin, and also puts it in the \jobname.log file in case you want to search/grep it later.

\documentclass{article}
\usepackage{xcolor}
\usepackage{lipsum}

\newcommand{\mypageref}[1]
{%
\marginpar{\color{red} \framebox{See page #1}}%
\typeout{MYPAGEREF: #1^^J}%
}

\begin{document}

\lipsum[1]
\mypageref{19}

\lipsum[2]
\mypageref{24}

\end{document}

-