diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/10_fonts.tex | 12 | ||||
-rwxr-xr-x | common/99_sidebar.tex | 56 | ||||
-rw-r--r-- | common/Makefile.common | 122 | ||||
-rwxr-xr-x | common/classes/tex/DUClasses/DUclasses.sty | 40 | ||||
-rw-r--r-- | common/classes/tex/DUStyle/DUStyle.sty | 63 | ||||
-rw-r--r-- | common/classes/tex/DUcenter/DUcenter.sty | 12 | ||||
-rwxr-xr-x | common/classes/tex/DUcolumns/DUcolumn.sty | 31 | ||||
-rw-r--r-- | common/classes/tex/DUpygments/DUpygments-arduino.sty | 127 | ||||
-rw-r--r-- | common/classes/tex/DUpygments/DUpygments-colorful.sty | 149 | ||||
-rw-r--r-- | common/classes/tex/DUpygments/DUpygments-default.sty | 130 | ||||
-rw-r--r-- | common/classes/tex/DUpygments/DUpygments-monokai.sty | 143 | ||||
-rw-r--r-- | common/classes/tex/DUpygments/DUpygments-tango.sty | 157 | ||||
-rw-r--r-- | common/classes/tex/DUpygments/pygments_css2sty.py | 66 | ||||
-rw-r--r-- | common/classes/tex/DUsidebar/DUsidebar.sty | 58 | ||||
-rw-r--r-- | common/classes/tex/DUsmallcaps/DUsmallcaps.sty | 4 |
15 files changed, 1165 insertions, 5 deletions
diff --git a/common/10_fonts.tex b/common/10_fonts.tex new file mode 100644 index 0000000..11e2a8e --- /dev/null +++ b/common/10_fonts.tex @@ -0,0 +1,12 @@ +\usepackage{fontspec} + +\newfontfamily\CaviarDreamsFont{CaviarDreams} + [ Path=\commonPath/../fonts/ + , BoldFont = CaviarDreams_Bold + , Mapping=tex-text + , Extension = .ttf + ] + +\newfontfamily\LibertineFont{Linux Libertine O} + [ Ligatures=TeX + ] diff --git a/common/99_sidebar.tex b/common/99_sidebar.tex index ab599a0..57d76ad 100755 --- a/common/99_sidebar.tex +++ b/common/99_sidebar.tex @@ -1,15 +1,60 @@ +\usepackage{paracol} \newlength{\notesep} +% All the models uses two columns. +% At any time in the RST document, you can add elements in the sidebar using +% the sidebar directive. +% +% .. sidebar:: Informations +% +% * 17 allée des cerisiers +% * 75001 Paris |phoneicon| +% * 01 23 45 67 89 |mailicon| +% * email@example |noicon| +% +% You can close the sidebar at any time, but this requires to use latex code in the document +% +% .. raw:: latex +% +% \flushpage +% \end{paracol} +% \newgeometry{left=3cm,right=3cm,bottom=1cm,top=1cm} + + +% Switch in paracol mode from the begining of the document +% This can be disabled by defining \nocolumns before loading +% this template. +% +% \def\nocolumns{} +% +% The column is supposed to be on the left on the document, with the index 0. You +% can change this by defining a counter sidebarindex with +% +% \newcounter{sidebarindex} +% \setcounter{sidebarindex}{1} + +\ifdefined\sidebarindex +\else + \newcommand\sidebarindex{0} +\fi + +\ifdefined\nocolumns +\else + \AtBeginDocument{% + \begin{paracol}{2} + } +\fi + \def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]} \let\endchangemargin=\endlist \ifdefinedcolor{backsidecolor}{% - \backgroundcolor{c[0]}{backsidecolor} + \backgroundcolor{c[\sidebarindex]}{backsidecolor} }{} % Une commande dédiée pour les notes de marge \newcommand{\DUsidebar}[1]{% - \switchcolumn[0] + \switchcolumn[\sidebarindex] \begin{changemargin}{0.7cm}{0.7cm} % Sélectionne la police alternative \AltFont\selectfont @@ -21,8 +66,9 @@ \ifdefinedcolor{textsidecolor}{\color{black}}{} } +% If the column is still active, make it go to the bottom of the page. +\makeatletter \AtEndDocument{% - % Make the column go to the bottom - \flushpage - \end{paracol} + \ifthenelse{\equal{\@currenvir}{paracol}}{\flushpage\end{paracol}}{} } +\makeatother diff --git a/common/Makefile.common b/common/Makefile.common new file mode 100644 index 0000000..c3f6959 --- /dev/null +++ b/common/Makefile.common @@ -0,0 +1,122 @@ +TEX=$(shell command -v lualatex xelatex | head -n 1) +SOURCE=. +MODEL ?= . + +SRC =$(wildcard *.rst) +SVG =$(wildcard content/*.svg) + +PDFS = $(SRC:.rst=.pdf) +INCLUDED_PDF = $(SVG:.svg=.pdf) + +all: $(PDFS) + +BIBS =$(wildcard *.bib) + +DIR = $(sort $(shell find $(SOURCE) -name '*.rst' -print)) + +# Pick the first file for the given name, either in the path from the model, or +# in the local path from the source. +select_file = \ + $(firstword $(wildcard ./resources/$(1)) $(wildcard $(MODEL)/resources/$1)) + + +# Select the files to use in the styles. +ifeq ($(MODEL),.) + $(info Modèle de base) + + SOURCES = $(sort $(filter-out $(FILTERS), $(wildcard $(MODEL)/resources/*.tex) )) + +else + $(info Modèle surchargé) + + # Remove from the list the elements given in the variable FILTERS + NEW_STYLES = $(wildcard resources/*.tex) + MODEL_STYLES = $(wildcard $(MODEL)/resources/*.tex) + # For each file, extract the name, and sort the list by order. + STYLE_NAME = $(sort $(foreach fic,$(NEW_STYLES) $(filter-out $(FILTERS),$(MODEL_STYLES)),$(notdir $(fic)))) + # Pick the file either in the current directory, or in the model path + SOURCES = $(foreach fic,$(STYLE_NAME),$(call select_file,$(fic))) + +endif + +null := +space := $(null) # +comma := , +TEX_STYLE := $(subst $(space),$(comma),$(strip $(SOURCES))) +TEX_BIBS := $(subst $(space),$(comma),$(strip $(BIBS))) + +# Add a variable for specific options to add in the rst2latex command +# +EXTRA_RST_OPTIONS ?= + +EXTRA_STYLES ?= + +# Remove the comments and the empty lines from the module list file +PACK = $(shell sed -e 's/\#.*$$//' -e '/^\s$$/d' $(MODEL)/resources/modules) +PACKAGES = $(subst $(space),$(comma),$(strip $(PACK))) + +tmp: + mkdir tmp + +# Hack used to identify the path to the shared configuration in latex. +tmp/model.tex: | tmp + # Transform the path to the model into an absolute path, because this path + # will be used in the lualatex cache to references the fonts, and using + # relative path can cause issues if we need to references the font from + # another location. + $(file >$@,\def\commonPath{$(abspath $(MODEL)/../common/)}) + +# Generate the latex file from rst +tmp/%.tex: %.rst $(INCLUDED_PDF) $(SOURCES) | tmp + $$(command -v rst2latex rst2latex.py | head -n 1) \ + --no-section-subtitles \ + --table-style=borderless \ + --use-latex-citations \ + --use-latex-docinfo \ + --documentclass=extarticle \ + --documentoption=12pt,A4,table \ + --syntax-highlight=short \ + $(EXTRA_RST_OPTIONS) \ + --stylesheet=tmp/model.tex,$(PACKAGES),$(subst $(space),$(comma),\$(EXTRA_STYLES)),$(TEX_STYLE) $< $@ + sed -i -e 's/continued on next page/suite sur la page suivante/;s|^%$$||' $@ + sed -i -e 's/admonition-/admonition/g' $@ + +# Generate each pdf with latex +tmp/%.pdf: tmp/%.tex tmp/model.tex $(BIBS) | tmp + # Make the first run in batch mode (no pdf produced) + TEXMFHOME=$(MODEL)/../common/classes $(TEX) -output-directory tmp --halt-on-error --draftmode $< + TEXMFHOME=$(MODEL)/../common/classes $(TEX) -output-directory tmp $< + #bibtex tmp/$*.aux && $(TEX) -output-directory tmp $< || echo "no bib" + while grep 'Rerun to get ' tmp/$*.log ; do \ + $(TEX) -output-directory tmp $< ;\ + done + +# Put the pdf in the right place +%.pdf: tmp/%.pdf | tmp + cp $< $@ + # Update mupdf if the process exist, or do nothing. + pkill -HUP mupdf || true + +.PHONY: clean +clean: + rm -r tmp + +# Generate the final PDF document +# Send a notification to mupdf in order to refresh the document +%.png: %.pdf + gs -dTextAlphaBits=4 -dFirstPage=1 -dLastPage=1 -dBATCH -dNOPAUSE -sDEVICE=png16m -r150 -dUseCropBox -sOutputFile=$@ $< + +# Watch mode, which regenerate the documents as soon there is a change in a +# file., +# requires inotifywait (package inotify-tools) +.PHONY: watch +watch: + while true; do \ + $(MAKE) all; \ + inotifywait -qre close_write . ; \ + done + +# Format the pages in order to make them printable in a book +book: $(PDFS) + + pdfbook2 --no-crop $< diff --git a/common/classes/tex/DUClasses/DUclasses.sty b/common/classes/tex/DUClasses/DUclasses.sty new file mode 100755 index 0000000..737fbf1 --- /dev/null +++ b/common/classes/tex/DUClasses/DUclasses.sty @@ -0,0 +1,40 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{DUclasses}[2019/08/13 Docutils custom classes] + +\RequirePackage{xstring} +\RequirePackage{environ} + +% +% Permet d'appliquer des paramètres aux styles de classes, et fournis quelques styles +% correspondant +% +% .. container:: textcolor-white centering +% +% Ceci est un test +% +% Sur plusieurs lignes + +% Mise à jour de l'environnement DUclass + +% class handling for environments (block-level elements) +% \begin{DUclass}{foo-bar} tries \DUCLASSfoo[bar] and +% \end{DUclass}{foo} tries \endDUCLASSfoo +\ifx\DUclass\undefined + \newenvironment{DUclass}[1]% + {\StrCut{#1}{-}\csA\csB + \def\DocutilsClassFunctionName{DUCLASS\csA}% arg cannot be used in end-part of environment. + \csname \DocutilsClassFunctionName \endcsname{\csB}}% + {\csname end\DocutilsClassFunctionName \endcsname}% +\fi + + +% Creation d'une boite de hauteur fixe +\NewEnviron{DUCLASShbox}[1]{ + \parbox[s][#1][c]{\linewidth}{\BODY} +} + +% Mise en couleur du texte +\newcommand{\DUCLASStextcolor}[1]{\color{#1}} + +\NewEnviron{DUCLASScentering}{\centering\BODY\par} + diff --git a/common/classes/tex/DUStyle/DUStyle.sty b/common/classes/tex/DUStyle/DUStyle.sty new file mode 100644 index 0000000..666d703 --- /dev/null +++ b/common/classes/tex/DUStyle/DUStyle.sty @@ -0,0 +1,63 @@ +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesPackage{DUStyle}[2018/02/25 DUStyle Package] + +% The macro can be used to create your own style : +% the style will apply by declaring a custom class : + +%\createIconifiedDUStyle{warning}{orange}{!}{large} +%\createIconifiedDUStyle{note}{blue}{}{large} + +% .. admonition:: Title +% :class: warning + +% .. sidebar:: Title +% :class: note + +\RequirePackage{tikz} +\RequirePackage{mdframed} +\RequirePackage{xcolor} +\RequirePackage{ifthen} + +% Background color for the frame. +\definecolor{DUStyle@lightGray}{RGB}{245, 245, 245} + +% arg1 : The circle backround color +% arg2 : The dot content +% arg3 : The title environment +% arg4 : The title +\newcommand{\DUStyle@iconizedTitle}[4]{% + \begin{#3}% + \ifthenelse{\equal{#2}{}} + {} + {% + \tikz[baseline]{% + \node[circle,fill=#1,inner sep=3pt,anchor=base] at (0, 0)% + {\color{DUStyle@lightGray}#2}; + }% + } + {#4} + \end{#3} +} + +\newcommand{\DUStyle@colorBox}[2]{% + \begin{mdframed}[topline=false, + bottomline=false, + rightline=false, + linecolor=#1, + linewidth=3pt, + skipabove=0.5cm, + %backgroundcolor=DUStyle@lightGray + ]% + #2 + \end{mdframed} +} + +% Create two commands with the same style : +% - for the admonition colored box +% - for the titles in styles (sidebar, admonitions...) +\newcommand\createIconifiedDUStyle[4]{% + \expandafter\newcommand\csname DUadmonition#1\endcsname[1]{\DUStyle@colorBox{#2}{##1}} + \expandafter\newcommand\csname DUtitle#1\endcsname[1]{\DUStyle@iconizedTitle{#2}{#3}{#4}{##1}} +} + + diff --git a/common/classes/tex/DUcenter/DUcenter.sty b/common/classes/tex/DUcenter/DUcenter.sty new file mode 100644 index 0000000..f5e0781 --- /dev/null +++ b/common/classes/tex/DUcenter/DUcenter.sty @@ -0,0 +1,12 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{DUcenter}[2017/04/16 Docutils center role] + +% +% Permet de centrer un texte en utilisant la classe « center » +% +% .. class:: center +% +% Ce texte sera centré + +\newcommand{\DUrolecenter}[1]{\begin{center}#1\end{center}} + diff --git a/common/classes/tex/DUcolumns/DUcolumn.sty b/common/classes/tex/DUcolumns/DUcolumn.sty new file mode 100755 index 0000000..d8e7141 --- /dev/null +++ b/common/classes/tex/DUcolumns/DUcolumn.sty @@ -0,0 +1,31 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{DUcolumn}[2017/04/16 Docutils multicol] + +\RequirePackage{multicol} + +% +% .. container:: paracol2 +% +% Create a section of two column using paracol +% +% +% .. container:: multicols2 +% +% Create a section of two column using multicols + +\newenvironment{DUCLASSparacol2}% + {\begin{paracol}{2}} + {\end{paracol}} + +\newenvironment{DUclasstparacol3}% + {\begin{paracol}{2}} + {\end{paracol}} + +\newenvironment{DUCLASSmulticols2}% + {\begin{multicols}{2}} + {\end{multicols}} + +\newenvironment{DUCLASSmulticols3}% + {\begin{multicols}{3}} + {\end{multicols}} + diff --git a/common/classes/tex/DUpygments/DUpygments-arduino.sty b/common/classes/tex/DUpygments/DUpygments-arduino.sty new file mode 100644 index 0000000..c1f623b --- /dev/null +++ b/common/classes/tex/DUpygments/DUpygments-arduino.sty @@ -0,0 +1,127 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{DUpygments-arduino}[2017/04/16 Docutils Pygments] + +% Stylesheet for syntax highlight with Docutils +% Generated by pygments_css2sty.py from a Pygments CSS style +% (output of `pygmentize -S <style> -f html`). + +\RequirePackage{color} +\providecommand*\DUrolehll[1]{\textcolor[rgb]{1.00,1.00,0.80}{#1}} +% Comment +\providecommand*\DUrolec[1]{\textcolor[rgb]{0.58,0.65,0.65}{#1}} +% Error +\providecommand*\DUroleerr[1]{\textcolor[rgb]{0.65,0.09,0.09}{#1}} +% Keyword +\providecommand*\DUrolek[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}} +% Name +\providecommand*\DUrolen[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}} +% Operator +\providecommand*\DUroleo[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}} +% Comment.Hashbang +\providecommand*\DUrolech[1]{\textcolor[rgb]{0.58,0.65,0.65}{#1}} +% Comment.Multiline +\providecommand*\DUrolecm[1]{\textcolor[rgb]{0.58,0.65,0.65}{#1}} +% Comment.Preproc +\providecommand*\DUrolecp[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}} +% Comment.PreprocFile +\providecommand*\DUrolecpf[1]{\textcolor[rgb]{0.58,0.65,0.65}{#1}} +% Comment.Single +\expandafter\providecommand\csname DUrolec1\endcsname[1]{\textcolor[rgb]{0.58,0.65,0.65}{#1}} +% Comment.Special +\providecommand*\DUrolecs[1]{\textcolor[rgb]{0.58,0.65,0.65}{#1}} +% Keyword.Constant +\providecommand*\DUrolekc[1]{\textcolor[rgb]{0.00,0.59,0.62}{#1}} +% Keyword.Declaration +\providecommand*\DUrolekd[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}} +% Keyword.Namespace +\providecommand*\DUrolekn[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}} +% Keyword.Pseudo +\providecommand*\DUrolekp[1]{\textcolor[rgb]{0.00,0.59,0.62}{#1}} +% Keyword.Reserved +\providecommand*\DUrolekr[1]{\textcolor[rgb]{0.00,0.59,0.62}{#1}} +% Keyword.Type +\providecommand*\DUrolekt[1]{\textcolor[rgb]{0.00,0.59,0.62}{#1}} +% Literal.Number +\providecommand*\DUrolem[1]{\textcolor[rgb]{0.54,0.48,0.32}{#1}} +% Literal.String +\providecommand*\DUroles[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}} +% Name.Attribute +\providecommand*\DUrolena[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}} +% Name.Builtin +\providecommand*\DUrolenb[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}} +% Name.Class +\providecommand*\DUrolenc[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}} +% Name.Constant +\providecommand*\DUroleno[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}} +% Name.Decorator +\providecommand*\DUrolend[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}} +% Name.Entity +\providecommand*\DUroleni[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}} +% Name.Exception +\providecommand*\DUrolene[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}} +% Name.Function +\providecommand*\DUrolenf[1]{\textcolor[rgb]{0.83,0.33,0.00}{#1}} +% Name.Label +\providecommand*\DUrolenl[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}} +% Name.Namespace +\providecommand*\DUrolenn[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}} +% Name.Other +\providecommand*\DUrolenx[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}} +% Name.Property +\providecommand*\DUrolepy[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}} +% Name.Tag +\providecommand*\DUrolent[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}} +% Name.Variable +\providecommand*\DUrolenv[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}} +% Operator.Word +\providecommand*\DUroleow[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}} +% Literal.Number.Bin +\providecommand*\DUrolemb[1]{\textcolor[rgb]{0.54,0.48,0.32}{#1}} +% Literal.Number.Float +\providecommand*\DUrolemf[1]{\textcolor[rgb]{0.54,0.48,0.32}{#1}} +% Literal.Number.Hex +\providecommand*\DUrolemh[1]{\textcolor[rgb]{0.54,0.48,0.32}{#1}} +% Literal.Number.Integer +\providecommand*\DUrolemi[1]{\textcolor[rgb]{0.54,0.48,0.32}{#1}} +% Literal.Number.Oct +\providecommand*\DUrolemo[1]{\textcolor[rgb]{0.54,0.48,0.32}{#1}} +% Literal.String.Affix +\providecommand*\DUrolesa[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}} +% Literal.String.Backtick +\providecommand*\DUrolesb[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}} +% Literal.String.Char +\providecommand*\DUrolesc[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}} +% Literal.String.Delimiter +\providecommand*\DUroledl[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}} +% Literal.String.Doc +\providecommand*\DUrolesd[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}} +% Literal.String.Double +\expandafter\providecommand\csname DUroles2\endcsname[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}} +% Literal.String.Escape +\providecommand*\DUrolese[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}} +% Literal.String.Heredoc +\providecommand*\DUrolesh[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}} +% Literal.String.Interpol +\providecommand*\DUrolesi[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}} +% Literal.String.Other +\providecommand*\DUrolesx[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}} +% Literal.String.Regex +\providecommand*\DUrolesr[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}} +% Literal.String.Single +\expandafter\providecommand\csname DUroles1\endcsname[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}} +% Literal.String.Symbol +\providecommand*\DUroless[1]{\textcolor[rgb]{0.50,0.55,0.55}{#1}} +% Name.Builtin.Pseudo +\providecommand*\DUrolebp[1]{\textcolor[rgb]{0.45,0.56,0.00}{#1}} +% Name.Function.Magic +\providecommand*\DUrolefm[1]{\textcolor[rgb]{0.83,0.33,0.00}{#1}} +% Name.Variable.Class +\providecommand*\DUrolevc[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}} +% Name.Variable.Global +\providecommand*\DUrolevg[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}} +% Name.Variable.Instance +\providecommand*\DUrolevi[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}} +% Name.Variable.Magic +\providecommand*\DUrolevm[1]{\textcolor[rgb]{0.26,0.31,0.33}{#1}} +% Literal.Number.Integer.Long +\providecommand*\DUroleil[1]{\textcolor[rgb]{0.54,0.48,0.32}{#1}} diff --git a/common/classes/tex/DUpygments/DUpygments-colorful.sty b/common/classes/tex/DUpygments/DUpygments-colorful.sty new file mode 100644 index 0000000..f8a1d13 --- /dev/null +++ b/common/classes/tex/DUpygments/DUpygments-colorful.sty @@ -0,0 +1,149 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{DUpygments-colorful}[2017/04/19 Docutils Pygments] + +% Stylesheet for syntax highlight with Docutils +% Generated by pygments_css2sty.py from a Pygments CSS style +% (output of `pygmentize -S <style> -f html`). + +\RequirePackage{color} +\providecommand*\DUrolehll[1]{\textcolor[rgb]{0.64,0.62,0.61}{#1}} +% Comment +\providecommand*\DUrolec[1]{\textcolor[rgb]{0.25,0.53,0.23}{#1}} +% Error +\providecommand*\DUroleerr[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}} +% Keyword +\providecommand*\DUrolek[1]{\textcolor[rgb]{0.51,0.36,0.64}{#1}} +% Literal +\providecommand*\DUrolel[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}} +% Name +\providecommand*\DUrolen[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}} +% Operator +\providecommand*\DUroleo[1]{\textcolor[rgb]{0.36,0.77,0.75}{#1}} +% Punctuation +\providecommand*\DUrolep[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}} +% Comment.Hashbang +\providecommand*\DUrolech[1]{\textcolor[rgb]{0.55,0.53,0.53}{#1}} +% Comment.Multiline +\providecommand*\DUrolecm[1]{\textcolor[rgb]{0.25,0.53,0.23}{#1}} +% Comment.Preproc +\providecommand*\DUrolecp[1]{\textcolor[rgb]{0.55,0.53,0.53}{#1}} +% Comment.PreprocFile +\providecommand*\DUrolecpf[1]{\textcolor[rgb]{0.55,0.53,0.53}{#1}} +% Comment.Single +\expandafter\providecommand\csname DUrolec1\endcsname[1]{\textcolor[rgb]{0.25,0.53,0.23}{#1}} +% Comment.Special +\providecommand*\DUrolecs[1]{\textcolor[rgb]{0.55,0.53,0.53}{#1}} +% Generic.Deleted +\providecommand*\DUrolegd[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}} +% Generic.Emph +\providecommand*\DUrolege[1]{\textit{#1}} +% Generic.Heading +\providecommand*\DUrolegh[1]{\textbf{\textcolor[rgb]{0.18,0.12,0.18}{#1}}} +% Generic.Inserted +\providecommand*\DUrolegi[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}} +% Generic.Prompt +\providecommand*\DUrolegp[1]{\textbf{\textcolor[rgb]{0.55,0.53,0.53}{#1}}} +% Generic.Strong +\providecommand*\DUrolegs[1]{\textbf{#1}} +% Generic.Subheading +\providecommand*\DUrolegu[1]{\textbf{\textcolor[rgb]{0.36,0.77,0.75}{#1}}} +% Keyword.Constant +\providecommand*\DUrolekc[1]{\textcolor[rgb]{0.51,0.36,0.64}{#1}} +% Keyword.Declaration +\providecommand*\DUrolekd[1]{\textcolor[rgb]{0.51,0.36,0.64}{#1}} +% Keyword.Namespace +\providecommand*\DUrolekn[1]{\textcolor[rgb]{0.36,0.77,0.75}{#1}} +% Keyword.Pseudo +\providecommand*\DUrolekp[1]{\textcolor[rgb]{0.51,0.36,0.64}{#1}} +% Keyword.Reserved +\providecommand*\DUrolekr[1]{\textcolor[rgb]{0.51,0.36,0.64}{#1}} +% Keyword.Type +\providecommand*\DUrolekt[1]{\textcolor[rgb]{0.50,0.77,0.09}{#1}} +% Literal.Date +\providecommand*\DUroleld[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}} +% Literal.Number +\providecommand*\DUrolem[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}} +% Literal.String +\providecommand*\DUroles[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}} +% Name.Attribute +\providecommand*\DUrolena[1]{\textcolor[rgb]{0.02,0.71,0.94}{#1}} +% Name.Builtin +\providecommand*\DUrolenb[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}} +% Name.Class +\providecommand*\DUrolenc[1]{\textcolor[rgb]{0.50,0.77,0.09}{#1}} +% Name.Constant +\providecommand*\DUroleno[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}} +% Name.Decorator +\providecommand*\DUrolend[1]{\textcolor[rgb]{0.36,0.77,0.75}{#1}} +% Name.Entity +\providecommand*\DUroleni[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}} +% Name.Exception +\providecommand*\DUrolene[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}} +% Name.Function +\providecommand*\DUrolenf[1]{\textcolor[rgb]{0.02,0.71,0.94}{#1}} +% Name.Label +\providecommand*\DUrolenl[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}} +% Name.Namespace +\providecommand*\DUrolenn[1]{\textcolor[rgb]{0.50,0.77,0.09}{#1}} +% Name.Other +\providecommand*\DUrolenx[1]{\textcolor[rgb]{0.02,0.71,0.94}{#1}} +% Name.Property +\providecommand*\DUrolepy[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}} +% Name.Tag +\providecommand*\DUrolent[1]{\textcolor[rgb]{0.36,0.77,0.75}{#1}} +% Name.Variable +\providecommand*\DUrolenv[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}} +% Operator.Word +\providecommand*\DUroleow[1]{\textcolor[rgb]{0.36,0.77,0.75}{#1}} +% Text.Whitespace +\providecommand*\DUrolew[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}} +% Literal.Number.Bin +\providecommand*\DUrolemb[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}} +% Literal.Number.Float +\providecommand*\DUrolemf[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}} +% Literal.Number.Hex +\providecommand*\DUrolemh[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}} +% Literal.Number.Integer +\providecommand*\DUrolemi[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}} +% Literal.Number.Oct +\providecommand*\DUrolemo[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}} +% Literal.String.Affix +\providecommand*\DUrolesa[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}} +% Literal.String.Backtick +\providecommand*\DUrolesb[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}} +% Literal.String.Char +\providecommand*\DUrolesc[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}} +% Literal.String.Delimiter +\providecommand*\DUroledl[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}} +% Literal.String.Doc +\providecommand*\DUrolesd[1]{\textcolor[rgb]{0.55,0.53,0.53}{#1}} +% Literal.String.Double +\expandafter\providecommand\csname DUroles2\endcsname[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}} +% Literal.String.Escape +\providecommand*\DUrolese[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}} +% Literal.String.Heredoc +\providecommand*\DUrolesh[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}} +% Literal.String.Interpol +\providecommand*\DUrolesi[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}} +% Literal.String.Other +\providecommand*\DUrolesx[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}} +% Literal.String.Regex +\providecommand*\DUrolesr[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}} +% Literal.String.Single +\expandafter\providecommand\csname DUroles1\endcsname[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}} +% Literal.String.Symbol +\providecommand*\DUroless[1]{\textcolor[rgb]{0.28,0.71,0.52}{#1}} +% Name.Builtin.Pseudo +\providecommand*\DUrolebp[1]{\textcolor[rgb]{0.18,0.12,0.18}{#1}} +% Name.Function.Magic +\providecommand*\DUrolefm[1]{\textcolor[rgb]{0.02,0.71,0.94}{#1}} +% Name.Variable.Class +\providecommand*\DUrolevc[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}} +% Name.Variable.Global +\providecommand*\DUrolevg[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}} +% Name.Variable.Instance +\providecommand*\DUrolevi[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}} +% Name.Variable.Magic +\providecommand*\DUrolevm[1]{\textcolor[rgb]{0.94,0.38,0.33}{#1}} +% Literal.Number.Integer.Long +\providecommand*\DUroleil[1]{\textcolor[rgb]{0.98,0.61,0.08}{#1}} diff --git a/common/classes/tex/DUpygments/DUpygments-default.sty b/common/classes/tex/DUpygments/DUpygments-default.sty new file mode 100644 index 0000000..cf0fa8e --- /dev/null +++ b/common/classes/tex/DUpygments/DUpygments-default.sty @@ -0,0 +1,130 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{DUpygments-default}[2017/04/16 Docutils Pygments] + +% Stylesheet for syntax highlight with Docutils +% Generated by makesty.py from a Pygments CSS style +% (output of `pygmentize -S <style> -f html`). + +\RequirePackage{color} +\providecommand*\DUrolehll[1]{\textcolor[rgb]{1.00,1.00,0.80}{#1}} +% Comment +\providecommand*\DUrolecomment[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}} +% Error +\definecolor{DUcolor0}{rgb}{1.00,0.00,0.00} +\providecommand*\DUroleerr[1]{\colorbox{DUcolor0}{#1}} +% Keyword +\providecommand*\DUrolekeyword[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}} +% Operator +\providecommand*\DUroleo[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}} +% Comment.Multiline +\providecommand*\DUrolecm[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}} +% Comment.Preproc +\providecommand*\DUrolecp[1]{\textcolor[rgb]{0.74,0.48,0.00}{#1}} +% Comment.Single +\expandafter\providecommand\csname DUrolec1\endcsname[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}} +% Comment.Special +\providecommand*\DUrolecs[1]{\textit{\textcolor[rgb]{0.25,0.50,0.50}{#1}}} +% Generic.Deleted +\providecommand*\DUrolegd[1]{\textcolor[rgb]{0.63,0.00,0.00}{#1}} +% Generic.Emph +\providecommand*\DUrolege[1]{\textit{#1}} +% Generic.Error +\providecommand*\DUrolegr[1]{\textcolor[rgb]{1.00,0.00,0.00}{#1}} +% Generic.Heading +\providecommand*\DUrolegh[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.50}{#1}}} +% Generic.Inserted +\providecommand*\DUrolegi[1]{\textcolor[rgb]{0.00,0.63,0.00}{#1}} +% Generic.Output +\providecommand*\DUrolego[1]{\textcolor[rgb]{0.50,0.50,0.50}{#1}} +% Generic.Prompt +\providecommand*\DUrolegp[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.50}{#1}}} +% Generic.Strong +\providecommand*\DUrolegs[1]{\textbf{#1}} +% Generic.Subheading +\providecommand*\DUrolegu[1]{\textbf{\textcolor[rgb]{0.50,0.00,0.50}{#1}}} +% Generic.Traceback +\providecommand*\DUrolegt[1]{\textcolor[rgb]{0.00,0.25,0.82}{#1}} +% Keyword.Constant +\providecommand*\DUrolekc[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}} +% Keyword.Declaration +\providecommand*\DUrolekd[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}} +% Keyword.Namespace +\providecommand*\DUrolekn[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}} +% Keyword.Pseudo +\providecommand*\DUrolekp[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}} +% Keyword.Reserved +\providecommand*\DUrolekr[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}} +% Keyword.Type +\providecommand*\DUrolekt[1]{\textcolor[rgb]{0.69,0.00,0.25}{#1}} +% Literal.Number +\providecommand*\DUrolenumber[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}} +% Literal.String +\providecommand*\DUrolestring[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}} +% Name.Attribute +\providecommand*\DUrolename[1]{\textcolor[rgb]{0.49,0.56,0.16}{#1}} +% Name.Builtin +\providecommand*\DUrolenb[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}} +% Name.Class +\providecommand*\DUrolenc[1]{\textbf{\textcolor[rgb]{0.00,0.00,1.00}{#1}}} +% Name.Constant +\providecommand*\DUroleno[1]{\textcolor[rgb]{0.53,0.00,0.00}{#1}} +% Name.Decorator +\providecommand*\DUrolend[1]{\textcolor[rgb]{0.67,0.13,1.00}{#1}} +% Name.Entity +\providecommand*\DUroleni[1]{\textbf{\textcolor[rgb]{0.60,0.60,0.60}{#1}}} +% Name.Exception +\providecommand*\DUrolene[1]{\textbf{\textcolor[rgb]{0.82,0.25,0.23}{#1}}} +% Name.Function +\providecommand*\DUrolenf[1]{\textcolor[rgb]{0.00,0.00,1.00}{#1}} +% Name.Label +\providecommand*\DUrolenl[1]{\textcolor[rgb]{0.63,0.63,0.00}{#1}} +% Name.Namespace +\providecommand*\DUrolenn[1]{\textbf{\textcolor[rgb]{0.00,0.00,1.00}{#1}}} +% Name.Tag +\providecommand*\DUrolent[1]{\textbf{\textcolor[rgb]{0.00,0.50,0.00}{#1}}} +% Name.Variable +\providecommand*\DUrolenv[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}} +% Operator.Word +\providecommand*\DUroleow[1]{\textbf{\textcolor[rgb]{0.67,0.13,1.00}{#1}}} +% Text.Whitespace +\providecommand*\DUrolew[1]{\textcolor[rgb]{0.73,0.73,0.73}{#1}} +% Literal.Number.Float +\providecommand*\DUrolemf[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}} +% Literal.Number.Hex +\providecommand*\DUrolemh[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}} +% Literal.Number.Integer +\providecommand*\DUrolemi[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}} +% Literal.Number.Oct +\providecommand*\DUrolemo[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}} +% Literal.String.Backtick +\providecommand*\DUrolesb[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}} +% Literal.String.Char +\providecommand*\DUrolesc[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}} +% Literal.String.Doc +\providecommand*\DUrolesd[1]{\textit{\textcolor[rgb]{0.73,0.13,0.13}{#1}}} +% Literal.String.Double +\expandafter\providecommand\csname DUroles2\endcsname[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}} +% Literal.String.Escape +\providecommand*\DUrolese[1]{\textbf{\textcolor[rgb]{0.73,0.40,0.13}{#1}}} +% Literal.String.Heredoc +\providecommand*\DUrolesh[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}} +% Literal.String.Interpol +\providecommand*\DUrolesi[1]{\textbf{\textcolor[rgb]{0.73,0.40,0.53}{#1}}} +% Literal.String.Other +\providecommand*\DUrolesx[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}} +% Literal.String.Regex +\providecommand*\DUrolesr[1]{\textcolor[rgb]{0.73,0.40,0.53}{#1}} +% Literal.String.Single +\expandafter\providecommand\csname DUroles1\endcsname[1]{\textcolor[rgb]{0.73,0.13,0.13}{#1}} +% Literal.String.Symbol +\providecommand*\DUroless[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}} +% Name.Builtin.Pseudo +\providecommand*\DUrolebp[1]{\textcolor[rgb]{0.00,0.50,0.00}{#1}} +% Name.Variable.Class +\providecommand*\DUrolevc[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}} +% Name.Variable.Global +\providecommand*\DUrolevg[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}} +% Name.Variable.Instance +\providecommand*\DUrolevi[1]{\textcolor[rgb]{0.10,0.09,0.49}{#1}} +% Literal.Number.Integer.Long +\providecommand*\DUroleil[1]{\textcolor[rgb]{0.40,0.40,0.40}{#1}} diff --git a/common/classes/tex/DUpygments/DUpygments-monokai.sty b/common/classes/tex/DUpygments/DUpygments-monokai.sty new file mode 100644 index 0000000..e95f4dc --- /dev/null +++ b/common/classes/tex/DUpygments/DUpygments-monokai.sty @@ -0,0 +1,143 @@ +% Stylesheet for syntax highlight with Docutils +% Generated by pygments_css2sty.py from a Pygments CSS style +% (output of `pygmentize -S <style> -f html`). + +\RequirePackage{color} +\providecommand*\DUroleln[1]{\textcolor[rgb]{1.00,1.00,1.00}{#1}} +\providecommand*\DUrolehll[1]{\textcolor[rgb]{0.29,0.28,0.24}{#1}} +% Comment +\providecommand*\DUrolec[1]{\textcolor[rgb]{0.46,0.44,0.37}{#1}} +% Error +\providecommand*\DUroleerr[1]{\textcolor[rgb]{0.59,0.00,0.31}{#1}} +% Keyword +\providecommand*\DUrolek[1]{\textcolor[rgb]{0.40,0.85,0.94}{#1}} +% Literal +\providecommand*\DUrolel[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}} +% Name +\providecommand*\DUrolen[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}} +% Operator +\providecommand*\DUroleo[1]{\textcolor[rgb]{0.98,0.15,0.45}{#1}} +% Punctuation +\providecommand*\DUrolep[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}} +% Comment.Hashbang +\providecommand*\DUrolech[1]{\textcolor[rgb]{0.46,0.44,0.37}{#1}} +% Comment.Multiline +\providecommand*\DUrolecm[1]{\textcolor[rgb]{0.46,0.44,0.37}{#1}} +% Comment.Preproc +\providecommand*\DUrolecp[1]{\textcolor[rgb]{0.46,0.44,0.37}{#1}} +% Comment.PreprocFile +\providecommand*\DUrolecpf[1]{\textcolor[rgb]{0.46,0.44,0.37}{#1}} +% Comment.Single +\expandafter\providecommand\csname DUrolec1\endcsname[1]{\textcolor[rgb]{0.46,0.44,0.37}{#1}} +% Comment.Special +\providecommand*\DUrolecs[1]{\textcolor[rgb]{0.46,0.44,0.37}{#1}} +% Generic.Deleted +\providecommand*\DUrolegd[1]{\textcolor[rgb]{0.98,0.15,0.45}{#1}} +% Generic.Emph +\providecommand*\DUrolege[1]{\textit{#1}} +% Generic.Inserted +\providecommand*\DUrolegi[1]{\textcolor[rgb]{0.65,0.89,0.18}{#1}} +% Generic.Strong +\providecommand*\DUrolegs[1]{\textbf{#1}} +% Generic.Subheading +\providecommand*\DUrolegu[1]{\textcolor[rgb]{0.46,0.44,0.37}{#1}} +% Keyword.Constant +\providecommand*\DUrolekc[1]{\textcolor[rgb]{0.40,0.85,0.94}{#1}} +% Keyword.Declaration +\providecommand*\DUrolekd[1]{\textcolor[rgb]{0.40,0.85,0.94}{#1}} +% Keyword.Namespace +\providecommand*\DUrolekn[1]{\textcolor[rgb]{0.98,0.15,0.45}{#1}} +% Keyword.Pseudo +\providecommand*\DUrolekp[1]{\textcolor[rgb]{0.40,0.85,0.94}{#1}} +% Keyword.Reserved +\providecommand*\DUrolekr[1]{\textcolor[rgb]{0.40,0.85,0.94}{#1}} +% Keyword.Type +\providecommand*\DUrolekt[1]{\textcolor[rgb]{0.40,0.85,0.94}{#1}} +% Literal.Date +\providecommand*\DUroleld[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}} +% Literal.Number +\providecommand*\DUrolem[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}} +% Literal.String +\providecommand*\DUroles[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}} +% Name.Attribute +\providecommand*\DUrolena[1]{\textcolor[rgb]{0.65,0.89,0.18}{#1}} +% Name.Builtin +\providecommand*\DUrolenb[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}} +% Name.Class +\providecommand*\DUrolenc[1]{\textcolor[rgb]{0.65,0.89,0.18}{#1}} +% Name.Constant +\providecommand*\DUroleno[1]{\textcolor[rgb]{0.40,0.85,0.94}{#1}} +% Name.Decorator +\providecommand*\DUrolend[1]{\textcolor[rgb]{0.65,0.89,0.18}{#1}} +% Name.Entity +\providecommand*\DUroleni[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}} +% Name.Exception +\providecommand*\DUrolene[1]{\textcolor[rgb]{0.65,0.89,0.18}{#1}} +% Name.Function +\providecommand*\DUrolenf[1]{\textcolor[rgb]{0.65,0.89,0.18}{#1}} +% Name.Label +\providecommand*\DUrolenl[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}} +% Name.Namespace +\providecommand*\DUrolenn[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}} +% Name.Other +\providecommand*\DUrolenx[1]{\textcolor[rgb]{0.65,0.89,0.18}{#1}} +% Name.Property +\providecommand*\DUrolepy[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}} +% Name.Tag +\providecommand*\DUrolent[1]{\textcolor[rgb]{0.98,0.15,0.45}{#1}} +% Name.Variable +\providecommand*\DUrolenv[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}} +% Operator.Word +\providecommand*\DUroleow[1]{\textcolor[rgb]{0.98,0.15,0.45}{#1}} +% Text.Whitespace +\providecommand*\DUrolew[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}} +% Literal.Number.Bin +\providecommand*\DUrolemb[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}} +% Literal.Number.Float +\providecommand*\DUrolemf[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}} +% Literal.Number.Hex +\providecommand*\DUrolemh[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}} +% Literal.Number.Integer +\providecommand*\DUrolemi[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}} +% Literal.Number.Oct +\providecommand*\DUrolemo[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}} +% Literal.String.Affix +\providecommand*\DUrolesa[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}} +% Literal.String.Backtick +\providecommand*\DUrolesb[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}} +% Literal.String.Char +\providecommand*\DUrolesc[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}} +% Literal.String.Delimiter +\providecommand*\DUroledl[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}} +% Literal.String.Doc +\providecommand*\DUrolesd[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}} +% Literal.String.Double +\expandafter\providecommand\csname DUroles2\endcsname[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}} +% Literal.String.Escape +\providecommand*\DUrolese[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}} +% Literal.String.Heredoc +\providecommand*\DUrolesh[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}} +% Literal.String.Interpol +\providecommand*\DUrolesi[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}} +% Literal.String.Other +\providecommand*\DUrolesx[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}} +% Literal.String.Regex +\providecommand*\DUrolesr[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}} +% Literal.String.Single +\expandafter\providecommand\csname DUroles1\endcsname[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}} +% Literal.String.Symbol +\providecommand*\DUroless[1]{\textcolor[rgb]{0.90,0.86,0.45}{#1}} +% Name.Builtin.Pseudo +\providecommand*\DUrolebp[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}} +% Name.Function.Magic +\providecommand*\DUrolefm[1]{\textcolor[rgb]{0.65,0.89,0.18}{#1}} +% Name.Variable.Class +\providecommand*\DUrolevc[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}} +% Name.Variable.Global +\providecommand*\DUrolevg[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}} +% Name.Variable.Instance +\providecommand*\DUrolevi[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}} +% Name.Variable.Magic +\providecommand*\DUrolevm[1]{\textcolor[rgb]{0.97,0.97,0.95}{#1}} +% Literal.Number.Integer.Long +\providecommand*\DUroleil[1]{\textcolor[rgb]{0.68,0.51,1.00}{#1}} diff --git a/common/classes/tex/DUpygments/DUpygments-tango.sty b/common/classes/tex/DUpygments/DUpygments-tango.sty new file mode 100644 index 0000000..e5a8fd6 --- /dev/null +++ b/common/classes/tex/DUpygments/DUpygments-tango.sty @@ -0,0 +1,157 @@ +% Stylesheet for syntax highlight with Docutils +% Generated by pygments_css2sty.py from a Pygments CSS style +% (output of `pygmentize -S <style> -f html`). + +\RequirePackage{color} +\providecommand*\DUrolehll[1]{\textcolor[rgb]{1.00,1.00,0.80}{#1}} +% Comment +\providecommand*\DUrolec[1]{\textit{\textcolor[rgb]{0.56,0.35,0.01}{#1}}} +% Error +\definecolor{DUcolor0}{rgb}{0.64,0.00,0.00} +\providecommand*\DUroleerr[1]{\colorbox{DUcolor0}{\textcolor[rgb]{0.64,0.00,0.00}{#1}}} +% Generic +\providecommand*\DUroleg[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Keyword +\providecommand*\DUrolek[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}} +% Literal +\providecommand*\DUrolel[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Name +\providecommand*\DUrolen[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Operator +\providecommand*\DUroleo[1]{\textbf{\textcolor[rgb]{0.81,0.36,0.00}{#1}}} +% Other +\providecommand*\DUrolex[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Punctuation +\providecommand*\DUrolep[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.00}{#1}}} +% Comment.Hashbang +\providecommand*\DUrolech[1]{\textit{\textcolor[rgb]{0.56,0.35,0.01}{#1}}} +% Comment.Multiline +\providecommand*\DUrolecm[1]{\textit{\textcolor[rgb]{0.56,0.35,0.01}{#1}}} +% Comment.Preproc +\providecommand*\DUrolecp[1]{\textit{\textcolor[rgb]{0.56,0.35,0.01}{#1}}} +% Comment.PreprocFile +\providecommand*\DUrolecpf[1]{\textit{\textcolor[rgb]{0.56,0.35,0.01}{#1}}} +% Comment.Single +\expandafter\providecommand\csname DUrolec1\endcsname[1]{\textit{\textcolor[rgb]{0.56,0.35,0.01}{#1}}} +% Comment.Special +\providecommand*\DUrolecs[1]{\textit{\textcolor[rgb]{0.56,0.35,0.01}{#1}}} +% Generic.Deleted +\providecommand*\DUrolegd[1]{\textcolor[rgb]{0.64,0.00,0.00}{#1}} +% Generic.Emph +\providecommand*\DUrolege[1]{\textit{\textcolor[rgb]{0.00,0.00,0.00}{#1}}} +% Generic.Error +\providecommand*\DUrolegr[1]{\textcolor[rgb]{0.94,0.16,0.16}{#1}} +% Generic.Heading +\providecommand*\DUrolegh[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.50}{#1}}} +% Generic.Inserted +\providecommand*\DUrolegi[1]{\textcolor[rgb]{0.00,0.63,0.00}{#1}} +% Generic.Output +\providecommand*\DUrolego[1]{\textit{\textcolor[rgb]{0.00,0.00,0.00}{#1}}} +% Generic.Prompt +\providecommand*\DUrolegp[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}} +% Generic.Strong +\providecommand*\DUrolegs[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.00}{#1}}} +% Generic.Subheading +\providecommand*\DUrolegu[1]{\textbf{\textcolor[rgb]{0.50,0.00,0.50}{#1}}} +% Generic.Traceback +\providecommand*\DUrolegt[1]{\textbf{\textcolor[rgb]{0.64,0.00,0.00}{#1}}} +% Keyword.Constant +\providecommand*\DUrolekc[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}} +% Keyword.Declaration +\providecommand*\DUrolekd[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}} +% Keyword.Namespace +\providecommand*\DUrolekn[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}} +% Keyword.Pseudo +\providecommand*\DUrolekp[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}} +% Keyword.Reserved +\providecommand*\DUrolekr[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}} +% Keyword.Type +\providecommand*\DUrolekt[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}} +% Literal.Date +\providecommand*\DUroleld[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Literal.Number +\providecommand*\DUrolem[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.81}{#1}}} +% Literal.String +\providecommand*\DUroles[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} +% Name.Attribute +\providecommand*\DUrolena[1]{\textcolor[rgb]{0.77,0.63,0.00}{#1}} +% Name.Builtin +\providecommand*\DUrolenb[1]{\textcolor[rgb]{0.13,0.29,0.53}{#1}} +% Name.Class +\providecommand*\DUrolenc[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Name.Constant +\providecommand*\DUroleno[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Name.Decorator +\providecommand*\DUrolend[1]{\textbf{\textcolor[rgb]{0.36,0.21,0.80}{#1}}} +% Name.Entity +\providecommand*\DUroleni[1]{\textcolor[rgb]{0.81,0.36,0.00}{#1}} +% Name.Exception +\providecommand*\DUrolene[1]{\textbf{\textcolor[rgb]{0.80,0.00,0.00}{#1}}} +% Name.Function +\providecommand*\DUrolenf[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Name.Label +\providecommand*\DUrolenl[1]{\textcolor[rgb]{0.96,0.47,0.00}{#1}} +% Name.Namespace +\providecommand*\DUrolenn[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Name.Other +\providecommand*\DUrolenx[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Name.Property +\providecommand*\DUrolepy[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Name.Tag +\providecommand*\DUrolent[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}} +% Name.Variable +\providecommand*\DUrolenv[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Operator.Word +\providecommand*\DUroleow[1]{\textbf{\textcolor[rgb]{0.13,0.29,0.53}{#1}}} +% Text.Whitespace +\providecommand*\DUrolew[1]{\textcolor[rgb]{0.97,0.97,0.97}{#1}} +% Literal.Number.Bin +\providecommand*\DUrolemb[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.81}{#1}}} +% Literal.Number.Float +\providecommand*\DUrolemf[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.81}{#1}}} +% Literal.Number.Hex +\providecommand*\DUrolemh[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.81}{#1}}} +% Literal.Number.Integer +\providecommand*\DUrolemi[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.81}{#1}}} +% Literal.Number.Oct +\providecommand*\DUrolemo[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.81}{#1}}} +% Literal.String.Affix +\providecommand*\DUrolesa[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} +% Literal.String.Backtick +\providecommand*\DUrolesb[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} +% Literal.String.Char +\providecommand*\DUrolesc[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} +% Literal.String.Delimiter +\providecommand*\DUroledl[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} +% Literal.String.Doc +\providecommand*\DUrolesd[1]{\textit{\textcolor[rgb]{0.56,0.35,0.01}{#1}}} +% Literal.String.Double +\expandafter\providecommand\csname DUroles2\endcsname[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} +% Literal.String.Escape +\providecommand*\DUrolese[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} +% Literal.String.Heredoc +\providecommand*\DUrolesh[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} +% Literal.String.Interpol +\providecommand*\DUrolesi[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} +% Literal.String.Other +\providecommand*\DUrolesx[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} +% Literal.String.Regex +\providecommand*\DUrolesr[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} +% Literal.String.Single +\expandafter\providecommand\csname DUroles1\endcsname[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} +% Literal.String.Symbol +\providecommand*\DUroless[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}} +% Name.Builtin.Pseudo +\providecommand*\DUrolebp[1]{\textcolor[rgb]{0.20,0.40,0.64}{#1}} +% Name.Function.Magic +\providecommand*\DUrolefm[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Name.Variable.Class +\providecommand*\DUrolevc[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Name.Variable.Global +\providecommand*\DUrolevg[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Name.Variable.Instance +\providecommand*\DUrolevi[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Name.Variable.Magic +\providecommand*\DUrolevm[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}} +% Literal.Number.Integer.Long +\providecommand*\DUroleil[1]{\textbf{\textcolor[rgb]{0.00,0.00,0.81}{#1}}} diff --git a/common/classes/tex/DUpygments/pygments_css2sty.py b/common/classes/tex/DUpygments/pygments_css2sty.py new file mode 100644 index 0000000..185050b --- /dev/null +++ b/common/classes/tex/DUpygments/pygments_css2sty.py @@ -0,0 +1,66 @@ +#! /usr/bin/env python +# coding: utf8 +# Copyright: Raphael 'kena' Poss <r.c.poss@uva.nl> +# this file is placed in the public domain. +# +# Convert a CSS stylesheet into one for Docutils' LaTeX output. +# +# Usage example:: +# +# pygmentize -S default -f html | pygments_css2sty.py >pygments-default.sty +# +# Versions: +# +# 2012-05-09: Günter Milde <milde@users.sf.net>: +# Bugfix: do not fail at lines without comment. +# Support for digits in role names. +# ``\providecommand`` instead of ``\newcommand``. +# Renamed from makesty.py to pygments_css2sty.py. +# 2013-03-27: Günter Milde: +# Implement bugfix from Juan Luis Cano Rodríguez for csnames. + +import sys +import re + +print '% Stylesheet for syntax highlight with Docutils' +print '% Generated by pygments_css2sty.py from a Pygments CSS style' +print '% (output of `pygmentize -S <style> -f html`).' +print +print r'\RequirePackage{color}' + +cnt = 0 +for l in sys.stdin: + + if '/*' in l: + print "% " + l.split('*')[1] + key = l.split(' ', 1)[0][1:] + + s = '#1' + + if 'color:' in l: + col = l.split('#',1)[1][:6] + r = float(int(col[0:2], 16)) / 255. + g = float(int(col[2:4], 16)) / 255. + b = float(int(col[4:6], 16)) / 255. + s = r'\textcolor[rgb]{%.2f,%.2f,%.2f}{%s}' % (r, g, b, s) + + if 'font-style: italic' in l: + s = r'\textit{%s}' % s + if 'font-weight: bold' in l: + s = r'\textbf{%s}' % s + + if 'border:' in l: + col = l.split('#',1)[1][:6] + r = float(int(col[0:2], 16)) / 255. + g = float(int(col[2:4], 16)) / 255. + b = float(int(col[4:6], 16)) / 255. + cname = 'DUcolor%d' % cnt + cnt += 1 + print r'\definecolor{%s}{rgb}{%.2f,%.2f,%.2f}' % (cname, r, g, b) + s = r'\colorbox{%s}{%s}' % (cname, s) + + if re.match(r'.*[0-9]', key) is None: + print(r'\providecommand*\DUrole%s[1]{%s}' % (key, s)) + else: + print(r'\expandafter\providecommand\csname DUrole%s\endcsname[1]{%s}' + % (key, s)) diff --git a/common/classes/tex/DUsidebar/DUsidebar.sty b/common/classes/tex/DUsidebar/DUsidebar.sty new file mode 100644 index 0000000..d4e709e --- /dev/null +++ b/common/classes/tex/DUsidebar/DUsidebar.sty @@ -0,0 +1,58 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{DUsidebar}[2017/04/16 Docutils sidebar] + +\RequirePackage{kvoptions} +\RequirePackage{mdframed} +\RequirePackage{ifthen} +\RequirePackage{makeidx} + +% Option for the color line ( +\DeclareStringOption {linecolor}[blue] +\ProcessKeyvalOptions* + +% Défini une note de marge entourée d'un petit cadre +% + +\ifthenelse{\equal{\DUsidebar@linecolor}{}}{% + % Node bar colored defined, juste put the note in the margin + \newcommand{\DUsidebar}[1]{\marginpar{\small#1}}% +}{% + \newcommand{\DUsidebar}[1]{% + \marginpar[{\begin{mdframed}[topline=false,% + bottomline=false,% + leftline=false,% + linecolor=\DUsidebar@linecolor,% + innerrightmargin=2pt,% + linewidth=.4pt]% + {\small#1}% + \end{mdframed}% + }]{\begin{mdframed}[topline=false,% + bottomline=false,% + rightline=false,% + linecolor=\DUsidebar@linecolor,% + innerleftmargin=2pt,% + linewidth=.4pt]% + {\small#1}% + \end{mdframed}% + }% + }% +}% + + +% +% Permet de créer une note en utilisant le rôle « note » +% +% .. role:: note +% +% :note:`Ceci est un test` +\newcommand{\DUrolenote}[1]{\marginpar{#1}} + + + +% +% Permet de référencer un élément dans la marge en utilisant le rôle « index » +% +% .. role:: index +% +% :index:`Terme` +\newcommand{\DUroleindex}[1]{\index{#1}\marginpar{\texttt{#1}}} diff --git a/common/classes/tex/DUsmallcaps/DUsmallcaps.sty b/common/classes/tex/DUsmallcaps/DUsmallcaps.sty new file mode 100644 index 0000000..2b11be8 --- /dev/null +++ b/common/classes/tex/DUsmallcaps/DUsmallcaps.sty @@ -0,0 +1,4 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{DUsmallcaps}[2017/04/16 Docutils smallcaps role] + +\newcommand{\DUrolesmallcaps}[1]{\textsc{\MakeLowercase{#1}}} |