Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Germain-C2S
Beamer TPT NG
Commits
1b29bdf4
Commit
1b29bdf4
authored
May 24, 2020
by
Cédric Ware
Browse files
Document adjustable dimensions on a slide.
Clean up Makefile, include dimensions slide in build system.
parent
35fa977b
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
1b29bdf4
...
...
@@ -16,6 +16,7 @@
*.pdftex
*.pdftex_t
model.pdf
model-slide*
poster.pdf
lettre-upsay.pdf
odgs/diag.pdf
...
...
Makefile
View file @
1b29bdf4
#
# Use this Makefile with GNU make.
#
TOP
?=
model.pdf
TOP_NAME
=
$(
patsubst
%.pdf,%,
$(TOP)
)
EXT
=
pdf log aux out bbl blg toc snm nav fdb_latexmk fls
FIGS
=
$(
wildcard
figs/
*
.fig
)
FIGS_PDF
=
$(
patsubst
%.fig,%.pdftex,
$(FIGS)
)
...
...
@@ -12,8 +17,8 @@ ODGS_PDF = $(patsubst %.odg,%.pdf,$(ODGS))
NEEDED
=
$(FIGS_PDF)
$(FIGS_PDF_T)
$(SVGS_PDF)
$(ODGS_PDF)
TOP_NAME
=
$(
patsubst
%.pdf,%,
$(TOP)
)
EXT
=
pdf log aux out bbl blg toc snm nav fdb_latexmk fls
# Only for package documentation.
NEEDED_DOC
=
$(TOP_NAME)
-slide2
.pdf
PREVIEW_OPTS
=
\R
equirePackage[active,delayed,tightpage,graphics,pdftex]
{
preview
}
PREVIEW_OPTS
+=
\P
reviewMacro[
{
*
[][]{}}]{
\i
ncode
}
...
...
@@ -22,33 +27,25 @@ export TEXINPUTS := ./texinputs/:$(TEXINPUTS)
#.SECONDARY: $(FIGS_PDF)
.PHONY
:
all clean dep
toc bibetex
.PHONY
:
all clean dep
preview
all
:
$(TOP)
$(TOP)
:
dep
dep
:
$(NEEDED)
dep
:
$(NEEDED)
$(NEEDED_DOC)
%.pdf
:
%.tex
%.pdf
:
%.tex
texinputs/beamerthemetptnew.sty
@
echo
"Latex search path
$(TEXINPUTS)
"
@
latexmk
-pdf
$<
toc
:
$(TOP)
@
pdflatex
$(
patsubst
%.pdf,%.tex,
$<
)
bibtex
:
$(TOP)
@
bibtex
$(
patsubst
%.pdf,%,
$<
)
@
pdflatex
$(
patsubst
%.pdf,%.tex,
$<
)
@
pdflatex
$(
patsubst
%.pdf,%.tex,
$<
)
preview
:
$(NEEDED)
preview
:
dep
pdflatex
'
$(PREVIEW_OPTS)
\input{
$(TOP_NAME)
.tex}'
clean
:
@
echo
Cleaning
$(TOP)
and
$(NEEDED)
@
$(
foreach
ext,
$(EXT)
,[
-e
$(
TOP_NAME
)
.
$(ext)
]
&&
rm
-f
$(
TOP_NAME
)
.
$(ext)
||
true
;
)
@
$(
foreach
file,
$(TOP_NAME)
$(TOP_NAME)
-slide2
preview texput,
$(
foreach
ext,
$(EXT)
,[
-e
$(
file
)
.
$(ext)
]
&&
rm
-f
$(
file
)
.
$(ext)
||
true
;
)
)
@
rm
-f
$(NEEDED)
@
$(
foreach
ext,
$(EXT)
,[
-e
preview.
$(ext)
]
&&
rm
-f
preview.
$(ext)
||
true
;
)
%.pdftex
:
%.fig
...
...
@@ -65,3 +62,7 @@ clean:
%.pdf
:
%.odg
libreoffice
--headless
--convert-to
pdf
$<
--outdir
odgs
pdfcrop
--margins
1
$@
$@
# Only for package documentation.
$(TOP_NAME)-slide2.tex
:
$(TOP_NAME).tex
@
perl
-pE
'if (m{^%+ Stop ici}i) { say "\\end{document}"; last; }'
$<
>
$@
model.tex
View file @
1b29bdf4
...
...
@@ -35,9 +35,13 @@
% Pour insérer directement des images au format .fig :
\usepackage
{
figlatex
}
% Divers : typographie française, gestion des tables, texte de remplissage.
% Divers : typographie française, gestion des tables,
% programmation de dessins, calcul de longueurs, texte de remplissage.
% Supprimez ce dont vous n'avez pas besoin.
\usepackage
[french]
{
babel
}
\usepackage
{
booktabs
}
\usepackage
{
tikz
}
\usepackage
{
calc
}
\usepackage
{
lipsum
}
...
...
@@ -357,6 +361,126 @@
\tptthemekeys
{
framecount
}
\begin{frame}
\frametitle
{
Dimensions modifiables
}
\newcommand*\Xtt
{
\ttfamily\textbackslash
}
\centering
\begin{tikzpicture}
[scale=0.5,font=
\tiny
,>=stealth]
%
% On inclut un frame standard précompilé.
\node
[draw,dotted,above right,inner sep=0pt] (slide) at (0,0)
{
%
\includegraphics
[width={0.5\textwidth + 0.5em},page=2]
{
model-slide2.pdf
}
%
}
;
%
% On cache le texte pour éviter la distraction.
\fill
[white,opacity=0.7]
(0.5em,
\footerlogoheight
) rectangle (0.8
\paperwidth
,0.8
\paperheight
)
(slide.north west)
++(1.01
\tptframetitlefriezewidth
,-0.99
\tptframetitlefriezesep
)
rectangle +(0.5
\paperwidth
,-0.2
\paperheight
);
\foreach
\c
in
{
%
east,north east,north,north west,west,south west,south,south east
}
{
%
\coordinate
(
\c
) at (slide.
\c
);
}
%
% Quelques coordonnées.
\path
(south west)
+(-3,0) coordinate (xlines)
+(-1.5,0) coordinate (xlines2)
(north west)
++(0,-
\tptframetitlefriezesep
) coordinate (frametitlefriezesep)
++(0,-
\tptframetitlefriezeheight
) coordinate (frametitlefriezeheight)
+(0,-
\tptframetitledepth
) coordinate (frametitledepth)
++(0.98
\tptframetitlefriezewidth
,0) coordinate (frieze right)
++(
\tptframetitlesep
,0) coordinate (frametitle text)
(south west) ++(0,
\tptbottomboxesmargin
) coordinate (bottomboxesmargin)
+(2,
\tptbottomboxesbase
) coordinate (bottomboxesbase)
++(0,
\tptbottomboxesheight
) coordinate (bottomboxesheight)
++(
\tptleftbottomboxwidth
,0) coordinate (leftbottomboxwidth)
++(
\tptbottomboxsep
,0) coordinate (bottomboxsep)
++(
\tptmidbottomboxwidth
,0) coordinate (midbottomboxwidth)
(south east)
+(1,0) coordinate (xlines3)
++(0,
\tptbottomboxesmargin
) coordinate (logo base)
++(0,
\tptfooterlogoyshift
) coordinate (footerlogoyshift)
++(0,
\footerlogoheight
) coordinate (footerlogoheight)
(north west)
++(
\tptframetitlefriezewidth
,-
\tptframetitlefriezesep
)
coordinate (frametitlefriezewidth)
++(
\tptframetitlesep
,0) coordinate (frametitlesep)
;
%
% On trace les lignes indicatrices côté gauche.
\foreach
\y
/
\sh
/
\xline
in
{
%
south west/-0.5/,bottomboxesmargin/0/,
%
bottomboxesbase/0.5/2,bottomboxesheight/1.5/,
%
north west/0.2/,frametitlefriezesep/0/,
%
frametitlefriezeheight/-0.2/,frametitledepth/-0.5/
%
}
{
\draw
(
\y
) ++(0,
\sh
) coordinate (tmp)
(tmp -| xlines
\xline
) coordinate (endpoint
\y
)
-- (tmp -| -1,0) -- (
\y
-| -0.3,0) -- (
\y
);
}
%
% On indique les dimensions côté gauche.
\foreach
\yone
/
\ytwo
/
\dir
/
\prefix
in
{
%
south west/bottomboxesmargin/->/tpt,
%
bottomboxesmargin/bottomboxesbase/->/tpt,
%
bottomboxesmargin/bottomboxesheight/->/tpt,
%
north west/frametitlefriezesep/<-/tpt,
%
frametitlefriezesep/frametitlefriezeheight/<-/tpt,
%
frametitlefriezeheight/frametitledepth/<-/tpt
%
}
{
\draw
[\dir,transform canvas={xshift=3pt}]
(endpoint
\yone
-| endpoint
\ytwo
) -- node[left]
{
\Xtt\prefix\ytwo
}
(endpoint
\ytwo
);
}
%
% On trace les lignes indicatrices côté droit.
\draw
(logo base) -- (logo base -| xlines3) coordinate (endpoint logo base)
(footerlogoyshift) ++(0.2,0.5) coordinate (tmp)
(tmp -| xlines3) coordinate (endpoint footerlogoyshift)
-- ++(-0.5,0) -- (tmp |- footerlogoyshift) -- (footerlogoyshift)
(footerlogoheight)
-- (footerlogoheight -| xlines3) coordinate (endpoint footerlogoheight);
%
% On indique les dimensions côté droit.
\draw
[->,transform canvas={xshift=-3pt}]
(endpoint logo base -| endpoint footerlogoyshift)
-- node[right]
{
\Xtt
tptfooterlogoyshift
}
(endpoint footerlogoyshift);
\draw
[->,transform canvas={xshift=-3pt}]
(endpoint footerlogoyshift)
-- node[right]
{
\Xtt
footerlogoheight
}
(endpoint footerlogoheight);
%
% On trace les lignes indicatrices verticales.
\foreach
\x
/
\dy
in
{
%
leftbottomboxwidth/2.1,midbottomboxwidth/0.6,
%
frametitlefriezewidth/1.2,frametitlesep/0.5
}
{
\draw
(
\x
) -- +(0,
\dy
) coordinate (endpoint
\x
);
}
%
% Quelques indicatrices et coordonnées à la main.
\draw
(north west) -- +(0,1) coordinate (endpoint frieze left)
(bottomboxesheight) +(0,2) coordinate (endpoint leftbottombox)
(bottomboxsep) ++(0.5,1.2) coordinate (endpoint bottomboxsep)
++(0,-0.9) coordinate (tmp)
(bottomboxsep) -- ++(0,0.2) -- (tmp) -- (endpoint bottomboxsep);
%
% On indique les dimensions horizontales.
\foreach
\xone
/
\xtwo
/
\nodefill
/
\dy
in
{
%
leftbottombox/leftbottomboxwidth/white/2pt,
%
leftbottomboxwidth/bottomboxsep/white/2pt,
%
bottomboxsep/midbottomboxwidth/none/0pt,
%
frieze left/frametitlefriezewidth/none/0pt,
%
frametitlefriezewidth/frametitlesep/none/0pt
%
}
{
%
\draw
[->,transform canvas={yshift=-3pt}]
(endpoint
\xone
|- endpoint
\xtwo
)
node [above right,fill=
\nodefill
,yshift=
\dy
]
{
\Xtt
tpt
\xtwo
}
-- (endpoint
\xtwo
);
}
\end{tikzpicture}
\end{frame}
\end{document}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment