Compare commits

...

14 Commits

Author SHA1 Message Date
478f504f71
fix: updated ieee template location
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-11 15:36:43 +01:00
32c05c3c99
chore: updated plantuml
All checks were successful
continuous-integration/drone/push Build is passing
2025-01-21 16:32:17 +01:00
a8b69fa55a
build: fix not existing dependency
All checks were successful
continuous-integration/drone/push Build is passing
2024-12-27 15:50:26 +01:00
7692c174de
build: enable mirroring to github
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2024-12-27 15:48:13 +01:00
87b753e480
feat: support latex math mode in plantuml 2024-09-16 10:10:46 +02:00
b220a13665
feat: use own version of plantuml 2024-09-06 08:46:19 +02:00
ff7baa77ec
feat: support plantuml files 2024-09-06 08:37:47 +02:00
0b1141ffa3
feat: support excalidraw files 2024-08-08 23:04:38 +02:00
36a5c4706f
ADD: provide target to build tex based pdf images 2022-02-15 16:37:59 +01:00
837b70cca8
ADD: support .drawio.svg images 2021-12-08 12:27:49 +01:00
110f4474e7
FIX: removed unnecessary phony target 2021-12-03 20:18:38 +01:00
4b4a2f2e2c
ADD: better inkscape management 2021-12-03 13:26:08 +01:00
6d0e935337
ADD: used correct commandline for inkscape (idea from Marcel) 2021-12-03 10:39:14 +01:00
dbd138f09d ADD: set correct git toplevel directory 2021-07-06 17:36:07 +02:00
9 changed files with 80 additions and 6 deletions

26
.drone.yml Normal file
View File

@ -0,0 +1,26 @@
---
kind: pipeline
type: kubernetes
name: mirror-to-github
node_selector:
kubernetes.io/arch: amd64
federationhq.de/location: Blumendorf
federationhq.de/compute: true
steps:
- name: github-mirror
image: registry.cloud.federationhq.de/drone-github-mirror:latest
pull: always
settings:
GH_TOKEN:
from_secret: GH_TOKEN
GH_REPO: "byterazor/Paper-Makefile"
GH_REPO_DESC: "Makefile for generating scientific papers written in latex"
GH_REPO_HOMEPAGE: https://gitea.federationhq.de/Research/Paper-Makefile"
---
kind: secret
name: GH_TOKEN
get:
path: github
name: token

View File

@ -1,12 +1,13 @@
# Makefile for generating pdf from latex files
# -dependency support
# -pdf generation of svg files
# -pdf generation of svg files
# -pdf generation of dot files
#
# Author : Dominik Meyer <dmeyer@hsu-hh.de>
# Date : 2017-11-22
# License : GPLv2
#
SHELL := /bin/bash
DEPDIR := .d
$(shell mkdir -p $(DEPDIR) >/dev/null)
GITDIR = $(shell git rev-parse --show-toplevel)/
@ -21,17 +22,56 @@ else
LATEXMK=export TEXINPUTS=$(TEXINPUTS);latexmk -use-make -f $(DEPFLAGS) -pdflua $(subst .pdf,.tex,$@) 1>>$(subst .pdf,.log,$@) 2>>$(subst .pdf,.log,$@)
endif
INKSCAPE_EXIST=$(shell which inkscape >/dev/null;echo $$?)
ifeq ($(INKSCAPE_EXIST),0)
# identify used inkscape version and set command
INKSCAPE_BASE=$(shell which inkscape)
INKSCAPE_VERSION=$(shell $(INKSCAPE_BASE) --version 2>/dev/null | cut -d " " -f 2 | cut -d . -f 1)
ifeq ($(INKSCAPE_VERSION),0)
INKSCAPE = "echo \"$< --export-pdf=$@\" | DISPLAY= $(INKSCAPE_BASE) -D -y 0 --shell >/dev/null"
else
INKSCAPE = "$(INKSCAPE_BASE) --export-type=pdf -o $@ $<"
endif
endif
.SECONDARY: .latexmkrc
.PHONY: clean watermark IEEE base
%.svg: %.plantuml
@echo "**** Generating $@ from plantuml file $< ****"
@${MakefileBase}/bin/plantuml -tsvg $<
@touch $@.dep
%.pdf: %.image.tex
@echo "**** Generating $@ from tex file $< ****"
@lualatex -output-directory=`dirname $<` $< >/dev/null
IN=`echo $< | sed 's/\.tex/\.pdf/'`;OUT=`echo $< | sed 's/\.image\.tex/\.pdf/'`; cp $$IN $$OUT
@touch $@.dep
%.pdf : %.dot
@echo "**** Generating $@ from dot file $< ****"
@dot -Tpdf $< -o $@
@touch $@.dep
%.svg: %.drawio.svg
@echo "**** Renaming drawio file $< *****"
@cp $< $@
@touch $@.dep
%.svg: %.excalidraw.svg
@echo "**** Renaming excalidraw file $< *****"
@cp $< $@
@touch $@.dep
%.pdf: %.svg
@echo "**** Generating $@ from svg file $< ****"
@echo "$< --export-pdf=$@" | DISPLAY= inkscape -D -y 0 --shell >/dev/null
@if [ $(INKSCAPE_EXIST) != "0" ]; then echo "The inkscape tool required for converting svg --> pdf is missing. Please install it"; exit -1; fi
@if [ "$(INKSCAPE_VERSION)" -eq "0" ]; then echo "$<" --export-pdf=$@ | DISPLAY= $(INKSCAPE_BASE) -D -y 0 --shell >/dev/null; fi
@if [ "$(INKSCAPE_VERSION)" -eq "1" ]; then $(INKSCAPE_BASE) --export-type=pdf -o $@ $< 1>/dev/null 2>/dev/null; fi
@touch $@.dep
%.pdf: $(DEPDIR)/%.d
@ -47,9 +87,9 @@ $(DEPDIR)/%.d: ;
IEEE: IEEEtran.cls
IEEEtran.cls:
@wget https://www.ieee.org/documents/ieee-latex-conference-template.zip 1>/dev/null 2>/dev/null
@unzip -j ieee-latex-conference-template.zip IEEEtran/IEEEtran.cls >/dev/null
@rm ieee-latex-conference-template.zip
@wget https://www.ieee.org/content/dam/ieee-org/ieee/web/org/conferences/conference-latex-template.zip 1>/dev/null 2>/dev/null
@unzip -j conference-latex-template.zip IEEE-conference-template-062824/IEEEtran.cls >/dev/null
@rm conference-latex-template.zip
base: .gitignore .latexmkrc ${GITDIR}/.git/hooks/post-commit

BIN
bin/batik-all-1.7.jar Normal file

Binary file not shown.

Binary file not shown.

BIN
bin/jlm_cyrillic.jar Normal file

Binary file not shown.

BIN
bin/jlm_greek.jar Normal file

Binary file not shown.

5
bin/plantuml Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
LOCATION=$(dirname $0)
java -jar ${LOCATION}/plantuml.jar $@

BIN
bin/plantuml.jar Normal file

Binary file not shown.

View File

@ -10,6 +10,9 @@
FIRSTTAG=$(git describe --tags --always --dirty='-*' 2>/dev/null)
# Get the first tag in history that looks like a Release
RELTAG=$(git describe --tags --long --always --dirty='-*' --match '[0-9]*.*' 2>/dev/null)
# Get toplevel directory
GITDIR=$(git rev-parse --show-toplevel)
# Hoover up the metadata
git --no-pager log -1 --date=short --decorate=short \
--pretty=format:"\usepackage[%
@ -28,4 +31,4 @@ git --no-pager log -1 --date=short --decorate=short \
refnames={%d},
firsttagdescribe={$FIRSTTAG},
reltag={$RELTAG}
]{gitexinfo}" HEAD > .git/gitHeadInfo.gin
]{gitexinfo}" HEAD > ${GITDIR}/.git/gitHeadInfo.gin