# Parentheses and square brackets contextually in small caps

In a book publication I use references in parentheses with an open type font. The references are set in small caps (both letters and numbers):

% xelatex xetex 0.9999 texlive 2013 windows
\documentclass{scrbook}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX,
Numbers=OldStyle,
]{TeX Gyre Pagella}  % to be replaced by a font which supports small caps brackets
\begin{document}

Text (\textsc{ref.} 1.1) text.

\end{document}


I would like the parentheses (round or square) around the reference to be set into small caps contextually. What would be the usual way how to do it in latex? Thank you in advance.

Update: The font I use for the publication does support alternate "small caps" brackets, but I still search for a convenient contextual way how to set it so in latex contextually without having to reformat the references:

-
Welcome to TeX.SX! As far as I can tell, parentheses have the same size in small caps. –  egreg Apr 8 '14 at 10:22
Not a recommendation, but I had a problem similar: with Latin Modern, the numbers are not “small” and don't fit well with lowercase small caps. My “wrong solution”: scale all down (easy wit l3tl from LaTeX3). May be, as a last option (if you don't find a font that suit your needs), you can make a latex command to scale all. –  Manuel Apr 8 '14 at 12:09
@egreg -- "small caps" usually means "caps and small caps", with the regular caps the same size as the comparable roman font. hence it's logical that the punctuation be the "normal" size, even if it looks out of place sometimes. take a look at this discussion in typophile: "Apostrophe in Small Caps". –  barbara beeton Apr 8 '14 at 12:39
@barbarabeeton I know the reason why parentheses are full height also in small caps fonts. Good typography is also choosing the right fonts (shape/weight/whatnot) according to what the document needs. In this case, I would recommend not using small caps or avoiding the parentheses for this particular usage. –  egreg Apr 8 '14 at 14:26
Well, TeX is not clairvoyant, so it can't know whether a ( is followed by text in small caps. How do you get the short parentheses? –  egreg Apr 8 '14 at 17:55

The discussion at github.com/wspr/fontspec/issues/166 is relevant to this question.

By all means avoid the suggestion to create a macro with \small, just as you would avoid faked small caps. The font itself needs to provide small cap parentheses.

I’ve just tested several dozen fonts, mostly commercial.

Most with the case feature use it to produce parentheses which are no smaller than normal, but which sit higher; such parentheses are appropriate around capitals, because they aren’t embracing non-existent descenders, but they’re inappropriate around small caps.

Of the fonts with small cap parentheses, most require no special handling. Simply ensure that the parentheses are inside the \textsc{}. For example,

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Cartier Book Pro}
\begin{document}
Text (\textsc{ref.}~1.1) text.

Text \textsc{(ref.~1.1)} text.
\end{document}


Other fonts which behave similarly are Agmena Pro, Albertan Pro, Augustin, Calluna, Le Monde Livre Classic, Livory, and Maiola PE. Numbers will be affected as well if a font has small cap figures (e.g., Jannon 10 Pro and Neacademia Latin).

Some fonts require turning on the c2sc feature. Here I’ve defined a macro, \ucsc{} (for “uppercase small caps”) to make that easier:

\documentclass{article}
\usepackage{fontspec}
\setmainfont[Contextuals=Alternate,Numbers=OldStyle]{Junicode}

In short, inspect each font closely. And it’s probably a good idea to check whether each behaves as before whenever you update fontspec.