Questions tagged [pandoc]
Pandoc is an open-source, command-line, universal document converter for converting between various markup formats.
2,534
questions
2
votes
1
answer
25
views
Add class to <img>-tag generated by knitr (Rmd)
I write a R Notebook (Rmd) that I want to render as HTML.
::: { .mycls }
```{r dev="svg", fig.dim=c(8,6), out.width="100%"}
ggplot(data.frame(x=rnorm(40, 5, 8),
...
1
vote
0
answers
40
views
test if rmarkdown format is rdocx_document similar to knitr::is_html_output()
Depending on format output, I want all plots in rmarkdown to be a certain size if the output is word (officedown::rdocx_document:) and a different size if the output is html (bookdown::html_document2:)...
0
votes
0
answers
41
views
Which file format keeps as much information as possible when converted from docx while being easily editable in vim? [closed]
Logos is a Bible study software that allows you do upload your own personal books (https://support.logos.com/hc/en-us/articles/360015926452-Personal-Books), but it requires them in the docx format ...
1
vote
1
answer
28
views
Avoid unwanted LF linefeeds in PanDoc docx to markdown conversion
I need to convert a PDF document to markdown. Because PanDoc doesn't support PDF as an input format, I use MS Word's online conversion. The result in Word looks like this:
As you can see, there's a ...
0
votes
0
answers
26
views
How to automating title and filename synchronization in Quarto Markdown with Lua filters?
I am authoring a Quarto markdown document, an extension of the Pandoc markdown system, and am crafting a YAML section to generate a PDF. My objective is to assign identical text to both the title and ...
0
votes
0
answers
19
views
How to change text appearance in a Pandoc lua filter?
I'm using Pandoc to convert my academic paper from markdown to pdf via latex. For the author block I'm using the scholarly-metadata.lua filter with a custom filter for the author block.
It currently ...
-1
votes
0
answers
22
views
LaTeX and Pandoc, splitting an align environment into multiple (still aligning) equation environments
I chose to ask here instead of TeX.SE due to the scope of this question being not only about TeX.
I'm using Pandoc (with Quarto) to write a Tufte-style book, and I wish to be able to put marginnote's ...
1
vote
1
answer
84
views
Code formatting not working with Pandoc in Haskell
When using the pandoc CLI with pandoc test.md -o test.html --highlight-style=pygments, code blocks in the input markdown file are converted to nicely formatted HTML as expected:
<div class="...
0
votes
1
answer
26
views
RMarkdown to PDF: Full Cover Page with a pre-designed picture but I also need to write text at a specific place
I want to include this image as a cover-page:
I want to include the Author details from YAML at the "Prepared By" Location.
So far, this is my setup:
---
title: "Report for `r params$...
0
votes
1
answer
27
views
Custom Pandoc Writer/Filter: Output BulletList as BBCode
I'd like to convert this markdown list (list.md):
- Europe
- Germany
- Berlin
- Hamburg
To the following output (BBCode):
[list]
[*]Europe
[list]
[*]Germany
[list]
...
0
votes
0
answers
7
views
how to automatically numbering the hyperlink reference list?
# content
someone said[1][link text]
others said[2][another link]
but the fact is in between[3][yet another link]
# refs
1. [https://example1.com][link test]
2. [https://example2.com][another link]
...
0
votes
0
answers
6
views
how can I get current section number in pandoc?
in latex we can do:
\section{Main Content}\label{sec:main}
we are at~\ref{sec:main}.
I wonder how can we do this in pandoc?
0
votes
0
answers
10
views
in pandoc how can I use per-section reference list for url link?
I have following code
# Section 1
[Link to Example 1][1]
[1]: https://example1
# Section 2
[Link to Example 2][1]
[1]: https://example2
however, it is always link to last [1] which is example2 ...
0
votes
1
answer
44
views
pandoc md -> latex write lua-filter to change latex-macro used for caption
I have written a custom latex .cls file to establish a typesetting workflow for the scientific journals of my research institute. The texts should be written in Markdown and then be processed with ...
3
votes
1
answer
34
views
How do I create an incremental list with nonincremental nested list in rmarkdown / pandoc?
I am creating a beamer presentation using rmarkdown. I want the top-level bullets (on some slides) to increment but the sub-bullets to appear with the top-level bullets.
How do I achieve this, ideally ...
2
votes
0
answers
97
views
How can I run a Rmarkdown file in VScode?
I'm using VSCode for R programming. As I try different ways of plotting my data, I thought it might be a nice idea to use a Rmd file to get track of what I tried but my problem is I can't make this ...
0
votes
0
answers
18
views
pandoc version 1.12.3 or higher is required error
Everything else in my code runs, but I receive this error when I try to knit the document: "Error: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::...
0
votes
2
answers
85
views
Is it possible to remove unused footnote references using Pandoc?
If wonder if it is possible to remove unused footnote references from a Markdown document using Pandoc using a built-in feature or a custom filter?
0
votes
0
answers
32
views
how to knit in rmarkdown?
I had to reinstall rstudio for some reason and now it just wont knit, everything is correct (even if I just try to knit the demo version.) I keep getting this error and have no idea what to do:
sh: /...
1
vote
0
answers
18
views
Trouble getting an rmarkdown file to render from an R script using the taskscheduleR package
I am trying to schedule a task using the taskscheduleR package that uses an R script to render an R markdown html file. I keep getting an error message saying Error: pandoc version 1.12.3 or higher is ...
0
votes
0
answers
49
views
pandoc ignores yaml options
I have trouble with the yaml header in a markdown file.
I would like to use the yaml header. At the moment I copy/paste the pandoc command with all cli arguments each time I need to process my file. ...
0
votes
1
answer
26
views
Why am I unable to use my custom-reference.docx when converting md to docx with Pandoc?
I'm trying to convert markdown to a docx file with Pandoc using a custom reference doc. I created a reference doc according to the Pandoc manual and placed it in my .pandoc folder. Here's a mwe of the ...
0
votes
1
answer
11
views
Superscript in pandoc epub not rendering on Kindle
I'm using markdown like the following to try and add superscript to my epub.
1^st^
This produces an epub with the expected html sup tag.
But when I open it on my Kindle, there is no superscript.
1
vote
2
answers
33
views
How to change document title when converting to HTML with Pandoc?
Let's say we have input.md file:
# Name
Contents
— and we need to automatically rewrite it in HTML:
# pandoc --from markdown --to html input.md -o output.html
# cat ./output.html
<h1 id="...
2
votes
1
answer
87
views
Long author list goes below title page. How to use page break on authors or affiliations?
I've been trying to knit an article with a very long author list. Here I'm using apa6_pdf with papaja. However, the long list seems not to start on a new page. Half of them cannot be shown on the ...
0
votes
1
answer
52
views
How convert table from markdown to restructured text
I am trying to convert a table in markdown format to rst format. I used pandoc and m2r, but the output is the same
import pypandoc
output = pypandoc.convert_file('README.md', 'rst', format='md', ...
0
votes
0
answers
24
views
Pandoc epub to pdf - remove captions
I'm looking for a way to remove auto generated captions when turning epub book into pdf (the epub has those hardcoded, so I get double captions under images).
I've tried cobbling together a lua filter,...
-1
votes
1
answer
23
views
Pandoc converting Latex document with package \lstinputlisting in .html
I tried to convert a Latex document with pandoc in html and I get the following error:
unexpected
\lstinputlisting[
Is it possible to use \lstinputlisting with Pandoc?
My code main.tex as follows:
\...
0
votes
0
answers
8
views
Render BibLaTeX Key and generate plain text bibliography
I would like to render the BibLaTeX keys in my markdown file and add a bibliography at the end of the text. Currently I use in a powershell script
pandoc -s $Markdown --bibliography "C:\...\ref....
0
votes
0
answers
30
views
Pandoc Checklist/Checkbox/Tasklist generation using task_lists Extension doesn't work
I checked pandoc --list-extensions=markdown and pandoc --list-extensions=gfm whether +task_lists is supported, and it is. However, even with that, I can't render checklists using tasks_lists while ...
0
votes
0
answers
21
views
How to link to first/cover page or document title above automatically generated toc of Pandoc-generated document?
I'm using --toc for automatically generated table of contents during document conversion from Markdown to EPUB using Pandoc to publish in Amazon KDP.
I'd like to have reference in my document point to ...
0
votes
1
answer
27
views
Is it possible to replace Markdown footnotes with links using Pandoc?
I want to convert a Markdown which uses extended syntax for footnotes to strict Markdown which YouTrack Knowledge Base uses. I want to rewrite footnotes using links syntax.
I wonder if there is ...
0
votes
1
answer
53
views
detailed_entries() not rendering correctly in R vitae package with custom template
I have created a very basic modification for a custom template as described here. However, when I knit the file mycv_public_mod.Rmd it does not render detailed_entries() correctly; rather it only ...
0
votes
0
answers
20
views
Asciidoctor tables in docx no style
I create a asciidoc documentation with asciidocFx and rendering looks ok.
When i convert the asciidoc to xml and xml to docx, i see in my docx that tables are no borders and i would like to know what ?...
2
votes
1
answer
89
views
Add incremental option to markdown tables in Rmarkdown with reveal.js
I have a table like that that I render on a slide with Rmarkdown into a reveal.js html presentation:
|variable |class |description |
|:------------------|:---------|:--------------...
0
votes
1
answer
67
views
How to solve the problem that pandoc fails to convert latex formulas to docx
I want to convert the following latex formula into a formula in docx. The latex formula can be used normally on both mathtype and mathjaxjs.
$\left\{ {\begin{array}{*{20}{l}} {(m + 2)x = 1}\\ {3x - (m ...
0
votes
0
answers
25
views
Pandoc Latex to markdown non-html figures/links
I use the following Pandoc command to convert Latex to markdown: pandoc -s latex.tex -o gfm.md -t gfm
I have any figures or links, pandoc converts these to HTML elements rather than markdown elements. ...
1
vote
0
answers
77
views
How to convert LaTeX document with multiple files to markdown using pandoc
I am trying to convert LaTeX (arXiv files) to markdown (where math equations can be set off with $). I am trying to use pandoc for this, yet run into issues where in a single document may have ...
0
votes
0
answers
48
views
How to configure R Markdown to use Latex Package Minted
I would like to use the latex package "Minted" with R Markdown but I am running into R Studio external package configuration issues.
Documentation for the Latex Minted Package can be found ...
1
vote
1
answer
131
views
How to create a self-contained HTML file without the embeded files being lost?
When I render my Quarto script as a self-contained HTML file using embed-resources: true in the YAML, all embedded files (.bib and .png) are deleted. Embedding them in the HTML works fine, but since ...
0
votes
0
answers
10
views
How to avoid converting latex in pandoc markdown to markdown conversion
I want to use pandoc to add citations to my markdown-latex file to post it on a website
Citation of [@gao2022scalingRMOver]
\begin{equation*}
1 = 2+2
\end{equation*}
# References
Currently with ...
0
votes
1
answer
43
views
How to convert selected sections of a html to docx
I routinely convert html to docx with this simple command:
pandoc -s input.html -o output.docx
I would like to use the same approach to only convert parts of the html file. The html file comprises of ...
0
votes
0
answers
38
views
Why are my LaTeX block-quotes not being formatted by Pandoc?
I am trying to format my thesis which I have written in LaTeX, but I cannot get Pandoc to pass my block-quotes through correctly.
Here is my minimal example:
\documentclass[12pt]{article}
\...
1
vote
1
answer
70
views
Minimal example of pandoc conversion from markdown to pdf with bbitex citations
I must be missing something terribly obvious but after a lot of banging my head against the docs and examples, I still can't get pandoc to process bibtex/biblatex citations properly. I'm using pandoc ...
0
votes
0
answers
22
views
How to make pandoc stop omitting equations when rendering to PowerPoint?
I have a presentation written in MarkDown that I have to render to PowerPoint. Rendering as Beamer pdf output, everything works fine. But when I try to output to PowerPoint, all equations are either ...
1
vote
1
answer
160
views
Quarto unable to resolve external file in "include-before-body"
I've long used R Markdown to create HTML documents. These documents rely on an external JS file that is accessed through HTTPS. Here is an example of the YAML header for this sort of R Markdown ...
0
votes
1
answer
65
views
Why is the number-offset YAML option not working in Quarto PDF rendering?
I'm trying to offset the section/heading numbers so that the first level 1 heading starts at 0. The default starts at 1. When I set number-offset: -1 for the PDF output option, it doesn't work. I've ...
0
votes
0
answers
49
views
Pandoc .md to .docx - how do you get lot and lof?
How do you convert markdown file to doc/docx with "list of figures" and "list of tables"? And the case is slightly trickier as I have some latex tags in the md file as I have to ...
0
votes
0
answers
7
views
HTML produced with tufte.csl does not give sidenotes for footnotes and citations
I have used pandoc before with the tufte.css to produce a bibliography with references in sidenotes and a full bibliography at the end; it put footnotes from markdown into sidenotes as well.
I now ...
0
votes
1
answer
20
views
May I factorize more the header I'm creating at the top of my markdown documents? It has constant parts, but also variables ones
I have organized the generation of my markdown documents that way:
export APPRENTISSAGE_HOME=the folder where my documents are
/apprentissage
gen.sh : a script running a command: 'pandoc -f ...