Skip to content

Commit

Permalink
Add direct tex output (#82)
Browse files Browse the repository at this point in the history
* Add tex build

* Create expected-paper.tex

* Create paper.tex

Closes #81
  • Loading branch information
cthoyt authored Sep 16, 2024
1 parent f5f806b commit 1d6d50e
Show file tree
Hide file tree
Showing 6 changed files with 2,088 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/example-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ jobs:
--volume "$(pwd):/data" \
--user "$(id -u):$(id -g)" \
openjournals/inara:latest \
-o contextpdf example/paper.md
-o contextpdf,tex example/paper.md
- name: Upload PDF
uses: actions/upload-artifact@v3
with:
name: paper
path: example/paper.context.pdf
path: |
example/paper.context.pdf
example/paper.tex
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ ARTICLE_INFO_FILE = $(OPENJOURNALS_PATH)/default-article-info.yaml
IMAGE = openjournals/inara:edge

.PHONY: all
all: cff pdf html jats crossref native preprint
all: cff pdf tex html jats crossref native preprint

.PHONY: cff pdf html jats crossref native preprint
.PHONY: cff pdf tex html jats crossref native preprint
cff: $(TARGET_FOLDER)/paper.cff
pdf: $(TARGET_FOLDER)/paper.pdf
tex: $(TARGET_FOLDER)/paper.tex
html: $(TARGET_FOLDER)/paper.html
jats: $(TARGET_FOLDER)/paper.jats
native: $(TARGET_FOLDER)/paper.native
Expand Down Expand Up @@ -68,6 +69,7 @@ clean:
rm -rf $(TARGET_FOLDER)/paper.html
rm -rf $(TARGET_FOLDER)/paper.jats
rm -rf $(TARGET_FOLDER)/paper.native
rm -rf $(TARGET_FOLDER)/paper.tex
rm -rf $(TARGET_FOLDER)/paper.pdf
rm -rf $(TARGET_FOLDER)/paper.preprint
rm -rf $(TARGET_FOLDER)/paper.preprint.tex
Expand All @@ -77,6 +79,7 @@ clean:
rm -rf example/paper.html
rm -rf example/paper.jats
rm -rf example/paper.native
rm -rf example/paper.tex
rm -rf example/paper.pdf
rm -rf example/paper.preprint
rm -rf example/paper.preprint.tex
Expand All @@ -101,12 +104,12 @@ test: test-golden-draft test-golden-pub
test-golden-draft: \
test-draft-crossref \
test-draft-jats \
test-draft-pdf \
test-draft-tex \
test-draft-preprint
test-golden-pub: \
test-pub-crossref \
test-pub-jats \
test-pub-pdf \
test-pub-tex \
test-pub-preprint

.PHONY: test-pub-jats test-pub-preprint test-pub-%
Expand Down
19 changes: 19 additions & 0 deletions data/defaults/tex.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
to: latex
# pdf-engine: latexmk
# pdf-engine-opt: -lualatex
output-file: paper.tex
filters:
- type: lua
path: add-images.lua
- type: lua
path: draft.lua
- type: lua
path: self-citation.lua
- type: lua
path: fix-bibentry-spacing.lua
variables:
# styling options
colorlinks: true
linkcolor: '[rgb]{0.0, 0.5, 1.0}'
urlcolor: '[rgb]{0.0, 0.5, 1.0}'

1 change: 0 additions & 1 deletion example/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ paper by @upper1974.

[YAML]: https://yaml.org


# Statement of Need

The journal publisher, in most cases where you'd be reading this, Open
Expand Down
Loading

0 comments on commit 1d6d50e

Please sign in to comment.