Text Formatting ⇒ Command to write "usual" text in LaTeX
Command to write "usual" text in LaTeX
Hi!
I wanna know which is the command to introduce text with displaymaths or $'s without LaTeX compile them, like in a tutorial or manual of LaTeX. I was searching it in internet but I didn't know how to search it correctly so I ask here.
Sorry for bothering you.
I wanna know which is the command to introduce text with displaymaths or $'s without LaTeX compile them, like in a tutorial or manual of LaTeX. I was searching it in internet but I didn't know how to search it correctly so I ask here.
Sorry for bothering you.
Last edited by GenisToii on Wed Jan 04, 2012 3:20 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Command to write "usual" text in LaTeX
You can do this very simple with the verbatim environment and the \verb command for short in-line code snippets.
There are packages which enhance typesetting of verbatim text.
For more elaborated typesetting of source code for arbitrary programming languages (including LaTeX) with syntax highlighting there are advanced packages.
For details about the capabilities of the packages refer to the corresponding manuals.
Thorsten
There are packages which enhance typesetting of verbatim text.
For more elaborated typesetting of source code for arbitrary programming languages (including LaTeX) with syntax highlighting there are advanced packages.
For details about the capabilities of the packages refer to the corresponding manuals.
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Command to write "usual" text in LaTeX
Hi,
you could use \verb, such as
or the verbatim environment for longer texts.
For writing LaTeX code as demonstration, especially if you would like to have syntax highlighting, you could use the showexpl package, or more generally the listings package.
Stefan
you could use \verb, such as
Code: Select all
\verb|$\sqrt{2}$|
For writing LaTeX code as demonstration, especially if you would like to have syntax highlighting, you could use the showexpl package, or more generally the listings package.
Stefan
LaTeX.org admin
Re: Command to write "usual" text in LaTeX
Thanks for the answers but, there's someone that doesn't need that I do the separations in the text?
Because with verbatim enviroment (I use it cause of its a longer text) I have to press enter to separate the text. If there's another possibility please tell me.
Because with verbatim enviroment (I use it cause of its a longer text) I have to press enter to separate the text. If there's another possibility please tell me.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Command to write "usual" text in LaTeX
Submit a proper minimal example to give us an adequate problem description.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Command to write "usual" text in LaTeX
Sorry for answering so late. here it's the example:
If you see that text, nearly each line had need a [enter] because if I didn't write it the line continues until the infinity and, when I convert it to pdf, the line is cut by the end of the page.
I would like to know how can I write this in verbatim wihtout pressing [enter] in each long text line.
Thanks
Code: Select all
\begin{verbatim}
\no\underline{Sumes inferiors i superiors de Riemann}
\vspace{11pt}
\no Sigui $f\colon[a,b]\Rightarrow\mathbb{R},$ una funció acotada i $P=\{x_0,x_1,x_2,...,
x_n\}$ amb $a=x_0<x_1<x_2<...<x_n=b,$ definim com:
\begin{itemize}
\item \textit{Suma superior de la funció $f$ associada a la partició arbitraria $P$}.
Expressada algebraicament com S(f,P), és el valor obtingut per:
\bd
S(f,P) = \sum_{k=1}^{n}M_k(x_k-x_{k-1})
\ed
\no En que $M_k=\sup$ $\{f(x),x\in I_k\},$ que significa que $M_k$ correspon al
valor de $f(x)$ més elevat de tots els valors possibles obtinguts a partir dels
diferents valors de $x$ en el subinterval $I_k$.
\end{itemize}
\end{verbatim}
I would like to know how can I write this in verbatim wihtout pressing [enter] in each long text line.
Thanks
Last edited by GenisToii on Tue Jan 03, 2012 1:49 pm, edited 2 times in total.
Re: Command to write "usual" text in LaTeX
I have also tryed spverbatim, moreverb, fancyvrb and listing packages but always there are errors and any one lets me to break too long lines of verbatim enviroment...
Help please
Help please
Re: Command to write "usual" text in LaTeX
It had been solved. I had the both packages (verbatim and spverbatim) and it makes the errors, now it's ok.