换行至C位置地址

换行至C位置地址

我正在写一份报告,报告一些重复出现的错误回溯。我制作了一个模板来指示回溯,但我想从位置超链接处断行。执行这些换行的命令是什么?

File "/home/awgomes/SALOME-9.6.0-UB18.04-SRC/BINARIES-UB18.04/GEOM/lib/python3.6/site-packages/salome/salome/geom/geomBuilder.py"

我的正文: PDF图片

\documentclass[a4paper, 12pt, twoside]{style/Refrep}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage[portuguese]{babel}

% Hyperref things for pdf and html:
\usepackage[]{hyperref}
\newcommand{\code}[1]{\texttt{#1}}
\renewcommand{\lstlistingname}{Code}
\renewcommand{\lstlistlistingname}{List of Codes}
\definecolor{DOrange}{rgb}{1,.4,.2}
\usepackage{layout}


\vspace{0.3cm}
\begin{mdframed}[linecolor=black,topline=true,bottomline=true,leftline=false,rightline=false, 
backgroundcolor=wikkiCinzaCode]
\begin{minted}[linenos=false,numbersep=11pt,framesep=2mm,fontsize=\footnotesize,obeytabs=true,tabsize=2]{cpp}

Traceback (most recent call last):
File "/home/awgomes/winds_core/tutorials/geo_auto/Teste1/pa/generateBlade.py", 
line 304, in <module>
 pa1.CreateCAD()
File "/home/awgomes/winds_core/tutorials/geo_auto/Teste1/pa/generateBlade.py", 
line 128, in CreateCAD
 Solid_inteiro = geompy.MakeSolid(Fuse_1)
File "/home/awgomes/SALOME-9.6.0-UB18.04-SRC/BINARIES-UB18.04/GEOM/lib/python3.6/site-packages/salome/salome/geom/geomBuilder.py",
line 364, in OpenCallClose
 res = theFunction(self, *args, **kwargs)
File "/home/awgomes/SALOME-9.6.0-UB18.04-SRC/BINARIES-UB18.04/GEOM/lib/python3.6/site-packages/salome/salome/geom/geomBuilder.py",
line 4960, in MakeSolid
 raise RuntimeError("MakeSolidShells : Unable to create solid from unclosed shape")
RuntimeError: MakeSolidShells : Unable to create solid from unclosed shape
ERROR:salomeContext:SystemExit 1 in method _runAppli.

\end{minted}
\end{mdframed}
\vspace{0.3cm}```

答案1

您可以允许 minted 使用 key 来断线,然后允许它通过使用breaklines来中断您非常长的路径/breakafter=/

% !TeX program = txs:///arara
% arara: pdflatex: {synctex: on, interaction: nonstopmode, shell: yes}
\documentclass[a4paper, 12pt, twoside]{report}
\usepackage[T1]{fontenc}
%\usepackage[utf8x]{inputenc}
\usepackage[portuguese]{babel}
\usepackage{minted}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{mdframed}

% Hyperref things for pdf and html:
\usepackage[]{hyperref}
\newcommand{\code}[1]{\texttt{#1}}
\renewcommand{\lstlistingname}{Code}
\renewcommand{\lstlistlistingname}{List of Codes}
\definecolor{DOrange}{rgb}{1,.4,.2}
\usepackage{layout}


\begin{document}

\vspace{0.3cm}
\begin{mdframed}[linecolor=black,topline=true,bottomline=true,leftline=false,rightline=false, 
backgroundcolor=lightgray]
\begin{minted}[linenos=false,numbersep=11pt,framesep=2mm,fontsize=\footnotesize,obeytabs=true,tabsize=2,breaklines,breakafter=/]{cpp}

Traceback (most recent call last):
File "/home/awgomes/winds_core/tutorials/geo_auto/Teste1/pa/generateBlade.py", 
line 304, in <module>
 pa1.CreateCAD()
File "/home/awgomes/winds_core/tutorials/geo_auto/Teste1/pa/generateBlade.py", 
line 128, in CreateCAD
 Solid_inteiro = geompy.MakeSolid(Fuse_1)
File "/home/awgomes/SALOME-9.6.0-UB18.04-SRC/BINARIES-UB18.04/GEOM/lib/python3.6/site-packages/salome/salome/geom/geomBuilder.py",
line 364, in OpenCallClose
 res = theFunction(self, *args, **kwargs)
File "/home/awgomes/SALOME-9.6.0-UB18.04-SRC/BINARIES-UB18.04/GEOM/lib/python3.6/site-packages/salome/salome/geom/geomBuilder.py",
line 4960, in MakeSolid
 raise RuntimeError("MakeSolidShells : Unable to create solid from unclosed shape")
RuntimeError: MakeSolidShells : Unable to create solid from unclosed shape
ERROR:salomeContext:SystemExit 1 in method _runAppli.

\end{minted}
\end{mdframed}
\vspace{0.3cm}

\end{document}

在此处输入图片描述

相关内容