
scrlttr2
好像沒有定義數字?
包標題錯誤:未定義浮點類型“圖形”。
那我該如何解決這個問題呢?
在你爭論在字母中使用數字毫無意義之前:
- 是的,也許吧,但我想要它。
- 例如,在一封關於藝術的多頁信中,它可能實際上很有用。
- 據我所知,除了
wrapfig
(wrapfigure) 之外,我無法以任何其他方式將文字環繞圖像 - 這不取決於嗎figure
?我可以在網路上找到的所有指南推薦wrapfig
。否則我該如何環繞圖像?甚至 Word 也可以輕鬆做到這一點,而且它(也)是為創建字母而設計的。
範例程式碼(片段):
\documentclass[version=last]{scrlttr2}
\usepackage{caption}
\captionsetup{justification=centering}
\usepackage{wrapfig}
答案1
如果您需要浮動數字和/或\caption
命令,請使用 classscrartcl
和 load package scrletter
。
例子:
\documentclass{scrartcl}
\usepackage{scrletter}
\usepackage{blindtext}% only for dummy text
\usepackage{graphicx}
\usepackage{wrapfig}
\begin{document}
\begin{letter}{Max Mustermann}
\opening{Hello \usekomavar{toname},}
\begin{wrapfigure}{l}{3cm}
\includegraphics[width=\linewidth]{example-image}
\caption{Caption}
\end{wrapfigure}
\blindtext
\Blindtext[2]
\begin{figure}
\centering
\includegraphics[width=5cm]{example-image}
\caption{Another Caption}
\end{figure}
\closing{Best regards}
\end{letter}
\end{document}