LaTeX forum ⇒ Text Formattinghow to enter backslash (\) in your text

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
ghantauke
Posts: 9
Joined: Wed Mar 02, 2011 2:50 am

how to enter backslash (\) in your text

Postby ghantauke » Sun Mar 13, 2011 3:57 am

Hi,

I want my pdf file to display the following line.

Blah blah \n blaah
Last edited by ghantauke on Mon Mar 14, 2011 3:35 am, edited 1 time in total.

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

how to enter backslash (\) in your text

Postby gmedina » Sun Mar 13, 2011 4:09 am

Hi,

the answer depends on the font that you want to use to display \n; some options

\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}
1,1,2,3,5,8,13,21,34,55,89,144,233,...

ghantauke
Posts: 9
Joined: Wed Mar 02, 2011 2:50 am

how to enter backslash (\) in your text

Postby ghantauke » Mon Mar 14, 2011 3:35 am

\textbackslash n"

worked pefectly.

Many thanks to you. :)


Return to “Text Formatting”

Who is online

Users browsing this forum: Google [Bot] and 3 guests