Text FormattingEscape backslash character again

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
tjyang
Posts: 4
Joined: Wed Jul 14, 2010 12:12 am

Escape backslash character again

Post by tjyang »

Hi, All

I searched this forum and googled the keyword of escaping the backslash character.
So the answer is to use \textbackslash.

What I want to see in generated ps/pdf file is

C:\bbwin\trunk\Core\Agents>

my tex src is

c:\textbackslash bbwin \textbackslash trunk\textbackslash Core\textbackslash Agents>

But after the rendering into PDF using pdflatex, I am getting following

C:\ bbwin\ trunk\ Core\ Agents>


There is a space character after the slash character.

Any pointer ?

Thanks for your time


tj

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Escape backslash character again

Post by frabjous »

You could do:

Code: Select all

c:{\textbackslash}bbwin{\textbackslash}trunk{\textbackslash}Core{\textbackslash}Agents{\textgreater}
though I’d prefer:

Code: Select all

\verb|c:\bbwin\trunk\Core\Agents>|
tjyang
Posts: 4
Joined: Wed Jul 14, 2010 12:12 am

Re: Escape backslash character again

Post by tjyang »

Frabjous

Thanks for helping me out on this beginner type of question.
I appreciate your help.

I put down you two solutions for my question into my "The LaTeX Companion" book.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Escape backslash character again

Post by localghost »

Topics with solved problems are marked accordingly by the OP as described in Section 3 of the Board Rules. Marking a topic means to edit the initial post, not the last one.


Best regards
Thorsten
Post Reply