I am trying to type:
C:\\Users\\Reymi\\Downloads\\imagen.png
all in one line. The problem is that because of \\ it skips a line between each word.
I am trying to type:
C:\\Users\\Reymi\\Downloads\\imagen.png
all in one line. The problem is that because of \\ it skips a line between each word.
You can use the url package for this:
\documentclass{article}
\usepackage{url}
\DeclareUrlCommand\file{%
% Set monospace font
\def\UrlFont{\ttfamily}%
% Set characters to break after but not in between
\def\UrlBigBreaks{\do\:\do\\}
}
\begin{document}
\file|C:\\Users\\Reymi\\Downloads\\imagen.png|
Here's some long sentence that shows that the path \file|C:\\Users\\Reymi\\Downloads\\imagen.png| is also broken across lines.
\end{document}
Output:
\textbackslashmakes\but usually\verb|c:\Users\Reymi\Downloads\imagen.png|is easier or\verb|c:\\Users\\Reymi\\Downloads\\imagen.png|if you need\\– David Carlisle Jul 08 '17 at 17:20\\?" – Werner Jul 08 '17 at 20:08