LyXWrong referencing for subtables (sub table)

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Wrong referencing for subtables (sub table)

Post by sommerfee »

The subfig package is dependent on knowing if the \caption is above or below the subfigures resp. subtables. Otherwise the numbering and/or the references would get wrong. For that reason, it evaluates the "position" setting of the caption package.
Juanjo wrote:This is solved by means of the document class option captions=tableheading.
Not in every case. Usually this is sufficient since the caption package evaluates this KOMA-Script option and set "position=t" for tables internally. But in this case loading of the caption package was suppressed by passing the option "caption=false" to the subfig package, so this option-chain is broken here. Therefore the caption package will "guess" what the actual position is. (The position setting is set to "position=auto" here). I implemented this "guessing" in version 3.1 of the caption package and improved this from version to version, but since this is dependent on the version of the caption package it could be that Juanjo will have correct results anyway but pooz not.

Since guessing is always a bad idea when doing typesetting, I strongly suggest adding the line

Code: Select all

\captionsetup[table]{position=t}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
additionally.

See also http://www.latex-community.org/forum/po ... 49#pr28941 ;)

Axel (Author and maintainer of the caption package)

P.S.: If guessing is a bad idea then why did I implemented it in the caption package? Simply to reduce my support effort since nearly no-one reads the corresponding section in the subfig package documentation and the guessing will give you usually the correct result when using actual versions of the caption package. ;)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply