From 97ebb7e25423aeb4ca14c54d48ca9fc6f441367b Mon Sep 17 00:00:00 2001 From: TG Date: Mon, 10 Aug 2020 15:14:52 +0200 Subject: [PATCH] Generates pstex/pstex_t from fig to accommodate xelatex xelatex is note based on pdflatex (lualatex is) thus the \ifpdf macro returns false. As xelatex uses \ifpdf to identify the latex engine and thus will try to insert ps files instead of pdf ones. This patch adds make rules to also generate pstex and pstex_t files. --- Makefile | 9 ++++++++- example-presentation.tex | 2 -- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index dbf1231..d38971f 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,8 @@ STYS = $(wildcard texinputs/*.sty) FIGS = $(wildcard figs/*.fig) FIGS_PDF = $(patsubst %.fig,%.pdftex,$(FIGS)) FIGS_PDF_T = $(patsubst %.fig,%.pdftex_t,$(FIGS)) +FIGS_PS = $(patsubst %.fig,%.pstex,$(FIGS)) +FIGS_PS_T = $(patsubst %.fig,%.pstex_t,$(FIGS)) SVGS = $(wildcard svgs/*.svg) SVGS_PDF = $(patsubst %.svg,%.pdf,$(SVGS)) @@ -17,7 +19,7 @@ SVGS_PDF = $(patsubst %.svg,%.pdf,$(SVGS)) ODGS = $(wildcard odgs/*.odg) ODGS_PDF = $(patsubst %.odg,%.pdf,$(ODGS)) -NEEDED = $(FIGS_PDF) $(FIGS_PDF_T) $(SVGS_PDF) $(ODGS_PDF) +NEEDED = $(FIGS_PDF) $(FIGS_PDF_T) $(FIGS_PS) $(FIGS_PS_T) $(SVGS_PDF) $(ODGS_PDF) # Only for package documentation. NEEDED_DOC = $(TOP_NAME)-slide2.pdf @@ -51,6 +53,11 @@ clean: @rm -f $(patsubst %.pdf, %.tex, $(NEEDED_DOC)) +%.pstex:%.fig + fig2dev -L pstex $< $@ +%.pstex_t:%.pstex + fig2dev -L pstex_t -p $< $(patsubst %.pstex_t,%.fig,$@) $@ + %.pdftex:%.fig fig2dev -L pdftex $< $@ %.pdftex_t:%.pdftex diff --git a/example-presentation.tex b/example-presentation.tex index 950250f..f71b2e3 100644 --- a/example-presentation.tex +++ b/example-presentation.tex @@ -303,7 +303,6 @@ \end{frame} %------------------------------------------------------------------------------ -\ifxetex\else% FIXME figlatex passe mal avec XeTeX. \begin{frame} \frametitle{Another FrameĀ : Fig illustration} @@ -312,7 +311,6 @@ \end{center} \end{frame} -\fi %------------------------------------------------------------------------------ \section[2e] { 2e Section : blocs } %------------------------------------------------------------------------------ -- GitLab