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

I'm using the eco package to get oldstyle numbers in my manuscript, but I'm trying to get the section numbers (in the mainmatter and the table of contents as well) to be "newstyle numbers" (ie. lining figures) and having a tough time with it.

Can anyone shed some light on the matter please?

PS: It would be nice to get lining figures in the table and figure numbers as well.

Edit: posting a mwe below (regarding doncherry's suggestion).










share|improve this question
Welcome to TeX.SE!. Could you give a MWE that illustrates the problem including the \documentclass so that those trying to help don't have to recreate it. – cmhughes Oct 18 '11 at 16:54
Done! Sorry, didn't realize at first. – mpr Oct 18 '11 at 18:49
You can upload the picture (via the button) and remove the ! from the beginning of the line. Then a higher-rep user will edit the post to display the picture. – doncherry Oct 18 '11 at 18:57
up vote 3 down vote accepted

Change the font back to Computer Modern (cmr) for the relevant counters, similarly as eco's \newstylenumbers{} does:







% setting the counters to higher values just to see some more digits




\section{Section 9876543210}


\subsection{Subsection 9876543210}


\subsubsection{Subsubsection 9876543210}

The page numbers are still in old style figures, I couldn't change them, you didn't ask for that either. Numbers within section (etc.) titles and captions are still in osf as well.


There's no need to redefine more than the highest level you're using, the changed font will be used throughout the sectionlevel number, you just need to get rid of the extra { and }, which form a group, limiting the scope of the changed font. Also, notice how they're all just a single number in your example, but should be like ""? Just get rid of all redefinitions except chapter (and table and figure of course). Furthermore, the page numbers won't get pushed to the side if you put in an actual title and not an unknown and awkwardly long word like "One-One-One-One-One-One-One". Replacing the dashes -- with spaces is sufficient:








    \chapter{One One}
      \section{One One One}
        \subsection{One One One One}
          \subsubsection{One One One One One}
            \paragraph{One One One One One One}
              \subparagraph{One One One One One One One}
              \subparagraph{One One One One One One Two}
              \subparagraph{One One One One One One Three}
            \paragraph{One One One One One Two}
              \subparagraph{One One One One One Two One}
              \subparagraph{One One One One One Two Two}
              \subparagraph{One One One One One Two Three}


If the titles get longer than that, they'll be broken into several lines, but you might want to consider using a short title for the ToC then, using \section[short title for ToC and header]{long title for the place in the paper where it actually appears}.

share|improve this answer
Thanks! This does get new style numerals on the section headings and the table of contents, but it also messes up the toc's spacing between the section number and the section title. (I can't seem to figure how to post a code excerpt here, sorry :( ) – mpr Oct 18 '11 at 18:09
It's new style numerals for the numbers (1, 1.1, 1.1.1), but not for the titles (9876543210). In this example, the spacing doesn't seem messed up; are you loading any other packages, a different document class or changing anything else that might have an influence here? If you want to post more than a few words of code, it's probably best to edit your question and to put it at its bottom. – doncherry Oct 18 '11 at 18:39
(original question edited) :) – mpr Oct 18 '11 at 18:48
BTW, yes, it was indeed like that: lining figures for the "automatic" part of the sectioning, the section title's "text" is of no consequence. – mpr Oct 18 '11 at 18:52
It's lining ("new style") figures for the automatic numbering, old style figures for everything else. – mpr Oct 18 '11 at 19:21

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.