Menu

#72 Provide a komafont element `verbatim`

once upon a time
new-feature
nobody
2024-06-13
2024-06-13
mh113
No

The font to be used for verbatim environments (and for verb...) is stored in the LaTeX kernel command \verbatim@font (default is \normalfont\ttfamily). It would be convenient if this font could be set using the komafont mechanism, i.e. with \setkomafont or \addtokomafont. Would it be possible to provide a komafont element verbatim that sets \verbatim@font? (I. e. adding something like

\newcommand*\scr@fnt@verbatim{\verbatim@font}

to the class files, if I understand the implementation correctly).

Discussion

  • Markus Kohm

    Markus Kohm - 2024-06-13

    At first glance, the idea seems tempting. But:

    • The verbatim environment is not a KOMA-Script environment but a LaTeX kernel environment.
    • There are a lot of packages, that redefine verbatim. I'm not sure, that all of them use \verbatim@font. (To be true: I'm even sure, they do not).
    • For example fancyvrb uses AFAIK a font setting that cannot be easily reproduced with a single KOMA-Script font element.
    • Package verbatim has settings inside the definition of \verbatim@font, that are not font attributes, which are documented to be used with \setkomafont and \addkomafont.

    So such an element could even be confusing and therefore on closer inspection, however, I think the idea is less good.

     

    Last edit: Markus Kohm 2024-06-13
  • Markus Kohm

    Markus Kohm - 2024-06-13
    • labels: --> feature request, font elements
    • Milestone: KOMA-Script 3.42 --> once upon a time
     
  • Markus Kohm

    Markus Kohm - 2024-06-13
    • status: open --> new-feature
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.