On 2017-02-18, Marshall Feldman wrote:

Dear Marshall,

> I just finished laying out my first floating figure with subfloats (in a 
> 2x2 matrix). But to get it to work the way I want, I had to use ERT, and 
> I'm wondering if this is really necessary. If it is necessary, then 
> consider this a feature request for LyX to do this automatically.



> First, some background. I'm using the Memoir class, which has its own 
> methods for handling floats and captions (see Ch. 10 of the Memoir 
> Manual <http://texdoc.net/texmf-dist/doc/latex/memoir/memman.pdf>). But 
> they stopped working as soon as I started using subfloats in LyX. After 
> about a day (!) of detective work, I learned that LyX automatically 
> invokes the subfig <https://www.ctan.org/pkg/subfig?lang=en> package, 
> which in turn automatically invokes the caption 
> <https://www.ctan.org/pkg/caption> package.
> Since the latter conflicts 
> with Memoir's methods, Memoir is smart enough to turn off its own 
> methods if the caption package is loaded. But LyX doesn't warn you about 
> this, much less do something about it, and I did not see documentation 
> of this conflict anywhere. At the very least, I'd like to see this 
> documented. 

This is a valid (and simple) feature request. Could you post it (with a
telling subject line) on the LyX bug tracker?
Do you have a suggestion where to document this?

> Even better, if the Memoir class is being used, provide some 
> option to allow the user to choose between Memoir's native captioning 
> and that of the caption package.

... or just use the native captioning...

Another valid feature request.

> Possibly a similar conflict exists between subfig and the newer (and to 
> my mind easier-to-use) subcaption <https://www.ctan.org/pkg/subcaption> 
> package. Again, I'd like to see better documentation and options for 
> handling this explicitly, rather than letting users first fail to 
> compile their documents as expected, due to conflicts between their 
> method of choice and LyX's hidden side-effects, and then have to track 
> down the problem and fix it (which in my case eventually meant having no 
> choice but to use subfig and caption). (BTW, why doesn't LyX use the 
> more recent subcaption package instead of subfig?)

A third feature request: "support the subcaption package".

> In any case, here's how I want my figure to look. Each subfigure panel 
> is labeled with a letter in parentheses, both boldface. (E.g., "*(a)*".) 
> The main figure itself is labeled the usual way, except "Figure," the 
> number, and the separator are bold-faced (e.g., "*Figure 1:* "). Then, 
> immediately following this, there's a short cation to be used in the 
> list of figures. The identical text then appears boldfaced at the start 
> of the long caption, ending with a period. This is the visible figure 
> title. Immediately after this comes the rest of a long, paragraph-like 
> caption discussing the four panels in relation to each other. This long 
> caption makes repeated reference to the subfigure captions, and each 
> reference is set in the same font as the caption itself (in this case 
> boldface).

> I was able to do most of this by using the caption/subfig commands 
> \DeclareSubrefFormat and \captionsetup in the preamble. But the repeated 
> short caption (figure title) had to be copied, pasted, period added, and 
> boldfaced. And the references in the long caption needed to be done with 
> ERT, such as"\textbf{\protect\subref{subfig:MVpct}}" where subfig:MVpct 
> is the label used for a panel's subfigure caption. Nothing I tried with 
> LyX would make this work as desired, so I resorted to ERT.

Please provide a *minimal* example file. (Leave out everything
non-standard except the memoir class from the preamble and everything not
required to show the problem expect 2 sub-figures + references.)

Günter

Reply via email to