Text Formatting ⇒ how to enter backslash (\) in your text
how to enter backslash (\) in your text
I want my pdf file to display the following line.
Blah blah \n blaah
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
how to enter backslash (\) in your text
the answer depends on the font that you want to use to display \n; some options
Code: Select all
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
% monospaced font
\verb+\n+
% monospaced font
\texttt{\symbol{92}n}
% monospaced font; requires T1 encoding
\texttt{\textbackslash n}
% current font
\textbackslash n
\end{document}