diff options
37 files changed, 368 insertions, 159 deletions
@@ -23,6 +23,9 @@ test: bench: cabal bench +changes_github: + pandoc --filter extract-changes.hs changelog -t markdown_github | pbcopy + install: full cabal copy cabal register @@ -32,7 +35,7 @@ dist: man/pandoc.1 rm -rf "pandoc-${version}" tar xvzf dist/pandoc-${version}.tar.gz cd pandoc-${version} - cabal configure ${CABALARGS} && cabal build && cabal test && cd .. && rm -rf "pandoc-${version}" + stack setup && stack test && cd .. && rm -rf "pandoc-${version}" .travis.yml: pandoc.cabal make_travis_yml.hs runghc make_travis_yml.hs $< > $@ @@ -58,4 +61,4 @@ download_stats: clean: cabal clean -.PHONY: deps quick full install clean test bench osxpkg dist prof download_stats +.PHONY: deps quick full install clean test bench changes_github osxpkg dist prof download_stats @@ -29,7 +29,7 @@ on systems where LaTeX or ConTeXt is installed. Pandoc's enhanced version of Markdown includes syntax for [footnotes], [tables], flexible [ordered lists], [definition lists], [fenced code blocks], [superscripts and subscripts], [strikeout], [metadata blocks], automatic tables of -contents, [embedded LaTeX math][Math rendering in HTML], [citations], and [Markdown inside HTML block +contents, embedded LaTeX [math], [citations], and [Markdown inside HTML block elements][Extension: `markdown_in_html_blocks`]. (These enhancements, described below under [Pandoc's Markdown], can be disabled using the `markdown_strict` input or output format.) @@ -176,8 +176,8 @@ Production of a PDF requires that a LaTeX engine be installed (see are available: [`amsfonts`], [`amsmath`], [`lm`], [`ifxetex`], [`ifluatex`], [`eurosym`], [`listings`] (if the `--listings` option is used), [`fancyvrb`], [`longtable`], -[`booktabs`], [`url`], [`graphicx`] and [`grffile`] (if the -document contains images), [`color`], [`hyperref`], [`ulem`], +[`booktabs`], [`graphicx`] and [`grffile`] (if the +document contains images), [`hyperref`], [`ulem`], [`geometry`] (with the `geometry` variable set), [`setspace`] (with `linestretch`), and [`babel`] (with `lang`). The use of `xelatex` or `lualatex` as the LaTeX engine requires [`fontspec`]; `xelatex` uses @@ -206,12 +206,10 @@ or [variables for ConTeXt]. [`fancyvrb`]: https://ctan.org/pkg/fancyvrb [`longtable`]: https://ctan.org/pkg/longtable [`booktabs`]: https://ctan.org/pkg/booktabs -[`url`]: https://ctan.org/pkg/url [`graphicx`]: https://ctan.org/pkg/graphicx [`grffile`]: https://ctan.org/pkg/grffile [`geometry`]: https://ctan.org/pkg/geometry [`setspace`]: https://ctan.org/pkg/setspace -[`color`]: http://ctan.org/pkg/color [`xecjk`]: https://ctan.org/pkg/xecjk [`hyperref`]: https://ctan.org/pkg/hyperref [`ulem`]: https://ctan.org/pkg/ulem @@ -374,7 +372,7 @@ Reader options `...` to ellipses. Nonbreaking spaces are inserted after certain abbreviations, such as "Mr." (Note: This option is selected automatically when the output format is `latex` or `context`, unless `--no-tex-ligatures` - is used.) + is used. It has no effect for `latex` input.) `--old-dashes` @@ -651,15 +649,19 @@ Options affecting specific writers `--no-tex-ligatures` -: Do not convert quotation marks, apostrophes, and dashes to - the TeX ligatures when writing LaTeX or ConTeXt. Instead, just - use literal unicode characters. This is needed for using advanced - OpenType features with `xelatex` and `lualatex`. Note: normally - `--smart` is selected automatically for LaTeX and ConTeXt - output, but it must be specified explicitly if `--no-tex-ligatures` - is selected. If you use literal curly quotes, dashes, and ellipses - in your source, then you may want to use `--no-tex-ligatures` - without `--smart`. +: Do not use the TeX ligatures for quotation marks, apostrophes, + and dashes (`` `...' ``, ` ``..'' `, `--`, `---`) when + writing or reading LaTeX or ConTeXt. In reading LaTeX, + parse the characters `` ` ``, `'`, and `-` literally, rather + than parsing ligatures for quotation marks and dashes. In + writing LaTeX or ConTeXt, print unicode quotation mark and + dash characters literally, rather than converting them to + the standard ASCII TeX ligatures. Note: normally `--smart` + is selected automatically for LaTeX and ConTeXt output, but + it must be specified explicitly if `--no-tex-ligatures` is + selected. If you use literal curly quotes, dashes, and + ellipses in your source, then you may want to use + `--no-tex-ligatures` without `--smart`. `--listings` @@ -1115,6 +1117,11 @@ including all [reveal.js configuration options]. `theme`, `colortheme`, `fonttheme`, `innertheme`, `outertheme` : themes for LaTeX [`beamer`] documents +`navigation` +: controls navigation symbols in `beamer` documents + (default is `empty` for no navigation symbols; other valid values + are `frame`, `vertical`, and `horizontal`). + [reveal.js configuration options]: https://github.com/hakimel/reveal.js#configuration Variables for LaTeX @@ -1166,13 +1173,13 @@ LaTeX variables are used when [creating a PDF]. : allows font encoding to be specified through `fontenc` package (with `pdflatex`); default is `T1` (see guide to [LaTeX font encodings]) -`linkcolor`, `toccolor`, `urlcolor`, `citecolor` -: color for internal links, links in table of contents, external links, - and citation links, using options available through - [`color`] package, e.g. `red`, `green`, `magenta`, `cyan`, `blue`, `black` +`colorlinks` +: add color to link text; automatically enabled if any of `linkcolor`, `citecolor`, + `urlcolor`, or `toccolor` are set -`hidelinks` -: enables `hidelinks` option for [`hyperref`], disabling link color +`linkcolor`, `citecolor`, `urlcolor`, `toccolor` +: color for internal links, citation links, external links, and links in table of contents: + uses any of the [predefined LaTeX colors] `links-as-notes` : causes links to be printed as footnotes @@ -1204,6 +1211,7 @@ LaTeX variables are used when [creating a PDF]. [`report`]: https://ctan.org/pkg/report [`book`]: https://ctan.org/pkg/book [`memoir`]: https://ctan.org/pkg/memoir +[predefined LaTeX colors]: https://en.wikibooks.org/wiki/LaTeX/Colors#Predefined_colors [LaTeX Font Catalogue]: http://www.tug.dk/FontCatalogue/ [`mathpazo`]: https://ctan.org/pkg/mathpazo [LaTeX font encodings]: https://ctan.org/pkg/encguide @@ -1225,8 +1233,11 @@ Variables for ConTeXt `mainfont`, `sansfont`, `monofont`, `mathfont` : font families: take the name of any system font (see [ConTeXt Font Switching]) -`linkcolor` -: color for links, e.g. `red`, `blue` (see [ConTeXt Color]) +`linkcolor`, `contrastcolor` +: color for links outside and inside a page, e.g. `red`, `blue` (see [ConTeXt Color]) + +`linkstyle` +: typeface style for links, e.g. `normal`, `bold`, `slanted`, `boldslanted`, `type`, `cap`, `small` `indenting` : controls indentation of paragraphs, e.g. `yes,small,next` (see [ConTeXt Indentation]); @@ -3598,8 +3609,9 @@ instead, use raw HTML in your source and add `data-external="1"` to the tag with the `src` attribute. For example: <audio controls="1"> - <source src="http://www.sixbarsjail.it/tmp/bach_toccata.mp3" - data-external="1" type="audio/mpeg"></source> + <source src="http://example.com/music/toccata.mp3" + data-external="1" type="audio/mpeg"> + </source> </audio> Literate Haskell support diff --git a/RELEASE-CHECKLIST b/RELEASE-CHECKLIST index 5b3af693c..7ae936d96 100644 --- a/RELEASE-CHECKLIST +++ b/RELEASE-CHECKLIST @@ -16,11 +16,11 @@ _ Generate Mac OSX package. _ Generate Ubuntu/Debian deb package (cd deb; make package). -- Add release on github (and upload files) +- Add release on github (use 'make changes_github' and upload files) _ Upload to HackageDB -_ Update website, including short description of changes +_ Update website, including short description of changes ('make changes') _ Announce on pandoc-announce, pandoc-discuss @@ -1,3 +1,12 @@ +pandoc (1.15.2.1) + + * Added two missing test files, and `stack.yaml`, to + `extra-source-files` so they're included in the source tarball. + + * reveal.js template: Fixed parallaxBackground options. + `parallaxBackgroundHorizontal` and `parallaxBackgroundVertical` + need integer values, not strings. (Vaughn Iverson) + pandoc (1.15.2) * `pandoc my.md -t context -o my.pdf` will now create a PDF using @@ -13,6 +22,8 @@ pandoc (1.15.2) parsing (#2469). Tightened up the inline HTML parser so it disallows TagWarnings. + * Derive `Generic` instances for the types in `Text.Pandoc.Options`. + * Org reader: + Fix paragraph/list interaction (Albert Krewinkel, #2464). @@ -96,60 +107,76 @@ pandoc (1.15.2) * Textile writer: support start number in ordered lists (#2465). + * OpenDocument writer: Allow customization of opendocument + automatic styles. Automatic styles can now be inserted in the + template, which now provides the enclosing `<office:automatic-styles>` + tags (#2520). + + * Docx writer: insert space between footnote reference and note (#2527). + This matches Word's default behavior. + * EPUB writer: don't download linked media when `data-external` attribute set (#2473). By default pandoc downloads all linked media and includes it in the EPUB container. This can be disabled by setting `data-external` on the tags linking to media that should not be downloaded. Example: <audio controls="1"> - <source src="http://www.sixbarsjail.it/tmp/bach_toccata.mp3" - type="audio/mpeg"></source> + <source src="http://example.com/music/toccata.mp3" + data-external="1" type="audio/mpeg"> + </source> </audio> * HTML writer: use width on whole table if col widths sum to < 100%. Otherwise some browsers display the table with the columns separated far apart. - * Updated dzslides template from source (Andrew Dunning). - - * Asciidoc template: Fixed `author` and `date`; added `keywords`, + * AsciiDoc template: Fix `author` and `date`; add `keywords`, `abstract` (Andrew Dunning). - * HTML-based templates: + * HTML-based templates (Andrew Dunning): - + Use en dash instead of hypehn between title prefix & title - (Andrew Dunning.) - + Added `keywords` and fixed alignment (Andrew Dunning). - + Added `lang`, `dir`, `quotes` (Andrew Dunning). - + Always make author and date display conditional (Andrew Dunning). + + Use en dash instead of hyphen between title prefix and title. + + Add `keywords` to metadata. + + Add `lang`, `dir`, `quotes` where missing. + + Always make author and date display conditional. + + Updated dzslides template from source. * Man template: make "generated by" comment conditional. - * LaTeX template: + * LaTeX, Beamer templates: - + Simplify hyperref usage (Andrew Dunning, #139). - + Improved formatting of conditionals. - + `$for$` is always provided where the user might want to use - multiple options (does not change existing functionality). - + `hyperref` link rendering revised: - - the `hidelinks` option is now effectively the default (and has - been removed as a separate option), rather than setting all links to - black; - - link colours can be enabled more easily (using a slightly darker - version of the old Pandoc defaults) using a new `colorlinks` variable - - `pdfborder={0 0 0}` is automatically enabled in `hyperref` when - `colorlinks` is enabled, and is now only applied. + + Add `babel-otherlangs` for language divs/spans; `babel-newcommands`, + filled by commands that make babel understand the polyglossia-style + language directives (mb21, #137). + + Improved formatting of conditionals; `$for$` is always provided to allow + multiple options (Andrew Dunning, #141). + + Use `Ligatures=TeX` rather than `Mapping=tex-text` with `fontspec` + to improve support for LuaTeX (Andrew Dunning, #135). + + Revise `hyperref` usage (Andrew Dunning, #139, #141): + - use same options for all LaTeX engines; + - add `subtitle` and `keywords` to PDF metadata; + - do not override `hyperref` link coloring without user input, effectively making + the `hidelinks` option the default (removed as a separate variable); + - link colors can be enabled (using a slightly darker version of the old + defaults) using a new `colorlinks` variable, automatically used by + the LaTeX writer when custom colors are specified; + - `pdfborder={0 0 0}` is automatically set by `hyperref` with + `colorlinks`, and is only applied if `colorlinks` is disabled. * ConTeXt template (Andrew Dunning): - + Default link color to black. - + Define all sections. - + microtype applied to both regular text and small caps. - + `indenting` variable added. - + Renamed `style` to `linkstyle` for consistency. - + Separated `linkcontrastcolor` from `linkcolor`. - + Matching LaTeX `hyperref` usage, only disable link styling rather - than providing a specific setting. + + New variables for controlling styles: `linkstyle`, `linkcolor`, + `linkcontrastcolor`, `layout`, `pagenumbering`, `whitespace`, `indenting`, + `interlinespace`, `headertext`, `footertext`, `mainfont`, `sansfont`, + `monofont`, `mathfont`, `fontsize`. + + Default template no longer supports MkII. + + Improve writing of title block (suppressing numbering of first page). + + Add `title` `subtitle`, `author`, `date`, `keywords` to PDF metadata. + + Support `subtitle`, `abstract`. + + Support list of figures (`lof`), list of tables (`lot`). + + Disable link styling by default. + + Define styles for all section types. + + Enable microtype. + Improved formatting of conditionals. * Beamer template: added code to prevent slide breaks inside paragraphs @@ -157,10 +184,8 @@ pandoc (1.15.2) `allowframebreaks` is used. It is especially helpful for bibliography slides. - * Updated latex, beamer templates to support language divs/spans. - This adds a template variable that can be filled - by commands that make babel understand the polyglossia-style - language directives. Thanks to mb21. + * OpenDocument template: Add `<office:automatic-styles>` tag around + automatic styles. The writer now longer provides this (see #2520). * Restored Text.Pandoc.Compat.Monoid. @@ -176,7 +201,7 @@ pandoc (1.15.2) * Change default for old-locale flag to False. - * Use stack in deb and osx package generators. + * Use stack in deb, osx, and Windows package generators. * Added Vagrantfile for building deb in vm. This should help in automating binary package creation. 'make package' @@ -396,7 +421,7 @@ pandoc (1.15.1) Move HTML5 shiv after CSS and fix URL (Andrew Dunning). Add dir attribute in html5 (Andrew Dunning). + reveal.js: Add `controls`, `progress` variables (Grégoire Pineau, #127). - Add `width`, `height` variables (Anrew Dunning). Update template + Add `width`, `height` variables (Andrew Dunning). Update template from 3.1 source (Andrew Dunning). All configuration options are now available as variables, but are only be included if set (reveal.js uses defaults otherwise). diff --git a/data/templates b/data/templates -Subproject ef963c30605d7f0558b9cfbf7183f0aa4aad688 +Subproject ff9ebaa31ae31401e236574e81c2e75609adc72 diff --git a/deb/GlobalSignDomainValidationCA-SHA256-G2.pem b/deb/GlobalSignDomainValidationCA-SHA256-G2.pem new file mode 100644 index 000000000..b9130c350 --- /dev/null +++ b/deb/GlobalSignDomainValidationCA-SHA256-G2.pem @@ -0,0 +1,26 @@ +-----BEGIN CERTIFICATE-----
+MIIEYzCCA0ugAwIBAgILBAAAAAABRE7wPiAwDQYJKoZIhvcNAQELBQAwVzELMAkG
+A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
+b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw0xNDAyMjAxMDAw
+MDBaFw0yNDAyMjAxMDAwMDBaMGAxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9i
+YWxTaWduIG52LXNhMTYwNAYDVQQDEy1HbG9iYWxTaWduIERvbWFpbiBWYWxpZGF0
+aW9uIENBIC0gU0hBMjU2IC0gRzIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
+AoIBAQCp3cwOs+IyOd1JIqgTaZOHiOEM7nF9vZCHll1Z8syz0lhXV/lG72wm2DZC
+jn4wsy+aPlN7H262okxFHzzTFZMcie089Ffeyr3sBppqKqAZUn9R0XQ5CJ+r69eG
+ExWXrjbDVGYOWvKgc4Ux47JkFGr/paKOJLu9hVIVonnu8LXuPbj0fYC82ZA1ZbgX
+qa2zmJ+gfn1u+z+tfMIbWTaW2jcyS0tdNQJjjtunz2LuzC7Ujcm9PGqRcqIip3It
+INH6yjfaGJjmFiRxJUvE5XuJUgkC/VkrBG7KB4HUs9ra2+PMgKhWBwZ8lgg3nds4
+tmI0kWIHdAE42HIw4uuQcSZiwFfzAgMBAAGjggElMIIBITAOBgNVHQ8BAf8EBAMC
+AQYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQU6k581IAt5RWBhiaMgm3A
+mKTPlw8wRwYDVR0gBEAwPjA8BgRVHSAAMDQwMgYIKwYBBQUHAgEWJmh0dHBzOi8v
+d3d3Lmdsb2JhbHNpZ24uY29tL3JlcG9zaXRvcnkvMDMGA1UdHwQsMCowKKAmoCSG
+Imh0dHA6Ly9jcmwuZ2xvYmFsc2lnbi5uZXQvcm9vdC5jcmwwPQYIKwYBBQUHAQEE
+MTAvMC0GCCsGAQUFBzABhiFodHRwOi8vb2NzcC5nbG9iYWxzaWduLmNvbS9yb290
+cjEwHwYDVR0jBBgwFoAUYHtmGkUNl8qJUC99BM00qP/8/UswDQYJKoZIhvcNAQEL
+BQADggEBANdFnqDc4ONhWgt9d4QXLWVagpqNoycqhffJ7+mG/dRHzQFSlsVDvTex
+4bjyqdKKEYRxkRWJ3AKdC8tsM4U0KJ4gsrGX3G0LEME8zV/qXdeYMcU0mVwAYVXE
+GwJbxeOJyLS4bx448lYm6UHvPc2smU9ZSlctS32ux4j71pg79eXw6ImJuYsDy1oj
+H6T9uOr7Lp2uanMJvPzVoLVEgqtEkS5QLlfBQ9iRBIvpES5ftD953x77PzAAi1Pj
+tywdO02L3ORkHQRYM68bVeerDL8wBHTk8w4vMDmNSwSMHnVmZkngvkA0x1xaUZK6
+EjxS1QSCVS1npd+3lXzuP8MIugS+wEY=
+-----END CERTIFICATE-----
diff --git a/deb/Makefile b/deb/Makefile index 207de6895..0c4262fc0 100644 --- a/deb/Makefile +++ b/deb/Makefile @@ -1,5 +1,5 @@ COMMIT?=HEAD -VAGRANTBOX?=ubuntu/trusty64 +VAGRANTBOX?=debian/wheezy64 .PHONY: package clean diff --git a/deb/Vagrantfile b/deb/Vagrantfile index a2a288ffe..3a6ac14e8 100644 --- a/deb/Vagrantfile +++ b/deb/Vagrantfile @@ -12,7 +12,7 @@ Vagrant.configure(2) do |config| # Every Vagrant development environment requires a box. You can search for # boxes at https://atlas.hashicorp.com/search. - config.vm.box = ENV['VAGRANTBOX'] || "ubuntu/trusty64" + config.vm.box = ENV['VAGRANTBOX'] || "ubuntu/precise64" # Disable automatic box update checking. If you disable this, then # boxes will only be checked for updates when the user runs @@ -48,7 +48,7 @@ Vagrant.configure(2) do |config| # vb.gui = true # Customize the amount of memory on the VM: - vb.memory = "4096" + vb.memory = "2048" end # # View the documentation for the provider you are using for more @@ -65,9 +65,11 @@ Vagrant.configure(2) do |config| # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the # documentation for more information about their specific syntax and use. config.vm.provision "shell", inline: <<-SHELL - wget -q -O- https://s3.amazonaws.com/download.fpcomplete.com/debian/fpco.key | sudo apt-key add - - echo 'deb http://download.fpcomplete.com/ubuntu/trusty stable main'|sudo tee /etc/apt/sources.list.d/fpco.list + wget -q https://s3.amazonaws.com/download.fpcomplete.com/debian/fpco.key + sudo apt-key add fpco.key + echo 'deb http://download.fpcomplete.com/ubuntu/precise stable main'|sudo tee /etc/apt/sources.list.d/fpco.list sudo apt-get update sudo apt-get install -y stack build-essential debhelper dh-make + sudo cp /vagrant_data/deb/*.pem /etc/ssl/certs/ SHELL end diff --git a/deb/control.in b/deb/control.in index 0aabf67a2..549f9c115 100644 --- a/deb/control.in +++ b/deb/control.in @@ -4,7 +4,7 @@ Section: text Priority: optional Architecture: ARCHITECTURE Installed-Size: INSTALLED_SIZE -Depends: libc6 (>= 2.11), libgmp10, zlib1g (>= 1:1.1.4) +Depends: libc6 (>= 2.13), libgmp10, zlib1g (>= 1:1.1.4) Maintainer: John MacFarlane <jgm@berkeley.edu> Description: general markup converter Pandoc is a Haskell library for converting from one markup diff --git a/deb/haskell.org.pem b/deb/haskell.org.pem new file mode 100644 index 000000000..05bdffb9a --- /dev/null +++ b/deb/haskell.org.pem @@ -0,0 +1,30 @@ +-----BEGIN CERTIFICATE-----
+MIIFMjCCBBqgAwIBAgISESGwJtbMWHI+x6Mmm0FEK3WqMA0GCSqGSIb3DQEBCwUA
+MGAxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTYwNAYD
+VQQDEy1HbG9iYWxTaWduIERvbWFpbiBWYWxpZGF0aW9uIENBIC0gU0hBMjU2IC0g
+RzIwHhcNMTUxMTExMjE0NjUzWhcNMTYxMjE1MDYyODEwWjA7MSEwHwYDVQQLExhE
+b21haW4gQ29udHJvbCBWYWxpZGF0ZWQxFjAUBgNVBAMMDSouaGFza2VsbC5vcmcw
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDNixwKSAJbYPGflK3nO/hH
+CxigkOiKQr9q47aY9S8l0vU9ISC0eiuKkFD42ia5GzeqyBsGF4HoSF0MtBivShJz
+oxt6xFtmagKRX6VB3Qo41+36IKnqmvWE5CAoNIyoy9+ZgfKQKOaIjQzFd4edYxfa
+AQgEypRjod/BjY4NlAOILXa1L7cNQp29QkouODU5oW9mT/TWh3gNIO7cjqq+GHxh
+7/itRt7I6CJOPhEZa3UaA27yNbDsJK8dxGXeGqkUVqdoff98zO4LygyNxwIguWbD
+ektP8472N9tR4G2e/f3tnWPFzmSFIUYQPQQZsWbMi5lBVAL1IX3kgO8qgyJOQeWN
+AgMBAAGjggIJMIICBTAOBgNVHQ8BAf8EBAMCBaAwSQYDVR0gBEIwQDA+BgZngQwB
+AgEwNDAyBggrBgEFBQcCARYmaHR0cHM6Ly93d3cuZ2xvYmFsc2lnbi5jb20vcmVw
+b3NpdG9yeS8wYgYDVR0RBFswWYINKi5oYXNrZWxsLm9yZ4IYYXV0b2Rpc2NvdmVy
+Lmhhc2tlbGwub3JnghBtYWlsLmhhc2tlbGwub3Jngg9vd2EuaGFza2VsbC5vcmeC
+C2hhc2tlbGwub3JnMAkGA1UdEwQCMAAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsG
+AQUFBwMCMEMGA1UdHwQ8MDowOKA2oDSGMmh0dHA6Ly9jcmwuZ2xvYmFsc2lnbi5j
+b20vZ3MvZ3Nkb21haW52YWxzaGEyZzIuY3JsMIGUBggrBgEFBQcBAQSBhzCBhDBH
+BggrBgEFBQcwAoY7aHR0cDovL3NlY3VyZS5nbG9iYWxzaWduLmNvbS9jYWNlcnQv
+Z3Nkb21haW52YWxzaGEyZzJyMS5jcnQwOQYIKwYBBQUHMAGGLWh0dHA6Ly9vY3Nw
+Mi5nbG9iYWxzaWduLmNvbS9nc2RvbWFpbnZhbHNoYTJnMjAdBgNVHQ4EFgQUsWoN
+IkHc+WhdtDwGB4pRHYZu+x4wHwYDVR0jBBgwFoAU6k581IAt5RWBhiaMgm3AmKTP
+lw8wDQYJKoZIhvcNAQELBQADggEBADrupN5ncMzXJLUxtIkhZKJUOQByrkVqmlvO
+me3tsAQn2YccC1YPE7wlkMttV8h8JN3/CWlvcSwfncXPzDF4lV7tuunapmAJLTxz
+Iz4tCIMzKVaGaivxYe9dml9LtiicsAOo29ZGE4E+mTHXR0EBjylKn4RS5f6XLawC
+wvdzYEH6nw6XbD6PlvYjZekIcky1lZ99cqsBoYiht0PQEcj8LWcBW79o1UWYEaXv
+q8b47QhFYMQ+IKwfIo3PSWjotIBw35lnrfKlrWvqyRA5t+ollH+6X1vdYOibupts
+rUdXZCfeWcwhFiJVOrq7kxpQLNZsPq8nm55Ao2tRGsrDMwsuZhc=
+-----END CERTIFICATE-----
diff --git a/deb/stack.yaml b/deb/stack.yaml index dcc76b61c..b4ee36157 100644 --- a/deb/stack.yaml +++ b/deb/stack.yaml @@ -13,5 +13,5 @@ flags: debug: false packages: - '..' -- 'https://hackage.haskell.org/package/pandoc-citeproc-0.8.1.1/pandoc-citeproc-0.8.1.1.tar.gz' +- 'https://hackage.haskell.org/package/pandoc-citeproc-0.8.1.3/pandoc-citeproc-0.8.1.3.tar.gz' resolver: lts-3.13 diff --git a/extract-changes.hs b/extract-changes.hs new file mode 100644 index 000000000..8c8160c2c --- /dev/null +++ b/extract-changes.hs @@ -0,0 +1,9 @@ +-- Extract changes from latest version in changelog. +import Text.Pandoc.JSON + +main = toJSONFilter extractFirst + +extractFirst :: Pandoc -> Pandoc +extractFirst (Pandoc meta (Para{} : BulletList bs : _)) = + Pandoc meta [BulletList bs] +extractFirst x = x diff --git a/make_osx_package.sh b/make_osx_package.sh index a544ad7a0..320c3fead 100755 --- a/make_osx_package.sh +++ b/make_osx_package.sh @@ -14,13 +14,14 @@ PACKAGEMAKER=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker # We need this for hsb2hs: PATH=$LOCALBIN:$PATH +export MACOSX_DEPLOYMENT_TARGET=10.7 # echo Removing old files... rm -rf $DIST mkdir -p $DIST mkdir -p $RESOURCES stack setup -which hsb2hs | stack install --stack-yaml=stack.hsb2hs.yaml +which hsb2hs || stack install --stack-yaml=stack.hsb2hs.yaml echo Building pandoc... stack clean diff --git a/man/pandoc.1 b/man/pandoc.1 index 741d2395f..0126fc6de 100644 --- a/man/pandoc.1 +++ b/man/pandoc.1 @@ -1,5 +1,5 @@ .\"t -.TH PANDOC 1 "November 12, 2015" "pandoc 1.15.2" +.TH PANDOC 1 "November 12, 2015" "pandoc 1.15.2.1" .SH NAME pandoc - general markup converter .SH SYNOPSIS @@ -774,6 +774,7 @@ documents. \f[C]javascript\f[] obfuscates them using javascript. \f[C]references\f[] obfuscates them by printing their letters as decimal or hexadecimal character references. +The default is \f[C]javascript\f[]. .RS .RE .TP @@ -3959,6 +3960,9 @@ treated as spaces or as hard line breaks. This option is intended for use with East Asian languages where spaces are not used between words, but text is divided into lines for readability. +.SS Extension: \f[C]emoji\f[] +.PP +Parses textual emojis like \f[C]:smile:\f[] as Unicode emoticons. .SS Extension: \f[C]tex_math_single_backslash\f[] .PP Causes anything between \f[C]\\(\f[] and \f[C]\\)\f[] to be interpreted @@ -4064,7 +4068,8 @@ variants are supported: \f[C]auto_identifiers\f[], \f[C]ascii_identifiers\f[], \f[C]backtick_code_blocks\f[], \f[C]autolink_bare_uris\f[], \f[C]intraword_underscores\f[], \f[C]strikeout\f[], -\f[C]hard_line_breaks\f[], \f[C]shortcut_reference_links\f[]. +\f[C]hard_line_breaks\f[], \f[C]emoji\f[], +\f[C]shortcut_reference_links\f[]. .RS .RE .TP @@ -4486,8 +4491,9 @@ For example: .nf \f[C] <audio\ controls="1"> -\ <source\ src="http://www.sixbarsjail.it/tmp/bach_toccata.mp3" -\ data\-external="1"\ type="audio/mpeg"></source> +\ \ <source\ src="http://example.com/music/toccata.mp3" +\ \ \ \ \ \ \ \ \ \ data\-external="1"\ type="audio/mpeg"> +\ \ </source> </audio> \f[] .fi diff --git a/osx/stack.yaml b/osx/stack.yaml index ec85fb775..71af73661 100644 --- a/osx/stack.yaml +++ b/osx/stack.yaml @@ -16,5 +16,5 @@ ghc-options: highlighting-kate: '-pgmP cpphs -optP--cpp' packages: - '..' -- 'https://hackage.haskell.org/package/pandoc-citeproc-0.8.1.1/pandoc-citeproc-0.8.1.1.tar.gz' +- 'https://hackage.haskell.org/package/pandoc-citeproc-0.8.1.3/pandoc-citeproc-0.8.1.3.tar.gz' resolver: lts-3.13 diff --git a/pandoc.cabal b/pandoc.cabal index f4823dacd..fd9a43179 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -1,5 +1,5 @@ Name: pandoc -Version: 1.15.2 +Version: 1.15.2.1 Cabal-Version: >= 1.10 Build-Type: Custom License: GPL @@ -113,6 +113,8 @@ Extra-Source-Files: -- documentation INSTALL, BUGS, CONTRIBUTING.md, changelog man/pandoc.1 + -- stack build plan + stack.yaml -- files needed to build man page man/capitalizeHeaders.hs man/removeNotes.hs @@ -187,6 +189,8 @@ Extra-Source-Files: tests/writer.fb2 tests/writer.opml tests/writer.dokuwiki + tests/writers-lang-and-dir.latex + tests/writers-lang-and-dir.context tests/dokuwiki_inline_formatting.dokuwiki tests/lhs-test.markdown tests/lhs-test.markdown+lhs @@ -1010,6 +1010,7 @@ defaultWriterName x = ".epub" -> "epub" ".org" -> "org" ".asciidoc" -> "asciidoc" + ".adoc" -> "asciidoc" ".pdf" -> "latex" ".fb2" -> "fb2" ".opml" -> "opml" @@ -1139,7 +1140,7 @@ main = do -- --bibliography implies -F pandoc-citeproc for backwards compatibility: - let needsCiteproc = any ("--bibliography" `isPrefixOf`) rawArgs && + let needsCiteproc = M.lookup "bibliography" (optMetadata opts) /= Nothing && optCiteMethod opts `notElem` [Natbib, Biblatex] && "pandoc-citeproc" `notElem` map takeBaseName filters let filters' = if needsCiteproc then "pandoc-citeproc" : filters @@ -1175,6 +1176,9 @@ main = do "beamer" `isPrefixOf` writerName' let conTeXtOutput = "context" `isPrefixOf` writerName' + let laTeXInput = "latex" `isPrefixOf` readerName' || + "beamer" `isPrefixOf` readerName' + writer <- if ".lua" `isSuffixOf` writerName' -- note: use non-lowercased version writerName then return $ IOStringWriter $ writeCustom writerName @@ -1256,8 +1260,10 @@ main = do uriFragment = "" } _ -> Nothing - let readerOpts = def{ readerSmart = smart || (texLigatures && - (laTeXOutput || conTeXtOutput)) + let readerOpts = def{ readerSmart = if laTeXInput + then texLigatures + else smart || (texLigatures && + (laTeXOutput || conTeXtOutput)) , readerStandalone = standalone' , readerParseRaw = parseRaw , readerColumns = columns diff --git a/src/Text/Pandoc/Options.hs b/src/Text/Pandoc/Options.hs index b7d268a65..158303acd 100644 --- a/src/Text/Pandoc/Options.hs +++ b/src/Text/Pandoc/Options.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-} {- Copyright (C) 2012-2015 John MacFarlane <jgm@berkeley.edu> @@ -54,6 +54,7 @@ import Text.Pandoc.Highlighting (Style, pygments) import Text.Pandoc.MediaBag (MediaBag) import Data.Data (Data) import Data.Typeable (Typeable) +import GHC.Generics (Generic) -- | Individually selectable syntax extensions. data Extension = @@ -114,7 +115,7 @@ data Extension = | Ext_line_blocks -- ^ RST style line blocks | Ext_epub_html_exts -- ^ Recognise the EPUB extended version of HTML | Ext_shortcut_reference_links -- ^ Shortcut reference links - deriving (Show, Read, Enum, Eq, Ord, Bounded, Data, Typeable) + deriving (Show, Read, Enum, Eq, Ord, Bounded, Data, Typeable, Generic) pandocExtensions :: Set Extension pandocExtensions = Set.fromList @@ -258,7 +259,7 @@ data ReaderOptions = ReaderOptions{ , readerDefaultImageExtension :: String -- ^ Default extension for images , readerTrace :: Bool -- ^ Print debugging info , readerTrackChanges :: TrackChanges -} deriving (Show, Read, Data, Typeable) +} deriving (Show, Read, Data, Typeable, Generic) instance Default ReaderOptions where def = ReaderOptions{ @@ -280,7 +281,7 @@ instance Default ReaderOptions -- Writer options -- -data EPUBVersion = EPUB2 | EPUB3 deriving (Eq, Show, Read, Data, Typeable) +data EPUBVersion = EPUB2 | EPUB3 deriving (Eq, Show, Read, Data, Typeable, Generic) data HTMLMathMethod = PlainMath | LaTeXMathML (Maybe String) -- url of LaTeXMathML.js @@ -290,18 +291,18 @@ data HTMLMathMethod = PlainMath | MathML (Maybe String) -- url of MathMLinHTML.js | MathJax String -- url of MathJax.js | KaTeX String String -- url of stylesheet and katex.js - deriving (Show, Read, Eq, Data, Typeable) + deriving (Show, Read, Eq, Data, Typeable, Generic) data CiteMethod = Citeproc -- use citeproc to render them | Natbib -- output natbib cite commands | Biblatex -- output biblatex cite commands - deriving (Show, Read, Eq, Data, Typeable) + deriving (Show, Read, Eq, Data, Typeable, Generic) -- | Methods for obfuscating email addresses in HTML. data ObfuscationMethod = NoObfuscation | ReferenceObfuscation | JavascriptObfuscation - deriving (Show, Read, Eq, Data, Typeable) + deriving (Show, Read, Eq, Data, Typeable, Generic) -- | Varieties of HTML slide shows. data HTMLSlideVariant = S5Slides @@ -310,13 +311,13 @@ data HTMLSlideVariant = S5Slides | DZSlides | RevealJsSlides | NoSlides - deriving (Show, Read, Eq, Data, Typeable) + deriving (Show, Read, Eq, Data, Typeable, Generic) -- | Options for accepting or rejecting MS Word track-changes. data TrackChanges = AcceptChanges | RejectChanges | AllChanges - deriving (Show, Read, Eq, Data, Typeable) + deriving (Show, Read, Eq, Data, Typeable, Generic) -- | Options for writers data WriterOptions = WriterOptions @@ -363,7 +364,7 @@ data WriterOptions = WriterOptions , writerMediaBag :: MediaBag -- ^ Media collected by docx or epub reader , writerVerbose :: Bool -- ^ Verbose debugging output , writerLaTeXArgs :: [String] -- ^ Flags to pass to latex-engine - } deriving (Show, Data, Typeable) + } deriving (Show, Data, Typeable, Generic) instance Default WriterOptions where def = WriterOptions { writerStandalone = False diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs index ab49bf002..9f1c7af0a 100644 --- a/src/Text/Pandoc/Readers/Docx.hs +++ b/src/Text/Pandoc/Readers/Docx.hs @@ -503,6 +503,10 @@ bodyPartToBlocks (ListItem pPr numId lvl levelInfo parparts) = do ] blks <- bodyPartToBlocks (Paragraph pPr parparts) return $ divWith ("", ["list-item"], kvs) blks +bodyPartToBlocks (DummyListItem pPr _ parparts) = + let pPr' = pPr {pStyle = "ListParagraph": (pStyle pPr)} + in + bodyPartToBlocks $ Paragraph pPr' parparts bodyPartToBlocks (Tbl _ _ _ []) = return $ para mempty bodyPartToBlocks (Tbl cap _ look (r:rs)) = do diff --git a/src/Text/Pandoc/Readers/Docx/Parse.hs b/src/Text/Pandoc/Readers/Docx/Parse.hs index 02397d658..5910a476b 100644 --- a/src/Text/Pandoc/Readers/Docx/Parse.hs +++ b/src/Text/Pandoc/Readers/Docx/Parse.hs @@ -144,9 +144,6 @@ type Level = (String, String, String, Maybe Integer) data DocumentLocation = InDocument | InFootnote | InEndnote deriving (Eq,Show) --- data RelationshipType = DocumentRel | FootnoteRel | EndnoteRel --- deriving Show - data Relationship = Relationship DocumentLocation RelId Target deriving Show @@ -181,6 +178,7 @@ defaultParagraphStyle = ParagraphStyle { pStyle = [] data BodyPart = Paragraph ParagraphStyle [ParPart] | ListItem ParagraphStyle String String Level [ParPart] + | DummyListItem ParagraphStyle String [ParPart] | Tbl String TblGrid TblLook [Row] | OMathPara [Exp] deriving Show @@ -245,7 +243,6 @@ defaultRunStyle = RunStyle { isBold = Nothing , rUnderline = Nothing , rStyle = Nothing} - type Target = String type Anchor = String type URL = String @@ -418,6 +415,7 @@ lookupLevel numId ilvl (Numbering _ numbs absNumbs) = do lvl <- lookup ilvl $ map (\l@(i, _, _, _) -> (i, l)) lvls return lvl + numElemToNum :: NameSpaces -> Element -> Maybe Numb numElemToNum ns element | qName (elName element) == "num" && @@ -569,7 +567,7 @@ elemToBodyPart ns element num <- asks envNumbering case lookupLevel numId lvl num of Just levelInfo -> return $ ListItem parstyle numId lvl levelInfo parparts - Nothing -> throwError WrongElem + Nothing -> return $ DummyListItem parstyle lvl parparts elemToBodyPart ns element | isElem ns "w" "p" element = do sty <- asks envParStyles @@ -582,7 +580,7 @@ elemToBodyPart ns element Just levelInfo -> return $ ListItem parstyle numId lvl levelInfo parparts Nothing -> - throwError WrongElem + return $ DummyListItem parstyle lvl parparts Nothing -> return $ Paragraph parstyle parparts elemToBodyPart ns element | isElem ns "w" "tbl" element = do diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index a6db6ffad..b9645d034 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -169,17 +169,23 @@ quoted' f starter ender = do try ((f . mconcat) <$> manyTill inline ender) <|> lit startchs doubleQuote :: LP Inlines -doubleQuote = - quoted' doubleQuoted (try $ string "``") (void $ try $ string "''") - <|> quoted' doubleQuoted (string "“") (void $ char '”') - -- the following is used by babel for localized quotes: - <|> quoted' doubleQuoted (try $ string "\"`") (void $ try $ string "\"'") - <|> quoted' doubleQuoted (string "\"") (void $ char '"') +doubleQuote = do + smart <- getOption readerSmart + if smart + then quoted' doubleQuoted (try $ string "``") (void $ try $ string "''") + <|> quoted' doubleQuoted (string "“") (void $ char '”') + -- the following is used by babel for localized quotes: + <|> quoted' doubleQuoted (try $ string "\"`") (void $ try $ string "\"'") + <|> quoted' doubleQuoted (string "\"") (void $ char '"') + else str <$> many1 (oneOf "`'“”\"") singleQuote :: LP Inlines -singleQuote = - quoted' singleQuoted (string "`") (try $ char '\'' >> notFollowedBy letter) - <|> quoted' singleQuoted (string "‘") (try $ char '’' >> notFollowedBy letter) +singleQuote = do + smart <- getOption readerSmart + if smart + then quoted' singleQuoted (string "`") (try $ char '\'' >> notFollowedBy letter) + <|> quoted' singleQuoted (string "‘") (try $ char '’' >> notFollowedBy letter) + else str <$> many1 (oneOf "`\'‘’") inline :: LP Inlines inline = (mempty <$ comment) diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs index b1bf463af..3db01faf4 100644 --- a/src/Text/Pandoc/Readers/Textile.hs +++ b/src/Text/Pandoc/Readers/Textile.hs @@ -535,6 +535,7 @@ link = try $ do image :: Parser [Char] ParserState Inlines image = try $ do char '!' >> notFollowedBy space + _ <- attributes -- ignore for now, until we have image attributes src <- manyTill anyChar' (lookAhead $ oneOf "!(") alt <- option "" (try $ (char '(' >> manyTill anyChar' (char ')'))) char '!' diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 40dbd839c..94c9ff28e 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -1070,8 +1070,8 @@ inlineToOpenXML opts (Note bs) = do [ mknode "w:rPr" [] footnoteStyle , mknode "w:footnoteRef" [] () ] let notemarkerXml = RawInline (Format "openxml") $ ppElement notemarker - let insertNoteRef (Plain ils : xs) = Plain (notemarkerXml : ils) : xs - insertNoteRef (Para ils : xs) = Para (notemarkerXml : ils) : xs + let insertNoteRef (Plain ils : xs) = Plain (notemarkerXml : Space : ils) : xs + insertNoteRef (Para ils : xs) = Para (notemarkerXml : Space : ils) : xs insertNoteRef xs = Para [notemarkerXml] : xs oldListLevel <- gets stListLevel oldParaProperties <- gets stParaProperties diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 9fdeb2c11..626732ef2 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -193,9 +193,6 @@ pandocToHtml opts (Pandoc meta blocks) = do defField "revealjs-url" ("reveal.js" :: String) $ defField "s5-url" ("s5/default" :: String) $ defField "html5" (writerHtml5 opts) $ - defField "center" (case lookupMeta "center" meta of - Just (MetaBool False) -> False - _ -> True) $ metadata return (thebody, context) @@ -542,6 +539,9 @@ blockToHtml opts (OrderedList (startnum, numstyle, _) lst) = do let attribs = (if startnum /= 1 then [A.start $ toValue startnum] else []) ++ + (if numstyle == Example + then [A.class_ "example"] + else []) ++ (if numstyle /= DefaultStyle then if writerHtml5 opts then [A.type_ $ diff --git a/src/Text/Pandoc/Writers/Haddock.hs b/src/Text/Pandoc/Writers/Haddock.hs index 14f398da9..5df6786ac 100644 --- a/src/Text/Pandoc/Writers/Haddock.hs +++ b/src/Text/Pandoc/Writers/Haddock.hs @@ -327,8 +327,8 @@ inlineToHaddock _ (RawInline f str) inlineToHaddock _ (LineBreak) = return cr inlineToHaddock _ Space = return space inlineToHaddock opts (Cite _ lst) = inlineListToHaddock opts lst -inlineToHaddock opts (Link txt (src, _)) = do - linktext <- inlineListToHaddock opts txt +inlineToHaddock _opts (Link txt (src, _)) = do + let linktext = text $ escapeString $ stringify txt let useAuto = isURI src && case txt of [Str s] | escapeURI s == src -> True diff --git a/src/Text/Pandoc/Writers/ICML.hs b/src/Text/Pandoc/Writers/ICML.hs index ae068a94f..95ea0c643 100644 --- a/src/Text/Pandoc/Writers/ICML.hs +++ b/src/Text/Pandoc/Writers/ICML.hs @@ -16,6 +16,7 @@ into InDesign with File -> Place. module Text.Pandoc.Writers.ICML (writeICML) where import Text.Pandoc.Definition import Text.Pandoc.XML +import Text.Pandoc.Readers.TeXMath (texMathToInlines) import Text.Pandoc.Writers.Shared import Text.Pandoc.Shared (splitBy) import Text.Pandoc.Options @@ -410,7 +411,8 @@ inlineToICML opts style (Cite _ lst) = inlinesToICML opts style lst inlineToICML _ style (Code _ str) = charStyle (codeName:style) $ text $ escapeStringForXML str inlineToICML _ style Space = charStyle style space inlineToICML _ style LineBreak = charStyle style $ text lineSeparator -inlineToICML _ style (Math _ str) = charStyle style $ text $ escapeStringForXML str --InDesign doesn't really do math +inlineToICML opts style (Math mt str) = + cat <$> mapM (inlineToICML opts style) (texMathToInlines mt str) inlineToICML _ _ (RawInline f str) | f == Format "icml" = return $ text str | otherwise = return empty diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs index ebe678dc0..7ee87f4af 100644 --- a/src/Text/Pandoc/Writers/OpenDocument.hs +++ b/src/Text/Pandoc/Writers/OpenDocument.hs @@ -191,8 +191,7 @@ writeOpenDocument opts (Pandoc meta blocks) = listStyle (n,l) = inTags True "text:list-style" [("style:name", "L" ++ show n)] (vcat l) listStyles = map listStyle (stListStyles s) - automaticStyles = inTagsIndented "office:automatic-styles" $ vcat $ - reverse $ styles ++ listStyles + automaticStyles = vcat $ reverse $ styles ++ listStyles context = defField "body" body $ defField "automatic-styles" (render' automaticStyles) $ metadata diff --git a/tests/Tests/Readers/Docx.hs b/tests/Tests/Readers/Docx.hs index 127dfd73c..086d3f964 100644 --- a/tests/Tests/Readers/Docx.hs +++ b/tests/Tests/Readers/Docx.hs @@ -185,6 +185,14 @@ tests = [ testGroup "inlines" "docx/german_styled_lists.docx" "docx/german_styled_lists.native" , testCompare + "user deletes bullet after list item (=> part of item par)" + "docx/dummy_item_after_list_item.docx" + "docx/dummy_item_after_list_item.native" + , testCompare + "user deletes bullet after par (=> new par)" + "docx/dummy_item_after_paragraph.docx" + "docx/dummy_item_after_paragraph.native" + , testCompare "footnotes and endnotes" "docx/notes.docx" "docx/notes.native" diff --git a/tests/docx/dummy_item_after_list_item.docx b/tests/docx/dummy_item_after_list_item.docx Binary files differnew file mode 100644 index 000000000..5e29b993c --- /dev/null +++ b/tests/docx/dummy_item_after_list_item.docx diff --git a/tests/docx/dummy_item_after_list_item.native b/tests/docx/dummy_item_after_list_item.native new file mode 100644 index 000000000..3f6231932 --- /dev/null +++ b/tests/docx/dummy_item_after_list_item.native @@ -0,0 +1,3 @@ +[OrderedList (1,Decimal,Period) + [[Para [Str "One"] + ,Para [Str "Two",LineBreak,LineBreak,Str "Three"]]]] diff --git a/tests/docx/dummy_item_after_paragraph.docx b/tests/docx/dummy_item_after_paragraph.docx Binary files differnew file mode 100644 index 000000000..b0aee8843 --- /dev/null +++ b/tests/docx/dummy_item_after_paragraph.docx diff --git a/tests/docx/dummy_item_after_paragraph.native b/tests/docx/dummy_item_after_paragraph.native new file mode 100644 index 000000000..2e9b831c4 --- /dev/null +++ b/tests/docx/dummy_item_after_paragraph.native @@ -0,0 +1,3 @@ +[Para [Str "First",Space,Str "bullet",Space,Str "point",Space,Str "created",Space,Str "and",Space,Str "then",Space,Str "deleted"] +,Para [Str "A",Space,Str "normal",Space,Str "paragraph"] +,Para [Str "First",Space,Str "bullet",Space,Str "point",Space,Str "created",Space,Str "and",Space,Str "then",Space,Str "deleted",Space,Str "after",Space,Str "the",Space,Str "normal",Space,Str "paragraph"]] diff --git a/tests/writer.icml b/tests/writer.icml index b6f5b5e32..cd71fa86b 100644 --- a/tests/writer.icml +++ b/tests/writer.icml @@ -1864,17 +1864,49 @@ These should not be escaped: \$ \\ \> \[ \{</Content> </ParagraphStyleRange> <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/BulList"> <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> - <Content>2+2=4</Content> + <Content>2</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content>+</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content>2</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content>=</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content>4</Content> </CharacterStyleRange><Br /> </ParagraphStyleRange> <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/BulList"> - <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> - <Content>x \in y</Content> + <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic"> + <Content>x</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content>∈</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic"> + <Content>y</Content> </CharacterStyleRange><Br /> </ParagraphStyleRange> <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/BulList"> - <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> - <Content>\alpha \wedge \omega</Content> + <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic"> + <Content>α</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content>∧</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic"> + <Content>ω</Content> </CharacterStyleRange><Br /> </ParagraphStyleRange> <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/BulList"> @@ -1883,7 +1915,7 @@ These should not be escaped: \$ \\ \> \[ \{</Content> </CharacterStyleRange><Br /> </ParagraphStyleRange> <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/BulList"> - <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic"> <Content>p</Content> </CharacterStyleRange> <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> @@ -1895,15 +1927,33 @@ These should not be escaped: \$ \\ \> \[ \{</Content> <Content>Here’s some display math: </Content> </CharacterStyleRange> <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> - <Content>\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}</Content> + <Content>$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$</Content> </CharacterStyleRange><Br /> </ParagraphStyleRange> <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/BulList"> <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> <Content>Here’s one that has a line break in it: </Content> </CharacterStyleRange> - <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> - <Content>\alpha + \omega \times x^2</Content> + <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic"> + <Content>α</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content>+</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic"> + <Content>ω</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content>×</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> + <Content> </Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Italic"> + <Content>x</Content> + </CharacterStyleRange><CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Superscript"> + <Content>2</Content> </CharacterStyleRange> <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle"> <Content>.</Content> diff --git a/trypandoc/Makefile b/trypandoc/Makefile index 29942ac00..b53758d7f 100644 --- a/trypandoc/Makefile +++ b/trypandoc/Makefile @@ -1,7 +1,7 @@ CGIBIN=/home/website/cgi-bin TRYPANDOC=/home/website/html/pandoc/try/ CGI=${CGIBIN}/trypandoc -BIN=../dist/build/trypandoc/trypandoc +BIN=../.cabal-sandbox/bin/trypandoc install: ${CGI} ${TRYPANDOC}/index.html diff --git a/windows/make-windows-installer.bat b/windows/make-windows-installer.bat index 1e576a525..c7befe531 100644 --- a/windows/make-windows-installer.bat +++ b/windows/make-windows-installer.bat @@ -1,22 +1,15 @@ @echo off
-cd ..
-cabal update
-cabal sandbox init
-cabal clean
-cabal install hsb2hs
+stack install --test
if %errorlevel% neq 0 exit /b %errorlevel%
-cabal install -v1 --force --enable-tests --reinstall --flags="embed_data_files" . pandoc-citeproc
+for /f "delims=" %%a in ('stack path --local-bin-path') do @set BINPATH=%%a
+strip %BINPATH%\pandoc.exe
+strip %BINPATH%\pandoc-citeproc.exe
+%BINPATH%\pandoc.exe -s -S ..\README -o README.html
if %errorlevel% neq 0 exit /b %errorlevel%
-cabal test
+%BINPATH%\pandoc.exe -s ..\COPYING -t rtf -S -o COPYING.rtf
if %errorlevel% neq 0 exit /b %errorlevel%
-strip .\.cabal-sandbox\bin\pandoc.exe
-strip .\.cabal-sandbox\bin\pandoc-citeproc.exe
-.\.cabal-sandbox\bin\pandoc.exe -s --template data\templates\default.html -S README -o README.html
-if %errorlevel% neq 0 exit /b %errorlevel%
-.\.cabal-sandbox\bin\pandoc.exe -s --template data\templates\default.rtf COPYING -t rtf -S -o COPYING.rtf
-if %errorlevel% neq 0 exit /b %errorlevel%
-copy COPYRIGHT COPYRIGHT.txt
-for /f "tokens=1-2 delims= " %%a in ('.\.cabal-sandbox\bin\pandoc --version') do (
+copy ..\COPYRIGHT COPYRIGHT.txt
+for /f "tokens=1-2 delims= " %%a in ('%BINPATH%\pandoc.exe --version') do (
@set VERSION=%%b
goto :next
)
@@ -26,9 +19,8 @@ if "%VERSION%" == "" ( exit /b 1
)
echo Detected version %VERSION%
-cd windows
echo Creating msi...
-candle -dVERSION=%VERSION% pandoc.wxs
+candle -dVERSION=%VERSION% -dBINPATH=%BINPATH% pandoc.wxs
if %errorlevel% neq 0 exit /b %errorlevel%
light -sw1076 -ext WixUIExtension -ext WixUtilExtension -out pandoc-%VERSION%-windows.msi pandoc.wixobj
if %errorlevel% neq 0 exit /b %errorlevel%
diff --git a/windows/pandoc.wxs b/windows/pandoc.wxs index c1465ffcf..d19ed81e1 100644 --- a/windows/pandoc.wxs +++ b/windows/pandoc.wxs @@ -41,11 +41,11 @@ KeyPath="yes"/> <RemoveFolder Id="APPLICATIONFOLDER" On="uninstall"/> <File Id="pandocEXE" Name="pandoc.exe" - Source="..\.cabal-sandbox\bin\pandoc.exe" /> + Source="$(var.BINPATH)\pandoc.exe" /> <File Id="pandocCOPYRIGHT" Name="COPYRIGHT.txt" - Source="..\COPYRIGHT.txt" /> + Source="COPYRIGHT.txt" /> <File Id="pandocCOPYING" Name="COPYING.rtf" - Source="..\COPYING.rtf" /> + Source="COPYING.rtf" /> </Component> <Component Id="CitationSupport" @@ -55,13 +55,13 @@ Name="Version" Type="string" Value="[ProductVersion]" KeyPath="yes"/> <File Id="pandoc_citeprocEXE" Name="pandoc-citeproc.exe" - Source="..\.cabal-sandbox\bin\pandoc-citeproc.exe" /> + Source="$(var.BINPATH)\pandoc-citeproc.exe" /> </Component> <Component Id="Documentation" Guid="A8D54A76-1A3D-4647-8327-81B69D39D8A3"> <File Id="pandocREADME" Name="Pandoc User's Guide.html" - Source="..\README.html" KeyPath="yes"> + Source="README.html" KeyPath="yes"> <Shortcut Id="ApplicationStartMenuShortcut" Directory="ApplicationProgramsFolder" Name="Pandoc User’s Guide" Advertise="yes" /> @@ -163,7 +163,7 @@ <Property Id="ALLUSERS" Value="2" Secure="yes" /> <Property Id="MSIINSTALLPERUSER" Value="1" /> - <WixVariable Id="WixUILicenseRtf" Value="..\COPYING.rtf" /> + <WixVariable Id="WixUILicenseRtf" Value="COPYING.rtf" /> <UI Id="MyWixUI_Advanced"> <UIRef Id="WixUI_Advanced" /> diff --git a/windows/stack.yaml b/windows/stack.yaml new file mode 100644 index 000000000..4a00e2d38 --- /dev/null +++ b/windows/stack.yaml @@ -0,0 +1,19 @@ +flags: + pandoc: + trypandoc: false + https: true + embed_data_files: true + old-locale: false + network-uri: true + pandoc-citeproc: + bibutils: true + embed_data_files: true + unicode_collation: false + test_citeproc: false + debug: false +packages: +- '..' +- '../../pandoc-citeproc' +extra-deps: +- 'hsb2hs-0.3.1' +resolver: lts-3.13 |