4

I'm trying to print the vertical bar symbol in text mode, but I can't use the | symbol itself. What is the right command for this? Please, don't suggest to use \rule, since I need the standard symbol in the current font.

7
  • 1
    Curiosity: your keyboard doesn't have the key |?
    – Sigur
    Jun 29, 2023 at 18:20
  • Or when you type |, it renders as -? Why can't you use the | symbol itself?
    – Teepeemm
    Jun 29, 2023 at 18:21
  • Yes, the keyboard is broken :)
    – yegor256
    Jun 29, 2023 at 18:22
  • 1
    \textbar right?
    – mbert
    Jun 29, 2023 at 18:28
  • 2
    Note: detexify correctly identifies \textbar.
    – Sandy G
    Jun 29, 2023 at 18:38

1 Answer 1

9

The command to produce a | is \textbar. See lttextcomp.dtx in source2e. Note this works even in OT1 encoding, where | produces a horizontal bar

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .