tewarid / docker-pandoc Goto Github PK
View Code? Open in Web Editor NEWDocker image with Pandoc, TeX packages to use the eisvogel template, Node.js, and mermaid-filter.
License: MIT License
Docker image with Pandoc, TeX packages to use the eisvogel template, Node.js, and mermaid-filter.
License: MIT License
Update pandoc version in Docker image to 2.2.1.
Step 9/15 : RUN apt-get update -y && apt-get install -y -o Acquire::Retries=10 --no-install-recommends wget fontconfig lmodern && ./install-tl -profile texlive.profile
---> Running in 1968d386349e
Get:1 http://ppa.launchpad.net trusty InRelease [15.4 kB]
Get:2 http://security.debian.org jessie/updates InRelease [94.4 kB]
Ign http://deb.debian.org jessie InRelease
Get:3 http://deb.debian.org jessie-updates InRelease [145 kB]
Get:4 http://ppa.launchpad.net trusty/main amd64 Packages [15.0 kB]
Get:5 http://deb.debian.org jessie Release.gpg [2434 B]
Get:6 http://security.debian.org jessie/updates/main amd64 Packages [623 kB]
Get:7 http://deb.debian.org jessie Release [148 kB]
Get:8 http://deb.debian.org jessie-updates/main amd64 Packages [23.0 kB]
Get:9 http://deb.debian.org jessie/main amd64 Packages [9064 kB]
Fetched 10.1 MB in 15s (643 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
wget is already the newest version.
The following extra packages will be installed:
fontconfig-config fonts-dejavu-core fonts-lmodern libfontconfig1
libfreetype6 libpng12-0 tex-common ucf
Suggested packages:
debhelper
The following NEW packages will be installed:
fontconfig fontconfig-config fonts-dejavu-core fonts-lmodern libfontconfig1
libfreetype6 libpng12-0 lmodern tex-common ucf
0 upgraded, 10 newly installed, 0 to remove and 3 not upgraded.
Need to get 17.4 MB of archives.
After this operation, 51.1 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian/ jessie/main libpng12-0 amd64 1.2.50-2+deb8u3 [173 kB]
Get:2 http://deb.debian.org/debian/ jessie/main libfreetype6 amd64 2.5.2-3+deb8u2 [466 kB]
Get:3 http://deb.debian.org/debian/ jessie/main ucf all 3.0030 [69.7 kB]
Get:4 http://deb.debian.org/debian/ jessie/main fonts-dejavu-core all 2.34-1 [1047 kB]
Get:5 http://deb.debian.org/debian/ jessie/main fontconfig-config all 2.11.0-6.3+deb8u1 [274 kB]
Get:6 http://deb.debian.org/debian/ jessie/main libfontconfig1 amd64 2.11.0-6.3+deb8u1 [329 kB]
Get:7 http://deb.debian.org/debian/ jessie/main fontconfig amd64 2.11.0-6.3+deb8u1 [403 kB]
Get:8 http://deb.debian.org/debian/ jessie/main tex-common all 5.03 [625 kB]
Get:9 http://deb.debian.org/debian/ jessie/main fonts-lmodern all 2.004.4-5 [4539 kB]
Get:10 http://deb.debian.org/debian/ jessie/main lmodern all 2.004.4-5 [9469 kB]
�[91mdebconf: delaying package configuration, since apt-utils is not installed
�[0m
Fetched 17.4 MB in 2s (6368 kB/s)
Selecting previously unselected package libpng12-0:amd64.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 15787 files and directories currently installed.)
Preparing to unpack .../libpng12-0_1.2.50-2+deb8u3_amd64.deb ...
Unpacking libpng12-0:amd64 (1.2.50-2+deb8u3) ...
Selecting previously unselected package libfreetype6:amd64.
Preparing to unpack .../libfreetype6_2.5.2-3+deb8u2_amd64.deb ...
Unpacking libfreetype6:amd64 (2.5.2-3+deb8u2) ...
Selecting previously unselected package ucf.
Preparing to unpack .../archives/ucf_3.0030_all.deb ...
Moving old data out of the way
Unpacking ucf (3.0030) ...
Selecting previously unselected package fonts-dejavu-core.
Preparing to unpack .../fonts-dejavu-core_2.34-1_all.deb ...
Unpacking fonts-dejavu-core (2.34-1) ...
Selecting previously unselected package fontconfig-config.
Preparing to unpack .../fontconfig-config_2.11.0-6.3+deb8u1_all.deb ...
Unpacking fontconfig-config (2.11.0-6.3+deb8u1) ...
Selecting previously unselected package libfontconfig1:amd64.
Preparing to unpack .../libfontconfig1_2.11.0-6.3+deb8u1_amd64.deb ...
Unpacking libfontconfig1:amd64 (2.11.0-6.3+deb8u1) ...
Selecting previously unselected package fontconfig.
Preparing to unpack .../fontconfig_2.11.0-6.3+deb8u1_amd64.deb ...
Unpacking fontconfig (2.11.0-6.3+deb8u1) ...
Selecting previously unselected package tex-common.
Preparing to unpack .../tex-common_5.03_all.deb ...
Unpacking tex-common (5.03) ...
Selecting previously unselected package fonts-lmodern.
Preparing to unpack .../fonts-lmodern_2.004.4-5_all.deb ...
Unpacking fonts-lmodern (2.004.4-5) ...
Selecting previously unselected package lmodern.
Preparing to unpack .../lmodern_2.004.4-5_all.deb ...
Unpacking lmodern (2.004.4-5) ...
Setting up libpng12-0:amd64 (1.2.50-2+deb8u3) ...
Setting up libfreetype6:amd64 (2.5.2-3+deb8u2) ...
Setting up ucf (3.0030) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
Setting up fonts-dejavu-core (2.34-1) ...
Setting up fontconfig-config (2.11.0-6.3+deb8u1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
Setting up libfontconfig1:amd64 (2.11.0-6.3+deb8u1) ...
Setting up fontconfig (2.11.0-6.3+deb8u1) ...
Regenerating fonts cache...
done.
Setting up tex-common (5.03) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
Setting up fonts-lmodern (2.004.4-5) ...
Setting up lmodern (2.004.4-5) ...
Processing triggers for libc-bin (2.19-18+deb8u10) ...
Automated TeX Live installation using profile: texlive.profile
Loading http://ftp.math.purdue.edu/mirrors/ctan.org/systems/texlive/tlnet/tlpkg/texlive.tlpdb
�[91m=============================================================================
./install-tl: The TeX Live versions of the local installation
and the repository being accessed are not compatible:
local: 2017
repository: 2018
Perhaps you need to use a different CTAN mirror?
(For more, see the output of install-tl --help, especially the
-repository option. Online via http://tug.org/texlive/doc.)
=============================================================================
�[0m
Removing intermediate container 1968d386349e
The command '/bin/sh -c apt-get update -y && apt-get install -y -o Acquire::Retries=10 --no-install-recommends wget fontconfig lmodern && ./install-tl -profile texlive.profile' returned a non-zero code: 1
This will facilitate embedding images in SVG format such as those produced by mermaidjs.
To install rsvg2pdf on debian jessie
apt install librsvg2-bin
mermaid-filter 1.2.0 will look in the current working directory for a .puppeteer.json
{
"args": ["--no-sandbox"]
}
and pass it on to mermaid cli (-p
option of mmdc) if found.
That option can be used to disable sandbox.
Snippet of log file showing the failure
src/Text/Pandoc/Readers/Odt/ContentReader.hs:523:66: error:
• Could not deduce (Data.Semigroup.Semigroup m)
arising from a use of ‘<>’
from the context: Monoid e
bound by the type signature for:
matchingElement :: forall e.
Monoid e =>
Namespace
-> ElementName -> OdtReaderSafe e e -> ElementMatcher e
at src/Text/Pandoc/Readers/Odt/ContentReader.hs:(516,1)-(519,35)
or from: (ArrowChoice a, Monoid m)
bound by the type signature for:
asResultAccumulator :: forall (a :: * -> * -> *) m.
(ArrowChoice a, Monoid m) =>
a m m -> a m (Fallible m)
at src/Text/Pandoc/Readers/Odt/ContentReader.hs:522:4-80
Possible fix:
add (Data.Semigroup.Semigroup m) to the context of
the type signature for:
asResultAccumulator :: forall (a :: * -> * -> *) m.
(ArrowChoice a, Monoid m) =>
a m m -> a m (Fallible m)
• In the second argument of ‘(>>%)’, namely ‘(<>)’
In the second argument of ‘($)’, namely
‘keepingTheValue a >>% (<>)’
In the expression: liftAsSuccess $ keepingTheValue a >>% (<>)
|
523 | asResultAccumulator a = liftAsSuccess $ keepingTheValue a >>% (<>)
| ^^^^
Failed to install pandoc-2.1.1
cabal: Error: some packages failed to install:
See fix at jgm/pandoc#4448
Add example that uses eisvogel template and mermaid-filter, and uses pandoc to produce pdf output. This will facilitate testing and demo of Docker image.
The following files illustrate rendering problem found with rsvg-convert in librsvg2-bin version 2.40.5-1+deb8u2. The svg files can be previewed in the browser without any issues.
diagram-1.svg and the corresponding pdf diagram-1.pdf and png for a class diagram
diagram-2.svg and the corresponding pdf diagram-2.pdf and png for a gantt chart
sequence diagrams do render properly, here's the svg diagram-3.svg.zip
and corresponding pdf diagram-3.pdf and png
Rendering image in eps format results in error message such as
sh: 1: repstopdf: not found
system returned with code 32512
sh: 1: repstopdf: not found
system returned with code 32512
sh: 1: repstopdf: not found
system returned with code 32512
sh: 1: repstopdf: not found
system returned with code 32512
Error producing PDF.
! Package pdftex.def Error: File `./tex2pdf.-bd267f1f84adb5a1/4859595273588ecf1
923429b3b5c33f9b143abd5-eps-converted-to.pdf' not found: using draft setting.
See the pdftex.def package documentation for explanation.
Type H <return> for immediate help.
...
l.327 ...595273588ecf1923429b3b5c33f9b143abd5.eps}
Add support for repstopdf.
It can be installed by downloading epstopdf package using tlmgr
tlmgr install epstopdf
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.