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
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
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: 10324
- 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: 10324
- 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