Compare commits
14 Commits
a470e662ac
...
main
Author | SHA1 | Date | |
---|---|---|---|
478f504f71 | |||
32c05c3c99 | |||
a8b69fa55a | |||
7692c174de | |||
87b753e480 | |||
b220a13665 | |||
ff7baa77ec | |||
0b1141ffa3 | |||
36a5c4706f | |||
837b70cca8 | |||
110f4474e7 | |||
4b4a2f2e2c | |||
6d0e935337 | |||
dbd138f09d |
26
.drone.yml
Normal file
26
.drone.yml
Normal 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
|
50
Makefile
50
Makefile
@ -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
BIN
bin/batik-all-1.7.jar
Normal file
Binary file not shown.
BIN
bin/jlatexmath-minimal-1.0.3.jar
Normal file
BIN
bin/jlatexmath-minimal-1.0.3.jar
Normal file
Binary file not shown.
BIN
bin/jlm_cyrillic.jar
Normal file
BIN
bin/jlm_cyrillic.jar
Normal file
Binary file not shown.
BIN
bin/jlm_greek.jar
Normal file
BIN
bin/jlm_greek.jar
Normal file
Binary file not shown.
5
bin/plantuml
Executable file
5
bin/plantuml
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
LOCATION=$(dirname $0)
|
||||
|
||||
java -jar ${LOCATION}/plantuml.jar $@
|
BIN
bin/plantuml.jar
Normal file
BIN
bin/plantuml.jar
Normal file
Binary file not shown.
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user