Изменение номеров старого стиля на номера подкладки в среде linenumbers lineno

Изменение номеров старого стиля на номера подкладки в среде linenumbers lineno

Я использую в своем документе номера старого стиля, но предпочитаю линейные номера в моих средах нумерации строк ( linenoсреда \linenumbers). Как мне это реализовать (не меняя шрифт)?

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

введите описание изображения здесь

решение1

Чтобы просто изменить цифры, используйте fontspecкоманду \addfontfeatures{Numbers={Lining, Monospaced}}(см. раздел 10.3fontspecруководство). (Возможно, вам даже не нужно указывать Monospaced, но это не повредит.) \normalfontи \rmfamilyтакже не являются необходимыми.

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

выход

решение2

Для пользователей шрифта Type 1 (pdflatex) подойдет следующее:

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

Связанный контент