mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-24 22:50:39 +01:00
tex.mk: Make it understand german umlauts
This commit is contained in:
parent
c9e4b0a514
commit
9f7068db8c
1 changed files with 27 additions and 5 deletions
32
make/tex.mk
32
make/tex.mk
|
|
@ -13,10 +13,15 @@ FMT_OUT = $(patsubst %,$(OUT).%.zip,$(FMT))
|
||||||
FMT_OFFLINE_OUT = $(patsubst %,$(OUT).%.zip,$(FMT_OFFLINE))
|
FMT_OFFLINE_OUT = $(patsubst %,$(OUT).%.zip,$(FMT_OFFLINE))
|
||||||
ALL = $(FMT_OUT) html_install
|
ALL = $(FMT_OUT) html_install
|
||||||
PRE_HTML = $(patsubst %.tmpl,%,$(wildcard *.html.tmpl))
|
PRE_HTML = $(patsubst %.tmpl,%,$(wildcard *.html.tmpl))
|
||||||
PRE_TEX = $(patsubst %.tmpl,%,$(wildcard *.tex.tmpl) $(LOCAL_IMPORTED_TEMPLATES))
|
PRE_TEX = $(patsubst %.ger,%.tex,$(patsubst %.tmpl,%,$(wildcard *.tex.tmpl *.ger) $(LOCAL_IMPORTED_TEMPLATES)))
|
||||||
TEXSRC = $(wildcard *.tex $(IMAGES) $(LOCAL_SRC)) $(PRE_TEX)
|
TEXSRC = $(wildcard *.tex $(IMAGES) $(LOCAL_SRC)) $(PRE_TEX)
|
||||||
DATE := $(shell date +'%b, %d, %Y')
|
DATE := $(shell date +'%b, %d, %Y')
|
||||||
|
TEX_WARN_DONT_EDIT = "\
|
||||||
|
%+---------------------------------------------------+\n\
|
||||||
|
%| DO NOT EDIT THIS FILE! |\n\
|
||||||
|
%| It was automatically created during the build |\n\
|
||||||
|
%| process! |\n\
|
||||||
|
%+---------------------------------------------------+\n"
|
||||||
WD = `pwd`
|
WD = `pwd`
|
||||||
NEWDIRS = $(DISTDIR) $(HTMLDIR) $(DVIDIR)
|
NEWDIRS = $(DISTDIR) $(HTMLDIR) $(DVIDIR)
|
||||||
|
|
||||||
|
|
@ -38,7 +43,21 @@ define replace_macros
|
||||||
s/__ICON_CONTENTS__/$(ICON_CONTENTS)/g; \
|
s/__ICON_CONTENTS__/$(ICON_CONTENTS)/g; \
|
||||||
s/__ICON_PREV__/$(ICON_PREV)/g; \
|
s/__ICON_PREV__/$(ICON_PREV)/g; \
|
||||||
s/__ICON_NEXT__/$(ICON_NEXT)/g; \
|
s/__ICON_NEXT__/$(ICON_NEXT)/g; \
|
||||||
" > $@
|
" >> $@
|
||||||
|
endef
|
||||||
|
|
||||||
|
define replace_umlauts
|
||||||
|
@echo replacing german umlauts with tex-style umlauts
|
||||||
|
@echo -e $(TEX_WARN_DONT_EDIT) > $@
|
||||||
|
cat $< | sed -e "\
|
||||||
|
s/ä/\"a/g; \
|
||||||
|
s/Ä/\"A/g; \
|
||||||
|
s/ö/\"o/g; \
|
||||||
|
s/Ö/\"O/g; \
|
||||||
|
s/ü/\"u/g; \
|
||||||
|
s/Ü/\"Ü/g; \
|
||||||
|
s/ß/\"s/g; \
|
||||||
|
" >> $@
|
||||||
endef
|
endef
|
||||||
|
|
||||||
all: dirs $(ALL)
|
all: dirs $(ALL)
|
||||||
|
|
@ -50,14 +69,17 @@ txt: dirs $(OUT).txt.zip
|
||||||
html: dirs $(OUT).html.zip
|
html: dirs $(OUT).html.zip
|
||||||
pdf: dirs $(OUT).pdf.zip
|
pdf: dirs $(OUT).pdf.zip
|
||||||
|
|
||||||
|
%.tex: %.ger
|
||||||
|
$(replace_umlauts)
|
||||||
|
|
||||||
%.tex: %.tex.tmpl
|
%.tex: %.tex.tmpl
|
||||||
$(replace_macros)
|
$(replace_macros)
|
||||||
|
|
||||||
%.html: %.html.tmpl
|
%.html: %.html.tmpl
|
||||||
$(replace_macros)
|
$(replace_macros)
|
||||||
|
|
||||||
%.tmpl: $(TEX_TMPL_DIR)/%.tmpl
|
%.tmpl:
|
||||||
cp $< $@
|
cp $(TEX_TMPL_DIR)/$@ .
|
||||||
|
|
||||||
cfgtest.done:
|
cfgtest.done:
|
||||||
test -n "$(OUTPUT)" # OUTPUT
|
test -n "$(OUTPUT)" # OUTPUT
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue