当前位置:   article > 正文

pandoc实现文档不同格式的转换_java pandoc

java pandoc

Pandoc是一个文档格式转换器,Pandoc可以将下列格式文档进行相互转换。
Markdown、Microsoft Word、OpenOffice/LibreOffice、Jupyter notebook、HTML、EPUB、roff man、LaTeX和PDF。

安装与下载

具体的安装和简单教程可以看到:https://blog.csdn.net/xk_xx/article/details/104179256/
pandoc工具下载地址:https://github.com/jgm/pandoc/releases/tag/2.19.2

安装之后,可以通过在命令行界面运行如下命令查看是否成功:

[frank@LAPTOP-0OCJTGJR ~]$ pandoc --version
pandoc 1.12.3.1
Compiled with texmath 0.6.6, highlighting-kate 0.5.6.
Syntax highlighting is supported for the following languages:
    actionscript, ada, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog,
    clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, curry, d,
    diff, djangotemplate, doxygen, doxygenlua, dtd, eiffel, email, erlang,
    fortran, fsharp, gnuassembler, go, haskell, haxe, html, ini, java, javadoc,
    javascript, json, jsp, julia, latex, lex, literatecurry, literatehaskell,
    lua, makefile, mandoc, markdown, matlab, maxima, metafont, mips, modelines,
    modula2, modula3, monobasic, nasm, noweb, objectivec, objectivecpp, ocaml,
    octave, pascal, perl, php, pike, postscript, prolog, python, r,
    relaxngcompact, restructuredtext, rhtml, roff, ruby, rust, scala, scheme,
    sci, sed, sgml, sql, sqlmysql, sqlpostgresql, tcl, texinfo, verilog, vhdl,
    xml, xorg, xslt, xul, yacc, yaml
Default user data directory: /home/frank/.pandoc
Copyright (C) 2006-2013 John MacFarlane
Web:  http://johnmacfarlane.net/pandoc
This is free software; see the source for copying conditions.  There is no
warranty, not even for merchantability or fitness for a particular purpose.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

文档格式之间的转换

具体实例:

pandoc test.txt -o test.pdf
  • 1

-o是指output的意思,将test.txt转为test.pdf。

注意,pandoc不能对pdf进行转换,但是可以使用latex的文件转word,这转化通常比较实用:

pandoc test.tex -o test.docx
  • 1

具体的教程可以参考:
https://pandoc.org/MANUAL.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/159256
推荐阅读
相关标签
  

闽ICP备14008679号