With pdflatex, I used the cfr-lm package with following settings:


When using lualatex, I am using the following one

\setmainfont{Latin Modern Roman}
\setsansfont{Latin Modern Sans}
\setmonofont{Latin Modern Mono}

Now, each letter of the monospaced font has the same width. However, I like the variable=true feature. How can I active it at setmonofont?

! LaTeX error: "kernel/key-unknown"
! The key 'fontspec-opentype/Variable' is unknown and is being ignored.

As suggested by the table on page 8 of the cfr-lm documentation, what you’re looking for is Latin Modern Mono Prop, a set of fonts, not a feature of the better known Latin Modern Mono fonts. So you can use it this way:

\setmonofont{Latin Modern Mono Prop}[Numbers=OldStyle]
\texttt{This is Latin Modern Mono Prop, a proportional typewriter font.}


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.