Fw: Re: Problems with LyX - (color box)

Paul A. Rubin parubin73 at gmail.com
Thu Oct 15 18:23:07 UTC 2020


On 10/15/20 1:03 PM, Andreas Plihal wrote:
> The error message is just cosmetic. My main problem is that LyX dosn't 
> do what I want:
> I want to include boxes for mathematical examples in my book. To do 
> this, I chose the so called 'colored boxes', divided them into an 
> upper part (for the mathematical example) and a lower part (for its 
> solution), was able to underlay both parts with different colors (for 
> making it pretty), choose a pretty thin boxrule and finally managed to 
> make the box breakable. I can even place the text for footnotes inside 
> the box outside the box. Unfortunately, two strange things happen in 
> this process:
>
>  1. I put 2 footnotes in the box. Outside the box, however, both
>     footnote texts are quoted with the same No. 2. A footnote text
>     with No. 1 does not even exist.
>  2. I made the entire text in the color box long enough, so there MUST
>     be arise a page break. This puts the first footnote on the first
>     page and the second on the second page of the box. Now the two
>     footnote texts should be shown on the corresponding pages. But
>     they won't, both are shown on the second page.
>
> Greetings Andreas
Andreas,

I am copying this back to the user mailing list.

I do not know any way to force the footnotes onto a specific page, and a 
bit of googling suggests that is somewhere between very difficult and 
impossible. The numbering issue can be fixed (I think). I have attached 
a modified version of your document, in which I added three footnotes 
outside the color box both to confirm that numbering was sequential and 
to demonstrate that footnote placement is not fully controllable.

Other than the added footnotes, the relevant changes are as follows.

 1. I added a new counter ("myfootmark") in the preamble.
 2. Inside the color box, before any footmarks, I added some LaTeX code
    that sets the "myfootmark" counter equal to the current value of the
    normal footnote counter and then increments it. This will be the
    number assigned to your first footnotemark.
 3. In your code for placing the footnotetext, I give the value of the
    "myfootmark" counter as an optional argument (which causes that to
    be the number printed) and also step the counter after each
    footnotetext except the last.

Assuming the document compiles the same on your system as on mine, you 
will see that the first footnote in the box still prints on the second 
page, but the second footnote in the box now prints on the next page. 
This is the result of my adding two footnotes before the box, which eat 
up just enough space to cause the second portion of the box to consume 
almost all of the second page. Remove one of the first two footnotes 
that I added, and there is room for your second in-box footnote to join 
the first one.

Cheers,

Paul


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20201015/b363259f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Farbrahmen.lyx
Type: application/x-lyx
Size: 10237 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20201015/b363259f/attachment.lyx>


More information about the lyx-users mailing list