General< and > become inverted ! and ? also in Verbatim - help!

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
R_vardavas
Posts: 2
Joined: Tue Aug 05, 2008 9:18 pm

< and > become inverted ! and ? also in Verbatim - help!

Post by R_vardavas »

it seems that when using LaTeX "plus, minus, and equal sign may be used in either text or math mode, but < and > are math mode only (they produce inverted exclamation and question marks, respectively, in text mode)."

fine but if i have to show some C code in TeX and i place the code within the Verbatim - this problem still occurs making the code very hard to read.

please - what is the solution to this??

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

< and > become inverted ! and ? also in Verbatim - help!

Post by Stefan Kottwitz »

Hi R_vardavas,

welcome to the board!
it should work with inline math: $<$ text $>$
With

Code: Select all

\usepackage[T1]{fontenc}
you could use < and > directly in the text.
Inside the verbatim environment < and > should behave as expected. Btw. consider to use the listings package for typesetting source code.

Stefan
LaTeX.org admin
R_vardavas
Posts: 2
Joined: Tue Aug 05, 2008 9:18 pm

Re: < and > become inverted ! and ? also in Verbatim - help!

Post by R_vardavas »

Great !!

Thank you Stefan - it works great now.

Raffaello.
Post Reply