Text Formattingminitoc problem: You can't use '\unpenalty' in vertical mod

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
alicehs
Posts: 18
Joined: Sun Jan 25, 2009 3:53 pm

minitoc problem: You can't use '\unpenalty' in vertical mod

Post by alicehs »

I am using the following usepackage to produce mini tables of contents at the beginning of each of my sections:

Code: Select all

...
\usepackage{minitoc}
...

%(then at the beginning of the section from the main document:)
\section{Section 4}	
						\label{s:secfour} 								
\input{sections/sectionfour.tex}
...

%(then in the file sectionfour.tex:)

\secttoc

\clearpage
%===============================================
\subsection*{Overview}
\addcontentsline{toc}{subsection}{Overview}
...
I have no problems with the first 3 sections, but the one above (the fourth), I recieve the following warning:

Code: Select all

! You can't use '\unpenalty' in vertical mode.
\mtc@BRR -> \unpenalty
\nopagebreak [4]
1.13
Any ideas why? I can't find any reference to similar errors anywhere. And how I can fix it? If I skip the warning, it still compiles properly, its just annoying...

Thanks.

Recommended reading 2024:

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

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

marco_d
Posts: 57
Joined: Tue Jan 20, 2009 7:49 pm

Re: \minitoc problem

Post by marco_d »

Hello,

the same problem. You should create a minimal example. Only in this way it is possible for us to see the error respectively the problem.

regards
Marco
i am German. I can not use difficult words. :-)
alicehs
Posts: 18
Joined: Sun Jan 25, 2009 3:53 pm

Re: \minitoc problem

Post by alicehs »

Thanks for the replies,

Sorry, I do remember reading something about minimal examples (or minimal working examples? MWEs??), but I can't seem to find the guide again and have not done it before. Could you maybe point me in the right direction...?

(This problem is really bugging me and I can't for the life of me see why its happening. Grr...)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

minitoc problem: You can't use '\unpenalty' in vertical mod

Post by localghost »

There exist several resources which describe the process of building a MWE [1,2]. The choice is up to you. I suggest to put these pages into the bookmarks of your browser. Working with LaTeX you will need them frequently.


[1] Creating a LaTeX Minimal Example
[2] What is a minimal working example?


Best regards
Thorsten¹
alicehs
Posts: 18
Joined: Sun Jan 25, 2009 3:53 pm

Re: \minitoc problem

Post by alicehs »

Thank you,
As a prime example of why MWEs are good, I managed to solve this problem whist compiling it...
Still not fixed the other one, but will give it a bit more work before I post again.

Thank you thank you.
Am always eager to learn new things.
Post Reply