Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the generation of a TOC in the RTF Word document generated by the profile-doc-rtf.xsl builder #90

Open
tviegut opened this issue Feb 28, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@tviegut
Copy link
Contributor

tviegut commented Feb 28, 2024

A desired enhancement to the existing profile-doc-rtf.xsl builder is the generation of a TOC for all tables/classes in the generated RTF Word document.

https://stackoverflow.com/questions/1097358/add-table-of-contents-to-rtf-document

https://www.biblioscape.com/rtf15_spec.htm#Heading62

Example from the above stack overflow article:

{\rtf1\ansi\deff0\adeflang1045
{\fonttbl {\f0\fsserif\fcharset238 Verdana;}}
\titlepage\line\line\line\line\line
{\pard
{\field{\*\fldinst HYPERLINK \\l "toc"} {\fldrslt\f0\fs80\b\scaps\qc\ul0 Title Page\line go to Table of Contents}}
\par}
\page{\*\bkmkstart page2}{\*\bkmkend page2}\line\line\line\line\line{\pard\f0\fs80\b\scaps\qc\sa10000{\field{\*\fldinst HYPERLINK \\l "toc"} {\fldrslt Page}} \chpgn\par}
\page{\*\bkmkstart page3}{\*\bkmkend page3}\line\line\line\line\line{\pard\f0\fs80\b\scaps\qc\sa10000{\field{\*\fldinst HYPERLINK \\l "toc"} {\fldrslt Page}} \chpgn\par}
\page{\*\bkmkstart page4}{\*\bkmkend page4}\line\line\line\line\line{\pard\f0\fs80\b\scaps\qc\sa10000{\field{\*\fldinst HYPERLINK \\l "toc"} {\fldrslt Page}} \chpgn\par}
\page{\*\bkmkstart page5}{\*\bkmkend page5}\line\line\line\line\line{\pard\f0\fs80\b\scaps\qc\sa10000{\field{\*\fldinst HYPERLINK \\l "toc"} {\fldrslt Page}} \chpgn\par}
\page{\*\bkmkstart toc}{\*\bkmkend toc}{\pard\sa1000\f0\fs50\b\qc{\field{\*\fldinst TOC}{\fldrslt Table of Contents}}\par}
{\pard\f0\fs28\fi0\trowd\cellx8000\cellx8600
\pard\intbl\ql {\field{\*\fldinst HYPERLINK \\l "page2"} {\fldrslt\ul0 Link to anchor #page2}}\cell\pard\intbl\qr {\field{\*\fldinst PAGEREF page2}}\cell\row
\pard\intbl\ql {\field{\*\fldinst HYPERLINK \\l "page3"} {\fldrslt\ul0 Link to anchor #page3}}\cell\pard\intbl\qr {\field{\*\fldinst PAGEREF page3}}\cell\row
\pard\intbl\ql {\field{\*\fldinst HYPERLINK \\l "page4"} {\fldrslt\ul0 Link to anchor #page4}}\cell\pard\intbl\qr {\field{\*\fldinst PAGEREF page4}}\cell\row
\pard\intbl\ql {\field{\*\fldinst HYPERLINK \\l "page5"} {\fldrslt\ul0 Link to anchor #page5}}\cell\pard\intbl\qr {\field{\*\fldinst PAGEREF page5}}\cell\row
\par}
}
@tviegut tviegut added the enhancement New feature or request label Feb 28, 2024
@tviegut tviegut self-assigned this Feb 28, 2024
@tviegut tviegut removed this from CIMTool 2.1.0 Aug 7, 2024
@Sveino
Copy link

Sveino commented Oct 30, 2024

I think it would be good if we can reuse Pandoc, #185 then we can pick any format that is supported by Pandoc. Yes, we can all download it ourselves, but it would be good to have it abend in CIMTool so that we can standardise settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: No status
Development

No branches or pull requests

2 participants