Browse Source

Implement basic theme.

The code is still very rough but the basic features of the theme
are present and the theme should be usable.
master
Damien Goutte-Gattat 10 months ago
parent
commit
cbb647d97e
5 changed files with 211 additions and 11 deletions
  1. +1
    -0
      .gitignore
  2. +8
    -4
      Makefile
  3. +70
    -4
      beamer-cpldn.dtx
  4. +127
    -0
      cpldn-logo.svg
  5. +5
    -3
      sample.tex

+ 1
- 0
.gitignore View File

@ -1,6 +1,7 @@
*.sty
beamer-cpldn.pdf
sample.pdf
cpldn-logo.png
dist
*.aux
*.fdb_latexmk


+ 8
- 4
Makefile View File

@ -1,6 +1,6 @@
DESTDIR = dist
STYFILES = beamercolorthemecpldn.sty
STYFILES = beamerthemecpldn.sty beamerouterthemecpldn.sty beamercolorthemecpldn.sty
all: $(STYFILES) beamer-cpldn.pdf
@ -18,21 +18,25 @@ beamer-cpldn.ind: beamer-cpldn.idx
beamer-cpldn.pdf: beamer-cpldn.dtx beamer-cpldn.gls beamer-cpldn.ind
latexmk -lualatex $<
sample.pdf: sample.tex $(STYFILES)
sample.pdf: sample.tex $(STYFILES) cpldn-logo.png
latexmk -lualatex $<
install: beamer-cpldn.pdf $(STYFILES)
cpldn-logo.png: cpldn-logo.svg
inkscape -z -D -e $@ $<
install: beamer-cpldn.pdf $(STYFILES) cpldn-logo.png
mkdir -p $(DESTDIR)/src/latex/beamer-cpldn
mkdir -p $(DESTDIR)/doc/latex/beamer-cpldn
mkdir -p $(DESTDIR)/tex/latex/beamer-cpldn
install -m 644 beamer-cpldn.dtx lppl-1-3c.tex Makefile $(DESTDIR)/src/latex/beamer-cpldn
install -m 644 beamer-cpldn.pdf $(DESTDIR)/doc/latex/beamer-cpldn
install -m 644 $(STYFILES) $(DESTDIR)/tex/latex/beamer-cpldn
install -m 644 cpldn-logo.png $(DESTDIR)/tex/latex/beamer-cpldn
clean:
rm -f *.{aux,fls,glo,gls,idx,ilg,ind,log,nav,out,snm,toc,fdb_latexmk}
mrproper: clean
rm -f beamer-cpldn.pdf $(STYFILES) sample.pdf
rm -f beamer-cpldn.pdf $(STYFILES) cpldn-logo.png sample.pdf
.PHONY: clean mrproper

+ 70
- 4
beamer-cpldn.dtx View File

@ -36,6 +36,8 @@ has been generated for details.
\endpreamble
\generate{
\file{beamerthemecpldn.sty}{\from{beamer-cpldn.dtx}{theme}}
\file{beamerouterthemecpldn.sty}{\from{beamer-cpldn.dtx}{outertheme}}
\file{beamercolorthemecpldn.sty}{\from{beamer-cpldn.dtx}{colortheme}}
}
@ -111,6 +113,66 @@ has been generated for details.
%
% \section{The code}
%
% \subsection{The main theme}
% \iffalse
%<*theme>
% \fi
%
% \begin{macrocode}
\mode<presentation>
\useoutertheme{cpldn}
\useinnertheme{rectangles}
\usecolortheme{cpldn}
\setbeamercovered{transparent}
\setbeamertemplate{navigation symbols}{}
\mode<all>
% \end{macrocode}
%
% \iffalse
%</theme>
% \fi
%
%
% \subsection{The outer theme}
% \iffalse
%<*outertheme>
% \fi
%
% \begin{macrocode}
\mode<presentation>
\useoutertheme{infolines}
\setbeamertemplate{headline}{}
\defbeamertemplate*{frametitle}{cpldn}[1][left]
{%
\ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
\@tempdima=\textwidth%
\advance\@tempdima by\beamer@leftmargin%
\advance\@tempdima by\beamer@rightmargin%
\begin{beamercolorbox}[sep=.3cm,#1,wd=\the\@tempdima]{frametitle}
\usebeamerfont{frametitle}%
\vbox{}\vskip-1ex%
\if@tempswa\else\csname beamer@fte#1\endcsname\fi%
\strut\insertframetitle%
\hskip 0pt plus 1filll%
\includegraphics[height=1.5ex]{cpldn-logo}\par%
{%
\ifx\insertframesubtitle\@empty%
\else%
{\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\strut\insertframesubtitle\par}%
\fi
}%
\vskip-1ex%
\if@tempswa\else\vskip-.3cm\fi%
\end{beamercolorbox}%
}
\mode<all>
% \end{macrocode}
%
% \iffalse
%</outertheme>
% \fi
%
%
% \subsection{The color theme}
% \iffalse
%<*colortheme>
@ -118,14 +180,18 @@ has been generated for details.
%
% \begin{macrocode}
\mode<presentation>
\definecolor{cpldnpalepink}{rgb}{1,.12,.97}
\definecolor{cpldnpalepink}{rgb}{1,.94,.97}
\definecolor{cpldnpink}{rgb}{1,.89,.95}
\definecolor{cpldnmagenta}{rgb}{1,.11,.64}
\definecolor{cpldnviolet}{rgb}{.86,0,1}
\definecolor{cpldndarkblue}{rgb}{.4,.26,.95}
\setbeamercolor*{palette primary}{fg=cpldnmagenta}
\setbeamercolor*{palette secondary}{fg=cpldndarkblue}
\setbeamercolor*{palette tertiary}{fg=black}
\setbeamercolor{alerted text}{fg=cpldnmagenta}
\setbeamercolor{sample text}{fg=cpldnviolet}
\setbeamercolor{structure}{fg=cpldndarkblue}
\setbeamercolor*{author in head/foot}{fg=cpldndarkblue,bg=cpldnpalepink}
\setbeamercolor*{title in head/foot}{fg=cpldndarkblue,bg=cpldnpalepink}
\setbeamercolor*{date in head/foot}{fg=cpldndarkblue,bg=cpldnpalepink}
\setbeamercolor*{frametitle}{fg=cpldndarkblue,bg=cpldnpink}
\mode<all>
% \end{macrocode}
%


+ 127
- 0
cpldn-logo.svg View File

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg885"
width="838"
height="280.00018"
viewBox="0 0 838 280.00018"
sodipodi:docname="logo.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14">
<metadata
id="metadata891">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs889" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1918"
inkscape:window-height="1030"
id="namedview887"
showgrid="true"
showguides="true"
inkscape:guide-bbox="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="0.47773903"
inkscape:cx="205.33539"
inkscape:cy="26.273501"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg885">
<inkscape:grid
type="xygrid"
id="grid903"
spacingx="6.2"
spacingy="6.5"
originx="0.5"
originy="62.500179" />
</sodipodi:namedview>
<path
style="fill:#dc00ff;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 0.5,0.5 h 93 v 31 h -62 v 61.999999 h 62 V 124.5 h -93 z"
id="path4610"
inkscape:connector-curvature="0" />
<path
style="fill:#dc00ff;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 248.5,0.5 h 31 v 61.999999 h 31 V 0.5 h 31 v 124 h -31 V 93.499999 h -62 z"
id="path4616"
inkscape:connector-curvature="0" />
<path
style="fill:#dc00ff;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 372.5,0.500183 V 124.50018 h 31 V 93.500179 h 62 V 0.500183 Z m 31,31 h 31 v 30.999996 h -31 z"
id="path4618"
inkscape:connector-curvature="0" />
<path
style="fill:#dc00ff;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 496.5,0.5 h 93 v 31 h -31 v 93 h -31 v -93 h -31 z"
id="path4620"
inkscape:connector-curvature="0" />
<path
style="fill:#ff1ea4;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 620.5,0.500183 V 124.50018 h 93 V 93.500179 h 31 v 31.000001 h 31 V 93.500179 h 31 v 31.000001 h 31 V 62.500179 h -124 V 0.500183 Z m 31,31 h 31 v 61.999996 h -31 z"
id="path4622"
inkscape:connector-curvature="0" />
<path
style="fill:#ff1ea4;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 124.5,155.50018 v 62 H 0.5 v 62 h 31 v -31 h 31 v 31 h 31 v -31 h 31 v 31 h 93 v -124 z m 31,31 h 31 v 62 h -31 z"
id="path4624"
inkscape:connector-curvature="0" />
<path
style="fill:#dc00ff;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 248.5,155.50018 v 124 h 31 v -31 h 62 v -93 z m 31,31 h 31 v 31 h -31 z"
id="path4626"
inkscape:connector-curvature="0" />
<path
style="fill:#dc00ff;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 372.5,155.50018 v 124 h 31 v -31 h 31 v 31 h 31 v -124 z m 31,31 h 31 v 31 h -31 z"
id="path4628"
inkscape:connector-curvature="0" />
<path
style="fill:#dc00ff;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 496.5,279.5 v -124 h 93 v 62 h -31 v -31 h -31 v 31 h 31 v 31 h 31 v 31 h -31 v -31 h -31 v 31 z"
id="path4630"
inkscape:connector-curvature="0" />
<path
style="fill:#dc00ff;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 651.5,279.5 v -93 h -31 v -31 h 93 v 31 h -31 v 93 z"
id="path4632"
inkscape:connector-curvature="0" />
<path
style="fill:#dc00ff;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 744.5,155.5 h 31 v 62 h 31 v -62 h 31 v 124 h -31 v -31 h -31 -31 z"
id="path4634"
inkscape:connector-curvature="0" />
<path
style="fill:#dc00ff;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 124.5,124.5 V 0.5 h 93 v 61.999999 h -31 V 31.5 h -31 v 30.999999 h 31 v 31 h 31 V 124.5 h -31 V 93.499999 h -31 V 124.5 Z"
id="path4630-3"
inkscape:connector-curvature="0" />
</svg>

+ 5
- 3
sample.tex View File

@ -7,9 +7,11 @@
\setmainfont[Ligatures=TeX]{Linux Libertine O}
\setmainlanguage{english}
\usetheme{Boadilla}
\usecolortheme{cpldn}
\setbeamercovered{transparent}
\usetheme{cpldn}
%\useoutertheme{infolines}
%\useinnertheme{rectangles}
%\usecolortheme{cpldn}
%\setbeamercovered{transparent}
\AtBeginSection{
\begin{frame}{Outline}{}
\tableofcontents[currentsection]


Loading…
Cancel
Save