Document ClassesRe: Octavo package does not recognise \tableofcontents

Information and discussion about specific document classes and how to create your own document classes.
User avatar
skanda
Posts: 28
Joined: Sat May 16, 2009 6:32 pm

Re: Octavo package does not recognise \tableofcontents

Post by skanda »

Dear group,
I am trying to use the octavo package, which is itself based on the standard book class for formatting my document. I have MikTeX 2.76 installed on an XP Pro SP3 box.

Code: Select all

\documentclass[crown ,10pt ,draft]{octavo}
\usepackage{lettrine}                 %% dropped capitals;start of chap.
\usepackage[british, english]{babel}  %% Regional settings
\usepackage{hyperref}
\usepackage{newcent}
\usepackage[Glenn]{fncychap} % Glenn, Conny, Bjornstrup
...
\title{Looney Tunes on LP}
\author{Disko Ramen Veggie Noodles}
\date{2009}

\begin{document}
\frontmatter
\pagenumbering{roman}              %% pagenumbers: i, ii, iii, ...
\cleardoublepage                   %% Extra blank page
\cleardoublepage
\maketitle  
\tableofcontents	
\cleardoublepage              %% Extra blank page
\cleardoublepage
\chapter*{Preface}
\mainmatter
\pagenumbering{arabic}              %% pagenumbers: i, ii, iii, ...
\chapter{My First chapter}
......................
My problem is this: LaTeX issues the following error:

Code: Select all

! Undefined control sequence.
\@mkboth ...nguage {\languagename }}\def \bbl@arg
                           {#1}\ifx \bbl@arg \@empty ...
l.89 \tableofcontents

?
I have searched this forum and found a similar discussion about another document class here, but the problem was more towards babel setting.

View topic: Undefined control sequence \frontmatter

I have used the same setting as shown here before and all was well. Until now, that is...

I have been looking at this for all day now... What am I doing wrong here? Any pointer will be greatly appreciated.

Thanks in advance,
Skanda.

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

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: Octavo package does not recognise \tableofcontents

Post by Stefan Kottwitz »

Hi Skanda,

welcome to the board!
There might be a problem with \maketitle. Do you need a title page? Perhaps try the titlepage option of octavo:

Code: Select all

\documentclass[crown,10pt,draft,titlepage]{octavo}
Stefan
LaTeX.org admin
User avatar
skanda
Posts: 28
Joined: Sat May 16, 2009 6:32 pm

Re: Octavo package does not recognise \tableofcontents

Post by skanda »

Stefan_K wrote:Hi Skanda,
welcome to the board! There might be a problem with \maketitle. Do you need a title page?
Hello Stefan_K,
Thank you for replying. I appreciate it. Sorry, I ought to have mentioned: I did want a customised title and according to octavo manual
(no)titlepage: Contrary to the book class, the production
of a title page is not encouraged: the
default is therefore notitlepage. If you do wish
to have a titlepage, you still have to issue the
\maketitle command in your text.
So, I kept my class invocation simple and decided to add a \maketitle as per the document reccommendation posted above. Alas! :( tripped at the very start of the race :(
Perhaps try the titlepage option of octavo:

Code: Select all

\documentclass[crown,10pt,draft,titlepage]{octavo}
Had tried that one previously as well, but no joy! :( It was a very productive "guinea-pig-on-wheel" day for me today....Try this, try that, take this out, add this in... :x back to square one again :x !! :(.

Oh well, if something else strikes you, that would be appreciated also. I think some sleep might oil the cells a little. I will check up tomorrow morning...

But group,
please post any reccommendations that people might have on this topic.

Thanks once again,
Skanda.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: Octavo package does not recognise \tableofcontents

Post by Stefan Kottwitz »

Hi Skanda,

the titlepage option removed the error when I was testing your example code.

But your example shows a different error to me:

Code: Select all

! Undefined control sequence.
\reserved@c ->\HyOrg@maketitle 
                               \Hy@maketitle@end 
l.17     \tableofcontents
That's why I've used the titlepage option that solved it. I could suggest another way but perhaps we are speaking about different code because your minimal example is not complete what could explain the different error messages.

Btw. \bbl@arg is defined in babel.def.

Stefan
LaTeX.org admin
User avatar
skanda
Posts: 28
Joined: Sat May 16, 2009 6:32 pm

Re: Octavo package does not recognise \tableofcontents

Post by skanda »

Hello again,
Stefan_K wrote: the titlepage option removed the error when I was testing your example code. But your example shows a different error to me:

Code: Select all

! Undefined control sequence.
\reserved@c ->\HyOrg@maketitle 
                               \Hy@maketitle@end 
l.17     \tableofcontents
Whoa, This is just getting weirder! I stopped getting this error about 2 hours ago! And it is making an apprearance on your PC!

Once again, when I ran the MWE at my end (titlepage enabled, \maketitle on/commented), the above error does not appear. The first error I posted is the only error that I get on my machine. Dear, oh dear! :o

Do you need some more input from me? If I comment the ToC and maketitle, LaTeX runs and produces the output.... It is just those two in conjunction with this package that is causing the problems. Thanks for that tidbit on babel :) . I know now.

Best,
Skanda.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: Octavo package does not recognise \tableofcontents

Post by Stefan Kottwitz »

skanda wrote: Do you need some more input from me?
Yes ;) just some code that's producing that error mentioned in the first posting. If I'm able to reproduce that error I could fix it perhaps.

Stefan
LaTeX.org admin
User avatar
skanda
Posts: 28
Joined: Sat May 16, 2009 6:32 pm

Re: Octavo package does not recognise \tableofcontents

Post by skanda »

Dear Stefan_K,
Thanks for your patience. One more MWE, coming up now. :)

Code: Select all

    \documentclass[crown ,10pt ,titlepage, draft]{octavo}
    \usepackage{lettrine}                 %% dropped capitals;start of chap.
    \usepackage[british, english]{babel}  %% Regional settings
    \usepackage{hyperref}
    \usepackage{newcent}
    \usepackage[Glenn]{fncychap} % Glenn, Conny, Bjornstrup
    \title{Looney Tunes on LP}
    \author{Disko Ramen Veggie Noodles}
    \date{2009}

    \begin{document}
    \frontmatter
    \pagenumbering{roman}              %% pagenumbers: i, ii, iii, ...
    \cleardoublepage                   %% Extra blank page
    \cleardoublepage
    \maketitle 
    \tableofcontents   
    \cleardoublepage              %% Extra blank page
    \cleardoublepage
    
    \chapter*{Preface}
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    
    \mainmatter
    \pagenumbering{arabic}              %% pagenumbers: i, ii, iii, ...
    \chapter{My First chapter}
    
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    \end{document}

Remove the titlepage and you get the error,

Code: Select all

! Undefined control sequence.
\reserved@c ->\HyOrg@maketitle
                               \Hy@maketitle@end
l.17     \tableofcontents
YaY!! :(

Adding the titlepage directive back into the class invocation, returns the behaviour back to

Code: Select all

! Undefined control sequence.
\@mkboth ...nguage {\languagename }}\def \bbl@arg
                          {#1}\ifx \bbl@arg \@empty ...
l.17     \tableofcontents

YaY!! once more :( ...

This is getting almost surreal.
I think this time I am going to well and truly hit the sack for good. Oh the Horror, the horror!! ;)

Thanks a lot for staying on with the problem.
Best,
Skanda.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: Octavo package does not recognise \tableofcontents

Post by Stefan Kottwitz »

There could be a problem with \@mkboth in your version of babel. You could consider to update it, but perhaps try this small workaround first:
Instead of just

Code: Select all

\usepackage[british, english]{babel}
write

Code: Select all

\makeatletter
\let\std@mkboth\@mkboth
\usepackage[british, english]{babel}  %% Regional settings
\let\@mkboth\std@mkboth
\makeatother
I cannot test it because on my system the error doesn't occur.

Stefan
LaTeX.org admin
User avatar
skanda
Posts: 28
Joined: Sat May 16, 2009 6:32 pm

Re: Octavo package does not recognise \tableofcontents

Post by skanda »

Hello Stefan_K,
I simply could'nt leave the PC. Curiosity did keep the Cat awake ;)
Stefan_K wrote:There could be a problem with \@mkboth in your version of babel. You could consider to update it, but perhaps try this small workaround first:
Guess what? Here's the output:

Code: Select all

! TeX capacity exceeded, sorry [input stack size=5000].
\@currentlabelname ->\contentsname
            \@mkboth {\MakeUppercase \contentsname } ...
l.22     \tableofcontents
Output written on mwe.dvi (2 pages, 2176 bytes).
Oh,... and that "Output written" is misleading. There is no text in the dvi file.

Your other reccommendation about updating babel. Should I simply copy the latest babel package from CTAN and overwrite it? Your input is kindly solicited in this matter. :)

Thanks again.
Suresh.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: Octavo package does not recognise \tableofcontents

Post by Stefan Kottwitz »

For the update of babel use your package manager. With MiKTeX click Start/ MiKTeX/ Browse Packages, with TeX Live use the tlmgr program.

Perhaps you will have to rebuild the format files afterwards, you can find information here: Updating babel.

Stefan
LaTeX.org admin
Post Reply