Page LayoutRe: Page Numbers in Small Caps?

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
clockworkbutterfly
Posts: 4
Joined: Fri Jan 08, 2010 10:42 am

Re: Page Numbers in Small Caps?

Post by clockworkbutterfly »

I'm still a bit of a newbie to LaTeX, but hopefully this isn't that bad of a question.

All I want to do is alter the page numbering in my document so that all page numbers come out with small caps. I've found a way to do this with fancyhdr, but I'm wondering if there's a way to do it without an additional package. (Fancyhdr doesn't get along with a few alterations I'd like to keep.) In theory, I should be able to just \renewcommand{\thepage} or whichever command prints page numbers and alter it to either \textsc{} or \scshape itself. However, as I don't know what commands \thepage calls, I can't exactly alter it in terms of itself.

If it's easier, I'd even be fine with writing a command so that every time a number is printed, LaTeX prints it in small caps. Is there a way to do this? I briefly explored the ifthenelse package, but couldn't seem to make it do this.

Any ideas? If so, they'd be very much appreciated.

-- CB

Recommended reading 2024:

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

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

magicmoose
Posts: 90
Joined: Fri Nov 06, 2009 7:29 am

Re: Page Numbers in Small Caps?

Post by magicmoose »

Hi there,

I think \pagenumbering{Roman} in the preamble should do the trick (I know it's not small caps, but I think it's the best you will get without loading other packages)

Hope that helps
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Re: Page Numbers in Small Caps?

Post by meho_r »

Some fonts do have lowercase numbers, some not. Those that do have them usually have some optional parameter like "osf" or "oldstyle". For example, if you're using mathpazo (Palatino) font, use "osf" optional parameter (\usepackage[osf]{mathpazo}), and you'll automatically get lowercase numbers anywhere in document. So, check documentation of the font you're using and see if it has lowercase numbers and how to activate them.
clockworkbutterfly
Posts: 4
Joined: Fri Jan 08, 2010 10:42 am

Re: Page Numbers in Small Caps?

Post by clockworkbutterfly »

Thanks everyone. I did a fresh search this morning and actually stumbled upon the answer. All I needed was the following:
\setromanfont[Ligatures={Common},Numbers={OldStyle},Mapping=tex-text]{Adobe Caslon Pro}
\setmonofont[Ligatures={Common},Numbers={OldStyle},Mapping=tex-text]{Adobe Caslon Pro}
\setsansfont[Ligatures={Common},Numbers={OldStyle},Mapping=tex-text]{Adobe Caslon Pro}
\setmainfont[Ligatures={Common},Numbers={OldStyle},Mapping=tex-text]{Adobe Caslon Pro}
That should "OldStyle" all the numbers in my doc. I have to go back through and un-small-cap them though. I found it here, just in case anyone else has a similar question:
http://www.latex-community.org/forum/vi ... =48&t=6409

--CB
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Page Numbers in Small Caps?

Post by frabjous »

Those commands will only work if processing with XeLaTeX and the fontspec package. You should have mentioned that you were using XeLaTeX from the start.

You should not be using Caslon Pro as a sans or mono font, since it is a serif font, and the \setromanfont and \setmainfont commands are redundant.

\setmainfont[Ligatures={Common},Numbers={OldStyle},Mapping=tex-text]{Adobe Caslon Pro}

Should do it, or, IMHO, better:

\defaultfontfeatures{Mapping=tex-text,Numbers=OldStyle,Ligatures=Common}
\setmainfont{Adobe Caslon Pro}
clockworkbutterfly
Posts: 4
Joined: Fri Jan 08, 2010 10:42 am

Re: Page Numbers in Small Caps?

Post by clockworkbutterfly »

Thanks. I'm still a novice in the sense that I don't remember to give everyone the full scenario. I probably should've mentioned I was using fontspec, but I guess that once I started using it I never stopped, so it's sort of become a default package to use for me. My apologies, though. Thanks also for the corrections to the preamble -- I'll be sure to add them.

-- CB
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Page Numbers in Small Caps?

Post by localghost »

clockworkbutterfly wrote:[...] I probably should've mentioned I was using fontspec, but I guess that once I started using it I never stopped, so it's sort of become a default package to use for me. My apologies, though. [...]
That's the reason why you should provide a minimal working example (MWE) whenever you propose a question.


Best regards and welcome to the board
Thorsten
Post Reply