Skip to content

Commit ba146c9

Browse files
committed
manage no bibliography
1 parent f0ac3f3 commit ba146c9

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![works on my machine][works-badge]][works-link]
88
[![Docker status][docker-badge]][docker-link]
99

10-
LaTeX compiler in [Nextflow][nextflow-link] using [XeLaTex][xetex-link] within a Docker container. Made for compiling [Beamer][beamer-link] theme [Metropolis][metropolis-link], but works also with [moderncv][moderncv-link].
10+
[LaTeX][latex-link] compiler in [Nextflow][nextflow-link] using [XeLaTex][xetex-link] within a Docker container. Made for compiling [Beamer][beamer-link] theme [Metropolis][metropolis-link], but works also with [moderncv][moderncv-link].
1111

1212
## Options
1313

@@ -38,17 +38,23 @@ nextflow run MaxUlysse/compile-latex /
3838
--tex <file.tex>
3939
```
4040

41+
## Result
42+
- [sample.pdf](https://github.com/MaxUlysse/compile-latex/blob/master/sample.pdf)
43+
- [Presentations](https://github.com/MaxUlysse/Presentations)
44+
- [CV](https://github.com/MaxUlysse/myCV)
45+
4146
## Docker container
4247
Based on `debian:stretch-slim` contain:
4348
- Fonts and LaTeX utilities for themes:
44-
- (`metropolis`)[metropolis-link]
45-
- (`moderncv`)[moderncv-link]
49+
- [`metropolis`][metropolis-link]
50+
- [`moderncv`][moderncv-link]
4651

4752
[beamer-link]: https://github.com/josephwright/beamer
4853
[circleci-badge]: https://circleci.com/gh/MaxUlysse/compile-latex.svg?style=shield
4954
[circleci-link]: https://circleci.com/gh/MaxUlysse/compile-latex
5055
[docker-badge]: https://img.shields.io/docker/automated/maxulysse/compile-latex.svg
5156
[docker-link]: https://hub.docker.com/r/maxulysse/compile-latex
57+
[latex-link]: https://www.latex-project.org
5258
[license-badge]: https://img.shields.io/github/license/MaxUlysse/compile-latex.svg
5359
[license-link]: https://github.com/MaxUlysse/compile-latex/blob/master/LICENSE
5460
[metropolis-link]: https://ctan.org/pkg/beamertheme-metropolis
@@ -61,4 +67,4 @@ Based on `debian:stretch-slim` contain:
6167
[version-link]: https://github.com/MaxUlysse/compile-latex/releases/latest
6268
[works-badge]: https://img.shields.io/badge/works-on_my_machine-brightgreen.svg
6369
[works-link]: https://github.com/nikku/works-on-my-machine
64-
[xetex-link]: http://xetex.sourceforge.net/
70+
[xetex-link]: http://xetex.sourceforge.net

main.nf

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,28 @@ process RunXelatex {
5858

5959
input:
6060
file biblio
61-
file tex
6261
file pictures
62+
file tex
6363

6464
output:
6565
file("*.pdf") into pdf
6666

6767
script:
6868
scriptString = tex.baseName.startsWith("CV") ? "cp ${tex.baseName}.pdf CV-MGarcia-latest.pdf" : ""
69+
if (biblio.exists())
6970
"""
7071
xelatex -shell-escape ${tex}
7172
biber ${tex.baseName}.bcf
7273
xelatex -shell-escape ${tex}
7374
xelatex -shell-escape ${tex}
7475
${scriptString}
7576
"""
77+
else
78+
"""
79+
xelatex -shell-escape ${tex}
80+
xelatex -shell-escape ${tex}
81+
${scriptString}
82+
"""
7683
}
7784

7885
/*
@@ -115,9 +122,9 @@ def minimalInformationMessage() {
115122
log.info "Command Line: $workflow.commandLine"
116123
log.info "Launch Dir : $workflow.launchDir"
117124
log.info "Work Dir : $workflow.workDir"
118-
log.info "Profile : $workflow.profile"
119125
log.info "Container : $workflow.container"
120126
log.info "Tex file : $tex"
127+
if (biblio.exists()) log.info "Bibliography: $biblio"
121128
log.info "Pictures in : $pictures"
122129
}
123130

0 commit comments

Comments
 (0)