Document Classes ⇒ caption and nonfloat package: disabling position
caption and nonfloat package: disabling position
As is it always produces the error:
! Package caption Error: Usage of the `position' option is incompatible
(caption) to the `nonfloat' package.
I tried adding it after the nonfloat package (in case it gets disable automatically), and tried setting position=false and position=b (default latex behavior). None of these disabled the position option.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
caption and nonfloat package: disabling position
Code: Select all
\begin{center}\includegraphics{dummy}\captionof{figure}[ToC entry]{Dummy caption}\end{center}
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: caption and nonfloat package: disabling position
EDIT: Never mind. I found out it was the use of KOMA-Script which was bothering the caption package
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
caption and nonfloat package: disabling position
Considering that you use Version 3.0 or higher of the caption package, this should be no problem. The package offers settings for those cases.l0calh05t wrote:[...] caption -- even with position set to auto -- does not manage to put the correct spacing between captions above tables (both in the float environment, as in any other environment using captionof) and the table.
That shouldn't occur but also may depend on the used versions.l0calh05t wrote:[...] Never mind. I found out it was the use of KOMA-Script which was bothering the caption package
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: caption and nonfloat package: disabling position
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
caption and nonfloat package: disabling position
So do I. Without any problems. But I never used nonfloat.l0calh05t wrote:I'm using the newest version available for MikTeX (packaged on 2008-04-15, so it's quite new)
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: caption and nonfloat package: disabling position
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
caption and nonfloat package: disabling position
Could you provide a minimal example that shows the problem?l0calh05t wrote:I'm not using nonfloat anymore. The problem (with correct position) is caused by using KOMA-Script with caption.
Stefan
caption and nonfloat package: disabling position
Code: Select all
\documentclass{scrartcl}\usepackage[labelfont=bf,position=auto]{caption}\begin{document}\begin{table}\centering\caption{Caption that is too close to table}\begin{tabular}{|c|}\hlineLorem ipsum dolor sit amet, consectetuer adipiscing elit.\\\hline\end{tabular}\end{table}\end{document}
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
caption and nonfloat package: disabling position
Code: Select all
\captionsetup{belowskip=10pt}
Stefan