Cambie de números de estilo antiguo a números de línea en el entorno de números de línea de lineno

Cambie de números de estilo antiguo a números de línea en el entorno de números de línea de lineno

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 linenode \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}

ingrese la descripción de la imagen aquí

Respuesta1

Para cambiar simplemente los números, utilice el fontspeccomando \addfontfeatures{Numbers={Lining, Monospaced}}(consulte la sección 10.3 de lafontspecmanual). (Probablemente ni siquiera necesites especificar Monospaced, pero no está de más especificarlo) \normalfonty \rmfamilytampoco 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}

producción

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}

información relacionada