Document ClassesSetting Book Counter and Language

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
MCon
Posts: 1
Joined: Sun Mar 03, 2013 1:35 pm

Setting Book Counter and Language

Post by MCon »

Hi,

I'm using memoir to typeset a trilogy of fiction books.

I am typesetting them separately (three independent .tex files). I am actually machine generating the LaTeX source with a custom program, but this should not matter here.

I am unable to grasp how to correctly use the \book command.

Obviously I must manually set the book number (at least for second and third book).

I tried using \setcounter{book}{2}\book{Mondo Antico}, but LaTeX always prints "Book I".

This is wrong twice: It should be the second book and it should be localized to Italian; I would like to get something like "Libro II".

What is the right spell?

TiA
Mauro


My current full prologue (if useful) is:

Code: Select all

\documentclass[12pt,ebook,italian,onecolumn,twoside,titlepage,extrafontsizes,draft]{memoir}
\usepackage[italian]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ucs}
\usepackage{makeidx}
\usepackage{quotmark}
\usepackage{verbatim}
\usepackage{ifdraft}
\usepackage[final]{microtype}
% God quoting
\newcommand{\gqt}[1]{\tqt{\scshape #1}}
% Scene separator command
\newcommand{\stars}{\begin{center} * * *\\ \end{center}}
% Set default font families
\usepackage{pslatex}
% Eliminate completely header (longer text)
\addtolength{\textheight}{\headheight}
\setheadfoot{0pt}{\footskip}
\addtolength{\textheight}{\headsep}
\setheaderspaces{*}{0pt}{*}
% Define a new pagestyle called 'my'
\makepagestyle{my}
\makeevenfoot{my}{\thepage}{}{}
\makeoddfoot{my}{}{}{\thepage}
%
\author{Mauro Condarelli}
\title{Mondo Antico}
\begin{document}
%
\frontmatter
\maketitle
%
\mainmatter
\chapterstyle{companion}
\setcounter{secnumdepth}{0}
\pagestyle{my}
\isopage
\setcounter{book}{2}
\book{Mondo Antico}
%
\chapter*{Le Cascate del Rin}
\addcontentsline{toc}{chapter}{Le Cascate del Rin}
%
%scene: 'Sui monti Thun'
\ifdraft{\subsubsection*{Sui monti Thun}}

Minz assisteva alla caduta di Vadym e Jona seguiva la Bussola verso nord, verso i monti Thun. Si trattava di montagne relativamente basse e arrotondate, coperte di boschi. Qui 

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Setting Book Counter and Language

Post by cgnieder »

Welcome to the LaTeX community.

If I run your (far from minimal) example I get what I expected:
book.png
book.png (6.87 KiB) Viewed 3673 times
The name »Book« is hard-coded into »memoir« and does not recognize »babel«. You can redefine it easily, though:

Code: Select all

\renewcommand*\bookname{Libro}
Regards
site moderator & package author
Post Reply