Wandmalfarbe / pandoc-latex-template

A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
BSD 3-Clause "New" or "Revised" License
6.22k stars 968 forks source link

introduce option `toc-links` (defaults to `all`) #106

Closed salim-b closed 5 years ago

salim-b commented 5 years ago

toc-links defines which part of an entry in the table of contents (TOC) is made into a link. Possible values include:

Remark: I'm not sure if the hyperref option linktoc=... should be added to the second \hypersetup call @ line 850, too...

Wandmalfarbe commented 5 years ago

I think this is a rather obscure usecase and I'm hesistant to include it because you can already archive this behaviour with the (currently undocumented) variable hyperrefoptions:

---
title: "Example PDF"
author: [Author]
date: "2017-02-20"
subject: "Markdown"
keywords: [Markdown, Example]
lang: "en"
toc: true
hyperrefoptions: 
- linktoc=page
...

# Images and Tables

## LaTeX Table with Caption

At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
salim-b commented 5 years ago

(...) you can already achieve this behaviour with the (currently undocumented) variable hyperrefoptions

Ah! I didn't notice this before, thanks for the hint! Would you welcome a PR to just document this option? (If it stays undocumented I'll probably have forgotten about it the next time I use this template...😅)

Wandmalfarbe commented 5 years ago

Would you welcome a PR to just document this option?

Im currently adding it to the pandoc manual.