Text Formatting ⇒ Insert file name "nK_Gr9.5e4_ABBDI3_1" in Latex
Insert file name "nK_Gr9.5e4_ABBDI3_1" in Latex
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
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
Insert file name "nK_Gr9.5e4_ABBDI3_1" in Latex
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
Is there a possibility that the name appears in the same font as the rest of the text ?
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Insert file name "nK_Gr9.5e4_ABBDI3_1" in Latex
you could use \_ for the underscore symbol:
Code: Select all
nK\_Gr9.5e4\_ABBDI3\_1
Re: Insert file name "nK_Gr9.5e4_ABBDI3_1" in Latex
that´s exactly what I was looking for.
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: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Insert file name "nK_Gr9.5e4_ABBDI3_1" in Latex
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