tableofcontents

Properly add page numbers and total number of pages to PDF using ReportLab

泄露秘密 提交于 2021-02-18 18:15:12
问题 I am trying to create a document that has page numbering of the format "Page x of y". I have tried the NumberedCanvas approach (http://code.activestate.com/recipes/576832/ and also from the forums https://groups.google.com/forum/#!topic/reportlab-users/9RJWbrgrklI) but that conflicts with my clickable Table of Contents (https://www.reportlab.com/snippets/13/). I understood from this post http://two.pairlist.net/pipermail/reportlab-users/2002-May/000020.html that it may be possible using forms

How to include all chapters in TOC in different html pages

↘锁芯ラ 提交于 2021-02-05 10:00:13
问题 I have a rmarkdown file which I need to knitr to get an html output composed of three different pages. Each page has some chapters (1 chapter in the first, 4 in the second page and 4 in the third). I need to repeat the full TOC ( with all chapters within ) in each page. With the code I have each TOC is split and refers to chapters of the single page only. I copied following code at the beginning of each page. I am very new to this thank you so much. --- title: "page" author: "me" date: "26/02

How to include all chapters in TOC in different html pages

梦想的初衷 提交于 2021-02-05 10:00:10
问题 I have a rmarkdown file which I need to knitr to get an html output composed of three different pages. Each page has some chapters (1 chapter in the first, 4 in the second page and 4 in the third). I need to repeat the full TOC ( with all chapters within ) in each page. With the code I have each TOC is split and refers to chapters of the single page only. I copied following code at the beginning of each page. I am very new to this thank you so much. --- title: "page" author: "me" date: "26/02

Pandoc : How to add a table before the table of content?

寵の児 提交于 2021-01-27 18:49:16
问题 I would like to add a table before the table of content generated by pandoc/markdown. I've found the parameter "include-before". With this, I can add text before the table of content. But is there a way to add a table ? Show my code below. I would like the toc to be between the two tables and the header1 and not before the tables. Is there another way to achieve that ? I would like to use only one file for the generation. Thanks for your help --- geometry: margin=1in fontfamily: qbookman

Add figure and tables list to Table of Content using reportlab

此生再无相见时 提交于 2020-12-15 04:29:46
问题 I am latest reportlab and django, and standard platypus TOC with the notify to 'TOCEntry' works great for my document. I am now trying to add 2 more sections to Table of Contents: 'List of Figures', and 'List of Tables'. Since the flowables h1, h2, table, image etc. in the document can occur in any order, I cannot seem to separate the 2 lists from the main TOC. Ideally I would like to have something like: Table of Content: Heading1 Sub1 Sub2 Heading2 Sub3 Sub4 Sub5 List of Figures: Figure1

How to use tocify with asciidoctor for a dynamic toc?

孤者浪人 提交于 2020-06-24 04:53:17
问题 By default, asciidoctor creates a static toc. This is very cool but for long documents, it would be nice to if the toc could be somewhat more compact and would highlight where in the document the reader currently is. At this point, tocify comes in. Tocify is a nice Javascript solution exactly to cover this. Now the question is: how to use tocify with asciidoctor? Asciidoctor issue 699 is relevant here. 回答1: Enable docinfo processing in your asciidoc files, e.g. by passing the following

Tabset in html rmarkdown

偶尔善良 提交于 2020-06-17 13:21:47
问题 I am working on a html document (readthedown theme) of rmarkdown and i would like to create several ".tabset" but : I would like that the tabset's content appears only when i click on it in the table of content and not appears ones after ones directly on the body of doc. For example, when i am in the first tabset, and i'm going through the several sub tabset, i don't want to seing the next tabset on content of the page. in my situation i have : # Title1 {.tabset .tabset-fade} ## sub title a {

HTML to PDF adding a table of contents (TOC) dynamically

余生颓废 提交于 2020-04-14 07:32:08
问题 I am using iText 7 to convert html to PDF, but I couldn't find even one example on how to add a table of contents to the final PDF. Converting a text to PDF and adding a TOC is an easy task when following iText example here, but apparently it is not possible when converting HTML to PDF. The requirement is simple, just find all the HTML tag attributes "data-toc" and use the value to create the TOC Here is what I got so far using the same approach used in the Text to PDF sample here: VS 2019

Reading and writing the TOC for a PDF

元气小坏坏 提交于 2020-02-05 08:54:12
问题 My requirement is to prefix a PDF generated by some other process with a single 'cover page'. I've written a relatively simple Ant task to concatenate a list of PDF documents, and this works well, but the TOC is not preserved in the process. By TOC I mean .. Ideally, both TOCs would be preserved, and adjusted for their new offsets, but I can see no means of reading or writing the TOC (the left hand one) in the iText API. Can anyone? M. 回答1: I'm the author of the book about iText and in the

get printed page number of an element

依然范特西╮ 提交于 2020-01-13 20:36:10
问题 I'm working on a project that is involving converting PDF handbooks to html. I am trying to retain the value of a PDF when printed, while giving them a better ui on devices which aren't bound by the concept of pages. The issue that I am running into is that these handbooks have a Table of Contents with the page number of where each chapter/section begins. When viewing on a device, that list will just be in-page anchor links, but when printing I would like to get the page number of an element