[texhax] Having trouble with roman numerals

Uwe Lueck uwe.lueck at web.de
Mon Jun 22 00:01:22 CEST 2015


On Friday, June 19, 15:28 +02:00, David Niklas wrote:
DN>>> Where should I put it, ideally?
UL>>  put *what*?
>
> \pagenumbering{roman}

\frontmatter issues \pagenumbering{roman}, so when you 
use \frontmatter AND \pagenumbering{roman}, the latter 
is issued twice.

> Currently I have three pages all called 1 in xdvi when
> I open my doc whereas when I open someone else's book,
> then the page numbering starts from i.

\pagenumbering also resets the page number counter.
The code that you posted originally

    http://tug.org/pipermail/texhax/2015-June/021726.html

had

> \frontmatter
> \pagenumbering{roman}

once.  This does NOT result in three pages numbered "1" 
by xdvi, as I see from latex.ltx and book.cls, I have also 
tested it (by [un]commenting) in the example code at the 
end of this posting (provided the latter will ever end).
The second line is only redundant here. 

However, with 

    \frontmatter
    \maketitle
    \pagenumbering{roman}
    Preface
    \mainmatter
    Chapter 1

the page number counter is reset to one three times, each 
time followed by material for a new page, so there are 
three pages with number one, and xdvi DOES offer three 
pages with number one to choose from -- provided \maketitle 
creates an own page, see below (otherwise, add \newpage
between \maketitle and \pagenumbering).

Your

> Where should I put it, ideally?

in 

    http://tug.org/pipermail/texhax/2015-June/021741.html    

was preceded by 

RK> the behavior you describe is carved into the \maketitle 
RK> macro.  This macro suppresses page numbers on the title
RK> page deliberately because they are not desired.

so I should have inferred that you asked where to put 
\maketitle, ideally, while practically, I have now been 
justified in suspecting that you did not reason about the 
meaning of "it".  More practically, surprising myself, 
inspection of book.cls reveals that the behaviour you 
describe is NOT carved into the \maketitle macro.  It is 
carved into the \titlepage macro instead.  The latter is 
used by the default option "titlepage" of the book class 
(and called by \maketitle then).  You can get around it 
by class option "notitlepage".  The justification for this 
may be is saving trees, as it allows you to start the preface 
or the TOC or so right below the book title.  In general, 
the philosophy of LaTeX has been NOT to give authors a chance 
to create typographically bad documents, but an author who 
knows internals and can hack them though can use LaTeX for 
awful typesetting.  In the present case, demonstrated by my 
example document code, even knowing the "notitlepage" option 
seems to suffice.  I don't know whether this can be read from 
any documentation (rather than from the code).  The background 
is that it is \thispagestyle{empty} in \titlepage that 
suppresses page numbers, while with class option "notitlepage" 
\maketitle only issues \thispagestyle{plain}, which suppresses 
headings but prints a page number in the foot line.

> Currently, I don't have a publisher, this is my fist book
> (horrors, another newbie!) So I just wanted on copyright
> statement, and I thought it best to place it under the 
> author and date in small print.

All of a sudden, I found how do this, using the "notitlepages"
option, falsifying

UL> If you are asking for a copyright statement on the title
UL> page or on each page of the book, I do not want to help you.

as in

    http://tug.org/pipermail/texhax/2015-June/021738.html

It is falsified by the example document code also thinking of 
draft printouts where it is very useful to indicate on every 
sheet to what book (or ... and author) it belongs.  I am 
working at a book project (without being the author) where 
I found Martin Schröders prelim2e.sty very helpful.  I hope 
you can guess from the example code how to adjust it to your 
needs.  It may also replace draftwatermark.sty.  Some code 
line indentations indicate that the lines may be commented 
out for alternative settings, to see what there effect is. 
I am attaching one PDF output, for one constellation of these 
options.

Cheers,

    Uwe.

-------------------------------------------------------------------

\ProvidesFile{bkrmnums.tex}[2015/06/21 (C) Roman Numerals]
\documentclass[
               notitlepage
              ,11pt,oneside,a4paper
             %,final                %% disable other draft features
               ]{book}
\newcommand*{\thedocumenttitle}  {Roman\ Numerals}
\newcommand*{\thedocumentauthor}{Romain\ Num\'eral}
\newcommand*{\thedocumentauthorshort}{R.~Num\'eral}
  \usepackage{prelim2e,color}
  \renewcommand*{\PrelimText}{%     %% modify prelim2e.sty
    \textcolor{blue}{\footnotesize
                     \textit{\thedocumenttitle}~--
                     draft~copy~\today, 
                     \textcopyright~\thedocumentauthorshort}}
  \usepackage[T1]{fontenc}          %% for \'e with hyperref
  \usepackage[pdfauthor=\thedocumentauthor,
              pdftitle=\thedocumenttitle]
             {hyperref}             %% PDF features
\begin{document}
  \author{\thedocumentauthor}
  \title {\thedocumenttitle}
  \frontmatter
% \pagenumbering{roman}             %% irrelevant
    \maketitle
    \centerline{\footnotesize
                \textcopyright~\thedocumentauthorshort}
    \newpage
% \pagenumbering{roman}             %% demonstrate reset
    \section*{Preface}
      Please read the book before reading the preface \dots
  \mainmatter
    \chapter{I and Me}  
      Am I a Roman numeral?
\end{document}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bkrmnums.pdf
Type: application/pdf
Size: 43559 bytes
Desc: not available
URL: <http://tug.org/pipermail/texhax/attachments/20150622/d4a53a50/attachment-0001.pdf>


More information about the texhax mailing list