我想知道是否有人可以帮助我。我试图将图形标题设为一个块,而不是使文本相对于“图形”偏移。
我现在用来设置图像的代码是这样的:我想我的一些包或设置可能互相干扰。
\documentclass[12pt,pagesize,twoside,DIV=12,headsepline=0.4pt]{scrbook}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage{url}
\usepackage{setspace}
\usepackage{lscape}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{wrapfig}
\usepackage{caption}
\captionsetup[figure]{font=small}
\usepackage[backend=biber,style=apa]{biblatex}
\DeclareLanguageMapping{english}{american-apa}
\addbibresource{lit.bib}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage{multirow,booktabs,setspace,caption}
\usepackage{tikz}
\DeclareCaptionLabelSeparator*{spaced}{\\[2ex]}
\captionsetup[table]{textfont=it,format=plain,justification=justified,
singlelinecheck=false,labelsep=spaced,skip=0pt}
\captionsetup[figure]{labelsep=period,labelfont=it,justification=justified,
singlelinecheck=false,font=doublespacing}
\usepackage{scrlayer-scrpage}
\pagestyle{scrheadings}
\automark[chapter]{chapter}
\ohead[]{\headmark}
\cfoot[]{}
\ofoot[\pagemark]{\pagemark}
\usepackage{hyperref}
\setkomafont{disposition}{\normalcolor\bfseries}
\setkomafont{descriptionlabel}{\normalcolor\bfseries}
\setkomafont{captionlabel}{\normalcolor\bfseries}
\begin{document}
\begin{wrapfigure}{r}{0.5\linewidth}
\includegraphics[width=8cm]{winterhat}
\centering
\caption[Winter hat]{\href{https://sketchfab.com/3d-models/winter-hat-637a36cb74204c719883af7feb4b7c28?fbclid=IwAR2f8dF3RrEBaolJk0mBtSuPB0PvR2YwI6i9q4spDLZfd5EoCE1d9FiqMFY}{Winter hat - 3D model} by \href{https://sketchfab.com/stubbornfunkydonkey}{StubbornFunkyDonkey} is licensed under \href{https://creativecommons.org/licenses/by/4.0/}{CC BY 4.0}. This model of a winter hat was put on every scan in order to conceal the hairline and parts of the ears.}
\label{fig:winterhat}
\vspace{-50pt}
\end{wrapfigure}
\end{document}
图片如下:
答案1
您的标题与 中定义的完全相同\documentclass
,即scrbook
。您可以通过\captionsetup[figure]{...}
在 之后放置来覆盖默认设置\usepackage{scrlayer-scrpage}
,但您的尝试是 uclear。请参阅下面的 MWE。
MWE(我省略了所有不相关的包):
\documentclass[12pt,pagesize,twoside,
DIV=12,headsepline=0.4pt]{scrbook}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{scrlayer-scrpage}
\captionsetup[figure]{format=plain, % <--- new
font=footnotesize, labelfont=it,
singlelinecheck=false}
\usepackage{lipsum} % for text filer
\begin{document}
\lipsum[11]
\begin{wrapfigure}[14]{r}{0.5\linewidth}% explicit reserved space for wrapfigure
\vspace{-\baselineskip} % <--- move image for one line up
\includegraphics[width=\linewidth]{example-image-duck} % image width is equal to 'wrapfigure' width
\caption{"Winter hat - 3D model" by StubbornFunkyDonkey is licensed under CC BY 4.0. This model of a winter hat was put on every scan in order to conceal the hairline and parts of the ears.}
\label{fig:winterhat}
\end{wrapfigure}
\lipsum[1-2]
\end{document}
如果你喜欢不同的标题样式,请captionsetup
相应更改。现在我根据自己的喜好进行设置 :-)。
captionsetup
注意:您可以在@leandriis 的评论中找到类似的建议。