Estoy usando números de estilo antiguo en mi documento, pero prefiero alinear números en mis entornos de numeración de líneas ( entorno lineno
de \linenumbers
). ¿Cómo puedo hacer cumplir esto (sin cambiar a otra fuente)?
\documentclass{article}
\usepackage{fontspec,lineno}
\setmainfont[Numbers=OldStyle]{Linux Libertine O}
\renewcommand\linenumberfont{\normalfont\scriptsize\rmfamily}
\begin{document}
\begin{linenumbers}
\noindent Continual delighted\linelabel{1stword} as elsewhere am convinced unfeeling. Introduced stimulated attachment no by projection. To loud lady whom my mile sold four. Need miss all four case fine age tell. He families my pleasant speaking it bringing\linelabel{2ndword} it thoughts. View busy dine oh in knew if even. Boy these along far own other equal old fanny charm. Difficulty invitation put introduced\linelabel{3rdword} see middletons nor preference.
\end{linenumbers}
\vspace{\baselineskip}
\noindent I like the words I find in line \lineref{1stword}, \lineref{2ndword}, and \lineref{3rdword}.
\end{document}
Respuesta1
Para cambiar simplemente los números, utilice el fontspec
comando \addfontfeatures{Numbers={Lining, Monospaced}}
(consulte la sección 10.3 de lafontspec
manual). (Probablemente ni siquiera necesites especificar Monospaced
, pero no está de más especificarlo) \normalfont
y \rmfamily
tampoco son necesarios.
\documentclass{article}
\usepackage{fontspec,lineno}
\setmainfont[Numbers=OldStyle]{Linux Libertine O}
\renewcommand{\linenumberfont}{\scriptsize\addfontfeatures{Numbers={Lining, Monospaced}}}
\begin{document}
\begin{linenumbers}
\noindent Continual delighted\linelabel{1stword} as elsewhere am convinced unfeeling.
Introduced stimulated attachment no by projection. To loud lady whom my mile sold
four. Need miss all four case fine age tell. He families my pleasant speaking it
bringing\linelabel{2ndword} it thoughts. View busy dine oh in knew if even. Boy these
along far own other equal old fanny charm. Difficulty invitation put
introduced\linelabel{3rdword} see middletons nor preference.
\end{linenumbers}
\vspace{\baselineskip}
\noindent I like the words I find in line \lineref{1stword}, \lineref{2ndword}, and
\lineref{3rdword}.
\end{document}
Respuesta2
Para usuarios de fuentes Tipo 1 (pdflatex), lo siguiente funcionaría:
\documentclass{article}
\usepackage[osf]{libertine}
\usepackage[T1]{fontenc}
\usepackage{lineno}
\renewcommand\linenumberfont{\fontfamily{LinuxLibertineT-TLF}\scriptsize\selectfont}
\begin{document}
\begin{linenumbers}
\noindent Continual delighted\linelabel{1stword} as elsewhere am convinced unfeeling. Introduced stimulated attachment no by projection. To loud lady whom my mile sold four. Need miss all four case fine age tell. He families my pleasant speaking it bringing\linelabel{2ndword} it thoughts. View busy dine oh in knew if even. Boy these along far own other equal old fanny charm. Difficulty invitation put introduced\linelabel{3rdword} see middletons nor preference.
\end{linenumbers}
\vspace{\baselineskip}
\noindent I like the words I find in line \lineref{1stword}, \lineref{2ndword}, and \lineref{3rdword}.
\end{document}