When an auto-generated table of contents is exported to XHTML, the exported table of contents still has page numbers. There seems no point as the exported document is not paginated. Also, in the original ToC the page numbers are right justified and separated from the section name by a row of periods. In the exported ToC, the page numbers are on the right but not justified. They are separated from the section names by about 4 spaces. I suggest just not exporting the page numbers.
Mark: Could you please attach an example document and the exact steps on how to reproduce this problem? Otherwise it is very difficult to confirm this bug. After attaching the requested information, please set this bug to UNCONFIRMED. Thanks :)
Created attachment 82003 [details] .odt containing ToC from large document Here is a .odt to reproduce the issue. It has only a ToC cut from a larger document whose source I cannot post in this public forum. Export this document via File->Export, selecting xhtml as the output format. Observe that the exported HTML file still has page numbers on each ToC line, though without the "..." leading and right justification of the original.
Mark I tried reproducing this. Open your test file in 4.2.0.2, but when trying to "Save as..." I see no XHTML option, but only HTML. So exporting to HTML keeps the page numbers. But since that might be intentional I'm adding NeedAdvice. NEW since confirmed behavior.
Let's go with valid enhancement request.
The XHTML option is in the dialog that appears after you select Export... from the File menu. [Last time I tried Save As... HTML, the result had even more problems than the XHTML export so I stopped using it.] Both Export... XHTML and Save As... HTML options export the document as a single long HTML page so page numbers make no sense and have no meaning or usefulness. This is a BUG not an enhancement request so I have changed it back.
@FOSS - NeedAdvice is only for UNCONFIRMED bugs, we just move to NEW if it's confirmed, then, if a dev ever looks at it, they can investigate. We should do as much of the heavy lifting as possible -- especially as here where it's an enhancement request. NeedAdvice pings our top devs to look into it, here that's probably not needed :) Enhancement (behaves as intended, but valid request to change behaviour) Low (probably not going to impact many people at all but a logical request and probably an easy hack)
In order to limit the confusion between ProposedEasyHack and EasyHack and to make queries much easier we are changing ProposedEasyHack to NeedsDevEval. Thank you and apologies for the noise
On LO Version: 4.2.7.2 page number is not exported anymore, but page number for each entry in TOC is not right aligned. So Mark is still this a problem?
Robert Antoni Buj Gelonch committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=1ab97fe7a244d091def863a1279e67394167144a odf2xhtml: tdf#66305 do not display the page numbers in TOC It will be available in 5.0.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
If I understood this right, you do not exclude the TOC itself. Why not retain page numbers, e.g. in XHTML comments, then?
TOC can have hyperlinks which are very useful, but page number in a continuous output isn't.
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillCpp) [NinjaEdit]
Remove LibreOffice Dev List from CC on EasyHacks (curtailing excessive email to list) [NinjaEdit]
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/f2039cdbd827d60b8e0dbfa2e1d02dbb276514d6 tdf#66305: xhtml: Add unittest It will be available in 7.0.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.
Nice job! Solved Verified on Version: 7.0.0.0.alpha1 Build ID: 6a03b2a54143a9bc0c6d4c7f1... CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3; Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded