GeneralInserting text "as is"

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
matjaz
Posts: 2
Joined: Sat Sep 18, 2010 12:36 am

Inserting text "as is"

Post by matjaz »

Hi,
I have some text that i would like to see represented the way it is in my
document later.
In other words, i would like latex to not treat a part of my latex code as document-building instructions, but to display it as it was written.
Is there an environment that could achive that ?

Something like

Code: Select all

\begin{xxx}
<node BACKGROUND_COLOR="#0ea0f1" COLOR="#0033ff" TEXT="Child1-1">
\end{xxx}
would result in line
<node BACKGROUND_COLOR="#0ea0f1" COLOR="#0033ff" TEXT="Child1-1">
in my document.

I do not wish to manually check if every character inside environment xxx
is perhaps a control character that needs to be escaped (_ to \_).

Thanks
matjaz

Recommended reading 2024:

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

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

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Inserting text "as is"

Post by frabjous »

I think you're looking for this:

Code: Select all

\begin{verbatim}
<node BACKGROUND_COLOR="#0ea0f1" COLOR="#0033ff" TEXT="Child1-1">
\end{verbatim}
But for even more options and more power, check out the listings package.
matjaz
Posts: 2
Joined: Sat Sep 18, 2010 12:36 am

Re: Inserting text "as is"

Post by matjaz »

Hi,
thanks, that was exactly what i was looking for.
I, for some reason, could not find that environment with my google skils..

I have now found an explanation of similar environments that anybody with similar trouble could use (verbatim, verb, ...). I am including a link for future reference
http://en.wikibooks.org/wiki/LaTeX/Form ... Paragraphs

Thanks again
Matjaz
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Inserting text "as is"

Post by localghost »

Now that the problem is solved, please be so kind and mark the topic accordingly as clearly written in Section 3 of the Board Rules (to be read before posting). Otherwise tell us what is missing.


Best regards and welcome to the board
Thorsten
Post Reply