barman icon indicating copy to clipboard operation
barman copied to clipboard

Build docs with latest pandoc version

Open mikewallace1979 opened this issue 3 years ago • 4 comments

Currently we need to use pandoc version 2.2.1 in order to keep the formatting the same when we build the docs.

Newer versions of pandoc make different formatting choices which we don't necessarily want.

We need to determine how to invoke the current pandoc to reduce the formatting changes to only those that are acceptable to us.

mikewallace1979 avatar Nov 17 '21 15:11 mikewallace1979

Here is an example of changes from barman-wal-archive.1 (L 20 -> 23) cmd: pandoc -s -f markdown-smart -t man -o barman-wal-archive.1 barman-wal-archive.1.md

pandoc 2.2.1:

python 3 then avoid the compression options \f[C]\-\-gzip\f[] or
\f[C]\-\-bzip2\f[] as barman\-cloud\-wal\-restore is unable to restore
gzip\-compressed WALs on python < 3.2 or bzip2\-compressed WALs on
python < 3.3.

pandoc 2.14.2:

python 3 then avoid the compression options \f[C]--gzip\f[R] or
\f[C]--bzip2\f[R] as barman-cloud-wal-restore is unable to restore
gzip-compressed WALs on python < 3.2 or bzip2-compressed WALs on python
< 3.3.

didiermichel avatar Nov 17 '21 16:11 didiermichel

If the issue is in html transformation, then it will probably be useful to use a css style sheet and pass it as argument

didiermichel avatar Nov 17 '21 18:11 didiermichel

CSS can be added with --css=file.css when rendering html

didiermichel avatar Nov 18 '21 08:11 didiermichel

Adding some information to run pandoc 2.2.1 This will mitigate the issue until we take action to use a newer pandoc version.

Docker file

FROM debian:buster

RUN apt-get update && apt-get install -y make pandoc texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra

WORKDIR /data

Create Image debian/buster/pandoc:latest

Execute from barman/doc:

docker run --rm --volume "`pwd`:/data" -w="/data" --user `id -u`:`id -g` debian/buster/pandoc:latest make clean all

didiermichel avatar Jan 05 '22 15:01 didiermichel