Add markers and hyperlinks for citations in pandoc - pdf-generation

I put references in a yaml metadata-header:
references:
- id: fenner2012a
title: One-click science marketing
author:
- family: Fenner
given: Martin
...
(described here: http://johnmacfarlane.net/pandoc/README.html#extension-citations)
and I can cite this reference with See [#fenner2012a]....
This will create an output in the pdf like this: See ("One-click science marketing")... with no hyperlink on the reference.
Instead of the title I want to have auto-incremented number: See [1] with [1] being a hyperlink to the source. How can I achieve this?

Instead of the title I want to have auto-incremented number: See [1] with 1 being a hyperlink to the source. How can I achieve this?
Many CSL styles have a numeric format; you can try ACM Computing Surveys.
To specify the style, pandoc's documentation says:
These files are specified using the --csl option or the csl (or citation-style) metadata field.
There's one caveat when going to PDF, however. I haven't found a way to get the hyperlinking to work.
That is, you'll get See [1] but there is no hyperlink.
Edit: You can get this to work by using the following setting in meta-data:
link-citations: true
You can get hyperlinks in PDF by using LaTeX's way of formatting references. But I think you'll have to convert your reference to .bib format and specify it in your metadata:
bibliography: references.bib
pdf:
cite-method: biblatex

Related

AsciiDoc: how can I get the author's name in the output document?

This is the beginning of an AsciiDoc document, where the author is specified:
= Writing Documentation using AsciiDoc
Tom White <twhite#mymail.com>
v2.0, 2020-11-06
:toc:
The author name is accepted by the AsciiDoc processor, i.e. no error is produced, but it is not shown in the output document.
How is it possible to make the author's name visible?
If you are using the default Asciidoctor templates for HTML output, the author and their email address is included beneath the document heading.
If you are using a custom template, then the author and email address are available as attributes that you can use at any location within your document, {author} and {email} respectively.
For details, see: https://asciidoctor.org/docs/user-manual/#author-and-email

Using fancyhdr in YAML metadata produces multiple page numbers with Pandoc

I'm using Pandoc to generate a PDF from markdown. When specifying header/footer information in the YAML metadata (as below), I continue to get a page number in the center of my footer (with the text of \fancyfoot[L] written overtop), in addition to the page number in footer on the right that I've specified with \fancyfoot[R].
How can I remove the default page number in the footer at center? If I use \pagenumbering{gobble} it just removes all page numbers, at center and on right.
---
title: Test Title
author: Author Name
header-includes:
- \usepackage{fancyhdr}
- \pagestyle{fancy}
- \fancyhead[L]{Author Name}
- \fancyhead[R]{Test Title}
- \fancyfoot[L]{Extra text here}
- \fancyfoot[R]{\thepage}
---
Currently using Pandoc 1.17.2 on OSX 10.11.6.
Well, I think this should work if you just give the center field an empty content field. That is at least one way in which it works in Latex and hopefully the same for pandoc.
\fancyfoot[C]{}

Asciidoc: how to get page headers & footers?

Is there a correct way to get Asciidoc to include headers and footers?
I am trying to work out whether Asciidoc is a serious contender for printed material. I know that it is supposed to be docbook compatible, but I can’t find out how to create chapters, headers and footers.
I am trying to create instructional material. Currently I am using Atom with the asciidoc plugin to create the text, and Marked 2 on the Mac to get a better look and to export it to PDF.
Running page headers and footers are not part of the AsciiDoc language but the tool you use for PDF conversion. From my view you have (at least) 2 options:
Follow the instructions in Exporting Print/PDF of your Marked 2 user manual to create page headers and footers (this might turn out difficult using the AsciiDoc processor instead of MultiMarkdown).
"You can specify headers and footers on a per-document basis using MultiMarkdown metadata at the very top of the document"
Since you probably have installed Asciidoctor anyway to support asciidoc in Marked 2 you could use an Asciidoctor PDF theme to generate PDF with headers/footers using Asciidoctor PDF. You would have to find an appropriate theme or create one yourself, though.
The most frequently used way to generate PDF output, however, seems to be generating DocBook output first and convert that to PDF using dblatex with DocBook XSL stylesheets (see AsciiDoc homepage). Maybe someone else can say more about that.

Prevent asciidoc from converting a file path into a link

I'm manually converting a MS Word document to asciidoc format.
By doing so I ran into an issue that I can't work around yet.
There is an example where I want to show the reader of how the syntax of a file link should look like.
So I used this as an example:
file:///<Path>/<to>/<Keytab>
Asciidoc now renders this pseudo link into an actual link and warns me about this while converting my asciidoc document into HTML and PDF.
Usually, I would simply use the [source] element to prevent the link rendering. But the file link is part of a table.
[options="header,footer",cols="15%,85%"]
|=======================
|parameter|usage
|keyTabLocation |file:///<Path>/<to>/<Keytab>
|=======================
Is there a way to prevent the rendering/convertion of the file link?
Okay, I found the solution. I had to escape the whole macro using a \ at the beginning.
So this did the trick:
[options="header,footer",cols="15%,85%"]
|=======================
|parameter|usage
|keyTabLocation |\file:///<Path>/<to>/<Keytab>
|=======================

My `pdf` generated through RTD is having all articles of content in the heading content Why?

I have just recently (yesterday) started using sphinx and read the docs for my project.
Till now I am happy with the Html documentation but the pdf version includes all the articles That appear in the index within the Contents heading. And the Documents orignal content/index is simply comprised of two links.
Please help.
The documentation is at http://todx.rtfd.io and the pdf is here.
When generating the PDF, Sphinx is always adding the content that is referenced via a .. toctree:: directive exactly where the directive is placed.
In contrast, when generating HTML, Sphinx is placing the content after the file that contains the toctree.
In this aspect, PDF generation and HTML generation are simply inconsistent.
Thus, you should place all content of the index page before the table of contents.
In case you want to provide an overview of the most important sections inline, you can use a list of references. Then, you might want to hide the toctree using the hidden property, for example like this:
Contents
--------
- :ref:`quickstart`
- :ref:`userguide`
Features
--------
- Fast
- Simple
- Inituitive
- Easy to Use
- Offline
- Open Source
.. toctree::
:hidden:
quickstart
userguide

Resources