Text Formatting ⇒ Text without Command
Text without Command
I'm interesting next question: How paste in file tex format code block, which save initial view (command will't processed by compiler).
For example I have code:
%\int_{-\infty}^{\infty} dx \exp(-x^2) = \sqrt{\pi}.
And I want that % and other symbols no processed by compiler and in pdf i see:
%\int_{-\infty}^{\infty} dx \exp(-x^2) = \sqrt{\pi}.
May be there is anything block or library for it?
Or I have one way use /% replace % ?
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10362
- Joined: Mon Mar 10, 2008 9:44 pm
Text without Command
welcome to the board!
You could use the command
\verb
, such asCode: Select all
\documentclass{article}
\begin{document}
Example:
\verb|%\int_{-\infty}^{\infty} dx \exp(-x^2) = \sqrt{\pi}.|
\end{document}
{verbatim}
environment:Code: Select all
\documentclass{article}
\begin{document}
Example:
\begin{verbatim}
%\int_{-\infty}^{\infty} dx \exp(-x^2) = \sqrt{\pi}.
\end{verbatim}
\end{document}
Text without Command
And how i can disable non processing input in the block begin{verbatim} end{verbatim}?
If i want use usual format of tex? There is else from:
Code: Select all
/begin{verbatim}
text input
/end{verbatim}
usual text in tex
/begin{verbatim}
text input
/end{verbatim}
- Stefan Kottwitz
- Site Admin
- Posts: 10362
- Joined: Mon Mar 10, 2008 9:44 pm
Text without Command
verbatim
environment so that input is normally processed by TeX.Btw. commands begin with a backslash
\
, not a slash /
.Stefan