pandoc

use pandoc to embed images into a docx file that are in a HTML

浪尽此生 提交于 2019-12-07 02:34:14
问题 Is it possible to embed images into a docx file that are embedded in a HTML file? I am trying and it's not working for me, and perhaps I am not adding some extra parameter when I am running pandoc. pandoc -f html -t docx -o testdoc.docx image.html Thank you very much! 回答1: I managed to solved this by executing the following command: pandoc -s file_name.html -o file_name.docx; There are actually 2 important ponits that you need to consider: The quality of the output file is pretty much related

pandoc can't install due to http-client

耗尽温柔 提交于 2019-12-07 00:50:33
问题 I'm trying to install pandoc 1.13.1 on Ubuntu 12.04.5, but its failing due to a dependency on http-client: $ cabal install pandoc --verbose Reading available packages... Choosing modular solver. Resolving dependencies... Extracting /home/paleozogt/.cabal/packages/hackage.haskell.org/pandoc/1.13.1/pandoc-1.13.1.tar.gz to /tmp/pandoc-1.13.1-14926... creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist creating /tmp/pandoc-1.13.1-14926

Set code background colour in R markdown to PDF

主宰稳场 提交于 2019-12-07 00:19:50
问题 When an Rnw file is converted to PDF with RStudio and knitr , the code blocks have a pleasant grey background colour (like they do here at SO). When I convert a md file to PDF , the background colour is white and I can't seem to change it. The knitr code decoration option background is only for LaTeX and has no effect in md . How can I set a background colour for code blocks in the PDF I get from my md file? I see in some related questions that editing the markdown.css file might be relevant,

How to use Python filter with Pandoc to convert md with tikz to html on Windows 8.1

左心房为你撑大大i 提交于 2019-12-06 21:30:18
问题 I am trying to use a Pandoc filter to convert a markdown file with a tikz picture to html. I am on Win 8.1 (and I have all the dependencies -- pdflatex, Python 2.7, ImageMagick, and the pandocfilters Python package). I am using the tikz.py script that John MacFarlane provides on github. I found a similar question on the Pandoc Google Group and John MacFarlane suggests wrapping the filter in a Windows batch script (the filter must be an executable). Here is my command line input (I'll provide

RStudio, knitr, pandoc, Word: how do I get a 'new page' in my docx?

廉价感情. 提交于 2019-12-06 20:37:27
问题 I am using the RStudio, knitr, pandoc, MS Word combo to get my final results in a docx document. Occasionally, I would like the report to continue on a new page. I can't find the way to achieve this. From what I have Googled, it seems to be possible with CSS . I don't know HTML or CSS , but if it is the solution I will learn. Just don't want to take the wrong road... 回答1: Try the LaTeX command \newpage. Pandoc recognizes it and might (not on a computer right now) translate it to a Word page

How to get a second bibliography?

蓝咒 提交于 2019-12-06 20:10:13
问题 In rmarkdown PDF and HTML I want two bibliographies —one for papers/books, and one for software I have used in my research. I found this related issue but it doesn't answer my question since it's concerning the combination of two *.bib files into one bibliography. I'm used to place my bibliography with <div id="refs"></div> as explained here. Possibly a second one can be placed similarly with <div id="refs_2"></div> , but I couldn't figure out how to do it since this "refs" seems not to be

How to use Pandoc image alignment to align two images in the same row?

╄→гoц情女王★ 提交于 2019-12-06 20:04:24
问题 From the pandoc documentation I know how to insert an image http://johnmacfarlane.net/pandoc/README.html#images Now I want to align two images in the same row, how can I do that? My desired output format is pdf. 回答1: You can try something like this: ![](tests/lalune.jpg)\ ![](tests/lalune.jpg) This will give you two side-by-side images. You won't have a caption, though; pandoc only treats an image as a captioned figure if it is by itself in a paragraph. 回答2: Expanding on from John's answer,

Posiible to use pandoc with HTML containing base64 inline images?

拥有回忆 提交于 2019-12-06 18:35:06
问题 I want to convert an HTML file containing base64 encoded images to DOCX. When I do this using pandoc the base64 images are not converted. Is it possible to include the base64 images using pandoc? 回答1: See https://pandoc.org/MANUAL.html#option--self-contained pandoc --self-contained --metadata pagetitle="title" index.md -o index-out.html This feature was unavailable due to a bug, but has been fixed since May, 2014. 来源: https://stackoverflow.com/questions/20059542/posiible-to-use-pandoc-with

NOTE or WARNING from package check when README.md includes images

我的未来我决定 提交于 2019-12-06 16:13:33
I have a package with a README.Rmd that I pass to rmarkdown::render() producing README.md and a directory README_files , which contains images in README.md . This looks like the tree below. README_files is not a standard package directory , so if it isn't in .Rbuildignore , checking the package with R CMD check shows a note: * checking top-level files ... NOTE Non-standard file/directory found at top level: README_files But including the directory in .Rbuildignore leads to a warning, if and only if checking the package --as-cran . IIUC Pandoc tries to generate HTML from README.md , but the

pandoc command line parameters for resolving internal links

只谈情不闲聊 提交于 2019-12-06 11:05:40
My problem is similar to this post , but not identical. I somehow can't figure out the correct pandoc command line parameters for maintaining/resolving cross-document links when using a couple of interlinked HTML files as the input. Let's say I have two files, chapter1.xhtml and chapter2.xhtml located in the /home/user/Documents folder with the following contents: <?xml version="1.0" encoding="utf-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body> <h3>Chapter 1<