-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #264 from SecondSkoll/main
Adds default configuration for PDF generation
- Loading branch information
Showing
19 changed files
with
311 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
------------------------------- | ||
UBUNTU FONT LICENCE Version 1.0 | ||
------------------------------- | ||
|
||
PREAMBLE | ||
This licence allows the licensed fonts to be used, studied, modified and | ||
redistributed freely. The fonts, including any derivative works, can be | ||
bundled, embedded, and redistributed provided the terms of this licence | ||
are met. The fonts and derivatives, however, cannot be released under | ||
any other licence. The requirement for fonts to remain under this | ||
licence does not require any document created using the fonts or their | ||
derivatives to be published under this licence, as long as the primary | ||
purpose of the document is not to be a vehicle for the distribution of | ||
the fonts. | ||
|
||
DEFINITIONS | ||
"Font Software" refers to the set of files released by the Copyright | ||
Holder(s) under this licence and clearly marked as such. This may | ||
include source files, build scripts and documentation. | ||
|
||
"Original Version" refers to the collection of Font Software components | ||
as received under this licence. | ||
|
||
"Modified Version" refers to any derivative made by adding to, deleting, | ||
or substituting -- in part or in whole -- any of the components of the | ||
Original Version, by changing formats or by porting the Font Software to | ||
a new environment. | ||
|
||
"Copyright Holder(s)" refers to all individuals and companies who have a | ||
copyright ownership of the Font Software. | ||
|
||
"Substantially Changed" refers to Modified Versions which can be easily | ||
identified as dissimilar to the Font Software by users of the Font | ||
Software comparing the Original Version with the Modified Version. | ||
|
||
To "Propagate" a work means to do anything with it that, without | ||
permission, would make you directly or secondarily liable for | ||
infringement under applicable copyright law, except executing it on a | ||
computer or modifying a private copy. Propagation includes copying, | ||
distribution (with or without modification and with or without charging | ||
a redistribution fee), making available to the public, and in some | ||
countries other activities as well. | ||
|
||
PERMISSION & CONDITIONS | ||
This licence does not grant any rights under trademark law and all such | ||
rights are reserved. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a | ||
copy of the Font Software, to propagate the Font Software, subject to | ||
the below conditions: | ||
|
||
1) Each copy of the Font Software must contain the above copyright | ||
notice and this licence. These can be included either as stand-alone | ||
text files, human-readable headers or in the appropriate machine- | ||
readable metadata fields within text or binary files as long as those | ||
fields can be easily viewed by the user. | ||
|
||
2) The font name complies with the following: | ||
(a) The Original Version must retain its name, unmodified. | ||
(b) Modified Versions which are Substantially Changed must be renamed to | ||
avoid use of the name of the Original Version or similar names entirely. | ||
(c) Modified Versions which are not Substantially Changed must be | ||
renamed to both (i) retain the name of the Original Version and (ii) add | ||
additional naming elements to distinguish the Modified Version from the | ||
Original Version. The name of such Modified Versions must be the name of | ||
the Original Version, with "derivative X" where X represents the name of | ||
the new work, appended to that name. | ||
|
||
3) The name(s) of the Copyright Holder(s) and any contributor to the | ||
Font Software shall not be used to promote, endorse or advertise any | ||
Modified Version, except (i) as required by this licence, (ii) to | ||
acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with | ||
their explicit written permission. | ||
|
||
4) The Font Software, modified or unmodified, in part or in whole, must | ||
be distributed entirely under this licence, and must not be distributed | ||
under any other licence. The requirement for fonts to remain under this | ||
licence does not affect any document created using the Font Software, | ||
except any version of the Font Software extracted from a document | ||
created using the Font Software may only be distributed under this | ||
licence. | ||
|
||
TERMINATION | ||
This licence becomes null and void if any of the above conditions are | ||
not met. | ||
|
||
DISCLAIMER | ||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF | ||
COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE | ||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL | ||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER | ||
DEALINGS IN THE FONT SOFTWARE. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
{ | ||
'papersize': 'a4paper', | ||
'pointsize': '11pt', | ||
'fncychap': '', | ||
'preamble': r''' | ||
%\usepackage{charter} | ||
%\usepackage[defaultsans]{lato} | ||
%\usepackage{inconsolata} | ||
\setmainfont[UprightFont = *-R, BoldFont = *-B, ItalicFont=*-RI, Extension = .ttf]{Ubuntu} | ||
\setmonofont[UprightFont = *-R, BoldFont = *-B, ItalicFont=*-RI, Extension = .ttf]{UbuntuMono} | ||
\usepackage[most]{tcolorbox} | ||
\tcbuselibrary{breakable} | ||
\usepackage{lastpage} | ||
\usepackage{tabto} | ||
\usepackage{ifthen} | ||
\usepackage{etoolbox} | ||
\usepackage{fancyhdr} | ||
\usepackage{graphicx} | ||
\usepackage{titlesec} | ||
\usepackage{fontspec} | ||
\usepackage{tikz} | ||
\usepackage{changepage} | ||
\usepackage{array} | ||
\usepackage{tabularx} | ||
\definecolor{yellowgreen}{RGB}{154, 205, 50} | ||
\definecolor{title}{RGB}{76, 17, 48} | ||
\definecolor{subtitle}{RGB}{116, 27, 71} | ||
\definecolor{label}{RGB}{119, 41, 100} | ||
\definecolor{copyright}{RGB}{174, 167, 159} | ||
\makeatletter | ||
\def\tcb@finalize@environment{% | ||
\color{.}% hack for xelatex | ||
\tcb@layer@dec% | ||
} | ||
\makeatother | ||
\newenvironment{sphinxclassprompt}{\color{yellowgreen}\setmonofont[Color = 9ACD32, UprightFont = *-R, Extension = .ttf]{UbuntuMono}}{} | ||
\tcbset{enhanced jigsaw, colback=black, fontupper=\color{white}} | ||
\newtcolorbox{termbox}{use color stack, breakable, colupper=white, halign=flush left} | ||
\newenvironment{sphinxclassterminal}{\setmonofont[Color = white, UprightFont = *-R, Extension = .ttf]{UbuntuMono}\sphinxsetup{VerbatimColor={black}}\begin{termbox}}{\end{termbox}} | ||
\newcommand{\dimtorightedge}{% | ||
\dimexpr\paperwidth-1in-\hoffset-\oddsidemargin\relax} | ||
\newcommand{\dimtotop}{% | ||
\dimexpr\height-1in-\voffset-\topmargin-\headheight-\headsep\relax} | ||
\newtoggle{tpage} | ||
\AtBeginEnvironment{titlepage}{\global\toggletrue{tpage}} | ||
\fancypagestyle{plain}{ | ||
\fancyhf{} | ||
\fancyfoot[R]{\thepage\ of \pageref*{LastPage}} | ||
\renewcommand{\headrulewidth}{0pt} | ||
\renewcommand{\footrulewidth}{0pt} | ||
} | ||
\fancypagestyle{normal}{ | ||
\fancyhf{} | ||
\fancyfoot[R]{\thepage\ of \pageref*{LastPage}} | ||
\renewcommand{\headrulewidth}{0pt} | ||
\renewcommand{\footrulewidth}{0pt} | ||
} | ||
\fancypagestyle{titlepage}{% | ||
\fancyhf{} | ||
\fancyfoot[L]{\footnotesize \textcolor{copyright}{© 2024 Canonical Ltd. All rights reserved.}} | ||
} | ||
\newcommand\sphinxbackoftitlepage{\thispagestyle{titlepage}} | ||
\titleformat{\chapter}[block]{\Huge \color{title} \bfseries\filright}{\thechapter .}{1.5ex}{} | ||
\titlespacing{\chapter}{0pt}{0pt}{0pt} | ||
\titleformat{\section}[block]{\huge \bfseries\filright}{\thesection .}{1.5ex}{} | ||
\titlespacing{\section}{0pt}{0pt}{0pt} | ||
\titleformat{\subsection}[block]{\Large \bfseries\filright}{\thesubsection .}{1.5ex}{} | ||
\titlespacing{\subsection}{0pt}{0pt}{0pt} | ||
\setcounter{tocdepth}{1} | ||
\renewcommand\pagenumbering[1]{} | ||
''', | ||
'sphinxsetup': 'verbatimwithframe=false, pre_border-radius=0pt, verbatimvisiblespace=\\phantom{}, verbatimcontinued=\\phantom{}', | ||
'extraclassoptions': 'openany,oneside', | ||
'maketitle': r''' | ||
\begin{titlepage} | ||
\begin{flushleft} | ||
\begin{tikzpicture}[remember picture,overlay] | ||
\node[anchor=south east, inner sep=0] at (current page.south east) { | ||
\includegraphics[width=\paperwidth, height=\paperheight]{front-page-light} | ||
}; | ||
\end{tikzpicture} | ||
\end{flushleft} | ||
|
||
\vspace*{3cm} | ||
|
||
\begin{adjustwidth}{8cm}{0pt} | ||
\begin{flushleft} | ||
\huge \textcolor{black}{\textbf{}{\raggedright{$PROJECT}}} | ||
\end{flushleft} | ||
\end{adjustwidth} | ||
|
||
\vfill | ||
|
||
\begin{adjustwidth}{8cm}{0pt} | ||
\begin{tabularx}{0.5\textwidth}{ l l } | ||
\textcolor{lightgray}{© 2024 Canonical Ltd.} & \hspace{3cm} \\ | ||
\textcolor{lightgray}{All rights reserved.} & \hspace{3cm} \\ | ||
& \hspace{3cm} \\ | ||
& \hspace{3cm} \\ | ||
|
||
\end{tabularx} | ||
\end{adjustwidth} | ||
|
||
\end{titlepage} | ||
\RemoveFromHook{shipout/background} | ||
\AddToHook{shipout/background}{ | ||
\begin{tikzpicture}[remember picture,overlay] | ||
\node[anchor=south west, align=left, inner sep=0] at (current page.south west) { | ||
\includegraphics[width=\paperwidth]{normal-page-footer} | ||
}; | ||
\end{tikzpicture} | ||
\begin{tikzpicture}[remember picture,overlay] | ||
\node[anchor=north east, opacity=0.5, inner sep=35] at (current page.north east) { | ||
\includegraphics[width=4cm]{Canonical-logo-4x} | ||
}; | ||
\end{tikzpicture} | ||
} | ||
''', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -222,4 +222,6 @@ | |
rst_prolog = ''' | ||
.. role:: center | ||
:class: align-center | ||
.. role:: h2 | ||
:class: hclass2 | ||
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters