aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.circleci/config.yml74
-rw-r--r--.github/FUNDING.yml1
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.md25
-rw-r--r--.github/ISSUE_TEMPLATE/config.yml9
-rw-r--r--.github/ISSUE_TEMPLATE/feature_request.md21
-rw-r--r--.github/workflows/ci.yml260
-rw-r--r--.github/workflows/commit-validation.yml38
-rw-r--r--.github/workflows/format-validation.yml88
-rw-r--r--.github/workflows/lint.yml.bkp33
-rw-r--r--.github/workflows/nightly.yml91
-rw-r--r--.github/workflows/release-candidate.yml83
-rw-r--r--.mailmap37
-rw-r--r--INSTALL.md421
-rw-r--r--Makefile153
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs19
-rw-r--r--stack.yaml48
-rw-r--r--test/command/latex-multicols.md14
-rw-r--r--test/command/latex-stackengine.md18
18 files changed, 51 insertions, 1382 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
deleted file mode 100644
index a6019a6d9..000000000
--- a/.circleci/config.yml
+++ /dev/null
@@ -1,74 +0,0 @@
-version: "2.1"
-jobs:
- build:
- macos:
- xcode: 11.1.0
- environment:
- HOMEBREW_NO_AUTO_UPDATE: 1
- steps:
- - checkout
- - restore_cache:
- # See https://circleci.com/docs/2.0/caching/
- name: Restore Cached Dependencies
- keys:
- - stack-dependencies-{{ checksum "stack.yaml" }}
- - run:
- name: Install stack
- command: |
- brew install ghc
- brew install haskell-stack
- - run:
- name: Resolve/Update Dependencies
- command: stack --no-terminal setup
- - run:
- name: Run tests
- command: stack --no-terminal test
- - run:
- name: Install executable
- command: stack --no-terminal install
- - run:
- name: Create artifacts
- command: |
- export VERSION=$(grep '^[Vv]ersion:' pandoc.cabal | awk '{print $$2;}')
- export ARTIFACTS=macos-release-candidate
- export RESOURCES=${ARTIFACTS}/Resources
- export ROOT=${ARTIFACTS}/pandoc
- export DEST=${ROOT}/usr/local
- export ME=$(whoami)
- export BASE=pandoc-$VERSION
- mkdir -p ${ARTIFACTS}
- mkdir -p ${RESOURCES}
- mkdir -p ${DEST}/bin
- mkdir -p ${DEST}/share/man/man1
- cp ~/.local/bin/pandoc ${DEST}/bin/
- strip ${DEST}/bin/pandoc
- cp man/pandoc.1 ${DEST}/share/man/man1/pandoc.1
- ~/.local/bin/pandoc -s COPYING.md -Vpagetitle=License -o ${RESOURCES}/license.html
- chown -R $ME:staff ${ROOT}
- sed -e "s/PANDOCVERSION/${VERSION}/" macos/distribution.xml.in > ${ARTIFACTS}/distribution.xml
- cp macos/Makefile ${ARTIFACTS}/
- echo ${VERSION} > ${ARTIFACTS}/version.txt
- zip -r macos-release-candidate.zip ${ARTIFACTS}
-
- - save_cache:
- name: Cache Dependencies
- key: stack-dependencies-{{ checksum "stack.yaml" }}
- paths:
- - "/root/.stack"
- - ".stack-work"
- - "/usr/local/bin/stack"
-
- - store_artifacts:
- # https://circleci.com/docs/2.0/artifacts/
- path: macos-release-candidate.zip
- destination: macos-release-candidate.zip
-
-workflows:
- version: 2
- release:
- jobs:
- - build:
- filters:
- branches:
- only:
- - /rc\/.*/
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
deleted file mode 100644
index f4ef3ba4b..000000000
--- a/.github/FUNDING.yml
+++ /dev/null
@@ -1 +0,0 @@
-github: [jgm,tarleb]
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index 6162c2e57..000000000
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,25 +0,0 @@
----
-name: Bug report
-about: Create a report to help us improve
-title: ''
-labels: 'bug'
-assignees: ''
-
----
-
-<!--
-Thank you for reporting an issue! Before you continue, please make sure that you have
-
-- searched the issue tracker for similar issues (including closed issues): https://github.com/jgm/pandoc/issues
-- searched the pandoc-discuss mailing list for solutions: https://groups.google.com/forum/#!forum/pandoc-discuss
-- reproduced your issue on the latest release of pandoc, or on https://pandoc.org/try
-
-Note that this bug tracker is for reporting bugs, not asking questions. For questions, use the pandoc-discuss mailing list.
--->
-
-**Explain the problem.**
-Include the exact command line you used and all inputs necessary to reproduce the issue. Please create as minimal an example as possible, to help the maintainers isolate the problem. Explain the output you received and how it differs from what you expected.
-
-**Pandoc version?**
-What version of pandoc are you using, on what OS?
-
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
deleted file mode 100644
index e4d479ce6..000000000
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-blank_issues_enabled: false
-contact_links:
- - name: Ask a question
- url: https://groups.google.com/forum/#!forum/pandoc-discuss
- about: "Discussion forum for pandoc (may be used as an email list)"
- - name: Contributing Guidelines
- url: https://pandoc.org/CONTRIBUTING.html
- about: "Guidelines for submitting bug reports and code improvements"
-
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
deleted file mode 100644
index cff52c1d4..000000000
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ /dev/null
@@ -1,21 +0,0 @@
----
-name: Feature request
-about: Suggest an idea for this project
-title: ''
-labels: 'enhancement'
-assignees: ''
-
----
-
-<!--
-Thank you for suggesting a feature! Before you continue, please make sure that you have
-
-- read the contributing guidelines: https://pandoc.org/CONTRIBUTING.html
-- searched the issue tracker for similar issues (including closed issues): https://github.com/jgm/pandoc/issues
-- searched the pandoc-discuss mailing list for relevant discussions: https://groups.google.com/forum/#!forum/pandoc-discuss
--->
-
-**Describe your proposed improvement and the problem it solves.**
-
-**Describe alternatives you've considered.**
-
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
deleted file mode 100644
index 1b7e415ac..000000000
--- a/.github/workflows/ci.yml
+++ /dev/null
@@ -1,260 +0,0 @@
-name: CI tests
-
-on:
- push:
- branches:
- - '*'
- - '!rc/*'
- paths-ignore:
- - 'doc/**'
- - 'MANUAL.txt'
- - '*.md'
- - 'RELEASE_CHECKLIST'
- - 'BUGS'
- - 'changelog'
- - 'README.template'
- - 'appveyor.yml'
- - 'tools/**'
- - 'linux/**'
- - 'macos/**'
- - 'windows/**'
- - 'man/**'
- pull_request:
- paths-ignore:
- - 'doc/**'
- - 'MANUAL.txt'
- - '*.md'
- - 'RELEASE_CHECKLIST'
- - 'BUGS'
- - 'changelog'
- - 'README.template'
- - 'appveyor.yml'
- - 'tools/**'
- - 'linux/**'
- - 'macos/**'
- - 'windows/**'
- - 'man/**'
-
-jobs:
- linux:
-
- runs-on: ubuntu-18.04
- strategy:
- fail-fast: true
- matrix:
- versions:
- - ghc: '8.6.5'
- cabal: '3.2'
- prefix: ''
- cabalopts: '-f-embed_data_files'
- testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
- - ghc: '8.8.4'
- cabal: '3.2'
- prefix: ''
- cabalopts: ''
- testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
- - ghc: '8.10.7'
- cabal: '3.2'
- prefix: ''
- cabalopts: '-ftrypandoc'
- testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
- - ghc: '9.0.1'
- cabal: '3.4'
- prefix: ''
- cabalopts: ''
- testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
- steps:
- - uses: actions/checkout@v2
-
- # needed by memory
- - name: Install numa
- run: sudo apt-get install libnuma-dev
-
- # need to install older cabal/ghc versions from ppa repository
-
- - name: Install recent cabal/ghc
- uses: haskell/actions/setup@v1
- with:
- ghc-version: ${{ matrix.versions.ghc }}
- cabal-version: ${{ matrix.versions.cabal }}
-
- # declare/restore cached things
- # caching doesn't work for scheduled runs yet
- # https://github.com/actions/cache/issues/63
-
- - name: Cache cabal global package db
- id: cabal-global
- uses: actions/cache@v2
- with:
- path: |
- ~/.cabal
- key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ hashFiles('cabal.project') }}
-
- - name: Cache cabal work
- id: cabal-local
- uses: actions/cache@v2
- with:
- path: |
- dist-newstyle
- key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local
-
- - name: Install dependencies
- run: |
- cabal ${{ matrix.versions.prefix }}update
- cabal ${{ matrix.versions.prefix }}build ${{ matrix.versions.cabalopts }} --dependencies-only --enable-tests --disable-optimization
-
- - name: Build and test
- run: |
- cabal ${{ matrix.versions.prefix }}build ${{ matrix.versions.cabalopts }} --enable-tests --disable-optimization 2>&1 | tee build.log
- # fail if warnings in local build
- ! grep -q ": *[Ww]arning:" build.log || exit 1
- cabal ${{ matrix.versions.prefix }}test ${{ matrix.versions.cabalopts }} --disable-optimization ${{ matrix.versions.testopts }}
-
- windows:
-
- runs-on: windows-2019
-
- steps:
- - uses: actions/checkout@v2
-
- # We should have ghc 8.10, cabal, stack pre-installed
- # - uses: haskell/actions/setup@v1
- # with:
- # enable-stack: true
- # stack-version: 'latest'
-
- # declare/restore cached things
- # caching doesn't work for scheduled runs yet
- # https://github.com/actions/cache/issues/63
-
- - name: Cache stack global package db
- id: stack-global-package-db
- uses: actions/cache@v2
- with:
- path: |
- C:\Users\runneradmin\AppData\Roaming\stack\
- key: ${{ runner.os }}-appdata-roaming-stack-${{ hashFiles('stack.yaml') }}
-
- # stack's local package dbs for the project and each package
- # - name: Cache .stack-work
- # uses: actions/cache@v1
- # with:
- # path: .stack-work
- # key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}
- # restore-keys: ${{ runner.os }}-stack-work
-
- - name: Install dependencies
- run: |
- stack update
- stack install happy
- stack test --dependencies-only --fast
- - name: Build and test
- shell: cmd
- run: |
- stack test --fast --test-arguments="--hide-successes --ansi-tricks=false"
-
- macos:
-
- runs-on: macOS-10.15
- strategy:
- fail-fast: true
- matrix:
- versions:
- - ghc: '8.8.4'
- cabal: '3.2'
-
- steps:
- - uses: actions/checkout@v2
-
- - name: Install recent cabal/ghc
- uses: haskell/actions/setup@v1
- with:
- ghc-version: ${{ matrix.versions.ghc }}
- cabal-version: ${{ matrix.versions.cabal }}
-
- # declare/restore cached things
- # caching doesn't work for scheduled runs yet
- # https://github.com/actions/cache/issues/63
-
- - name: Cache cabal global package db
- id: cabal-global
- uses: actions/cache@v2
- with:
- path: |
- ~/.cabal
- key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ hashFiles('cabal.project') }}
-
- - name: Cache cabal work
- id: cabal-local
- uses: actions/cache@v2
- with:
- path: |
- dist-newstyle
- key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local
-
- - name: Install dependencies
- run: |
- cabal v2-update
- cabal v2-build --dependencies-only --enable-tests --disable-optimization
- - name: Build and test
- run: |
- cabal v2-build --enable-tests --disable-optimization 2>&1 | tee build.log
- # fail if warnings in local build
- ! grep -q ": *[Ww]arning:" build.log || exit 1
- cabal v2-test --disable-optimization --test-option=--hide-successes --test-option=--ansi-tricks=false
-
- benchmark:
-
- runs-on: ubuntu-18.04
- strategy:
- fail-fast: true
- matrix:
- versions:
- - ghc: '8.8.4'
- cabal: '3.2'
- - ghc: '8.10.7'
- cabal: '3.2'
- steps:
- - uses: actions/checkout@v2
-
- # need to install older cabal/ghc versions from ppa repository
-
- - name: Install recent cabal/ghc
- uses: haskell/actions/setup@v1
- with:
- ghc-version: ${{ matrix.versions.ghc }}
- cabal-version: ${{ matrix.versions.cabal }}
-
- # declare/restore cached things
- # caching doesn't work for scheduled runs yet
- # https://github.com/actions/cache/issues/63
-
- - name: Cache cabal global package db
- id: cabal-global
- uses: actions/cache@v2
- with:
- path: |
- ~/.cabal
- key: benchmark-${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ hashFiles('cabal.project') }}
-
- - name: Cache cabal work
- id: cabal-local
- uses: actions/cache@v2
- with:
- path: |
- dist-newstyle
- key: benchmark-${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local
-
- - name: Install dependencies
- run: |
- v2=$([ "${{ matrix.versions.cabal }}" = "2.2" ] && printf 'new' || printf 'v2')
- cabal $v2-update
- cabal $v2-build --dependencies-only --enable-optimization=1 --enable-benchmarks --disable-tests
-
- - name: Build and test
- run: |
- v2=$([ "${{ matrix.versions.cabal }}" = "2.2" ] && printf 'new' || printf 'v2')
- cabal $v2-build --enable-optimization=1 --enable-benchmarks --disable-tests 2>&1 | tee build.log
- # fail if warnings in local build
- ! grep -q ": *[Ww]arning:" build.log || exit 1
- cabal $v2-bench --enable-optimization=1 --benchmark-options='--timeout=6 +RTS -T -RTS'
diff --git a/.github/workflows/commit-validation.yml b/.github/workflows/commit-validation.yml
deleted file mode 100644
index 0b52e94e5..000000000
--- a/.github/workflows/commit-validation.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-name: commit-validation
-on: [ push, pull_request ]
-
-jobs:
- check-commit-msg-length:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v1
- - name: Check commit message length
- run: |
- # Get last commit messages
- if [ "${{github.event_name}}" = "push" ]; then
- if [ "${{github.event.before}}" = "0000000000000000000000000000000000000000" ]; then
- # We are on a new branch
- current="$(echo '${{github.ref}}' | sed 's!^refs/heads!origin!')"
- readarray -t other < <(git show-ref | awk -F' ' '{ sub(/^refs\/remotes\//,"",$NF); }($NF != "'"$current"'"){print "^" $NF;}')
- LOG_RANGE=( "$current" "${other[@]}" )
- unset current other
- else
- # We are on existing branch
- LOG_RANGE=( "${{github.event.before}}.." )
- fi
- elif [ "${{github.event_name}}" = "pull_request" ]; then
- LOG_RANGE=( "origin/${{github.base_ref}}.." )
- fi
- if [[ -v LOG_RANGE ]]; then
- if git log --no-merges --pretty=format:"%s" "${LOG_RANGE[@]}" -- | grep -qE "^[^#].{78}"; then
- echo -e "Last commit log contains a line with more than 78 characters:\n"
- git log --no-merges --pretty=format:"%h: %s" "${LOG_RANGE[@]}" -- | grep -E "^[^:]+: [^#].{78}"
- echo
- exit 1
- else
- echo "Commit log looks good."
- fi
- unset LOG_RANGE
- else
- echo "Not checking commits on ${{github.event_name}}"
- fi
diff --git a/.github/workflows/format-validation.yml b/.github/workflows/format-validation.yml
deleted file mode 100644
index a0a5b34b7..000000000
--- a/.github/workflows/format-validation.yml
+++ /dev/null
@@ -1,88 +0,0 @@
-name: Format validation
-
-on:
- push:
- branches:
- - '*'
- - '!rc/*'
- paths:
- - 'test/writer.jats_articleauthoring'
- - 'test/writer.jats_publishing'
- - 'test/writer.jats_archiving'
- - 'test/tables.jats_archiving'
- - 'test/tables/nordics.jats_archiving'
- - 'test/tables/planets.jats_archiving'
- - 'test/tables/students.jats_archiving'
- pull_request:
- branches:
- - '*'
- - '!rc/*'
- paths:
- - 'test/writer.jats_articleauthoring'
- - 'test/writer.jats_publishing'
- - 'test/writer.jats_archiving'
- - 'test/tables.jats_archiving'
- - 'test/tables/nordics.jats_archiving'
- - 'test/tables/planets.jats_archiving'
- - 'test/tables/students.jats_archiving'
-
-jobs:
- jats:
- name: JATS
- runs-on: ubuntu-latest
- env:
- VALIDATOR_URL: "https://jats-validator.hubmed.org/dtd/"
- strategy:
- fail-fast: false
- matrix:
- tagset:
- - articleauthoring
- - publishing
- - archiving
- steps:
- - name: Checkout
- uses: actions/checkout@v2
-
- - name: Validate writer output
- run: |
- filename=test/writer.jats_${{ matrix.tagset }}
- printf "Validating file %s\n" "$filename"
- json="$(curl --form "xml=@${filename}" --silent "$VALIDATOR_URL")"
- err_count="$(printf '%s' "$json" | jq '.errors | length')"
- if [ "$err_count" -eq 0 ]; then
- printf "File was validated successfully.\n"
- exit 0
- else
- printf "Validator report:\n%s" "$json"
- exit 1
- fi
-
- - name: Validate tables
- # Archiving has the simplest template, so we only check with that.
- if: matrix.tagset == 'archiving'
- run: |
- tmpl="$(cat <<EOF
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.2 20190208//EN"
- "JATS-archivearticle1.dtd">
- <article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="1.2" article-type="other">
- <front><article-meta></article-meta></front>
- <body>%s</body></article>
- EOF
- )"
- jats_file="$(mktemp jats-tables.XXXXX)"
- exit_code=0
- for f in tables tables/nordics tables/planets tables/students; do
- filename=test/$f.jats_archiving
- printf "Validating %s...\n" "$filename"
- printf "$tmpl" "$(cat $filename)" > "$jats_file"
- json="$(curl --form "xml=@${jats_file}" --silent "$VALIDATOR_URL")"
- err_count="$(printf "%s" "$json" | jq '.errors | length')"
- if [ "$err_count" -eq 0 ]; then
- printf "Table output is valid when used as body content.\n"
- else
- printf "Validator report:\n%s" "$json"
- exit_code=1
- fi
- done
- exit "$exit_code"
diff --git a/.github/workflows/lint.yml.bkp b/.github/workflows/lint.yml.bkp
deleted file mode 100644
index 13f4919da..000000000
--- a/.github/workflows/lint.yml.bkp
+++ /dev/null
@@ -1,33 +0,0 @@
-name: Lint
-
-# Trigger the workflow on push or pull request, but only for the
-# master branch
-on:
- pull_request:
- branch: [master]
- push:
- branch: [master]
- paths-ignore:
- - LICENSE
- - README.md
- - CHANGELOG.md
- - stack.yaml
- - .travis.yml
-
-jobs:
- lint:
- name: Lint
- runs-on: ubuntu-latest
- env:
- hlint_script: https://raw.github.com/ndmitchell/hlint/master/misc/run.sh
-
- steps:
- - name: Checkout
- uses: actions/checkout@v2
-
- - name: Check cabal file for missing test files
- run: make check-cabal
-
- - name: Download and run hlint
- run: |
- curl -sSL "${hlint_script}" | sh -s src app test
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
deleted file mode 100644
index a8afcee95..000000000
--- a/.github/workflows/nightly.yml
+++ /dev/null
@@ -1,91 +0,0 @@
-name: Nightly
-
-on:
- schedule:
- - cron: '53 7 * * *'
-
-jobs:
- linux:
-
- runs-on: ubuntu-18.04
- steps:
- - uses: actions/checkout@v2
-
- - name: Install recent cabal/ghc
- uses: haskell/actions/setup@v1
- with:
- ghc-version: '8.10.7'
- cabal-version: '3.2'
-
- - name: Install dependencies
- run: |
- ghc --version
- cabal --version
- cabal v2-update
- cabal v2-build --dependencies-only
- - name: Build
- run: |
- cabal v2-install
- strip $HOME/.cabal/bin/pandoc
- - name: Install artifact
- run: |
- export ARTIFACTS=nightly-linux/pandoc-nightly-linux-$(date +%Y-%m-%d)
- mkdir -p ${ARTIFACTS}
- cp $HOME/.cabal/bin/pandoc ${ARTIFACTS}/
- cp COPYRIGHT ${ARTIFACTS}/
- echo "Built from ${GITHUB_SHA}" > ${ARTIFACTS}/README.nightly.txt
- - uses: actions/upload-artifact@master
- with:
- name: nightly-linux
- path: nightly-linux
-
- windows:
-
- runs-on: windows-2019
-
- steps:
- - uses: actions/checkout@v2
- - name: Install dependencies
- run: |
- stack update
- stack build --dependencies-only pandoc
- - name: Build artifacts
- shell: cmd
- run: |
- for /f %%a in ('powershell -Command "Get-Date -format yyyy-MM-dd"') do set THEDATE=%%a
- set ARTIFACTS=%CD%\nightly-windows\pandoc-nightly-windows-%THEDATE%
- mkdir %ARTIFACTS%
- stack build pandoc
- forfiles /P .\.stack-work\install /M pandoc*.exe /S /C "cmd /C copy @path %%ARTIFACTS%%"
- copy COPYRIGHT %ARTIFACTS%
- ren %ARTIFACTS%\COPYRIGHT COPYRIGHT.txt
- echo Built from %GITHUB_SHA% > %ARTIFACTS%\README.nightly.txt
- - uses: actions/upload-artifact@master
- with:
- name: nightly-windows
- path: nightly-windows
-
- macos:
-
- runs-on: macOS-10.15
-
- steps:
- - uses: actions/checkout@v2
- - name: Install dependencies
- run: |
- stack update
- stack build --dependencies-only pandoc
- - name: Build artifacts
- run: |
- export ARTIFACTS=nightly-macos/pandoc-nightly-macos-$(date +%Y-%m-%d)
- mkdir -p ${ARTIFACTS}
- stack build pandoc
- for f in $(find .stack-work/install -name 'pandoc*' -perm +001 -type f); do cp $f ${ARTIFACTS}/; done
- mv ${ARTIFACTS}/pandoc ${ARTIFACTS}/pandoc
- cp COPYRIGHT ${ARTIFACTS}/
- echo "Built from ${GITHUB_SHA}" > ${ARTIFACTS}/README.nightly.txt
- - uses: actions/upload-artifact@master
- with:
- name: nightly-macos
- path: nightly-macos
-
diff --git a/.github/workflows/release-candidate.yml b/.github/workflows/release-candidate.yml
deleted file mode 100644
index cfb770ef5..000000000
--- a/.github/workflows/release-candidate.yml
+++ /dev/null
@@ -1,83 +0,0 @@
-name: Release candidate
-
-on:
- push:
- branches:
- - 'rc/**'
-
-jobs:
- linux:
-
- runs-on: ubuntu-18.04
- steps:
- - uses: actions/checkout@v1
- - name: Create linux package
- run: |
- make debpkg
- mkdir linux-release-candidate
- cp linux/artifacts/*.deb linux-release-candidate/
- cp linux/artifacts/*.tar.gz linux-release-candidate/
- - uses: actions/upload-artifact@v2
- with:
- name: linux-release-candidate
- path: linux-release-candidate
-
- windows:
-
- runs-on: windows-2019
- strategy:
- fail-fast: true
- matrix:
- versions:
- - osarch: "windows-x86_64"
- arch: "x64"
- stack_opts: "-j1"
- steps:
- - uses: actions/checkout@v1
- - name: Install dependencies
- run: |
- stack update
- stack build ${{ matrix.versions.stack_opts }} --dependencies-only pandoc
- - name: Create windows package
- shell: cmd
- run: |
- for /f %%a in ('powershell -Command "Get-Date -format yyyy-MM-dd"') do set THEDATE=%%a
- stack build ${{ matrix.versions.stack_opts }} pandoc
- for /f "tokens=1-2 delims= " %%a in ('stack exec pandoc -- --version') do (
- @set VERSION=%%b
- goto :next
- )
- :next
- if "%VERSION%" == "" (
- echo Error: could not determine version number.
- exit /b 1
- )
- echo Detected version %VERSION%
- @set WINDOWS=%CD%\windows
- @set RELEASE=%WINDOWS%\pandoc-%VERSION%
- mkdir %RELEASE%
- forfiles /P .\.stack-work\install /M pandoc.exe /S /C "cmd /C echo @path && echo %%WINDOWS%% && copy @path %%RELEASE%%"
- stack exec pandoc -- -s --toc MANUAL.txt -o %RELEASE%\MANUAL.html
- stack exec pandoc -- -s COPYING.md -t rtf -o %RELEASE%\COPYING.rtf
- copy %RELEASE%\COPYING.rtf %WINDOWS%
- copy COPYRIGHT %RELEASE%\COPYRIGHT.txt
- cd windows
- echo Creating msi...
- dir
- @set WIXBIN="c:\Program Files (x86)\WiX Toolset v3.11\bin"
- @set WORKDIR=%CD%
- echo Running candle...
- %WIXBIN%\candle -arch ${{ matrix.versions.arch }} -dVERSION=%VERSION% -dBINPATH=%RELEASE% *.wxs -out wixobj\
- if %errorlevel% neq 0 exit /b %errorlevel%
- echo Running light...
- %WIXBIN%\light -sw1076 -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -loc Pandoc-en-us.wxl -out %WORKDIR%\pandoc-%VERSION%-${{ matrix.versions.osarch }}-UNSIGNED.msi wixobj\*.wixobj
- 7z a "pandoc-%VERSION%-${{ matrix.versions.osarch }}.zip" pandoc-%VERSION%
- cd ..
- mkdir windows-release-candidate
- copy windows\pandoc-%VERSION%-${{ matrix.versions.osarch }}-UNSIGNED.msi windows-release-candidate
- copy windows\pandoc-%VERSION%-${{ matrix.versions.osarch }}.zip windows-release-candidate
- copy windows\Makefile windows-release-candidate
- - uses: actions/upload-artifact@v2
- with:
- name: windows-release-candidate
- path: windows-release-candidate
diff --git a/.mailmap b/.mailmap
deleted file mode 100644
index c7bc2a06a..000000000
--- a/.mailmap
+++ /dev/null
@@ -1,37 +0,0 @@
-Adam Brandizzi <brandizzi@gmail.com>
-Albert Krewinkel <albert@zeitkraut.de> <albert+github@zeitkraut.de>
-Albert Krewinkel <albert@zeitkraut.de> <albert.krewinkel@tourstream.eu>
-Albert Krewinkel <albert@zeitkraut.de> <tarleb@moltkeplatz.de>
-Albert Krewinkel <albert@zeitkraut.de> <tarleb@zeitkraut.de>
-Alexander Krotov <ilabdsf@gmail.com>
-Alex Ivkin <alex@ivkin.net>
-Alex Ivkin <alex@ivkin.net> <alexivkin@users.noreply.github.com>
-Andrew Dunning <andunning@gmail.com>
-Andrew Dunning <andunning@gmail.com> <adunning@users.noreply.github.com>
-Andrew Newman <andrewfnewman@gmail.com>
-Clare Macrae <clare.macrae@googlemail.com> <github@cfmacrae.fastmail.co.uk>
-Hugo Roy <hugo@fsfe.org>
-Hugo Roy <hugo@xps.ampoliros.net>
-John MacFarlane <jgm@berkeley.edu> <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>
-John MacFarlane <jgm@berkeley.edu> <fiddlosopher@gmail.com>
-John MacFarlane <jgm@berkeley.edu> <jgm@Johns-MacBook-Pro.local>
-Jose Luis Duran <jlduran@gmail.com> <jlduran@users.noreply.github.com>
-Marc Schreiber <schrieveslaach@online.de>
-Masayoshi Takahashi <maki@rubycolor.org>
-Matthew Pickering <matthewtpickering@gmail.com>
-Mauro Bieg <mauro.bieg@gmail.com>
-Mauro Bieg <mauro.bieg@gmail.com> <maurobieg@Mauros-MacBook-Air.local>
-Mauro Bieg <mauro.bieg@gmail.com> <mb21@server.fake>
-Mauro Bieg <mauro.bieg@gmail.com> <mb21@users.noreply.github.com>
-Mauro Bieg <mb21@users.noreply.github.com>
-Nils Carlson <nils.carlson@ludd.ltu.se>
-Nils Carlson <nils.carlson@ludd.ltu.se> <pyssling@ludd.ltu.se>
-Robin Lambertz <robinlambertz+dev@gmail.com>
-Roland Hieber <rohieb@rohieb.name> <rohieb@users.noreply.github.com>
-Sebastian Talmon <35015406+stalmon@users.noreply.github.com>
-Sergei Trofimovich <slyfox@gentoo.org> <siarheit@google.com>
-Sergei Trofimovich <slyfox@gentoo.org> <slyfox@inbox.ru>
-Stefan Björk <stefan.bjork@gmail.com> <stefan@airistotle.local>
-Thomas Hodgson <hello@twshodgson.net> <twsh@users.noreply.github.com>
-Timm Albers <timmm.albers@gmail.com> <timm.albers@open-xchange.com>
-Yan Pashkovsky <yanpaso@gmail.com> <Yanpas@users.noreply.github.com>
diff --git a/INSTALL.md b/INSTALL.md
deleted file mode 100644
index 35151eb02..000000000
--- a/INSTALL.md
+++ /dev/null
@@ -1,421 +0,0 @@
-# Installing pandoc
-
-The simplest way to get the latest pandoc release is to use the installer.
-
-<a href="https://github.com/jgm/pandoc/releases/latest"
- class="btn btn-primary" id="downloadInstallerBtn">
- Download the latest installer
-</a>
-
-For alternative ways to install pandoc, see below
-under the heading for your operating system.
-
-## Windows
-
-There is a package installer at pandoc's [download page].
-This will install pandoc, replacing older versions, and
-update your path to include the directory where pandoc's
-binaries are installed.
-
-If you prefer not to use the msi installer, we also provide
-a zip file that contains pandoc's binaries and
-documentation. Simply unzip this file and move the binaries
-to a directory of your choice.
-
-Alternatively, you can install pandoc using
-[Chocolatey](https://chocolatey.org):
-
- choco install pandoc
-
-Chocolatey can also install other software that integrates with Pandoc.
-For example, to install `rsvg-convert` (from [librsvg], covering formats
-without SVG support), [Python] (to use Pandoc filters), and
-[MiKTeX] (to typeset PDFs with [LaTeX]):
-
- choco install rsvg-convert python miktex
-
-Using multiple installation methods can result in two separate
-installations of pandoc; it is recommended to properly uninstall
-pandoc before switching to an alternative installation method.
-
-By default, Pandoc creates PDFs using LaTeX.
-We recommend installing it via [MiKTeX].
-
-## macOS
-
-There is a package installer at pandoc's [download page].
-If you later want to uninstall the package, you can do so
-by downloading [this script][uninstaller]
-and running it with `perl uninstall-pandoc.pl`.
-
-Alternatively, you can install pandoc using
-[Homebrew](https://brew.sh):
-
- brew install pandoc
-
-Homebrew can also install other software that integrates with Pandoc.
-For example, to install [librsvg] (its `rsvg-convert` covers formats
-without SVG support), [Python] (to use Pandoc filters), and
-[BasicTeX] (to typeset PDFs with [LaTeX]):
-
- brew install librsvg python homebrew/cask/basictex
-
-Note: On unsupported versions of macOS (more than three releases old),
-Homebrew installs from source, which takes additional time and disk space
-for the `ghc` compiler and dependent Haskell libraries.
-
-We also provide a zip file containing the binaries and man
-pages, for those who prefer not to use the installer. Simply
-unzip the file and move the binaries and man pages to
-whatever directory you like.
-
-By default, Pandoc creates PDFs using LaTeX. Because a full [MacTeX]
-installation uses four gigabytes of disk space, we recommend
-[BasicTeX] or [TinyTeX](https://yihui.org/tinytex/)
-and using the `tlmgr` tool to install additional packages
-as needed. If you receive errors warning of fonts not found:
-
- tlmgr install collection-fontsrecommended
-
-## Linux
-
-Check whether the pandoc version in your package manager is
-not outdated. Pandoc is in the [Debian], [Ubuntu], [Slackware],
-[Arch], [Fedora], [NiXOS], [openSUSE], [gentoo] and [Void] repositories.
-
-To get the latest release, we provide a binary package for amd64
-architecture on the **[download page]**.
-
-The executable is statically linked and
-has no dynamic dependencies or dependencies on external
-data files. Note: because of the static
-linking, the pandoc binary from this package cannot use lua
-filters that require external lua modules written in C.
-
-Both a tarball and a deb installer are provided. To install the deb:
-
- sudo dpkg -i $DEB
-
-where `$DEB` is the path to the downloaded deb. This will
-install the `pandoc` executable and man page.
-
-If you use an RPM-based distro, you may be able to install
-the deb from our download page using `alien`.
-
-On any distro, you may install from the tarball into `$DEST`
-(say, `/usr/local/` or `$HOME/.local`) by doing
-
- tar xvzf $TGZ --strip-components 1 -C $DEST
-
-where `$TGZ` is the path to the downloaded zipped tarball.
-For Pandoc versions before 2.0, which don't provide
-a tarball, try instead
-
- ar p $DEB data.tar.gz | tar xvz --strip-components 2 -C $DEST
-
-You can also install from source, using the
-instructions below under [Compiling from source].
-Note that most distros have the Haskell platform in their
-package repositories. For example, on Debian/Ubuntu,
-you can install it with `apt-get install haskell-platform`.
-
-For PDF output, you'll need LaTeX. We recommend installing
-[TeX Live](https://www.tug.org/texlive/) via your package
-manager. (On Debian/Ubuntu, `apt-get install texlive`.)
-
-## Chrome OS
-
-On Chrome OS, pandoc can be installed using the
-[chromebrew](https://github.com/skycocker/chromebrew) package manager
-with the command:
-
-```sh
-crew install pandoc
-```
-
-This will automatically build and configure pandoc for the specific
-device you are using.
-
-## BSD
-
-Pandoc is in the [NetBSD] and [FreeBSD ports] repositories.
-
-## Docker
-
-The official Docker images for pandoc can be found at
-<https://github.com/pandoc/dockerfiles> and at
-[dockerhub](https://hub.docker.com/).
-
-The [pandoc/core](https://hub.docker.com/r/pandoc/core)
-image contains `pandoc`.
-
-The [pandoc/latex](https://hub.docker.com/r/pandoc/latex)
-image also contains the minimal LaTeX installation needed
-to produce PDFs using pandoc.
-
-To run pandoc using Docker, converting `README.md` to `README.pdf`:
-
- docker run --rm --volume "`pwd`:/data" --user `id -u`:`id -g` pandoc/latex README.md -o README.pdf
-
-## GitHub Actions
-
-Pandoc can be run through
-[GitHub Actions](https://github.com/features/actions). For some
-examples, see <https://github.com/pandoc/pandoc-action-example>.
-
-## GitLab CI/CD
-
-Pandoc can be run through [GitLab CI/CD]. For some
-examples, see <https://gitlab.com/pandoc/pandoc-ci-example>.
-
-## Compiling from source
-
-If for some reason a binary package is not available for your
-platform, or if you want to hack on pandoc or use a non-released
-version, you can install from source.
-
-### Getting the pandoc source code
-
-Source tarballs can be found at
-<https://hackage.haskell.org/package/pandoc>. For example, to
-fetch the source for version 1.17.0.3:
-
- wget https://hackage.haskell.org/package/pandoc-1.17.0.3/pandoc-1.17.0.3.tar.gz
- tar xvzf pandoc-1.17.0.3.tar.gz
- cd pandoc-1.17.0.3
-
-Or you can fetch the development code by cloning the repository:
-
- git clone https://github.com/jgm/pandoc
- cd pandoc
-
-Note: there may be times when the development code is broken
-or depends on other libraries which must be installed
-separately. Unless you really know what you're doing, install
-the last released version.
-
-### Quick stack method
-
-The easiest way to build pandoc from source is to use [stack][stack]:
-
-1. Install [stack][stack]. Note that Pandoc requires stack >= 1.7.0.
-
-2. Change to the pandoc source directory and issue the following commands:
-
- stack setup
- stack install
-
- `stack setup` will automatically download the ghc compiler
- if you don't have it. `stack install` will install the
- `pandoc` executable into `~/.local/bin`, which you should
- add to your `PATH`. This process will take a while, and
- will consume a considerable amount of disk space.
-
-### Quick cabal method
-
-1. Install the [Haskell platform]. This will give you [GHC] and
- the [cabal-install] build tool. Note that pandoc requires
- GHC >= 7.10 and cabal >= 2.0.
-
-2. Update your package database:
-
- cabal update
-
-3. Check your cabal version with
-
- cabal --version
-
- If you have a version less than 2.0, install the latest with:
-
- cabal install cabal-install
-
-4. Use `cabal` to install pandoc and its dependencies:
-
- cabal install pandoc
-
- This procedure will install the released version of pandoc,
- which will be downloaded automatically from HackageDB.
-
- If you want to install a modified or development version
- of pandoc instead, switch to the source directory and do
- as above, but without the 'pandoc':
-
- cabal install
-
-5. Make sure the `$CABALDIR/bin` directory is in your path. You should
- now be able to run `pandoc`:
-
- pandoc --help
-
- [Not sure where `$CABALDIR` is?](https://wiki.haskell.org/Cabal-Install#The_cabal-install_configuration_file)
-
-5. By default `pandoc` uses the "i;unicode-casemap" method
- to sort bibliography entries (RFC 5051). If you would like to
- use the locale-sensitive unicode collation algorithm instead,
- specify the `icu` flag (which affects the dependency `citeproc`):
-
- cabal install pandoc -ficu
-
- Note that this requires the `text-icu` library, which in turn
- depends on the C library `icu4c`. Installation directions
- vary by platform. Here is how it might work on macOS with Homebrew:
-
- brew install icu4c
- stack install pandoc \
- --flag "citeproc:icu" \
- --extra-lib-dirs=/usr/local/opt/icu4c/lib \
- --extra-include-dirs=/usr/local/opt/icu4c/include
-
-6. The `pandoc.1` man page will be installed automatically. cabal shows
- you where it is installed: you may need to set your `MANPATH`
- accordingly. If `MANUAL.txt` has been modified, the man page can be
- rebuilt: `make man/pandoc.1`.
-
-
-### Custom cabal method
-
-This is a step-by-step procedure that offers maximal control
-over the build and installation. Most users should use the
-quick install, but this information may be of use to packagers.
-For more details, see the [Cabal User's Guide]. These instructions
-assume that the pandoc source directory is your working directory.
-You will need cabal version 2.0 or higher.
-
-1. Install dependencies: in addition to the [Haskell platform],
- you will need a number of additional libraries. You can install
- them all with
-
- cabal update
- cabal install --only-dependencies
-
-2. Configure:
-
- cabal configure --prefix=DIR --bindir=DIR --libdir=DIR \
- --datadir=DIR --libsubdir=DIR --datasubdir=DIR --docdir=DIR \
- --htmldir=DIR --program-prefix=PREFIX --program-suffix=SUFFIX \
- --mandir=DIR --flags=FLAGSPEC --enable-tests
-
- All of the options have sensible defaults that can be overridden
- as needed.
-
- `FLAGSPEC` is a list of Cabal configuration flags, optionally
- preceded by a `-` (to force the flag to `false`), and separated
- by spaces. Pandoc's flags include:
-
- - `embed_data_files`: embed all data files into the binary (default no).
- This is helpful if you want to create a relocatable binary.
-
- - `https`: enable support for downloading resources over https
- (using the `http-client` and `http-client-tls` libraries).
-
-3. Build:
-
- cabal build
- cabal test
-
-4. Build API documentation:
-
- cabal haddock --html-location=URL --hyperlink-source
-
-5. Copy the files:
-
- cabal copy --destdir=PATH
-
- The default destdir is `/`.
-
-6. Register pandoc as a GHC package:
-
- cabal register
-
- Package managers may want to use the `--gen-script` option to
- generate a script that can be run to register the package at
- install time.
-
-### Creating a relocatable binary
-
-It is possible to compile pandoc such that the data files
-pandoc uses are embedded in the binary. The resulting binary
-can be run from any directory and is completely self-contained.
-With cabal, add `-fembed_data_files` to the `cabal configure`
-or `cabal install` commands.
-
-With stack, use `--flag pandoc:embed_data_files`.
-
-
-
-### Running tests
-
-Pandoc comes with an automated test suite.
-To run with cabal, `cabal test`; to run with stack, `stack
-test`.
-
-To run particular tests (pattern-matching on their names), use
-the `-p` option:
-
- cabal install pandoc --enable-tests
- cabal test --test-options='-p markdown'
-
-Or with stack:
-
- stack test --test-arguments='-p markdown'
-
-It is often helpful to add `-j4` (run tests in parallel)
-and `--hide-successes` (don't clutter output with successes)
-to the test arguments as well.
-
-If you add a new feature to pandoc, please add tests as well, following
-the pattern of the existing tests. The test suite code is in
-`test/test-pandoc.hs`. If you are adding a new reader or writer, it is
-probably easiest to add some data files to the `test` directory, and
-modify `test/Tests/Old.hs`. Otherwise, it is better to modify the module
-under the `test/Tests` hierarchy corresponding to the pandoc module you
-are changing.
-
-### Running benchmarks
-
-To build and run the benchmarks:
-
- cabal configure --enable-benchmarks && cabal build
- cabal bench
-
-or with stack:
-
- stack bench
-
-To use a smaller sample size so the benchmarks run faster:
-
- cabal bench --benchmark-options='-s 20'
-
-To run just the markdown benchmarks:
-
- cabal bench --benchmark-options='markdown'
-
-
-[Arch]: https://www.archlinux.org/packages/community/x86_64/pandoc/
-[Cabal User's Guide]: https://cabal.readthedocs.io/
-[Debian]: https://packages.debian.org/pandoc
-[Fedora]: https://apps.fedoraproject.org/packages/pandoc
-[FreeBSD ports]: https://www.freshports.org/textproc/hs-pandoc/
-[GHC]: https://www.haskell.org/ghc/
-[GitLab CI/CD]: https://about.gitlab.com/stages-devops-lifecycle/continuous-integration/
-[Haskell platform]: https://hackage.haskell.org/platform/
-[MacPorts]: https://trac.macports.org/browser/trunk/dports/textproc/pandoc/Portfile
-[MacTeX]: https://tug.org/mactex/
-[BasicTeX]: https://www.tug.org/mactex/morepackages.html
-[LaTeX]: https://www.latex-project.org
-[MiKTeX]: https://miktex.org/
-[librsvg]: https://wiki.gnome.org/Projects/LibRsvg
-[Python]: https://www.python.org
-[NetBSD]: https://pkgsrc.se/wip/pandoc
-[NixOS]: https://nixos.org/nixos/packages.html
-[Slackware]: https://www.slackbuilds.org/result/?search=pandoc&sv=
-[Ubuntu]: https://packages.ubuntu.com/pandoc
-[download page]: https://github.com/jgm/pandoc/releases/latest
-[gentoo]: https://packages.gentoo.org/package/app-text/pandoc
-[haskell repository]: https://wiki.archlinux.org/index.php/Haskell_Package_Guidelines#.5Bhaskell.5D
-[openSUSE]: https://software.opensuse.org/package/pandoc
-[source tarball]: https://hackage.haskell.org/package/pandoc
-[stack]: https://docs.haskellstack.org/en/stable/install_and_upgrade.html
-[cabal-install]: https://hackage.haskell.org/package/cabal-install
-[Void]: https://voidlinux.org/
-[uninstaller]: https://raw.githubusercontent.com/jgm/pandoc/master/macos/uninstall-pandoc.pl
diff --git a/Makefile b/Makefile
deleted file mode 100644
index ac0506328..000000000
--- a/Makefile
+++ /dev/null
@@ -1,153 +0,0 @@
-version?=$(shell grep '^[Vv]ersion:' pandoc.cabal | awk '{print $$2;}')
-pandoc=$(shell find dist -name pandoc -type f -exec ls -t {} \; | head -1)
-SOURCEFILES?=$(shell git ls-tree -r master --name-only | grep "\.hs$$")
-BRANCH?=master
-ARCH=$(shell uname -m)
-DOCKERIMAGE=registry.gitlab.b-data.ch/ghc/ghc4pandoc:8.10.4
-COMMIT=$(shell git rev-parse --short HEAD)
-TIMESTAMP=$(shell date "+%Y%m%d_%H%M")
-LATESTBENCH=$(word 1,$(shell ls -t bench_*.csv 2>/dev/null))
-BASELINE?=$(LATESTBENCH)
-ifeq ($(BASELINE),)
-BASELINECMD=
-else
-BASELINECMD=--baseline $(BASELINE)
-endif
-GHCOPTS=-fdiagnostics-color=always -j4 +RTS -A8m -RTS
-WEBSITE=../../web/pandoc.org
-REVISION?=1
-# For gauge:
-# BENCHARGS?=--small --ci=0.90 --match=pattern $(PATTERN)
-# For tasty-bench:
-BENCHARGS?=--csv bench_$(TIMESTAMP).csv $(BASELINECMD) --timeout=6 +RTS -T --nonmoving-gc -RTS $(if $(PATTERN),--pattern "$(PATTERN)",)
-
-quick:
- stack install --ghc-options='$(GHCOPTS)' --system-ghc --flag 'pandoc:embed_data_files' --fast --test --test-arguments='-j4 --hide-successes --ansi-tricks=false $(TESTARGS)'
-
-quick-cabal:
- cabal v2-build -j8 --ghc-options '$(GHCOPTS)' --disable-optimization --enable-tests
- cabal v2-test --disable-optimization --test-options="--hide-successes --ansi-tricks=false $(TESTARGS)"
- echo "Path to built executable:" && cabal exec -- sh -c 'command -v pandoc' | sed -e 's!x/pandoc/build!x/pandoc/noopt/build!'
-
-full-cabal:
- cabal v2-configure . --ghc-options '$(GHCOPTS)' --flags '+embed_data_files +trypandoc' --enable-tests --enable-benchmarks
- cabal v2-build . --disable-optimization
- cabal v2-run test-pandoc --disable-optimization -- --hide-successes --ansi-tricks=false $(TESTARGS)
-
-full:
- stack install --flag 'pandoc:embed_data_files' --flag 'pandoc:trypandoc' --bench --no-run-benchmarks --test --test-arguments='-j4 --hide-successes--ansi-tricks-false' --ghc-options '-Wall -Werror -fno-warn-unused-do-bind -O0 $(GHCOPTS)'
-
-ghci:
- stack ghci --flag 'pandoc:embed_data_files'
-
-haddock:
- stack haddock
-
-check: check-cabal checkdocs
- cabal check # check cabal file
- cabal outdated # check cabal dependencies
- lsd # check that stack.yaml dependencies are up to date
-
-check-cabal: git-files.txt sdist-files.txt
- @echo "Checking to see if all committed test/data files are in sdist."
- diff -u $^
-
-checkdocs:
- @echo "Checking for tabs in manual."
- ! grep -q -n -e "\t" MANUAL.txt changelog.md
-
-# Note: to accept current results of golden tests,
-# make test TESTARGS='--accept'
-test:
- stack test --flag 'pandoc:embed_data_files' --fast --test-arguments='-j4 --hide-successes --ansi-tricks=false $(TESTARGS)' --ghc-options '$(GHCOPTS)'
-
-ghcid:
- ghcid -c "stack repl --flag 'pandoc:embed_data_files'"
-
-ghcid-test:
- ghcid -c "stack repl --ghc-options=-XNoImplicitPrelude --flag 'pandoc:embed_data_files' --ghci-options=-fobject-code pandoc:lib pandoc:test-pandoc"
-
-bench:
- stack bench \
- --ghc-options '$(GHCOPTS)' \
- --benchmark-arguments='$(BENCHARGS)' 2>&1 | \
- tee "bench_latest.txt"
-
-reformat:
- for f in $(SOURCEFILES); do echo $$f; stylish-haskell -i $$f ; done
-
-lint: hlint fix_spacing
-
-hlint:
- for f in $(SOURCEFILES); do echo $$f; hlint --verbose --refactor --refactor-options='-s -o -' $$f; done
-
-fix_spacing:
- # Fix trailing newlines and spaces at ends of lines
- for f in $(SOURCEFILES); do printf '%s\n' "`cat $$f`" | sed -e 's/ *$$//' > $$f.tmp; mv $$f.tmp $$f; done
-
-changes_github:
- pandoc --filter tools/extract-changes.hs changelog.md -t gfm --wrap=none --template tools/changes_template.html | sed -e 's/\\#/#/g' | pbcopy
-
-dist: man/pandoc.1
- cabal sdist
- rm -rf "pandoc-${version}"
- tar xvzf dist/pandoc-${version}.tar.gz
- cd pandoc-${version}
- stack setup && stack test && cd .. && rm -rf "pandoc-${version}"
-
-
-debpkg:
- docker run -v `pwd`:/mnt \
- -v `pwd`/linux/artifacts:/artifacts \
- --user $(id -u):$(id -g) \
- -e REVISION=$(REVISION) \
- -w /mnt \
- --memory=0 \
- --rm \
- $(DOCKERIMAGE) \
- bash \
- /mnt/linux/make_artifacts.sh 2>&1 > docker.log
-
-man/pandoc.1: MANUAL.txt man/pandoc.1.before man/pandoc.1.after
- pandoc $< -f markdown -t man -s \
- --lua-filter man/manfilter.lua \
- --include-before-body man/pandoc.1.before \
- --include-after-body man/pandoc.1.after \
- --metadata author="" \
- --variable footer="pandoc $(version)" \
- -o $@
-
-README.md: README.template MANUAL.txt tools/update-readme.lua
- pandoc --lua-filter tools/update-readme.lua \
- --reference-location=section -t gfm $< -o $@
-
-download_stats:
- curl https://api.github.com/repos/jgm/pandoc/releases | \
- jq -r '.[] | .assets | .[] | "\(.download_count)\t\(.name)"'
-
-pandoc-templates:
- rm ../pandoc-templates/default.* ; \
- cp data/templates/* ../pandoc-templates/ ; \
- pushd ../pandoc-templates/ && \
- git add * && \
- git commit -m "Updated templates for pandoc $(version)" && \
- popd
-
-trypandoc:
- ssh -t macfarlane 'cd src/pandoc && git pull && stack install --flag pandoc:trypandoc --flag pandoc:embed_data_files && cd trypandoc && sudo make install'
-
-update-website:
- make -C $(WEBSITE) update
- make -C $(WEBSITE)
- make -C $(WEBSITE) upload
-
-clean:
- stack clean
-
-sdist-files.txt: .FORCE
- cabal sdist --list-only | sed 's/\.\///' | grep '^\(test\|data\)\/' | sort > $@
-
-git-files.txt: .FORCE
- git ls-tree -r --name-only HEAD | grep '^\(test\|data\)\/' | sort > $@
-
-.PHONY: .FORCE deps quick full haddock install clean test bench changes_github dist prof download_stats reformat lint weigh doc/lua-filters.md pandoc-templates trypandoc update-website debpkg checkdocs ghcid ghci fix_spacing hlint check check-cabal check
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 548ac75a8..20a2db76b 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -420,6 +420,8 @@ inlineCommands = M.unions
, ("uline", underline <$> tok)
-- plain tex stuff that should just be passed through as raw tex
, ("ifdim", ifdim)
+ -- stackengine
+ , ("addstackgap", skipopts *> tok)
]
lettrine :: PandocMonad m => LP m Inlines
@@ -833,6 +835,7 @@ blockCommands = M.fromList
<|> (grouped block >>= addMeta "title")))
, ("subtitle", mempty <$ (skipopts *> tok >>= addMeta "subtitle"))
, ("author", mempty <$ (skipopts *> authors))
+ , ("tableofcontents", mempty <$ (addMeta "tableOfContents" True))
-- -- in letter class, temp. store address & sig as title, author
, ("address", mempty <$ (skipopts *> tok >>= addMeta "address"))
, ("signature", mempty <$ (skipopts *> authors))
@@ -933,11 +936,15 @@ environments = M.union (tableEnvironments blocks inline) $
, ("abstract", mempty <$ (env "abstract" blocks >>= addMeta "abstract"))
, ("sloppypar", env "sloppypar" blocks)
, ("letter", env "letter" letterContents)
+ , ("multicols", env "multicols" multicols)
, ("minipage", env "minipage" $
skipopts *> spaces *> optional braced *> spaces *> blocks)
, ("figure", env "figure" $ skipopts *> figure)
, ("subfigure", env "subfigure" $ skipopts *> tok *> figure)
, ("center", divWith ("", ["center"], []) <$> env "center" blocks)
+ , ("flushright", divWith ("", ["flushright"], []) <$> env "flushright" blocks)
+ , ("flushleft", divWith ("", ["flushleft"], []) <$> env "flushleft" blocks)
+ , ("landscape", env "landscape" blocks)
, ("quote", blockQuote <$> env "quote" blocks)
, ("quotation", blockQuote <$> env "quotation" blocks)
, ("verse", blockQuote <$> env "verse" blocks)
@@ -1088,6 +1095,18 @@ letterContents = do
_ -> mempty
return $ addr <> bs -- sig added by \closing
+multicols :: PandocMonad m => LP m Blocks
+multicols = do
+ spaces
+ n <- fromMaybe 1 . safeRead . untokenize <$> braced
+ spaces
+ bs <- blocks
+ return $ divWith ("", ["columns"], []) $ cols n bs
+ where
+ cols :: Int -> Blocks -> Blocks
+ cols n = foldr1 (.) (replicate n $ divWith ("", ["column"], []))
+
+
figure :: PandocMonad m => LP m Blocks
figure = try $ do
resetCaption
diff --git a/stack.yaml b/stack.yaml
deleted file mode 100644
index 94121b116..000000000
--- a/stack.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
-flags:
- pandoc:
- trypandoc: false
- embed_data_files: true
- QuickCheck:
- old-random: false
-packages:
-- '.'
-extra-deps:
-- skylighting-core-0.12.1
-- skylighting-0.12.1
-- doctemplates-0.10.0.1
-- emojis-0.1.2
-- doclayout-0.3.1.1
-- lpeg-1.0.1
-- hslua-2.0.1
-- hslua-classes-2.0.0
-- hslua-core-2.0.0.2
-- hslua-marshalling-2.0.1
-- hslua-module-path-1.0.0
-- hslua-module-system-1.0.0
-- hslua-module-text-1.0.0
-- hslua-module-version-1.0.0
-- hslua-objectorientation-2.0.1
-- hslua-packaging-2.0.0
-- lua-2.0.2
-- tasty-hslua-1.0.0
-- tasty-lua-1.0.0
-- pandoc-lua-marshal-0.1.3
-- pandoc-types-1.22.1
-- commonmark-0.2.1.1
-- commonmark-extensions-0.2.2.1
-- citeproc-0.6
-- aeson-pretty-0.8.9
-- unicode-transforms-0.4.0
-- unicode-data-0.2.0
-- git: https://github.com/jgm/texmath.git
- commit: 46df85d747f4f233157d3476683264232a4f58be
-- git: https://github.com/jgm/ipynb.git
- commit: 00246af10885c2ad4413ace4f69a7e6c88297a08
-- git: https://github.com/jgm/commonmark-hs
- commit: 4d460b206e0b1872376db86cadf7a4567eeddaed
- subdir: commonmark-pandoc
-ghc-options:
- "$locals": -fhide-source-paths -Wno-missing-home-modules
-resolver: lts-18.10
-nix:
- packages: [zlib]
diff --git a/test/command/latex-multicols.md b/test/command/latex-multicols.md
new file mode 100644
index 000000000..81e5577fd
--- /dev/null
+++ b/test/command/latex-multicols.md
@@ -0,0 +1,14 @@
+# `\begin{multicols}`
+
+```
+% pandoc -f latex -t native
+\begin{multicols}{2}
+Hello
+\end{multicols}
+^D
+[Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Div ("",["column"],[])
+ [Para [Str "Hello"]]]]]
+```
+
diff --git a/test/command/latex-stackengine.md b/test/command/latex-stackengine.md
new file mode 100644
index 000000000..21253bf61
--- /dev/null
+++ b/test/command/latex-stackengine.md
@@ -0,0 +1,18 @@
+# stackengine
+
+```
+% pandoc -f latex -t native
+\addstackgap{Hello} World
+
+^D
+[Para [Str "Hello",Space,Str "World"]]
+```
+
+```
+% pandoc -f latex -t native
+Hello \addstackgap[12pt]{World}
+
+^D
+[Para [Str "Hello",Space,Str "World"]]
+```
+