Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

3 votes
2 answers
3107 views
pandoc error: Permission denied
I'm on Manjaro Linux. I have `texlive-most` installed. I'm trying to make pdf files from md with pandoc. However, I keep getting `Permission denied` errors. I've tried using `pdflatex` and `pdfroff`. --- Run with the default `--pdf-engine=pdflatex`: ``` $ pandoc test.md -o test.pdf warning: kpathsea...
I'm on Manjaro Linux. I have texlive-most installed. I'm trying to make pdf files from md with pandoc. However, I keep getting Permission denied errors. I've tried using pdflatex and pdfroff. --- Run with the default --pdf-engine=pdflatex:
$ pandoc test.md -o test.pdf
warning: kpathsea: configuration file texmf.cnf not found in these directories: /usr/bin:/usr/bin/share/texmf-local/web2c:/usr/bin/share/texmf-dist/web2c:/usr/bin/share/texmf/web2c:/usr/bin/texmf-local/web2c:/usr/bin/texmf-dist/web2c:/usr/bin/texmf/web2c:/usr:/usr/share/texmf-local/web2c:/usr/share/texmf-dist/web2c:/usr/share/texmf/web2c:/usr/texmf-local/web2c:/usr/texmf-dist/web2c:/usr/texmf/web2c://texmf-local/web2c:/://share/texmf-local/web2c://share/texmf-dist/web2c://share/texmf/web2c://texmf-local/web2c://texmf-dist/web2c://texmf/web2c.

kpathsea: Running mktexfmt pdflatex.fmt
mktexfmt: Permission denied
warning: kpathsea: configuration file texmf.cnf not found in these directories: /usr/bin:/usr/bin/share/texmf-local/web2c:/usr/bin/share/texmf-dist/web2c:/usr/bin/share/texmf/web2c:/usr/bin/texmf-local/web2c:/usr/bin/texmf-dist/web2c:/usr/bin/texmf/web2c:/usr:/usr/share/texmf-local/web2c:/usr/share/texmf-dist/web2c:/usr/share/texmf/web2c:/usr/texmf-local/web2c:/usr/texmf-dist/web2c:/usr/texmf/web2c://texmf-local/web2c:/://share/texmf-local/web2c://share/texmf-dist/web2c://share/texmf/web2c://texmf-local/web2c://texmf-dist/web2c://texmf/web2c.

kpathsea: Running mktexfmt pdflatex.fmt
mktexfmt: Permission denied
Error producing PDF.
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Arch Linux) (preloaded format=pdflatex)
I can't find the format file `pdflatex.fmt'!
Quick investigation:
$ ll /usr/bin/mktexfmt
lrwxrwxrwx 1 root root 7 Nov  1  2019 /usr/bin/mktexfmt -> fmtutil

$ ll /usr/bin/fmtutil
lrwxrwxrwx 1 root root 48 Nov  1  2019 /usr/bin/fmtutil -> /usr/share/texmf-dist/scripts/texlive/fmtutil.pl

$ ll /usr/share/texmf-dist/scripts/texlive/fmtutil.pl
-rwxr-xr-x 1 root root 49K Nov  1  2019 /usr/share/texmf-dist/scripts/texlive/fmtutil.pl

$ locate pdflatex.fmt
/var/lib/texmf/web2c/pdftex/pdflatex.fmt

$ ll /var/lib/texmf/web2c/pdftex/pdflatex.fmt
-rw-r--r-- 1 root root 7.7M Jun  5 09:27 /var/lib/texmf/web2c/pdftex/pdflatex.fmt
--- Run with --pdf-engine=pdfroff:
$ pandoc --pdf-engine=pdfroff test.md -o test.pdf
pandoc: pdfroff: createProcess: runInteractiveProcess: exec: permission denied (Permission denied)
--- Running pandoc with sudo works but I'd rather not have to use sudo to generate pdfs. I see that mktexfmt has execute permission and pdflatex.fmt has read permission for everyone. I'd also like to use the default pdflatex instead of another engine. How should I fix this Permission denied problem?
ChocolateOverflow (1161 rep)
Jun 5, 2020, 06:40 AM • Last activity: Aug 3, 2025, 08:11 AM
23 votes
3 answers
21572 views
convert markdown to pdf in commandline
what is the simplest tool to convert markdown to pdf in commandline? I have found howtos where people suggest to use `pandoc`, but the required packages need gigabytes of dependencies: apt-get install pandoc texlive-latex-base texlive-fonts-recommended texlive-extra-utils texlive-latex-extra is ther...
what is the simplest tool to convert markdown to pdf in commandline? I have found howtos where people suggest to use pandoc, but the required packages need gigabytes of dependencies: apt-get install pandoc texlive-latex-base texlive-fonts-recommended texlive-extra-utils texlive-latex-extra is there some minimal tool that can convert simple markdown to pdf in commandline, that does not require tons of dependencies? I am using Debian 10.
Martin Vegter (586 rep)
Jul 22, 2022, 04:55 AM • Last activity: Mar 16, 2025, 02:02 PM
0 votes
1 answers
610 views
curl webpage and convert to markdown
having a dilemma with downloading webpages and converting them to markdown, for example: F=$(curl -O --silent https://www.guru3d.com/story/msi-teases-spatium-m560-ssd-with-innovative-nonmetallic-vc-cooling-technology | pandoc --extract-media="./"${F%.*}"_media" --from html --to markdown_strict -o "$...
having a dilemma with downloading webpages and converting them to markdown, for example: F=$(curl -O --silent https://www.guru3d.com/story/msi-teases-spatium-m560-ssd-with-innovative-nonmetallic-vc-cooling-technology | pandoc --extract-media="./"${F%.*}"_media" --from html --to markdown_strict -o "${F%.*}.md") HTML file downloads fine but the md file that gets created is not given proper name and is of no content. What is wrong in this syntax? Is there maybe some better or easier way of downloading webpages, converting them to markdown and storing html page images locally?
anon
May 31, 2024, 02:12 PM • Last activity: Jun 4, 2024, 03:50 AM
3 votes
2 answers
2988 views
how to set individual margins (left/right/top/bottom) with pandoc shell command when creating pdf?
I'm pleased to see pandoc can specify some latex (which I know almost nothing of) geometries to customize the margin size of a pdf it creates like so.... `pandoc -V geometry:margin=.5in somefile.mkd --pdf-engine=xelatex -o output.pdf` ...but is there a way to make the side margins different from top...
I'm pleased to see pandoc can specify some latex (which I know almost nothing of) geometries to customize the margin size of a pdf it creates like so.... pandoc -V geometry:margin=.5in somefile.mkd --pdf-engine=xelatex -o output.pdf ...but is there a way to make the side margins different from top/bottom margins? Can each of the four (top/right/bottom/left) margin sizes be set individually? I've tried options like geometry:margin=.5in,2in and geometry:margin-side and geometry:margin-top but none of those work. From https://pandoc.org/MANUAL.html these margin-left, margin-right, margin-top, margin-bottom should be able to be set individually but I can't figure out how to use them as commandline arguments.
alec (1928 rep)
Aug 8, 2020, 02:38 AM • Last activity: May 23, 2024, 04:16 PM
0 votes
1 answers
1274 views
Is there a tool that preserves CSS formatting during HTML to PDF conversion?
I tried the options in https://unix.stackexchange.com/questions/662801/is-there-a-script-or-tool-that-converts-html-to-pdf with command: pandoc documentation.html -o test.pdf --pdf-engine=xelatex but unfortunately they do not preserve the CSS formatting. For example I have this document that [looks...
I tried the options in https://unix.stackexchange.com/questions/662801/is-there-a-script-or-tool-that-converts-html-to-pdf with command: pandoc documentation.html -o test.pdf --pdf-engine=xelatex but unfortunately they do not preserve the CSS formatting. For example I have this document that looks like this : enter image description here --- but the resulting pdf output looks plain like this without css formatting. Notice that the header with blue background is gone and all the other formatted texts no background css. enter image description here
Harry McKenzie (137 rep)
Apr 11, 2024, 06:56 AM • Last activity: Apr 11, 2024, 09:42 AM
2 votes
1 answers
131 views
Add author note in YAML header with link in pandoc
I have a markdown file with a line in the header ``` --- author: Author\thanks{Institute. Email [test](mailto:test@test.org).} --- ``` My problem is: the link is not correctly interpreted by pandoc, even though other links are correctly interpreted in the markdown file. Please let me know if I shoul...
I have a markdown file with a line in the header
---
author: Author\thanks{Institute. Email [test](mailto:test@test.org).}
---
My problem is: the link is not correctly interpreted by pandoc, even though other links are correctly interpreted in the markdown file. Please let me know if I should provide a MWE. I guess the problem might be easy and I just do not see it.
ingli (2029 rep)
Apr 3, 2024, 09:26 AM • Last activity: Apr 8, 2024, 03:29 PM
4 votes
3 answers
476 views
How to merge these commands into one?
This is what I am wanting to do: Convert a folder of HTML files into markdown, also copying over the the XML metadata of each of the HTML files by converting into YAML. I have done research and came across the following commands: 1. `find . -name \*.md -type f -exec pandoc -o {}.txt {} \;` * [This w...
This is what I am wanting to do: Convert a folder of HTML files into markdown, also copying over the the XML metadata of each of the HTML files by converting into YAML. I have done research and came across the following commands: 1. find . -name \*.md -type f -exec pandoc -o {}.txt {} \; * [This was found here](https://stackoverflow.com/questions/10323317/batch-processing-pandoc-conversions) , and it is a command that works and uses pandoc, however the file extentions are ".html.md" not ".md" 2. find / -name "*.md" -type f -exec sh -c 'markdown "${0}" > "${0%.md}.html"' {} \; * [This was found here.](https://unix.stackexchange.com/questions/43669/use-find-command-to-convert-markdown-files-to-html) This apparently takes away the ".html.md" and turns into ".md", but it does not use pandoc. 3. pandoc -f html -t markdown -s input.html -o output.md * [This was found here.](https://stackoverflow.com/questions/22866498/use-pandoc-to-create-yaml-metadata-from-html-meta-tags?rq=1) This is the pandoc command that apparently copies over the metadata and turns it into YAML, however it does not work on a folder of files, only on open What I need is to have one single command that uses pandoc, gives the converted files the ".md." extension and not .html.md, and converts the XML metadata into YAML. All of this can be achieved using these three commands, they just need to be merged into one single command.
st john smith (61 rep)
Mar 14, 2015, 03:35 AM • Last activity: Oct 19, 2023, 11:42 AM
5 votes
3 answers
9148 views
How to install Pandoc on ArchLinux
Does anyone have suggestions about how to install pandoc on Arch? I am trying to install pandoc-static from here: https://aur.archlinux.org/packages/pandoc-static/, although it appears to be conflicting with my xmonad installation (I use xmonad as a TWM): [grease-lightning]/home/.../builds/pandoc-st...
Does anyone have suggestions about how to install pandoc on Arch? I am trying to install pandoc-static from here: https://aur.archlinux.org/packages/pandoc-static/ , although it appears to be conflicting with my xmonad installation (I use xmonad as a TWM): [grease-lightning]/home/.../builds/pandoc-static$ makepkg -s ==> Making package: pandoc-static 1.15.0.6-1 (Sun Aug 16 23:18:48 PDT 2015) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving sources... -> Found pandoc-static-1.15.0.6-1.tar.xz -> Found pandoc-static-1.15.0.6-1.tar.xz.sig ==> Validating source files with sha512sums... pandoc-static-1.15.0.6-1.tar.xz ... Passed pandoc-static-1.15.0.6-1.tar.xz.sig ... Skipped ==> Verifying source file signatures with gpg... pandoc-static-1.15.0.6-1.tar.xz ... Passed ==> Extracting sources... -> Extracting pandoc-static-1.15.0.6-1.tar.xz with bsdtar ==> Starting prepare()... ==> Removing existing $pkgdir/ directory... ==> Starting build()... -> Skipping List-0.5.2 -> Skipping SHA-1.6.4.2 -> Skipping base64-bytestring-1.0.0.1 -> Skipping byteable-0.1.1 -> Skipping cereal-0.4.1.1 -> Skipping cmdargs-0.10.13 -> Building data-default-class-0.0.1 Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal update' to download it. Resolving dependencies... In order, the following would be installed: data-default-class-0.0.1 (reinstall) cabal: The following packages are likely to be broken by the reinstalls: data-default-instances-old-locale-0.0.1 data-default-0.5.3 X11-1.6.1.2 xmonad-contrib-0.11.4 xmonad-0.11.1 X11-xft-0.3.1 data-default-instances-dlist-0.0.1 data-default-instances-containers-0.0.1 data-default-instances-base-0.0.1 Use --force-reinstalls if you want to install anyway. ==> ERROR: A failure occurred in build(). Aborting... I am afraid of breaking my xmonad TWM if I force the reinstall. What should I do? Perhaps I should install Pandoc via sudo cabal install --global pandoc? If so, how should I install cabal? I was thinking that I should download it from here: https://www.haskell.org/cabal/download.html Any suggestions or recommendations are appreciated. I am also happy to clarify anything.
modulitos (3275 rep)
Aug 17, 2015, 06:58 AM • Last activity: May 3, 2023, 01:48 PM
2 votes
2 answers
209 views
How to change the size of inline pdf in Pandoc generated html files?
I'm using [Pandoc](https://pandoc.org/MANUAL.html) to convert my mardown files to html files, html pages which are Github styled using [Github.html5](https://github.com/tajmone/pandoc-goodies/blob/master/templates/html5/github/GitHub.html5) from the [Pandoc-goodies](https://github.com/tajmone/pandoc...
I'm using [Pandoc](https://pandoc.org/MANUAL.html) to convert my mardown files to html files, html pages which are Github styled using [Github.html5](https://github.com/tajmone/pandoc-goodies/blob/master/templates/html5/github/GitHub.html5) from the [Pandoc-goodies](https://github.com/tajmone/pandoc-goodies) repo which is based on this other [repo](https://github.com/sindresorhus/github-markdown-css) . I'm extremely pleased to see that ![](./file.pdf) inserts the complete inline pdf in the html file output, however it's more or less at the minimal size, making it impossible to really read the pdf. How to tell Pandoc to resize this inline pdf ? I've tried the
trick but no luck.
Mike656 (23 rep)
Nov 11, 2022, 12:51 PM • Last activity: Nov 12, 2022, 03:37 PM
3 votes
2 answers
8717 views
How to process multiple files with pandoc?
files: ```$ ls a.md b.md c.md d.md e.md ``` Command: `pandoc file.md -f markdown file.pdf` How would I parallely process two pandoc instances simulatneously? Possibly with `xargs` or `parallel`. It would work like Iteration/ cmd 1 / cmd 2 1 / pandoc a.md -f markdown a.pdf / pandoc b.md -f markdown b...
files:
$ ls
a.md
b.md
c.md
d.md
e.md
Command: pandoc file.md -f markdown file.pdf How would I parallely process two pandoc instances simulatneously? Possibly with xargs or parallel. It would work like Iteration/ cmd 1 / cmd 2 1 / pandoc a.md -f markdown a.pdf / pandoc b.md -f markdown b.pdf 2 / pandoc c.md -f markdown c.pdf / pandoc d.md -f markdown d.pdf 3 / pandoc e.md -f markdown e.pdf / pandoc f.md -f markdown f.pdf 4 / pandoc g.md -f markdown g.pdf / pandoc h.md -f markdown h.pdf The files are randomly named.
precompute (35 rep)
Oct 28, 2018, 02:36 PM • Last activity: May 24, 2022, 08:26 AM
1 votes
1 answers
267 views
How to cat the first page of an epub file?
epubcat book.epub 1 3 # outputs plain text of pages 1 through 3 I don’t know if epubs have the concept of “pages.” If not, perhaps we can say each 400 chars are a page? A general solution that works for other ebook formats is better (mobi, azw3, etc). My own thoughts are currently on first convertin...
epubcat book.epub 1 3 # outputs plain text of pages 1 through 3 I don’t know if epubs have the concept of “pages.” If not, perhaps we can say each 400 chars are a page? A general solution that works for other ebook formats is better (mobi, azw3, etc). My own thoughts are currently on first converting the book to text via ebook-convert or pandoc and then extracting the needed amount, but this seems awfully inefficient as I intend to only get a little of the beginning of the content. You can download an example file that can be used for testing [here](http://82.102.11.148:8080//tmp/Time%20to%20Put%20Your%20Galleons%20Where%20Your%20Mouth%20Is%20-%20Tsume%20Yuki.epub) .
HappyFace (1694 rep)
Apr 10, 2020, 09:32 AM • Last activity: May 5, 2022, 11:46 PM
4 votes
1 answers
4624 views
Markdown & Pandoc : How to include a specific PDF page as image?
It is currently possible to insert a PDF as an image in markdown files through pandoc by doing this: ```markdown # Hello World ![My PDF file inserted](my-pdf.pdf) ``` Then you convert that markdown file with pandoc: ```bash ~$ pandoc -s -f markdown-implicit_figures my-document.md -o my-document.pdf...
It is currently possible to insert a PDF as an image in markdown files through pandoc by doing this:
# Hello World
![My PDF file inserted](my-pdf.pdf)
Then you convert that markdown file with pandoc:
~$ pandoc -s -f markdown-implicit_figures my-document.md -o my-document.pdf
And it works! **But pandoc only inserts the first page** of my-pdf.pdf. Is it possible to set which page to insert, or better, which pages range? Thanks by advance.
Creasixtine (801 rep)
Apr 5, 2021, 09:04 AM • Last activity: Mar 23, 2022, 01:25 AM
-7 votes
1 answers
365 views
What is the difference between lynx and pandoc?
[In this thread][1] I was suggested to do an action with `lynx` or `pandoc`. To my understanding, both programs can output an *all backend* and *solely or primarily textual* webpage, in console, pretty much as this webpage would be rendered on a web browser. I googled "lynx pandoc diff" (without quo...
In this thread I was suggested to do an action with lynx or pandoc. To my understanding, both programs can output an *all backend* and *solely or primarily textual* webpage, in console, pretty much as this webpage would be rendered on a web browser. I googled "lynx pandoc diff" (without quote marks) but didn't find a succinct explanation about the difference between the two programs. What is the difference between lynx and pandoc? ## Update I should have read a bit, an intro at least, about these utilities in man before publishing this question but due to not doing so and losing time in comments together with another user I do it symbolically to punish myself, better late than never as the principle goes. I have found after executing man pandoc: **pandoc - general markup converter** > Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. It can read Markdown, CommonMark, PHP Markdown Extra, GitHub-Flavored Markdown, MultiMark‐ down, and (subsets of) Textile, reStructuredText, HTML, LaTeX, MediaWiki markup, TWiki markup, Haddock markup, OPML, Emacs Org mode, DocBook, txt2tags, EPUB, ODT and Word docx; and it can write plain text. I have found after executing man lynx: **lynx - a general purpose distributed information browser for the World Wide Web** > Lynx is a fully-featured World Wide Web (WWW) client for users running cursor-addressable, character-cell display devices (e.g., vt100 terminals, vt100 emulators running on Windows 95/NT/XP/7/8 or any POSIX platform, or any other “curses-oriented” display). It will display hypertext markup language (HTML) documents containing links to files residing on the local system, as well as files residing on remote systems running Gopher, HTTP, FTP, WAIS, and NNTP servers. Current versions of Lynx run on Unix, VMS, Windows 95/NT/XP/7/8, DOS DJGPP and OS/2. > Lynx can be used to access information on the World Wide Web, or to build information systems intended primarily for local access. For example, Lynx has been used to build several Campus Wide Information Systems (CWIS). In addition, Lynx can be used to build systems isolated within a single LAN. I am anyway happy with publishing this question because if someone not familiar with the man culture or websites describing the utilities and stuck and feel overwhelmed, this post might help this person.
Lahor (123 rep)
Mar 14, 2022, 03:23 PM • Last activity: Mar 16, 2022, 12:22 AM
2 votes
1 answers
1803 views
Markdown to PDF Converstion with Pandoc: Make pages a specific size, in inches
So I know you can use `pagesize` and `geometry` to set the page size of the PDFs Pandoc makes to presets (like a5, b5, etc), but is there a way to set a precise pair of dimensions? I'm going to be using the PDF with Amazon Self-Publishing (paperback) and I need the pages to be exactly 5x8in, as that...
So I know you can use pagesize and geometry to set the page size of the PDFs Pandoc makes to presets (like a5, b5, etc), but is there a way to set a precise pair of dimensions? I'm going to be using the PDF with Amazon Self-Publishing (paperback) and I need the pages to be exactly 5x8in, as that's the closest setting KDP has to what I want. Thank you!
Alexis Purslane (663 rep)
Dec 10, 2021, 01:27 AM • Last activity: Dec 10, 2021, 05:28 PM
4 votes
1 answers
508 views
Avoiding awk injection
I have a script which reads an VCS log, converts that to latex, and then uses `awk` to replace keyword `@COMMITS@` in a template with the text: ``` untagged=$(get-commit-messages "$server" "$rev") IFS=$'\n' untagged=( $untagged ) # Tokenize based on newlines for commit in "${untagged[@]}"; do tex+="...
I have a script which reads an VCS log, converts that to latex, and then uses awk to replace keyword @COMMITS@ in a template with the text:
untagged=$(get-commit-messages "$server" "$rev")
IFS=$'\n' untagged=( $untagged )  # Tokenize based on newlines
for commit in "${untagged[@]}"; do
  tex+="\\\nui{"                  # Wrap each commit in a custom command
  tex+=$(echo "$commit" | pandoc -t latex --wrap=none)
  tex+="}
"
done

awk -v r="$tex" '{gsub(/@COMMITS@/,r)}1' template
Since commit messages are really just text, I use pandoc -t latex to ensure everything is escaped properly for the latex parser. My problem is that the awk parser un-escapes these. If I find a _ in a commit message, pandoc will replace that with \_, but then awk will convert it back and give a warning:
awk: warning: escape sequence \_' treated as plain _'
That will cause the latex parser to fail. Is there a way for me to prevent awk from un-escaping stuff? If not I'll look for a non-awk solution for text-replacement.
Stewart (15631 rep)
Jun 7, 2021, 02:06 PM • Last activity: Jun 7, 2021, 02:42 PM
2 votes
1 answers
1327 views
How to associate markdown files with a web browser?
Out of GUI-based software like ReText or Formiko, and using just a _command-line tool_ like pandoc, is it possible to open markdown files (MIME type association) as an HTML file in a web browser, without any browser-addon too? Notice that the original markdown file may include links to images or any...
Out of GUI-based software like ReText or Formiko, and using just a _command-line tool_ like pandoc, is it possible to open markdown files (MIME type association) as an HTML file in a web browser, without any browser-addon too? Notice that the original markdown file may include links to images or any kind of resources. Therefore, this process should be on-fly (stdout?), without saving the output HTML file to somewhere else like /tmp/ directory. And how can such a command be included in a .desktop file?
Anas R. (161 rep)
Mar 4, 2021, 03:06 PM • Last activity: Mar 21, 2021, 11:19 AM
2 votes
1 answers
291 views
Pandoc and Abbreviations
I'm trying to generate an ePub file with abbreviations. Here's an example: `input.md`: ```md --- title: Test language: en --- # Test HTML is maintained by W3C. ``` and `abbr.md`: ```md *[HTML]: Hyper Text Markup Language *[W3C]: World Wide Web Consortium ``` and `get-epub.sh`: ```md #!/bin/bash pand...
I'm trying to generate an ePub file with abbreviations. Here's an example: input.md:
---
title: Test
language: en
---

# Test

HTML is maintained by W3C.
and abbr.md:
*[HTML]: Hyper Text Markup Language
*[W3C]:  World Wide Web Consortium
and get-epub.sh:
#!/bin/bash
pandoc -f markdown+abbreviations -t epub\
--abbreviations="abbr.md"\
"input.md" -o "output.epub";
I'm expecting to see something like this in the output.epub file:

HTML is maintained by W3C.

while the actual output is:

HTML is maintained by W3C.

Did I miss something here?
Anas R. (161 rep)
Feb 1, 2021, 01:10 PM • Last activity: Feb 2, 2021, 02:45 PM
0 votes
0 answers
1006 views
pandoc: preserve centered text
i'm using pandoc (2.2.1) to convert an html page to pdf (or also markdown, org, plain text, etc. whatever works really). this is the page: https://www.exclassics.com/pamphlets/pamph004.htm pandoc returns the best output when i just use the ```-s``` flag and the default pdf engine (ie via latex rathe...
i'm using pandoc (2.2.1) to convert an html page to pdf (or also markdown, org, plain text, etc. whatever works really). this is the page: https://www.exclassics.com/pamphlets/pamph004.htm pandoc returns the best output when i just use the
-s
flag and the default pdf engine (ie via latex rather than direct). but it doesn't preserve the centered text at the beginning of the pamphlet. is is it possible to preserve this formatting? or workaround of some kind? anything better than converting to latex, manually centering it all, then converting again? i'm new to pandoc so sorry if this is obvious. i searched and found nothing.
mooseface (141 rep)
May 5, 2020, 05:08 PM
18 votes
2 answers
5245 views
Copy markdown input to the clipboard as rich text
I'm about to get involved in some collaborative prose writing with a friend of mine via email. As a regular person, he will of course be using MS Word document formats; as a massive nerd, I prefer to use markdown when writing on a computer. What I need is the exact opposite of [this question about c...
I'm about to get involved in some collaborative prose writing with a friend of mine via email. As a regular person, he will of course be using MS Word document formats; as a massive nerd, I prefer to use markdown when writing on a computer. What I need is the exact opposite of [this question about converting rich text copied from a webpage to markdown](https://unix.stackexchange.com/q/78395/34494) . My naive worst-case workflow would be: 1. Write up the document in markdown 2. Use pandoc -S file.mkd -o temp.html 3. Open up temp.html in a web browser 4. Copy & paste from the page to the open document in libreoffice I am certain that this can be optimised. (Google Docs is not an option in this case). Even though I've answered the main question, I still feel that this could be optimised further. If there is any way to concatenate .doc files (which I will be receiving and which pandoc can write to), perhaps with the libreoffice command-line interface, then I suppose it would be possible to construct an overly-complicated one-liner and avoid having to leave the terminal at all. If anyone finds a way to do that, I will happily accept that answer over my own.
evilsoup (7057 rep)
Jul 30, 2013, 06:10 PM • Last activity: May 4, 2020, 09:34 PM
1 votes
1 answers
1184 views
Cannot install miktex on Ubuntu 18
Ultimately the final goal is to convert HTML to PDF. I saw this solution: https://github.com/SebastiaanKlippert/go-wkhtmltopdf but the above solution seems to require headless chrome in order to run. So instead of that, I am going to try to use [pandoc][1] which will in turn use [miktex][2] to gener...
Ultimately the final goal is to convert HTML to PDF. I saw this solution: https://github.com/SebastiaanKlippert/go-wkhtmltopdf but the above solution seems to require headless chrome in order to run. So instead of that, I am going to try to use pandoc which will in turn use miktex to generate TeX from HTML? But when I install miktex, I get: $ sudo apt-get install miktex Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: miktex : Depends: libcurl3 (>= 7.16.2) but it is not installable Depends: libhunspell-1.4-0 but it is not installable Depends: libicu57 (>= 57.1-1~) but it is not installable Depends: libjpeg62-turbo (>= 1.3.1) but it is not installable Depends: libmpfr4 (>= 3.1.3) but it is not installable E: Unable to correct problems, you have held broken packages. does anyone know how to solve that dependency problem?
Alexander Mills (10734 rep)
Apr 16, 2020, 07:44 PM • Last activity: Apr 16, 2020, 10:14 PM
Showing page 1 of 20 total questions