Text Formatting ⇒ Command to write "usual" text in LaTeX
Command to write "usual" text in LaTeX
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.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Command to write "usual" text in LaTeX
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
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
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
Re: Command to write "usual" text in LaTeX
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
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Command to write "usual" text in LaTeX
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
Re: Command to write "usual" text in LaTeX
Help please