我正在尝试输入:
C:\\Users\\Reymi\\Downloads\\imagen.png
全部写在一行中。问题是,由于\\
它,每个单词之间都会跳过一行。
答案1
您可以使用url
为此打包:
\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}
输出: