tableofcontents

How to change table of content header in knitr?

南楼画角 提交于 2020-01-13 18:00:52
问题 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? 回答1: 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:

RMarkdown with knitr to HTML: How to hide bullets in TOC (table of contents)?

折月煮酒 提交于 2019-12-31 00:18:15
问题 How can I suppress the bullet points in front of the TOC items in the created HTML file? I want to see only the headline numbers... Example Test.Rmd file: --- title: "Untitled" author: "Author" date: "01/25/2015" output: html_document: number_sections: true toc: yes toc_depth: 3 --- *Content* # Headline 1 ## Sub headline 1.1 ## Sub headline 1.2 ### Sub sub headline 1.2.1 # Headline 2 The TOC of the resulting HTML document will look like this (with the unwanted bullet points - here indicated

TCPDF How do you make a link to the Table of Contents (TOC)?

☆樱花仙子☆ 提交于 2019-12-25 16:59:27
问题 Can anyone demonstrate a basic example that adds a link on an arbitrary page in the pdf that takes the user back to the table of contents? I have everything working fine, but can't get this simple requirement going. Some background: You'd think this would be trivial, everything about TCPDF seems to function so well, maybe a bad day I'm having. I have tried the following: From the documentation there seems to be 2 options for creating internal document links Via methods addlink() and setlink()

How do I conditionally include a file in a Sphinx 'toctree'? [duplicate]

会有一股神秘感。 提交于 2019-12-23 10:06:32
问题 This question already has answers here : Conditional toctree in Sphinx (4 answers) Closed 4 years ago . I would like to include one of my files in my Sphinx TOC only when a certain tag is set, however the obvious approach fails: .. toctree:: :maxdepth: 5 index core utils oec plotting install news glossary .. only:: private_version todo Is there a simple way to accomplish this? 回答1: In a past I had a need to be able to compile two documentations from the same source file: a public and a

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

僤鯓⒐⒋嵵緔 提交于 2019-12-23 03:50:06
问题 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? 回答1: Use an HTML parser such as lxml or BeautifulSoup to find all header elements. 回答2: Here's an example using lxml and xpath. from lxml import etree doc = etree.parse("test.xml") for node in

Turning an unordered list into a table of contents

浪尽此生 提交于 2019-12-22 04:54:20
问题 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>

iTextSharp - Using PDFAction.GotoLocalPage in Merged PDF

本小妞迷上赌 提交于 2019-12-20 04:22:55
问题 I have written some code that merges together multiple PDF's into a single PDF that I then display from the MemoryStream. This works great. What I need to do is add a table of contents to the end of the file with links to the start of each of the individual PDF's. I planned on doing this using the GotoLocalPage action which has an option for page numbers but it doesn't seem to work. If I change the action to the code below to one of the presset ones like PDFAction.FIRSTPAGE it works fine.

XSL-FO creating Dynamic Table Of Contents

两盒软妹~` 提交于 2019-12-20 04:22:25
问题 How we can create a table of contents page dynamically in XSL-FO? 回答1: What I've done in the past is use <fo:page-number-citation> for each entry in the TOC (Table of Contents). I do the table of contents as an <fo:table> . The <fo:page-number-citation> has a ref-id attribute that should contain the id of the location you're referencing. It should generate the PDF page number where that id is located. For example, if you wanted each <chapter> referenced in your TOC, you would use <fo:page

Table of Contents for PDF/Printed Report in SSRS

前提是你 提交于 2019-12-20 04:16:28
问题 Here's what I do know: I know that document maps and bookmarks can be utilized on screen but not in a pdf. SSRS does not have an out of the box ability to generate a printed Table of Contents with Page Numbers to a pdf. I know that a TOC can be generated by exporting the document map to Word. This approach will not work for my situation. Global variables can store page numbers, but they can't be utilized within the report body, only headers and footers. The closest thing I can find is a