I just started using LaTeX and I have a problem including this in my file:
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
is there some kind of a "de-specialized" environment?
I just started using LaTeX and I have a problem including this in my file:
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
is there some kind of a "de-specialized" environment?
You have many special symbols in your line of text. These special symbols mean something in LaTeX like any other programming language. So, you should take care when writing these symbols, e.g., \ precedes macros in LaTeX, $ means begin math mode, {,} are used to group expressions, etc.
There is also the \verb| ... | macro or its environment \begin{verbatim} ... \end{verbatim} if you don't mind using the typewriter typeface.
Also, you can add
\makeatletter
\def\verbatim@font{\normalfont}
\makeatother
and use the same font within \verb too.
\documentclass{article}
\makeatletter
\def\verbatim@font{\normalfont}
\makeatother
\begin{document}
X5O!P\%@AP[4\textbackslash PZX54(P\textasciicircum)7CC)7\}\$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!\$H+H*
\verb|X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*|
\end{document}
Package url:
\documentclass{article}
\usepackage{url}
\DeclareUrlCommand\despecialized{\urlstyle{same}}
\begin{document}
\despecialized|X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*|
\end{document}
Use the listings package to include literal content. The vertical bar | after \lstinline is the delimiter of the literal content. It mustn't appear among the characters in your string.
\documentclass{article}
\usepackage{listings}
\begin{document}
\lstinline|X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*|
\end{document}
\verb|X5O!P%@AP[4\PZ...$H+H*|? – egreg Mar 28 '16 at 13:03