TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It is my first experience with LaTeX. This may be some sort of dummy question. But anyway. I've spend a day with TeXLive on Fedora. And here is the problem. I have some file 1:

\usepackage{vit} % it's my own vit.sty file 






and a second file which is my "own" style vit.sty:

\definecolor{vit_black100}{cmyk}{0.0, 0.0, 0.0, 1}
\definecolor{vit_gray90}{cmyk}{0.0, 0.0, 0.0, 0.90} %can be used as background color
\definecolor{vit_gray70}{cmyk}{0.0, 0.0, 0.0, 0.70} %can be used as background color
\definecolor{vit_gray5}{cmyk}{0.0, 0.0, 0.0, 0.05} %can be used as background color
\definecolor{vit_snow}{cmyk}{0.0, 0.0, 0.0, 0.0} %can be used as background color
\definecolor{vit_whiteshadow}{cmyk}{0.50, 0.0, 0.0, 0.33}
\definecolor{vit_whitecolor}{cmyk}{0.25, 0.0, 0.0, 0.10}
\definecolor{vit_yolkshadow}{cmyk}{0.0, 0.60, 1, 0.10}
\definecolor{vit_yolkcolor}{cmyk}{0.0, 0.10, 1, 0}

    [{\color{vit_whitecolor}\titlerule[2.5pt]} 123]

and LaTeX returns the following error:

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h
ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma
rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, 
kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk,
 polish, portuguese, romanian, romansh, russian, sanskrit, serbian, serbianc, s
lovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian, 
welsh, loaded.
Document Class: book 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2012/texmf-dist/tex/latex/base/bk10.clo)) (./vit.sty
Package: vmargin 2004/07/15 V2.5 set document margins (VK)
) (/usr/local/texlive/2012/texmf-dist/tex/latex/tools/indentfirst.sty)
! Undefined control sequence.
\reserved@c ...abelfalse \fi \ifnum \ttll@chapter 
                                                  >\c@secnumdepth \ttl@label...
l.13 \chapter{
share|improve this question
Why do you have the [loadonly] option to titlesec? If you remove that it compiles. – Peter Grill Oct 27 '12 at 19:29
I'd suggest you make your Minimal Working Example more minimal; Try removing some of the other packages you have, until only your package is left. Also remove things such as sloppy: Basically, you want the minimum amount of code possible, so we can tell that the problem is what you think it is, and no somewhere else in the code. – Canageek Oct 27 '12 at 19:31
I suggest you not to use vmargin, but geometry for setting the page parameters; for instance, vmargin is not compatible with pdfpages and other packages. – egreg Oct 28 '12 at 14:28
up vote 16 down vote accepted

Remove the loadonly option for titlesec; i.e., instead of




in vit.sty. If you use the loadonly option, you will have to define the sectional unit formatting from scratch, and according to your definition for \titleformat{\chapter} you are not willing to do that.

You also need to make the following modifications to \titleformat{\chapter}:

  • You were using \textcolor{vit_whiteshadow} but \textcolor requires two arguments, so I changed it to \color{vit_whiteshadow}.

  • Since you are using \MakeTextLowercase, you need the textcase package; by the way, do you really need \MakeTextLowecase for \thesection?

  • You are using \spacedlowsmallcaps which is not a standard LaTeX command, so you also need to load the package providing this command if you want to use it; however, the only package I know that provides this command is classicthesis and loading this package will totally change your layout which might not be what you want; if you want to use this command on its own, you could copy the definition of \spacedlowsmallcaps from classicthesis.sty.

share|improve this answer
thank you! I seems works. But here is another problem: Package titlesec Error: Entered in horizontal mode. If you'll send me to google I won't be offended :) – dmigous Oct 27 '12 at 20:39
@dmigous I updated my answer with some explanatory comments. – Gonzalo Medina Oct 27 '12 at 21:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.