I'd like to print out two minus signs just after each other, like this -- (as in the C operator to subtract one). Doing --
gives one longer - sign. I've tried \char"2D\char"2D
but that also just gives one longer - sign. How can this be done?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this community
-{}-
, but maybe provide some more information about the context (math mode, verbatim, ...?)-
in text is a hyphen not a minus sign. In math,$--$
does not ligature to a dashlistings
orminted
, so--
wouldn't be a ligature any longer. BTW: Adding a minimal working example would help us to understand the question better and so to help you better.\lstdefinestyle
for larger blocks of code, but I've just changed the font when writing shorter snippets of code that resides within blocks of regular text. However,-{}-
did the trick for now.!=
,->
and the like.--
might be part of such a set of ligatures. In this case-{}-
would be a temporal workaround. A better way would probably be to disable the ligature in question. However, it depends on the font whether or not this is possible and, if yes, how to do this.