只要看一下下面的输出,我认为我的问题就很明显了:
- 包裹的图撞进了列表
标题没有注意到它左边可以使用的大量空间......(已在下面的答案中回答)
这些东西真的让我讨厌 LaTeX,似乎没有什么可以立即使用的……请给我展示一个简单的方法无需一千条代码行和自定义命令即可解决这个问题:D
这是 MWE 代码,请记住:我正在寻找一种适用于不同大小图像的通用解决方案,因此仅使标题跨越较少的行是不够的 - 这是一个单独的问题。
\documentclass[
11pt,
a4paper,
final,
twoside=false,
openright
]{scrbook}
\usepackage{listings,graphicx,wrapfig,xcolor}
\newcommand\crule[3][black]{\textcolor{#1}{\rule{#2}{#3}}}
\begin{document}
\section{Robots}
\begin{wrapfigure}{r}{0.3\textwidth}
\crule{0.25\textwidth}{5cm}
\caption{The UR5 robot arm used in this thesis has 8 links and 6 joints (not including its attached robot hand)}
\end{wrapfigure}
Possession her thoroughly\footnote{Blablabla} remarkably terminated man continuing. Removed greater to do ability. You shy shall while but wrote marry. Call why sake has sing pure. Gay six set polite nature worthy. So matter be me we wisdom should basket moment merely. Me burst ample wrong which would mr he could. Visit arise my point timed drawn no. Can friendly laughter goodness man him appetite carriage. Any widen see gay forth alone fruit bed.
Remain lively hardly needed at do by. Two you fat downs fanny three. True mr gone most at. Dare as name just when with it body. Travelling inquietude she increasing off impossible the. Cottage be noisier looking to we promise on. Disposal to kindness appetite diverted learning of on raptures. Betrayed any may returned now dashwood formerly\footnote{Blablabl2a}. Balls way delay shy boy man views. No so instrument discretion unsatiable to in.
\begin{itemize}
\item Defining constants
\begin{lstlisting}[language=XML]
<xacro:property name="constant_name" value="1" />
<!--Usage - "1" will be inserted below on evaluation-->
${constant_name}
\end{lstlisting}
\item Doing calculations
\begin{lstlisting}[language=XML]
${1+(height/2)}
\end{lstlisting}
\item elebrated is in. Am offended as wandered thoughts greatest an friendly. Evening covered in he exposed fertile to. Horses
\begin{lstlisting}[language=XML]
<xacro:include filename="path_to_file" />
\end{lstlisting}
\end{itemize}
\end{document}
编辑
我在另一个答案中找到了解决标题问题的技巧:不在标题中写任何内容,而是换行,然后将标题文本放在下面……但我仍然希望得到一个更好的(但仍然很短!)答案,因为我不希望标题从下一行开始:
\caption{\unskip}
<Caption text here>
答案1
KOMA-script 的默认标题样式为“悬挂”。您可以使用以下方式更改\setcapindent
:
\documentclass[
11pt,
a4paper,
final,
twoside=false,
openright
]{scrbook}
\usepackage{listings,graphicx,wrapfig,xcolor}
\newcommand\crule[3][black]{\textcolor{#1}{\rule{#2}{#3}}}
\begin{document}
\section{Robots}
\begin{wrapfigure}{r}{0.32\textwidth}\setcapindent{1em}
\centering
\crule{0.25\textwidth}{5cm}\\
\caption{The UR5 robot arm used in this thesis has 8 links and 6 joints (not including its attached robot hand)}
\end{wrapfigure}
Possession her thoroughly\footnote{Blablabla} remarkably terminated man continuing. Removed greater to do ability. You shy shall while but wrote marry. Call why sake has sing pure. Gay six set polite nature worthy. So matter be me we wisdom should basket moment merely. Me burst ample wrong which would mr he could. Visit arise my point timed drawn no. Can friendly laughter goodness man him appetite carriage. Any widen see gay forth alone fruit bed.
Remain lively hardly needed at do by. Two you fat downs fanny three. True mr gone most at. Dare as name just when with it body. Travelling inquietude she increasing off impossible the. Cottage be noisier looking to we promise on. Disposal to kindness appetite diverted learning of on raptures. Betrayed any may returned now dashwood formerly\footnote{Blablabl2a}. Balls way delay shy boy man views. No so instrument discretion unsatiable to in.
\begin{itemize}
\item Defining constants
\begin{lstlisting}[language=XML]
<xacro:property name="constant_name" value="1" />
<!--Usage - "1" will be inserted below on evaluation-->
${constant_name}
\end{lstlisting}
\item Doing calculations
\begin{lstlisting}[language=XML]
${1+(height/2)}
\end{lstlisting}
\item elebrated is in. Am offended as wandered thoughts greatest an friendly. Evening covered in he exposed fertile to. Horses
\begin{lstlisting}[language=XML]
<xacro:include filename="path_to_file" />
\end{lstlisting}
\end{itemize}
\end{document}