我正在嘗試輸入:
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}
輸出: