# Problems with LyX

Baris Erkus bariserkus at hotmail.com
Sun Oct 11 19:58:24 UTC 2020

On 11-Oct-20 10:50 PM, Baris Erkus wrote:
> On 09-Oct-20 8:02 PM, Andreas Plihal wrote:
>> 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.
>>
> You are using \footnotemark and \footnotetext. I tried this with basic
> LaTeX and both footnotes have 2. Obviously and apparently , these two
> commands cannot follow the numbers. Probably \footnotetext has to
>
> Try this in LaTeX and you will see all the footnote numbers are 3.
>
> \documentclass{article}
>
> \begin{document}
>
>     Testing footnotes. I'm writing something here to test
> \footnotemark several features. Testing the second \footnotemark and
> third \footnotemark.
>
>     \footnotetext{First footnote}
>     \footnotetext{Second footnote}
>     \footnotetext{Third footnote}
>
> \end{document}
>
> But if you try this one, everything works fine:
>
> \documentclass{article}
>
> \begin{document}
>
>     Testing footnotes. I'm writing something here to test
> \footnotemark several features.
>     \footnotetext{First footnote}
>
>     Testing the second \footnotemark
>     \footnotetext{Second footnote}
>
>     and third \footnotemark.
>     \footnotetext{Third footnote}
>
> \end{document}
>
> So, this has nothing to do with LyX. Why don't you use \footnote
> instead of \footnotemark and \footnotetext?
>
>>  1. I made the entire text in the collor 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.
>>
> I am guessing that tcolorbox does not have an automatic page break as
> you would expect. I recommend you look at the manuals of tcolorbox and
> stackexchange pages such as this one
> <https://tex.stackexchange.com/questions/186709/identify-tcolorbox-page-breaks>
> (https://tex.stackexchange.com/questions/186709/identify-tcolorbox-page-breaks)
>
> --
> ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
>
You can also have a look at this one
<https://tex.stackexchange.com/questions/263693/footnote-in-a-tcolorbox-environment>
(https://tex.stackexchange.com/questions/263693/footnote-in-a-tcolorbox-environment)

--
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓