Hi folks,
I would like to insert the file name "nK_Gr9.5e4_ABBDI3_1" in latex, so that it is reproduced exactly. I get Error-Messages if I write it like this in TexnicCenter and i don´t want it as math-mode.
Can Anybody help me ?
Thank you very much, Philipp
Text Formatting ⇒ Insert file name "nK_Gr9.5e4_ABBDI3_1" in Latex
Insert file name "nK_Gr9.5e4_ABBDI3_1" in Latex
Hi,
use a verbatim environment or command:
use a verbatim environment or command:
Code: Select all
\documentclass{article}
\begin{document}
\verb$nK_Gr9.5e4_ABBDI3_1$
\end{document}
Re: Insert file name "nK_Gr9.5e4_ABBDI3_1" in Latex
Thank you phi,
Is there a possibility that the name appears in the same font as the rest of the text ?
Is there a possibility that the name appears in the same font as the rest of the text ?
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Insert file name "nK_Gr9.5e4_ABBDI3_1" in Latex
Hi Philipp,
you could use \_ for the underscore symbol:
Stefan
you could use \_ for the underscore symbol:
Code: Select all
nK\_Gr9.5e4\_ABBDI3\_1
LaTeX.org admin
Re: Insert file name "nK_Gr9.5e4_ABBDI3_1" in Latex
Thank you Stefan,
that´s exactly what I was looking for.
that´s exactly what I was looking for.
Last edited by felipoc on Sun Dec 28, 2008 11:58 pm, edited 1 time in total.
Insert file name "nK_Gr9.5e4_ABBDI3_1" in Latex
felipoc wrote:Is there a possibility that the name appears in the same font as the rest of the text ?
Code: Select all
\detokenize{....}
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Insert file name "nK_Gr9.5e4_ABBDI3_1" in Latex
Hi phi,
just two remarks, I think \detokenize requires eTeX, but that would probably be used. With OT1 encoding the result might not be as expected, but with T1 encoding (and eTeX) \detokenize should work well with this example, so it's a good recommendation, that macro can also be useful to solve more problems (toc etc.).
Stefan
just two remarks, I think \detokenize requires eTeX, but that would probably be used. With OT1 encoding the result might not be as expected, but with T1 encoding (and eTeX) \detokenize should work well with this example, so it's a good recommendation, that macro can also be useful to solve more problems (toc etc.).
Stefan
LaTeX.org admin