Page Layout ⇒ Re: Page Numbers in Small Caps?
-
- Posts: 4
- Joined: Fri Jan 08, 2010 10:42 am
Re: Page Numbers in Small Caps?
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
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
NEW: TikZ book now 40% off at Amazon.com for a short time.
-
- Posts: 90
- Joined: Fri Nov 06, 2009 7:29 am
Re: Page Numbers in Small Caps?
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
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
Re: Page Numbers in Small Caps?
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.
-
- Posts: 4
- Joined: Fri Jan 08, 2010 10:42 am
Re: Page Numbers in Small Caps?
Thanks everyone. I did a fresh search this morning and actually stumbled upon the answer. All I needed was the following:
http://www.latex-community.org/forum/vi ... =48&t=6409
--CB
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:\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}
http://www.latex-community.org/forum/vi ... =48&t=6409
--CB
Re: Page Numbers in Small Caps?
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}
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}
-
- Posts: 4
- Joined: Fri Jan 08, 2010 10:42 am
Re: Page Numbers in Small Caps?
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
-- CB
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Page Numbers in Small Caps?
That's the reason why you should provide a minimal working example (MWE) whenever you propose a question.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. [...]
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10