Comments (2)
Docker container cannot access to host machine, so it is no way to open PDF from container.
However, you can save PDF to host machine using volume mount.
I think using docker-compose.yml is easier way.
Using docker-compose.yml
First, make docker-compose.yml
into your working directory.
version: '2'
services:
build:
image: paperist/alpine-texlive-ja
volumes:
- './:/workdir'
command: |
platex example &&
pbibtex example &&
platex example &&
platex example &&
dvipdfmx example
Next, when you build, type docker-compose run --rm build && open example.pdf
Tips
Latexmk
This image contains latexmk
command.
latexmk
is simple and useful command for building.
See http://mg.readthedocs.io/latexmk.html.
First, you put latexmkrc
like below to your working directory.
$latex = 'platex -halt-on-error -interaction=nonstopmode';
$bibtex = 'pbibtex';
$dvipdf = 'dvipdfmx %O -o %D %S';
$makeindex = 'pmendex %O -o %D %S';
$pdf_mode = 3;
$bibtex_use = 2;
Next, rewrite docker-compose.yml
to use latekmk.
version: '2'
services:
latexmk:
image: paperist/alpine-texlive-ja
volumes:
- './:/workdir'
entrypoint: latexmk
When you build, type docker-compose run --rm latexmk example.tex && open example.pdf
When cleanup, type docker-compose run --rm latexmk -C example.tex
whalebrew
If your machine is macOS or linux, you can use whalebrew
.
whalebrew
enables to use docker image like command.
First, install whalebrew
( see https://github.com/bfirsh/whalebrew#install )
Next, type whalebrew install paperist/latexmk
.
( Docker image from https://github.com/Paperist/whalebrew-latexmk )
When you build, type latexmk example.tex && open example.pdf
When cleanup, type latexmk -C example.tex
I hope that you can write comfortably.
from texlive-ja.
Thank you, it worked well.
Excuse me for my very late reply.
from texlive-ja.
Related Issues (11)
- Remove VOLUME from Dockerfile
- How to change from Japanese based to English based HOT 3
- Support ARM HOT 4
- XeLaTeX not working HOT 3
- Do fontconfig-dev and freetype-dev needed?
- How to watch .tex files? HOT 3
- How to compile .tex with unicode chars when attach ./docs/ to .workdir/? HOT 5
- Failed generate pdf with eps file as image file. HOT 1
- tlmgr fails
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from texlive-ja.