# Tag Info

## Hot answers tagged liningnums

5

You can define a new font family for the text mode (here in green): \documentclass{scrreprt} \usepackage{siunitx} \sisetup{% number-text-rm=\unitnumberfont, detect-mode, }% \usepackage{unicode-math} \setmainfont[Numbers=OldStyle,Color=2244FF]{TeX Gyre Pagella} \newfontfamily\unitnumberfont{TeX Gyre Pagella Math}[Color=...

4

The commands \textlf and \lfstyle are for you. Unfortunately they are not documented in file newpxdoc.pdf. \documentclass{article} \usepackage[osf]{newpxtext} \begin{document} Hello, world! These are old-style figures: 123 But I would like these to be lining figures: \textlf{123} {\lfstyle 456}. \end{document}

4

Don't use enumitem with beamer. You don't need it anyway, as using beamers font mechanism is sufficient. % !TeX TS-program = xelatex \documentclass{beamer} \usepackage{fontspec} \setbeamerfont{itemize/enumerate body}{family={\fontspec[Variant=1]{Zapfino}}} \setbeamerfont{enumerate item}{family={\fontspec[Variant=1]{Zapfino}}} \setbeamerfont{enumerate ...

4

You can disable the pnum feature when the label is being created: \documentclass{article} \usepackage{fontspec} \usepackage{gb4e} \usepackage{etoolbox} \makeatletter \patchcmd{\@exe} {(\thexnumi)} {(\addfontfeatures{RawFeature=-pnum}\thexnumi)} {}{} \makeatother \setmainfont[Numbers = {OldStyle, Proportional}]{Linux Libertine O} \exewidth{(9)} % ...

3

It is strange that you do not mention looking at the documentation for newtxmath, which includes detailed instructions for using lining figures for maths and hanging for text, when Babel is used. Unfortunately, they appear to be applicable only if the newtxtext fonts are used, although the documentation doesn't actually say so. So the most straightforward ...

3

It works with pdflatex, but not with (Lua|Xe)LaTeX, due to a bug in libertine.sty that resets the font family, instead of adding the required features when doing \liningnums. \documentclass{article} \usepackage{iftex} \usepackage[oldstyle,proportional]{libertine} \DeclareTextFontCommand\textsb{\libertineSB} \iftutex % XeLaTeX or LuaLaTeX \...

2

Robert Bringhurst combines small caps and old style figures in his Elements of Typographic Style. He also notes, that small caps should be letter spaced by 5-10%. You can do that by using \textls from microtype: \newcommand*{\abbr}[1]{% % Format abbreviations as small capitals \textls[50]{\textsc{\MakeLowercase{#1}}}% } Your table in Bringhurst's ...

2

I think all you need to do is specify mode=text as the optional argument to \SI. E.g., \SI[mode=text]{1234567890}{\meter} Same for the \num macro -- \num[mode=text]{12345} -- if it's used in text mode. Addendum to address the OP's follow-up comments: If it's a burden to have to specify the optional argument [mode=text] of the \SI and \num directives ...

2

citeindex sends the author name and title to the index (with \index), but your document has no setup for an index, so that macro won't do anything useful for you. You can find its definition in biblatex.def (ll. 2305-2309 in v3.14). The original definition of \supercite in your setup (if you don't pass any style options to biblatex that is equivalent to ...

2

You can just manually change the relevant LaTeX macros: There are two parts: We begin with \textsuperscript. It is defined by default as \DeclareRobustCommand*\textsuperscript[1]{% \@textsuperscript{\selectfont#1}} We want to use lining numbers, so we have to add \liningnums{...}. We can omit \selectfont because \liningnums will set the font anyway: \...

2

You should add this line in your preamble: \renewcommand{\thesidenote}{\textsuperscript*{\liningmainfont\arabic{sidenote}}} It instructs your engine to typeset the sidenote counter using the lining numbers. So a MWE will look like \documentclass{article} \usepackage{fontspec} \usepackage{sidenotes} \usepackage{realscripts} \setmainfont[Numbers=...

2

The command your looking for is called \classicstylenums: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[oldstylenums]{kpfonts} \begin{document} Numbers 123456789 are oldstyle. BUT \classicstylenums{123456789} SHOULD BE NEWSTYLE! \end{document}

1

Does this fit your needs? (mostly copied from [Fischer (2010)]) \documentclass{article} \usepackage[sfdefault]{merriweather} \usepackage{mathastext} \DeclareSymbolFont{numbers}{T1}{phv}{m}{n} \SetSymbolFont{numbers}{bold}{T1}{phv}{bx}{n} \DeclareMathSymbol{0}\mathalpha{numbers}{"30} \DeclareMathSymbol{1}\mathalpha{numbers}{"31} \DeclareMathSymbol{2}\...

1

This answer was shamelessly stolen from Alan Munn's answer in Lining numbers not working in certain fonts, and modified to the Merriweather font. Here, the numbers are replaced by Helvetica. Note that this does require you to use the macro \lining to set the font. It would therefore not change every number, which I believe is what you are asking. Here ...

Only top voted, non community-wiki answers of a minimum length are eligible