tableofcontents

Pandoc - Inserting pages before generated Table of Contents

五迷三道 提交于 2019-12-18 04:35:24
问题 I've been playing around with Pandoc. Is there anyway to insert pages before the generated Table of Contents? For example: Title Page Insert Custom Page 001 Insert Custom Page 002 (Generated) Table of Contents Many thanks in advance! 回答1: For this answer, I'm going to assume you are generating markdown, though the process is the same for other file formats as well. The key insight is that Pandoc uses templates to determine the final placement. It has default templates and if you modify them,

Update TOC in .docx document using DocumentFormat.OpenXml (C#)

℡╲_俬逩灬. 提交于 2019-12-13 15:19:01
问题 I create new word document using DocumentFormat.OpenXml. I load template document in which located the table of content and the table with picture logo. I append other content using c# code for this template. I send this document to user. When user get this document and open it - the table of contents not update. I found the resolve this problem. I add to my code mainPart.DocumentSettingsPart.Settings.Append(new UpdateFieldsOnOpen() { Val = true }); But when user will get the document and

iText7 Table of Content

我与影子孤独终老i 提交于 2019-12-11 17:18:17
问题 I am new to iText7, but have a decent grasp of most of the concepts. I would like to create a table of content (TOC) for my PDF, and found the following java example on their website: https://developers.itextpdf.com/content/itext-7-examples/itext-7-bookmarks-tocs/toc-first-page Converting the program to c# has worked out with normal text, but when having the Paragraphs inside Cells in a table, it doesn't work anymore. Furthermore i can't get the Reorder pages part to work, any ideas? EDIT:

Disable table of contents for documents

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 08:52:20
问题 I am using DocBook 4.5 and wanted to customize whether or not the table of contents is generated. I was looking over the XSD but couldn't find a way to disable it. I found ways to customize it. Could someone point me in the right direction? 回答1: In both Docbook 2 and Docbook 5 the toc element documenation says: "In real life, tocs are usually generated automatically by the presentation system and never have to be represented explicitly in the document source." So the next question is, which

how to get page numbers based on openxmlelement

南笙酒味 提交于 2019-12-11 06:05:39
问题 For a Paragraph object, how can I determine on which page this is located using the Open XML SDK 2.5 ? I've obtained all child elements in my document and fetched innertext also, using this. foreach (var i in mainPart.Document.ChildElements.FirstOrDefault().ChildElements) { ParagraphElements.Add(i); //openxmlelement list } I want to get page number for corresponding paragraph. for example, I have "this is heading 1" marked as style Heading 1 and this will be updated in TOC. so there I need to

How to remove the Table of Contents from the Table of Contents in WKHTMLTOPDF?

别等时光非礼了梦想. 提交于 2019-12-09 12:04:38
问题 I am generating a pdf using WKHTMLTOPDF with the table of content option, but it is adding itself to the table of contents, showing that it is on page 2. Thoughts on removing this? 回答1: You have full control over the TOC generation using XSL stylesheets for their generation. You can get the default stylesheet used by giving the argument --dump-default-toc-xsl to wkhtmltopdf. When you examine it, you are particularly interested in the <body><h1>...</h1> H1 element and the test xsl:if test="(

How do I generate a table of contents for HTML text in Python?

岁酱吖の 提交于 2019-12-06 19:36:30
Assume that I have some HTML code, like this (generated from Markdown or Textile or something): <h1>A header</h1> <p>Foo</p> <h2>Another header</h2> <p>More content</p> <h2>Different header</h2> <h1>Another toplevel header <!-- and so on --> How could I generate a table of contents for it using Python? Use an HTML parser such as lxml or BeautifulSoup to find all header elements. Here's an example using lxml and xpath. from lxml import etree doc = etree.parse("test.xml") for node in doc.xpath('//h1|//h2|//h3|//h4|//h5'): print node.tag, node.text 来源: https://stackoverflow.com/questions/2210265

How to change table of content header in knitr?

☆樱花仙子☆ 提交于 2019-12-05 22:29:10
I am using the following options to produce a pdf document with knitr: --- title: "Test" author: "Paulo Miramor" date: "13-07-2015" output: pdf_document toc: yes --- I would like to change the header of the table of contents (which is "Contents"), since I am producing a document in Portuguese. Is there any way to customize it? Thanks to @Molx and @Chris in the comments I could find a solution. Solution 1 Add \renewcommand{\contentsname}{Índice} to the document so that the .Rmd header is: --- title: "Test" author: "Paulo Miramor" date: "13-07-2015" output: pdf_document header-includes: -

How to get Table Of Content in document view for Xcode 6.2?

岁酱吖の 提交于 2019-12-05 10:58:56
问题 After updating Xcode to 6.2, the table of content in document viewer is missing for most of the UI classes references. Is any one else experiencing this issue? Is there any way to show the table of content in document viewer just like what it used to be? 回答1: I had the same he same issue - table of contents pane was blank. However, when I checked Preferences / Downloads, I saw that the Documentation objects iOS 8.2, OS X 10.10 and XCode 6.2 were all available but not yet downloaded , despite

Turning an unordered list into a table of contents

拜拜、爱过 提交于 2019-12-05 06:51:18
Reference this fiddle: http://jsfiddle.net/exGnZ/ Hi, I'm trying to reproduce a table of contents with an unordered list and leader dots. Unfortunately, when there's a long line of content, the formatting breaks down. Does anyone know how to get Chapter 2 in the image below to appear on the same line as the dots? Here's the code I've got at the moment: http://jsfiddle.net/exGnZ/ I'm also pasting it here: <div> <ul id="toc"> <li><span>Introduction</span> <a href="#">Chapter 1</a></li> <li><span> Storm clouds looming Storm clouds looming Storm clouds looming Storm clouds looming Storm clouds