├── gu.png ├── sbx.png ├── unipg.png ├── slides.pdf ├── LICENSE ├── .gitignore ├── slides.md ├── README.md └── beamerthemelucid.sty /gu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harisont/lucid/HEAD/gu.png -------------------------------------------------------------------------------- /sbx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harisont/lucid/HEAD/sbx.png -------------------------------------------------------------------------------- /unipg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harisont/lucid/HEAD/unipg.png -------------------------------------------------------------------------------- /slides.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/harisont/lucid/HEAD/slides.pdf -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Kenton Hamaluik 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Core latex/pdflatex auxiliary files: 2 | *.aux 3 | *.lof 4 | *.log 5 | *.lot 6 | *.fls 7 | *.out 8 | *.toc 9 | 10 | ## Intermediate documents: 11 | *.dvi 12 | # these rules might exclude image files for figures etc. 13 | # *.ps 14 | # *.eps 15 | # *.pdf 16 | 17 | ## Bibliography auxiliary files (bibtex/biblatex/biber): 18 | *.bbl 19 | *.bcf 20 | *.blg 21 | *-blx.aux 22 | *-blx.bib 23 | *.run.xml 24 | 25 | ## Build tool auxiliary files: 26 | *.fdb_latexmk 27 | *.synctex.gz 28 | *.synctex.gz(busy) 29 | *.pdfsync 30 | 31 | ## Auxiliary and intermediate files from other packages: 32 | 33 | # algorithms 34 | *.alg 35 | *.loa 36 | 37 | # amsthm 38 | *.thm 39 | 40 | # beamer 41 | *.nav 42 | *.snm 43 | *.vrb 44 | 45 | # glossaries 46 | *.acn 47 | *.acr 48 | *.glg 49 | *.glo 50 | *.gls 51 | 52 | # hyperref 53 | *.brf 54 | 55 | # listings 56 | *.lol 57 | 58 | # makeidx 59 | *.idx 60 | *.ilg 61 | *.ind 62 | *.ist 63 | 64 | # minitoc 65 | *.maf 66 | *.mtc 67 | *.mtc0 68 | 69 | # minted 70 | *.pyg 71 | 72 | # nomencl 73 | *.nlo 74 | 75 | # sagetex 76 | *.sagetex.sage 77 | *.sagetex.py 78 | *.sagetex.scmd 79 | 80 | # sympy 81 | *.sout 82 | *.sympy 83 | sympy-plots-for-*.tex/ 84 | 85 | # todonotes 86 | *.tdo 87 | 88 | # xindy 89 | *.xdy 90 | 91 | # useless files 92 | color_scheme.png 93 | identicon.png 94 | ._wordcount_selection.tex -------------------------------------------------------------------------------- /slides.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "The title" 3 | subtitle: "and a possibly very long subtitle" 4 | author: "The Author" 5 | theme: "lucid" 6 | logo: "gu.png" 7 | date: "the date" 8 | institute: "The Institution" 9 | --- 10 | 11 | # The first section 12 | 13 | ## The first slide 14 | It just contains some __text__ in _various_ styles ~~in it~~. 15 | 16 | ## The second slide 17 | A first, multiline paragraph with some random words and even a correctly placed footnote![^1] 18 | 19 | And a second, shorter paragraph here. 20 | 21 | [^1]: This is the footnote. 22 | 23 | ## Some nested bullet points 24 | - one 25 | - two 26 | - one 27 | - one 28 | - two 29 | - three 30 | - two 31 | - three 32 | - three 33 | 34 | ## And a nested numbered list 35 | 1. one 36 | 2. two 37 | 1. one 38 | 1. one 39 | 2. two 40 | 3. three 41 | 2. two 42 | 3. three 43 | 3. three 44 | 45 | ## Another text slide 46 | 47 | Where the text 48 | 49 | ### Is followed by a colorful subheading 50 | 51 | And some more text that doesn't say anything particularly interesting. 52 | 53 | ## A quote 54 | Introduced by some text, here are 55 | 56 | > Some words of wisdom 57 | 58 | And a closing comment. 59 | 60 | # The fancy section 61 | 62 | ## An image 63 | ![With a caption](sbx.png) 64 | 65 | ## Some code 66 | 67 | A syntax-highlighted code example: 68 | 69 | ```haskell 70 | haskellExample :: From -> To 71 | haskellExample from = to 72 | ``` 73 | 74 | Plus some `inline monospaced text` just because we can. 75 | 76 | ## A little bit of math mode 77 | Here is a pretty random formula: 78 | 79 | $\int_{a}^{b} f(x)dx = F(b) - F(a)$ 80 | 81 | With equal spacing above and below, _obviously_. 82 | 83 | ## And finally, a table 84 | 85 | As always, a very realistic example: 86 | 87 | | __col a__ | __col b__ | __col c__ | 88 | | --- | --- | --- | 89 | | a1 | b1 | c1 | 90 | | a2 | b2 | c2 | 91 | 92 | # That's all! -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # lucid 2 | A modern Beamer theme you can use without installing dozens of CTAN packages. 3 | 4 | I really, really hate all PowerPoint-like programs but also dislike most Beamer templates, so back in my third year of university I invested one night in making my own. 5 | I didn't understand anything about CTAN packages, `.sty` files and `tikz` (and to a large extent I still don't), but [Beamer-Theme-Execushares](https://github.com/hamaluik/Beamer-Theme-Execushares) provided an excellent starting point and the resulting theme served me well throughout the last 5 years - I only recently switched to my current institution's (Språkbanken Text, University of Gothenburg) colors and logo and fixed a few things that kept annoying me. 6 | There are still a few [issues](https://github.com/harisont/Beamer-mhthm/issues) I'd like to address, but because I find writing style files to be a nightmare PRs are more than ever welcome. 7 | 8 | ## Usage 9 | You can of course use lucid to write your presentations in LaTeX and compile them with `pdflatex`. 10 | A fairly standard `texlive` installation should provide everything you need, as the only package required is `tikz`. 11 | 12 | ### If you hate writing presentations in LaTeX 13 | However, __I warmly recommend that you write your presentations in Markdown and generate beamer slides with [pandoc](https://github.com/jgm/pandoc)__. 14 | This is a much easier way to obtain perfectly fine slides in 99% of the cases, and allows for LaTeX injections that fix the remaining 1% of things that you can't express in Markdown. 15 | For instance, you can add a `\pause` wherever you want. 16 | 17 | I usually just write regular Markdown using `#` for each new section and `##` for each new slide, add a metadata section in the beginning of the file, for instance 18 | 19 | ```yaml 20 | --- 21 | title: "The title" 22 | subtitle: "a possibly very long subtitle" # OPTIONAL 23 | author: "My Name" # OPTIONAL 24 | theme: "lucid" 25 | logo: "gu.png" # OPTIONAL - if present, it should as of now be the path to a 300x300 image 26 | date: "the date" # OPTIONAL - will appear on the title page on the bottom right 27 | institute: "Språkbanken Text, University of Gothenburg" # OPTIONAL 28 | --- 29 | ``` 30 | 31 | and then run 32 | 33 | ``` 34 | pandoc slides.md -t beamer --slide-level 2 -o slides.pdf 35 | ``` 36 | 37 | to generate the PDF. 38 | 39 | See [`slides.pdf`](slides.pdf) for some example pandoc-generated slides and [`slides.md`](slides.md) to take a look at the very simple source code. 40 | 41 | For further information about the pandoc + beamer combo, I think [alexeygumirov](https://github.com/alexeygumirov/pandoc-beamer-how-to) is the most exhaustive source. A more compact tutorial is available [here](https://ashwinschronicles.github.io/beamer-slides-using-markdown-and-pandoc?utm_source=pocket_reader). 42 | 43 | ## Namesake 44 | In Italian, _lucidi_ is the word that indicates slides meant for old-fashioned overhead projectors. 45 | Not to mention that having a quick and simple way to generate acceptable-looking slides greatly helps me _mantenere la luciditá_ (stay sane). 46 | -------------------------------------------------------------------------------- /beamerthemelucid.sty: -------------------------------------------------------------------------------- 1 | \usepackage{tikz} 2 | \usetikzlibrary{calc} 3 | 4 | % -------- COLOR SCHEME -------- 5 | \definecolor{PrimaryColor}{RGB}{7,79,140} % primary color (blue) 6 | \definecolor{SecondaryColor}{RGB}{242,88,26} % bulleted lists 7 | \definecolor{BackgroundColor}{RGB}{255,255,255} % background & titles (white) 8 | \definecolor{TextColor}{RGB}{0,0,0} % text (black) 9 | \definecolor{ProgBarBGColor}{RGB}{175,175,175} % progress bar background (grey) 10 | 11 | 12 | % set colours 13 | \setbeamercolor{normal text}{fg=TextColor}\usebeamercolor*{normal text} 14 | \setbeamercolor{alerted text}{fg=PrimaryColor} 15 | \setbeamercolor{section in toc}{fg=PrimaryColor} 16 | \setbeamercolor{structure}{fg=SecondaryColor} 17 | \hypersetup{colorlinks,linkcolor=,urlcolor=SecondaryColor} 18 | 19 | % set fonts 20 | \setbeamerfont{itemize/enumerate body}{size=\large} 21 | \setbeamerfont{itemize/enumerate subbody}{size=\normalsize} 22 | \setbeamerfont{itemize/enumerate subsubbody}{size=\small} 23 | 24 | % make pixelated bullets 25 | \setbeamertemplate{itemize item}{ 26 | \tikz{ 27 | \draw[fill=SecondaryColor,draw=none] (0, 0) rectangle(0.1, 0.1); 28 | \draw[fill=SecondaryColor,draw=none] (0.1, 0.1) rectangle(0.2, 0.2); 29 | \draw[fill=SecondaryColor,draw=none] (0, 0.2) rectangle(0.1, 0.3); 30 | } 31 | } 32 | \setbeamertemplate{itemize subitem}{ 33 | \tikz{ 34 | \draw[fill=SecondaryColor,draw=none] (0, 0) rectangle(0.075, 0.075); 35 | \draw[fill=SecondaryColor,draw=none] (0.075, 0.075) rectangle(0.15, 0.15); 36 | \draw[fill=SecondaryColor,draw=none] (0, 0.15) rectangle(0.075, 0.225); 37 | } 38 | } 39 | \setbeamertemplate{itemize subsubitem}{ 40 | \tikz{ 41 | \draw[fill=SecondaryColor,draw=none] (0.050, 0.050) rectangle(0.15, 0.15); 42 | } 43 | } 44 | 45 | % disable navigation 46 | \setbeamertemplate{navigation symbols}{} 47 | 48 | % disable the damn default logo! 49 | \setbeamertemplate{sidebar right}{} 50 | 51 | % custom draw the title page above 52 | \setbeamertemplate{title page}{} 53 | 54 | % again, manually draw the frame title above 55 | \setbeamertemplate{frametitle}{} 56 | 57 | % disable "Figure:" in the captions 58 | % TODO: somehow this doesn't work for md-generated slides 59 | %\setbeamertemplate{caption}{\tiny\insertcaption} 60 | %\setbeamertemplate{caption label separator}{} 61 | 62 | % add some space below the footnotes so they don't end up on the progress bar 63 | \setbeamertemplate{footnote}{ 64 | \parindent 0em 65 | \noindent 66 | \raggedright 67 | \hbox to 0.8em{\hfil\insertfootnotemark} 68 | \insertfootnotetext 69 | \par 70 | \vspace{2em} 71 | } 72 | 73 | % add the same vspace both before and after quotes 74 | \setbeamertemplate{quote begin}{\vspace{0.5em}} 75 | \setbeamertemplate{quote end}{\vspace{0.5em}} 76 | 77 | % progress bar counters 78 | \newcounter{showProgressBar} 79 | \setcounter{showProgressBar}{1} 80 | \newcounter{showSlideNumbers} 81 | \setcounter{showSlideNumbers}{1} 82 | \newcounter{showSlideTotal} 83 | \setcounter{showSlideTotal}{1} 84 | 85 | % use \makeatletter for our progress bar definitions 86 | % progress bar idea from http://tex.stackexchange.com/a/59749/44221 87 | % slightly adapted for visual purposes here 88 | \makeatletter 89 | \newcount\progressbar@tmpcounta% auxiliary counter 90 | \newcount\progressbar@tmpcountb% auxiliary counter 91 | \newdimen\progressbar@pbwidth %progressbar width 92 | \newdimen\progressbar@tmpdim % auxiliary dimension 93 | 94 | \newdimen\slidewidth % auxiliary dimension 95 | \newdimen\slideheight % auxiliary dimension 96 | 97 | % make the progress bar go across the screen 98 | \progressbar@pbwidth=\the\paperwidth 99 | \slidewidth=\the\paperwidth 100 | \slideheight=\the\paperheight 101 | 102 | % draw everything with tikz 103 | \setbeamertemplate{background}{ % all slides 104 | % progress bar stuff 105 | \progressbar@tmpcounta=\insertframenumber 106 | \progressbar@tmpcountb=\inserttotalframenumber 107 | \progressbar@tmpdim=\progressbar@pbwidth 108 | \divide\progressbar@tmpdim by 100 109 | \multiply\progressbar@tmpdim by \progressbar@tmpcounta 110 | \divide\progressbar@tmpdim by \progressbar@tmpcountb 111 | \multiply\progressbar@tmpdim by 100 112 | 113 | \begin{tikzpicture} 114 | % set up the entire slide as the canvas 115 | \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight); 116 | 117 | % background 118 | \fill[color=BackgroundColor] (0,0) rectangle(\the\paperwidth,\the\paperheight); 119 | 120 | \ifnum\thepage=1\relax % only title slides 121 | % primary color rectangle 122 | \fill[color=PrimaryColor] (0, 4cm) rectangle(\slidewidth,\slideheight); 123 | 124 | % text (title, subtitle, author, date) 125 | \node[anchor=south,text width=\slidewidth-1cm,inner xsep=0.5cm] at (0.5\slidewidth,4cm) {\color{BackgroundColor}\Huge\textbf{\inserttitle}}; 126 | \node[anchor=north east,text width=\slidewidth-1cm,align=right] at (\slidewidth-0.4cm,4cm) {\color{PrimaryColor}\large\textbf{\insertsubtitle}}; 127 | \node at (0.5\slidewidth,2cm) {\color{PrimaryColor}\LARGE\insertauthor}; 128 | \node at (0.5\slidewidth,1.25cm) {\color{PrimaryColor}\Large\insertinstitute}; 129 | \node[anchor=south east] at(\slidewidth,0cm) {\color{PrimaryColor}\tiny\insertdate}; 130 | \else % other slides 131 | % title bar 132 | \fill[color=PrimaryColor] (0, \slideheight-1cm) rectangle(\slidewidth,\slideheight); 133 | 134 | % slide title 135 | \node[anchor=north,text width=\slidewidth-0.75cm,inner xsep=0.5cm,inner ysep=0.25cm] at (0.5\slidewidth,\slideheight) {\color{BackgroundColor}\huge\textbf{\insertframetitle}}; 136 | 137 | % logo (TODO: autoscale; now it expects 350x350 138 | \node[anchor=north east] at (\slidewidth-0.25cm,\slideheight+0.06cm){\insertlogo}; 139 | 140 | % show progress bar 141 | \ifnum \value{showProgressBar}>0\relax% 142 | % progress bar icon in the middle of the screen 143 | \draw[fill=ProgBarBGColor,draw=none] (0cm,0cm) rectangle(\slidewidth,0.25cm); 144 | \draw[fill=PrimaryColor,draw=none] (0cm,0cm) rectangle(\progressbar@tmpdim,0.25cm); 145 | 146 | % bottom info 147 | \node[anchor=south west] at(0cm,0.25cm) {\color{PrimaryColor}\tiny\vphantom{lp}\insertsection}; 148 | % if slide numbers are active 149 | \ifnum \value{showSlideNumbers}>0\relax% 150 | % if slide totals are active 151 | \ifnum \value{showSlideTotal}>0\relax% 152 | % draw both slide number and slide total 153 | \node[anchor=south east] at(\slidewidth,0.25cm) {\color{PrimaryColor}\tiny\insertframenumber/\inserttotalframenumber}; 154 | \else 155 | \node[anchor=south east] at(\slidewidth,0.25cm) {\color{PrimaryColor}\tiny\insertframenumber}; 156 | \fi 157 | \fi 158 | \else 159 | % section title in the bottom left 160 | \node[anchor=south west] at(0cm,0cm) {\color{PrimaryColor}\tiny\vphantom{lp}\insertsection}; 161 | % if we're showing slide numbers 162 | \ifnum \value{showSlideNumbers}>0\relax% 163 | % if slide totals are active 164 | \ifnum \value{showSlideTotal}>0\relax% 165 | % slide number and slide total 166 | \node[anchor=south east] at(\slidewidth,0cm) {\color{PrimaryColor}\tiny\insertframenumber/\inserttotalframenumber}; 167 | \else 168 | \node[anchor=south east] at(\slidewidth,0cm) {\color{PrimaryColor}\tiny\insertframenumber}; 169 | \fi 170 | \fi 171 | \fi 172 | \fi 173 | \end{tikzpicture} 174 | } 175 | \makeatother 176 | 177 | \AtBeginSection{\frame{\sectionpage}} % section pages 178 | \setbeamertemplate{section page} 179 | { 180 | \begin{tikzpicture} 181 | % set up the entire slide as the canvas 182 | \useasboundingbox (0,0) rectangle(\slidewidth,\slideheight); 183 | \fill[color=BackgroundColor] (-1cm, 2cm) rectangle (\slidewidth, \slideheight+0.1cm); 184 | \fill[color=PrimaryColor] (-1cm, 0.5\slideheight-1cm) rectangle(\slidewidth, 0.5\slideheight+1cm); 185 | \node[text width=\the\paperwidth-1cm,align=center] at (0.4\slidewidth, 0.5\slideheight) {\color{BackgroundColor}\Huge\textbf{\insertsection}}; 186 | \end{tikzpicture} 187 | } 188 | --------------------------------------------------------------------------------