3

Possible Duplicate:
How does one insert a backslash or a tilde into LaTeX?

I wonder how I can typeset in LaTeX this text: @Data.test~

I mean, I want to have in the end "To display the data we use token @Data.test~." I searched symbols documentation, but only found \textasciitilde, which was not what I wanted. And no command for using @ in the text except \MVAt, but it is displayed in bold.

Thank you!

Oleksandr
  • 967
  • Not a direct answer but an idea : \makeatletter @\makeatother\relax Data.test\textasciitilde – percusse Jun 13 '12 at 09:18
  • @percusse You can use @ directly: contrary to what people tend to think, it is not 'special' in document-level material. – Joseph Wright Jun 13 '12 at 09:20
  • 1
    @percusse You don't need \makeatletter to print a @. Use simply the symbol itself. \makeatletter is only needed when you want @ in a command name. – Ulrike Fischer Jun 13 '12 at 09:22
  • @JosephWright Yes, but I remember breaking down some macro (can't remember what it was) with it though. Maybe it was because of something else. – percusse Jun 13 '12 at 09:22
  • Aha, OK, @ works. But \textasciitilde puts tilde too high, not in the middle of the line. It looks like the tilde is above some empty character. – Oleksandr Jun 13 '12 at 09:29
  • @Oleksandr see the link I've given in the first comment. – topskip Jun 13 '12 at 09:29
  • for tilde, use $\sim$ – Vivi Jun 13 '12 at 09:37
  • Also, for better looking @, you do \usepackage{marvosym} and \MVAt. Found using http://detexify.kirelabs.org/classify.html – Vivi Jun 13 '12 at 09:39
  • @Vivi this depends on the font. With newtxtext and newtxmath the best result is @Data.test\textasciitilde - $\sim$ and MVAt look very ugly in that context. – topskip Jun 13 '12 at 09:43
  • 1
    @joseph, ulrike: "@" used to have a special meaning in amstex (the plain tex predecessor of amslatex), and because of that there's actually a faq question about typing "@". the answer was slightly archaic in the first release of the faq (1994) but it's still there. perhaps oleksandr has been using tex a looooong time... – wasteofspace Jun 13 '12 at 09:44

1 Answers1

-1

Since this is probably either a command in some programming language or a file name, I think it makes more sense semantically to switch to a monospace font to typeset it.

With this modification, you can achieve the result you want with \verb|@Data.test~|. Or you can use the listings package and then \lstinline{@Data.test~}.