added contributors section

As I was not able to get pythontex running with latexmk, I wrote a
simple build script. It uses a hidden folder for the intermediate
files. The folder is added to .gitignore
This commit is contained in:
Benjamin Weiss 2015-06-12 10:24:24 +02:00
parent c98b92d409
commit 38592e254b
3 changed files with 41 additions and 0 deletions

2
.gitignore vendored
View File

@ -33,3 +33,5 @@ demo.pdf
*.vrb
*.xdy
*.tdo
package/.temptex

7
package/build.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
mkdir -p .temptex
xelatex -shell-escape -output-directory .temptex mtheme.dtx
pythontex .temptex/mtheme.dtx
xelatex -shell-escape -output-directory .temptex mtheme.dtx
cp .temptex/mtheme.pdf ./mtheme.pdf

View File

@ -24,6 +24,9 @@
ItalicFont={Fira Sans Light Italic},%
BoldFont={Fira Sans}]{Fira Sans Light}
\setmonofont{Fira Mono}
\defaultfontfeatures{Ligatures=TeX}
\usepackage{pythontex}
\usepackage{enumitem}
\setlist[itemize]{noitemsep}
@ -118,6 +121,35 @@ To get started with the theme is very simple. The following code shows a minimal
The theme itself is licensed under a \href{http://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons Attribution-ShareAlike 4.0 International License}. This means that if you change the theme and re-distribute it, you must retain the copyright notice header and license it under the same CC-BY-SA license. This does not affect the presentation that you create with the theme.
\section{Contributors}
\begin{pycode}
import httplib
import json
URL = 'api.github.com'
REQ = '/repos/matze/mtheme/contributors'
USER_AGENT = ("curl/7.13.2 " +
"(i386-pc-linux-gnu) " +
"libcurl/7.13.2 " +
"OpenSSL/0.9.7e" +
"zlib/1.2.2" +
"libidn/0.5.13")
HEADERS = {"User-Agent": USER_AGENT}
conn = httplib.HTTPSConnection(URL)
conn.request('GET', REQ, None, HEADERS)
resp = conn.getresponse()
print('\\begin{itemize}')
if resp.status == 200:
data = json.loads(resp.read())
for name, url in ((c['login'], c['html_url']) for c in data):
print(" \\item \\href{%s}{%s}" % (url, name))
else:
print(" \\item Couldn't get contributors")
print('\\end{itemize}')
\end{pycode}
\section{Implementation}
\DocInput{beamerthemem.dtx}
\DocInput{beamerfontthememetropolis.dtx}