From 4977f0bec84560c348f32507f0cbe5f340e2cc4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Novotn=C3=BD?= <witiko@gmail.com> Date: Wed, 18 Nov 2015 00:54:17 +0100 Subject: [PATCH] Added a suite of example files for every faculty of the MU. These example files replace the former `demo/` directory. --- DESCRIPTION | 4 +- Makefile | 40 ++++---- fibeamer/demo/source.tex => example.dtx | 91 ++++++++++++++---- fibeamer/Makefile | 17 ++-- fibeamer/demo/DESCRIPTION | 1 - fibeamer/demo/Makefile | 24 ----- latex.tex | 31 ------ lualatex.tex | 31 ------ mu-docstrip.tex | 6 ++ mu-econ.ins | 4 + mu-fi.ins | 4 + mu-fsps.ins | 4 + mu-fss.ins | 4 + mu-law.ins | 4 + mu-med.ins | 4 + mu-ped.ins | 4 + mu-phil.ins | 4 + mu-sci.ins | 4 + pdflatex.tex | 31 ------ resources/DESCRIPTION | 2 + .../res => resources}/jabberwocky-dark.pdf | Bin .../res => resources}/jabberwocky-light.pdf | Bin 22 files changed, 148 insertions(+), 166 deletions(-) rename fibeamer/demo/source.tex => example.dtx (83%) delete mode 100644 fibeamer/demo/DESCRIPTION delete mode 100644 fibeamer/demo/Makefile delete mode 100644 latex.tex delete mode 100644 lualatex.tex create mode 100644 mu-docstrip.tex create mode 100644 mu-econ.ins create mode 100644 mu-fi.ins create mode 100644 mu-fsps.ins create mode 100644 mu-fss.ins create mode 100644 mu-law.ins create mode 100644 mu-med.ins create mode 100644 mu-ped.ins create mode 100644 mu-phil.ins create mode 100644 mu-sci.ins delete mode 100644 pdflatex.tex create mode 100644 resources/DESCRIPTION rename {fibeamer/demo/res => resources}/jabberwocky-dark.pdf (100%) rename {fibeamer/demo/res => resources}/jabberwocky-light.pdf (100%) diff --git a/DESCRIPTION b/DESCRIPTION index 9cb7ad2..5a8bdcf 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,2 +1,2 @@ -This directory contains example fibeamer documents for various -TeX engines. +This directory contains example `fibeamer` documents for +various TeX engines. diff --git a/Makefile b/Makefile index 1b2790e..2433e51 100644 --- a/Makefile +++ b/Makefile @@ -1,32 +1,38 @@ +PDFFILES=mu-fi-pdflatex.pdf mu-fi-lualatex.pdf \ + mu-sci-pdflatex.pdf mu-sci-lualatex.pdf mu-ped-pdflatex.pdf \ + mu-ped-lualatex.pdf mu-med-pdflatex.pdf mu-med-lualatex.pdf \ + mu-fss-pdflatex.pdf mu-fss-lualatex.pdf mu-fsps-pdflatex.pdf \ + mu-fsps-lualatex.pdf mu-phil-pdflatex.pdf mu-phil-lualatex.pdf \ + mu-law-pdflatex.pdf mu-law-lualatex.pdf mu-econ-pdflatex.pdf \ + mu-econ-lualatex.pdf +TEXFILES=$(PDFFILES:.pdf=.tex) .PHONY: all clean all: make -C fibeamer - make pdflatex.pdf lualatex.pdf \ - latex.dvi latex.pdf clean + make $(TEXFILES) $(PDFFILES) clean -# This target typesets the pdfLaTeX example. -pdflatex.pdf: pdflatex.tex +# This target prepares a TeX file. +%-pdflatex.tex: %.ins example.dtx + xetex $< +%-lualatex.tex: %.ins example.dtx + xetex $< + +# This target typesets a pdfLaTeX example. +%-pdflatex.pdf: %-pdflatex.tex pdflatex $< pdflatex $< -# This target typesets the LuaLaTeX example. -lualatex.pdf: lualatex.tex +# This target typesets a LuaLaTeX example. +%-lualatex.pdf: %-lualatex.tex lualatex $< lualatex $< -# These targets typeset the LaTeX example. -latex.pdf: latex.dvi - dvipdfmx $< - -latex.dvi: latex.tex - latex $< - latex $< - # This target removes any auxiliary files. clean: - rm -f *.aux *.log *.out *.toc *.lot *.lof *.nav *.snm *.vrb + rm -f *.aux *.log *.out *.toc *.lot *.lof *.bcf *.blg *.run.xml \ + *.bbl *.idx *.ind *.ilg *.dvi *.nav *.snm # This target removes any auxiliary files -# and the output PDF file. +# and the output PDF files. implode: clean - rm -f pdflatex.pdf lualatex.pdf latex.pdf latex.dvi + rm -f $(PDFFILES) $(TEXFILES) diff --git a/fibeamer/demo/source.tex b/example.dtx similarity index 83% rename from fibeamer/demo/source.tex rename to example.dtx index ea91970..a18bb0e 100644 --- a/fibeamer/demo/source.tex +++ b/example.dtx @@ -1,22 +1,72 @@ +% \begin{macrocode} \documentclass{beamer} - \usepackage[basePath=..,faculty=?]% - {../beamerthemefibeamer} - \usepackage{polyglossia} - \setmainlanguage{english} - \setotherlanguage{czech} - \setotherlanguage{slovak} - \usepackage{ragged2e} % `\justify` text - \usepackage{booktabs} % Tables - \usepackage{tabularx} - \usepackage{tikz} % Diagrams - \usetikzlibrary{calc, shapes, backgrounds} - \usepackage{amsmath, amssymb} - \usepackage{url} % `\url`s - \usepackage{listings} % Code listings - \frenchspacing - \title{Presentation Title} - \subtitle{Presentation Subtitle} - \author{Author's Name} +%<*econ> +\usetheme[faculty=econ]{fibeamer} +%</econ> +%<*fi> +\usetheme[faculty=fi]{fibeamer} +%</fi> +%<*fsps> +\usetheme[faculty=fsps]{fibeamer} +%</fsps> +%<*fss> +\usetheme[faculty=fss]{fibeamer} +%</fss> +%<*law> +\usetheme[faculty=law]{fibeamer} +%</law> +%<*med> +\usetheme[faculty=med]{fibeamer} +%</med> +%<*ped> +\usetheme[faculty=ped]{fibeamer} +%</ped> +%<*phil> +\usetheme[faculty=phil]{fibeamer} +%</phil> +%<*sci> +\usetheme[faculty=sci]{fibeamer} +%</sci> +%<*pdftex> +\usepackage[utf8]{inputenc} +\usepackage[ + main=english, %% By using `czech` or `slovak` as the main locale + %% instead of `english`, you can typeset the + %% presentation in either Czech or Slovak, + %% respectively. + czech, slovak %% The additional keys allow foreign texts to be +]{babel} %% typeset as follows: +%% +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%</pdftex> +%<*luatex> +\usepackage{polyglossia} %% By using `czech` or `slovak` as the +\setmainlanguage{english} %% main locale instead of `english`, you +%% can typeset the presentation in either Czech or Slovak, +%% respectively. +\setotherlanguages{czech, slovak} %% The additional keys allow +% foreign texts to be typeset as follows: +%% +%% \begin{otherlanguage}{czech} ... \end{otherlanguage} +%% \begin{otherlanguage}{slovak} ... \end{otherlanguage} +%% +%</luatex> +%% These macros specify information about the presentation +\title{Presentation Title} %% that will be typeset on the +\subtitle{Presentation Subtitle} %% title page. +\author{Author's Name} +%% These additional packages are used within the document: +\usepackage{ragged2e} % `\justify` text +\usepackage{booktabs} % Tables +\usepackage{tabularx} +\usepackage{tikz} % Diagrams +\usetikzlibrary{calc, shapes, backgrounds} +\usepackage{amsmath, amssymb} +\usepackage{url} % `\url`s +\usepackage{listings} % Code listings +\frenchspacing \begin{document} \frame{\maketitle} \begin{frame}{Jabberwocky} @@ -24,7 +74,7 @@ \begin{tikzpicture}[overlay,remember picture] \node[anchor=south east,xshift=-30pt,yshift=35pt] at (current page.south east) { - \includegraphics[width=35mm]{res/jabberwocky-light} + \includegraphics[width=35mm]{resources/jabberwocky-light} }; \end{tikzpicture}%¨ 'Twas brillig, and the slithy toves\\ @@ -285,7 +335,7 @@ int main(int argc, char **argv) \begin{tikzpicture}[overlay,remember picture] \node[anchor=south east,xshift=-30pt,yshift=35pt] at (current page.south east) { - \includegraphics[width=35mm]{res/jabberwocky-dark} + \includegraphics[width=35mm]{resources/jabberwocky-dark} }; \end{tikzpicture}% 'Twas brillig, and the slithy toves\\ @@ -327,3 +377,4 @@ int main(int argc, char **argv) \againframe{bib} \end{darkframes} \end{document} +% \end{macrocode} diff --git a/fibeamer/Makefile b/fibeamer/Makefile index db47a4b..0a54bdb 100644 --- a/fibeamer/Makefile +++ b/fibeamer/Makefile @@ -1,5 +1,5 @@ SUBMAKES_REQUIRED=theme/mu logo/mu -SUBMAKES_MISCELLANEOUS=demo +SUBMAKES_MISCELLANEOUS=.. SUBMAKES=$(SUBMAKES_REQUIRED) $(SUBMAKES_MISCELLANEOUS) .PHONY: all complete clean dist dist-implode implode \ install uninstall $(SUBMAKES) @@ -10,11 +10,10 @@ LOGOSOURCES=logo/mu/*.svg LOGOS=logo/mu/*.pdf logo/mu/*.eps DTXFILES=*.dtx theme/mu/*.dtx INSFILES=*.ins theme/mu/*.ins -MAKES=theme/mu/Makefile logo/mu/Makefile -USEREXAMPLES=../*.tex ../Makefile ../DESCRIPTION \ - ../beamerthemefibeamer.sty demo/Makefile \ - demo/DESCRIPTION demo/source.tex demo/res/jabberwocky-dark.pdf \ - demo/res/jabberwocky-light.pdf +MAKES=theme/mu/Makefile logo/mu/Makefile Makefile +USEREXAMPLES=../*.tex ../*.ins ../*.pdf ../example.dtx \ + ../Makefile ../resources/jabberwocky-dark.pdf \ + ../resources/jabberwocky-light.pdf DEVEXAMPLES=logo/EXAMPLE/DESCRIPTION logo/mu/DESCRIPTION \ logo/DESCRIPTION theme/EXAMPLE/DESCRIPTION theme/mu/DESCRIPTION \ theme/DESCRIPTION @@ -86,10 +85,10 @@ $(DISTARCHIVE): $(SOURCES) $(RESOURCES) $(MAKES) \ # This target generates a CTAN distribution file $(CTANARCHIVE): $(SOURCES) $(MAKES) $(LOGOSOURCES) $(DOCS) \ - $(DEVEXAMPLES) $(VERSION) - DIR=`mktemp -d` && mkdir --parents "$$DIR/fibeamer" && \ + $(EXAMPLES) $(VERSION) + DIR=`mktemp -d` && mkdir --parents "$$DIR/fibeamer/fibeamer" && \ cp --verbose $(TDSARCHIVE) "$$DIR" && \ - cp --parents --verbose $^ "$$DIR/fibeamer" && \ + cp --parents --verbose $^ "$$DIR/fibeamer/fibeamer" && \ (cd "$$DIR" && zip -r -v -nw $@ *) && \ mv "$$DIR"/$@ . && rm -rf "$$DIR" diff --git a/fibeamer/demo/DESCRIPTION b/fibeamer/demo/DESCRIPTION deleted file mode 100644 index 2b263cb..0000000 --- a/fibeamer/demo/DESCRIPTION +++ /dev/null @@ -1 +0,0 @@ -This directory contains a demonstration document for fibeamer. diff --git a/fibeamer/demo/Makefile b/fibeamer/demo/Makefile deleted file mode 100644 index 1edad65..0000000 --- a/fibeamer/demo/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -PDFFILES=sci.pdf phil.pdf ped.pdf med.pdf fss.pdf fi.pdf law.pdf \ - econ.pdf fsps.pdf -TEXFILES=sci.tex phil.tex ped.tex med.tex fss.tex fi.tex law.tex \ - econ.tex fsps.tex -AUXFILES=*.aux *.log *.nav *.out *.snm *.toc -SRC=source.tex -TEX=lualatex -.PHONY: all clean -all: $(PDFFILES) clean - -# This target typesets a PDF file. -$(PDFFILES): $(TEMPLATE) - sed s/faculty=?/faculty=$(basename $@)/ $(SRC) > $(basename $@).tex - $(TEX) $(basename $@).tex - $(TEX) $(basename $@).tex - -# This target removes any auxiliary files. -clean: - rm -f $(TEXFILES) $(AUXFILES) - -# This target removes any auxiliary files -# and the output PDF files. -implode: clean - rm -f $(PDFFILES) diff --git a/latex.tex b/latex.tex deleted file mode 100644 index bc23563..0000000 --- a/latex.tex +++ /dev/null @@ -1,31 +0,0 @@ -\documentclass[dvipdfmx]{beamer} - \usetheme{fibeamer} - \usepackage[utf8]{inputenc} - \usepackage[english]{babel} - \usepackage{amsmath} % `\equation`s - \usepackage{tabularx} % Tables - \usepackage{booktabs} -\begin{document} - \title{My Presentation} - \subtitle{Daring the Unknown} - \author{Jane Doe} - \frame{\maketitle} - - \begin{frame}{Foo}{bar} - Hello world! - \begin{equation} - \tag{Mass--energy equivalence} e=mc^2 - \end{equation} - \begin{center} - \begin{tabularx}{\textwidth}{lllX} - \toprule - Day & Min Temp & Max Temp & Summary \\ - \midrule - Monday & $11^{\circ}\mathsf{C}$ & $22^\circ\mathsf{C}$ & A - clear day with lots of sunshine. However, the strong breeze - will bring down the temperatures. \\ - \bottomrule - \end{tabularx} - \end{center} - \end{frame} -\end{document} diff --git a/lualatex.tex b/lualatex.tex deleted file mode 100644 index 2cbfb0b..0000000 --- a/lualatex.tex +++ /dev/null @@ -1,31 +0,0 @@ -\documentclass{beamer} - \usetheme{fibeamer} - \usepackage{polyglossia} - \setmainlanguage{english} - \usepackage{amsmath} % `\equation`s - \usepackage{tabularx} % Tables - \usepackage{booktabs} -\begin{document} - \title{My Presentation} - \subtitle{Daring the Unknown} - \author{Jane Doe} - \frame{\maketitle} - - \begin{frame}{Foo}{bar} - Hello world! - \begin{equation} - \tag{Mass--energy equivalence} e=mc^2 - \end{equation} - \begin{center} - \begin{tabularx}{\textwidth}{lllX} - \toprule - Day & Min Temp & Max Temp & Summary \\ - \midrule - Monday & $11^{\circ}\mathsf{C}$ & $22^\circ\mathsf{C}$ & A - clear day with lots of sunshine. However, the strong breeze - will bring down the temperatures. \\ - \bottomrule - \end{tabularx} - \end{center} - \end{frame} -\end{document} diff --git a/mu-docstrip.tex b/mu-docstrip.tex new file mode 100644 index 0000000..31cf89f --- /dev/null +++ b/mu-docstrip.tex @@ -0,0 +1,6 @@ +\input docstrip.tex +% Insert only a minimal preamble before the generated document. +\preamble +\endpreamble +% Do not ask about overriding. +\askforoverwritefalse diff --git a/mu-econ.ins b/mu-econ.ins new file mode 100644 index 0000000..f3c8276 --- /dev/null +++ b/mu-econ.ins @@ -0,0 +1,4 @@ +\input mu-docstrip.tex +\generate{\file{mu-econ-pdflatex.tex}{\from{example.dtx}{pdftex,mu,econ}}} +\generate{\file{mu-econ-lualatex.tex}{\from{example.dtx}{luatex,mu,econ}}} +\endbatchfile diff --git a/mu-fi.ins b/mu-fi.ins new file mode 100644 index 0000000..b6fb905 --- /dev/null +++ b/mu-fi.ins @@ -0,0 +1,4 @@ +\input mu-docstrip.tex +\generate{\file{mu-fi-pdflatex.tex}{\from{example.dtx}{pdftex,mu,fi}}} +\generate{\file{mu-fi-lualatex.tex}{\from{example.dtx}{luatex,mu,fi}}} +\endbatchfile diff --git a/mu-fsps.ins b/mu-fsps.ins new file mode 100644 index 0000000..5763501 --- /dev/null +++ b/mu-fsps.ins @@ -0,0 +1,4 @@ +\input mu-docstrip.tex +\generate{\file{mu-fsps-pdflatex.tex}{\from{example.dtx}{pdftex,mu,fsps}}} +\generate{\file{mu-fsps-lualatex.tex}{\from{example.dtx}{luatex,mu,fsps}}} +\endbatchfile diff --git a/mu-fss.ins b/mu-fss.ins new file mode 100644 index 0000000..8beed3d --- /dev/null +++ b/mu-fss.ins @@ -0,0 +1,4 @@ +\input mu-docstrip.tex +\generate{\file{mu-fss-pdflatex.tex}{\from{example.dtx}{pdftex,mu,fss}}} +\generate{\file{mu-fss-lualatex.tex}{\from{example.dtx}{luatex,mu,fss}}} +\endbatchfile diff --git a/mu-law.ins b/mu-law.ins new file mode 100644 index 0000000..74b8f7c --- /dev/null +++ b/mu-law.ins @@ -0,0 +1,4 @@ +\input mu-docstrip.tex +\generate{\file{mu-law-pdflatex.tex}{\from{example.dtx}{pdftex,mu,law}}} +\generate{\file{mu-law-lualatex.tex}{\from{example.dtx}{luatex,mu,law}}} +\endbatchfile diff --git a/mu-med.ins b/mu-med.ins new file mode 100644 index 0000000..69d12d2 --- /dev/null +++ b/mu-med.ins @@ -0,0 +1,4 @@ +\input mu-docstrip.tex +\generate{\file{mu-med-pdflatex.tex}{\from{example.dtx}{pdftex,mu,med}}} +\generate{\file{mu-med-lualatex.tex}{\from{example.dtx}{luatex,mu,med}}} +\endbatchfile diff --git a/mu-ped.ins b/mu-ped.ins new file mode 100644 index 0000000..11d50d2 --- /dev/null +++ b/mu-ped.ins @@ -0,0 +1,4 @@ +\input mu-docstrip.tex +\generate{\file{mu-ped-pdflatex.tex}{\from{example.dtx}{pdftex,mu,ped}}} +\generate{\file{mu-ped-lualatex.tex}{\from{example.dtx}{luatex,mu,ped}}} +\endbatchfile diff --git a/mu-phil.ins b/mu-phil.ins new file mode 100644 index 0000000..07d8716 --- /dev/null +++ b/mu-phil.ins @@ -0,0 +1,4 @@ +\input mu-docstrip.tex +\generate{\file{mu-phil-pdflatex.tex}{\from{example.dtx}{pdftex,mu,phil}}} +\generate{\file{mu-phil-lualatex.tex}{\from{example.dtx}{luatex,mu,phil}}} +\endbatchfile diff --git a/mu-sci.ins b/mu-sci.ins new file mode 100644 index 0000000..e08c88a --- /dev/null +++ b/mu-sci.ins @@ -0,0 +1,4 @@ +\input mu-docstrip.tex +\generate{\file{mu-sci-pdflatex.tex}{\from{example.dtx}{pdftex,mu,sci}}} +\generate{\file{mu-sci-lualatex.tex}{\from{example.dtx}{luatex,mu,sci}}} +\endbatchfile diff --git a/pdflatex.tex b/pdflatex.tex deleted file mode 100644 index 1ebeb06..0000000 --- a/pdflatex.tex +++ /dev/null @@ -1,31 +0,0 @@ -\documentclass{beamer} - \usetheme{fibeamer} - \usepackage[utf8]{inputenc} - \usepackage[english]{babel} - \usepackage{amsmath} % `\equation`s - \usepackage{tabularx} % Tables - \usepackage{booktabs} -\begin{document} - \title{My Presentation} - \subtitle{Daring the Unknown} - \author{Jane Doe} - \frame{\maketitle} - - \begin{frame}{Foo}{bar} - Hello world! - \begin{equation} - \tag{Mass--energy equivalence} e=mc^2 - \end{equation} - \begin{center} - \begin{tabularx}{\textwidth}{lllX} - \toprule - Day & Min Temp & Max Temp & Summary \\ - \midrule - Monday & $11^{\circ}\mathsf{C}$ & $22^\circ\mathsf{C}$ & A - clear day with lots of sunshine. However, the strong breeze - will bring down the temperatures. \\ - \bottomrule - \end{tabularx} - \end{center} - \end{frame} -\end{document} diff --git a/resources/DESCRIPTION b/resources/DESCRIPTION new file mode 100644 index 0000000..3186cbc --- /dev/null +++ b/resources/DESCRIPTION @@ -0,0 +1,2 @@ +This directory contains resources for the example `fibeamer` +documents. diff --git a/fibeamer/demo/res/jabberwocky-dark.pdf b/resources/jabberwocky-dark.pdf similarity index 100% rename from fibeamer/demo/res/jabberwocky-dark.pdf rename to resources/jabberwocky-dark.pdf diff --git a/fibeamer/demo/res/jabberwocky-light.pdf b/resources/jabberwocky-light.pdf similarity index 100% rename from fibeamer/demo/res/jabberwocky-light.pdf rename to resources/jabberwocky-light.pdf -- GitLab