Bug 76007 - FORMATTING: Make it possible to insert a Table in a Footnote or Endnote
Summary: FORMATTING: Make it possible to insert a Table in a Footnote or Endnote
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/how-do-...
Whiteboard: BSA target:24.8.0
Keywords:
: 134127 (view as bug list)
Depends on:
Blocks: Footnote-Endnote Writer-Tables-Formulas
  Show dependency treegraph
 
Reported: 2014-03-11 03:27 UTC by AtaRafi
Modified: 2024-01-18 09:03 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Two verses in a row, aplied full justified aligment (27.33 KB, image/png)
2014-03-11 03:27 UTC, AtaRafi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AtaRafi 2014-03-11 03:27:15 UTC
Created attachment 95567 [details]
Two verses in a row, aplied full justified aligment

Mostly I have to work with RTL text, and sometimes we have poetry in footnotes, and 95% of RTL poetry is in full justified mode, with two verses in a row.

In that case, i need two different styles in a row, a different style for each verse. For this, i use tables, and i just can't..

I want Writer to be able to have tables in footnotes too.
Regards
Ata Rafi

              
Operating System: Windows 7
Version: 4.2.0.4 release
Comment 1 A (Andy) 2014-03-11 19:54:40 UTC Comment hidden (no-value)
Comment 2 Owen Genat (retired) 2014-03-12 12:00:39 UTC
Confirmed. Status set to NEW. Platform set to All/All. The related AskLO thread is:

http://ask.libreoffice.org/en/question/29878/cant-insert-tables-in-footnotes/?comment=31035#comment-31035

Quoting my answer in that thread:

> Until quite recently (v4.1.5-v4.2.0) LO could not open a Word document 
> containing a table in a footnote (bug 71749) and would crash if any attempt was 
> made to paste a table into a footnote (bug 71892). The ODF v1.2 specification 
> appears to support a table (<table:table> element) being placed in a footnote 
> (<text:note-body> element), which makes sense as this is required for 
> interoperability with OOXML, but it does not appear possible at present.
Comment 3 Gordo 2015-05-16 16:01:23 UTC
This comes a bit late but as a workaround to the problem in the original description, it is possible to use two textboxes side by side.  Format the paragraph inside each to set the alignment to justified and in one of them, set a tab stop.  I do not know how it would look in RTL but in English I set the right textbox to have a right tab equal to the width of the textbox.  It maybe the opposite, so set the left textbox to have a left tab at 0.

Windows Vista 64
Version: 4.4.3.2
Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16
Comment 4 Roger Gravel 2018-12-16 11:03:22 UTC Comment hidden (obsolete)
Comment 5 Telesto 2019-06-12 10:15:08 UTC
Repro
Version: 6.4.0.0.alpha0+ (x86)
Build ID: ac14e5613597e7361ce6995dacb1bb5bd55b6b00
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-06-06_05:09:49
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: threaded

LibO does render tables imported from doc/docx/rtf
Comment 6 Telesto 2019-06-12 10:23:13 UTC Comment hidden (no-value)
Comment 7 Xisco Faulí 2019-11-29 13:29:25 UTC Comment hidden (obsolete)
Comment 8 Mike Kaganski 2020-06-18 17:56:07 UTC
*** Bug 134127 has been marked as a duplicate of this bug. ***
Comment 9 R. Green 2020-06-19 10:48:12 UTC
Amended title to include Endnotes as well.
Comment 10 ajlittoz 2023-10-14 08:32:14 UTC
There are several somewhat arbitrary limitations in notes. The ban on tables is one of them. I don't see "logically" (= from an author's point of view or a typographer's) why they should be forbidden. If this is caused by an implementation reason or by ODF, this should be explicitly stated.

An example of "recent" complaint is found in https://ask.libreoffice.org/t/how-do-can-i-use-a-multicolumn-frame-in-a-footnote-when-footnotes-are-set-to-end-of-document/96921

Regarding endnotes (and perhaps footnotes when they are collected at end of section or document), a page break should be allowed so that notes related to separate parts of the documents are clearly segregated.

Perhaps this other ban is related to various restrictions on page style configuration in notes (such as the impossibility to alternate correctly left/right pages).
Comment 11 Mike Kaganski 2023-12-21 05:55:29 UTC
The code makes explicit checks to not put tables there. E.g., SwDoc::InsertTable; SwBaseShell::InsertTable; SwTextShell::GetState (case FN_INSERT_TABLE), etc.

Just disabling the checks in the mentioned three places already enables to insert tables into footnotes / endnotes. They seem to behave correctly; they even save both to ODT and DOCX (and may be seen if then opened in Word - both in ODT and DOCX, even though re-opening ODT in Writer drops the tables, because there's something in import code that also needs tweaking).

I believe that there should be no real difficylt problems supporting this. In fact, this may be an interesting easyhack - the pointers here give the idea what to look for in the code (basically, all uses of FrameTypeFlags::FOOTNOTE and StartOfSectionIndex are suspects).
Comment 12 Commit Notification 2024-01-07 10:45:33 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/75680dd751062b7ca34ff91e03de3add3fc973c6

Related tdf#76007: Make it possible to insert a Table in a Footnote or Endnote

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Julien Nabet 2024-01-07 11:16:24 UTC
I don't know if the patch is the right way to fix this, at least, Inserting table in footnotes isn't disabled + a table can be inserted.
Have in mind that there's some risk the patch be reverted since it may bring some wrong side effects.
Comment 14 Commit Notification 2024-01-08 08:28:39 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/08c4ed96cc94df4a3859aa167e92e6f6da9c2ce7

Revert "Related tdf#76007: Make it possible to insert a Table in a Footnote or Endnote"

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Julien Nabet 2024-01-08 08:28:56 UTC
Revert done since it triggered layout pb.