Commit b69ad7cc authored by Marthym's avatar Marthym

feat(build): Migrate to gitlab-ci build

parent 557be233
Pipeline #14135 passed with stage
in 33 seconds
image: marthym/latex:1.0.0
variables:
GIT_SUBMODULE_STRATEGY: recursive
swr-SNAPSHOT:
stage: build
cache:
paths:
- build
script:
- latexmk -f -r swr-class/latexmkrc || true
- mv "build/swr-livre-joueur.pdf" "build/SW-Redemption, Livre du joueur.pdf"
- mv "img/swr-fiche-perso.pdf" "build/swr-fiche-perso.pdf"
artifacts:
expire_in: 1 day
paths:
- "build/SW-Redemption, Livre du joueur.pdf"
- "build/swr-fiche-perso.pdf"
allow_failure: true
swr-RELEASE:
stage: deploy
script:
- cp "build/SW-Redemption, Livre du joueur.pdf" "SW-Redemption, Livre du joueur-${CI_COMMIT_TAG}.pdf"
- cp "img/swr-fiche-perso.pdf" "swr-fiche-perso-${CI_COMMIT_TAG}.pdf"
only:
- tags
artifacts:
name: "SW-Redemption, Livre du joueur v$CI_COMMIT_TAG"
paths:
- "SW-Redemption, Livre du joueur-${CI_COMMIT_TAG}.pdf"
- "swr-fiche-perso-${CI_COMMIT_TAG}.pdf"
[submodule "swr-class"]
path = swr-class
url = https://marthym@framagit.org/sw-redemption/latex-swr-class.git
dist: trusty
sudo: false
git:
submodules: false
before_install:
- git submodule update --init --remote --recursive
addons:
apt:
packages:
......@@ -22,7 +29,7 @@ addons:
- ghostscript
script:
- latexmk || true
- latexmk -f -r swr-class/latexmkrc || true
- gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dNOPAUSE -dQUIET -dBATCH -dPDFSETTINGS=/ebook -sOutputFile="build/SW-Redemption, Livre du joueur.pdf" build/swr-livre-joueur.pdf
before_deploy:
......
......@@ -11,6 +11,6 @@
\vfill
\noindent\makebox[\textwidth]{\includegraphics[width=\paperwidth]{img/preambule/cover-bg.png}}
\noindent\makebox[\textwidth]{\includegraphics[width=\paperwidth]{swr-class/_img/cover-bg.png}}
\end{titlepage}
This Font Software is licensed under the SIL Open Font License,
Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to
provide a free and open framework in which fonts may be shared and
improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply to
any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software
components as distributed by the Copyright Holder(s).
"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.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed,
modify, redistribute, and sell modified and unmodified copies of the
Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in
Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. 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.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created using
the Font Software.
TERMINATION
This license 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.
%This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
%To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter
% to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{jdrp}[2016/12/28 JdR Manuel Class]
\LoadClass[10pt,twoside,twocolumn]{article}
\ProcessOptions\relax
\RequirePackage[french]{babel} % French language
\RequirePackage[margin=1.5cm]{geometry} % Page margin
\RequirePackage[export]{adjustbox}
\RequirePackage[bottom]{footmisc} % Note de bas de page en bas plutôt que juste après le texte
\RequirePackage{enumitem}
\RequirePackage{lettrine}
\RequirePackage[table]{xcolor}
\RequirePackage[most]{tcolorbox}
\RequirePackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue, % Couleur des liens internes
citecolor=red, % Couleur des numéros de la biblio dans le corps
urlcolor=blue } % Couleur des url
\setcounter{DefaultLines}{3}
\setlength{\DefaultNindent}{0em}
\RequirePackage{wrapfig}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Biblio management
\RequirePackage[style=verbose,sorting=none]{biblatex}
\setlength\bibitemsep{1.5\itemsep}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Backgrounding
\RequirePackage{eso-pic}
\newcommand\AtTextUpperRight[1]{\AtTextUpperLeft{%
\makebox[\textwidth][r]{#1}}}
\AddToShipoutPictureBG{%
\ifnum\value{page}>1
\AtPageLowerLeft{\includegraphics[width=\paperwidth,height=\paperheight]{img/bg-a4-odd.jpg}}
\fi
}
\AddToShipoutPicture{
\ifthenelse{\isodd{\thepage}}
{\AtTextUpperLeft{\hspace{1.5\baselineskip}\hspace{\textwidth}\rotatebox{-90}{\scalebox{1.5}{\aurebesh\textcolor{uppergold}{\leftmark}}}}}
{\AtTextUpperLeft{\hspace{-2\baselineskip}\rotatebox{-90}{\scalebox{1.5}{\aurebesh\textcolor{uppergold}{\leftmark}}}}}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fonts
\RequirePackage[quiet]{fontspec}
\RequirePackage{xunicode}
\setmainfont[Path=font/noto-sans/,
Extension=.ttf,
UprightFont= *-Regular,
SmallCapsFont=*-Regular,
BoldFont=*-Bold,
ItalicFont=*-Italic,
BoldItalicFont=*-BoldItalic
]{NotoSans}
\newfontfamily{\jedifont}[Path=font/,Extension=.ttf,Ligatures=TeX]{Starjedi}
\newfontfamily\aurebesh[
Path=font/,
Extension=.otf
]{Aurebesh}
% Lettrine
\renewcommand{\LettrineFontHook}{\jedifont}
\renewcommand{\LettrineTextFont}{\upshape} % Remove samll-caps, Noto doesn't support
\renewcommand{\DefaultNindent}{5pt}
\DeclareFieldFormat{citetitle}{\textit{#1}}
\DeclareFieldFormat{citeauthor}{#1}
\DeclareFieldFormat{citefield}{#1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Columns setup
\setlength{\columnsep}{1cm}
\raggedbottom % Align multi columns to the top of the page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Define colors
\RequirePackage{color}
\definecolor{bgtan}{HTML}{F7F2E5} % e.g. used for background and quotebox
\definecolor{titlered}{HTML}{58180D} % e.g. used for titles
\definecolor{undergold}{HTML}{C9AD6A} % e.g. used for titlerules
\definecolor{uppergold}{HTML}{B89A67} %e.g. used for pagenumbers and footer
%\definecolor{puregold}{HTML}{E69A28} %e.g. used for top line in newer monsterbox
%\definecolor{monstertan}{HTML}{FDF1DC} %e.g. used for newer monsterblock
\definecolor{monstertandark}{HTML}{F0DBB5} %e.g. used for older monsterbox
\definecolor{commentgreen}{HTML}{E0E5C1} % e.g. used in table and green commentbox
\definecolor{itemtablepink}{HTML}{E9CDC2} % e.g. used in item tables instead of the green
%\definecolor{rulered}{HTML}{9C2B1B} %e.g. used for triangular rule in statsblock
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Footer - Must be before sectioning ...
\RequirePackage{fancyhdr} % Adaptation of the footers
\thispagestyle{empty}
\pagestyle{fancy}
\footskip = 20pt %push the footer down so it fits with the decal from the bg-img
\fancyhfoffset[LE]{28pt} % push the footer left on even pages so it fits the decal
\fancyhfoffset[RO]{30pt} % push the footer right on odd pages so it fits the decalbg-img
\renewcommand{\headrulewidth}{0.0pt} %no rule for header
\renewcommand{\footrulewidth}{0.0pt} %no rule for footer
\fancyhead{} % clear all header fields
\fancyfoot{} % clear all footer fields
\fancyfoot[LE]{
\textcolor{uppergold}{\thepage}
\hspace*{0.2cm}
\raisebox{-10pt}{\textcolor{uppergold}{\nouppercase\leftmark}}
}
\fancyfoot[RO]{
\raisebox{-10pt}{\textcolor{uppergold}{\nouppercase\rightmark}}
\hspace*{1cm}
\textcolor{uppergold}{\thepage}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Sectioning
\RequirePackage{titlesec}
\renewcommand\thesection{}
\renewcommand\thesubsection{}
\renewcommand\thesubsubsection{}
% Adjust section and subsection colors and font (change 0em to 1em if you commented the removal of section numbering)
\titleformat{\section}
{\color{titlered}\jedifont\Huge\raggedright}{\thesection}{0em}{}
\titleformat{\subsection}
{\color{titlered}\Large\raggedright}{\thesubsection}{0em}{}[{\titleline{\color{undergold}\titlerule[1pt]}}]
\titleformat{\subsubsection}
{\color{titlered}\large\raggedright}{\thesubsubsection}{0em}{}[]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Styling new commands
\RequirePackage{tcolorbox}
\newtcolorbox{commentbox}[2][]{
frame hidden,
boxrule=0pt,
breakable,
enhanced,
before skip=8pt plus 1pt,
toptitle=3mm,
boxsep=0.25ex,
left=8pt,
right=8pt,
arc=0mm,
fonttitle=\bfseries\color{black},
title=#2,
parbox = false,
colback=commentgreen,
colframe=commentgreen,
colbacktitle=commentgreen,
after={\vspace{5pt plus 1pt}\noindent},
#1
}
\newlist{rebelist}{itemize}{1}
\setlist[rebelist]{label=\jedifont{\$}}
\RequirePackage{tabularx}
\newenvironment{itemtable}[1][XX]{
\par\vspace*{8pt}
\noindent
\rowcolors{1}{bgtan}{itemtablepink} % Alternate colors
\tabularx{\linewidth}{#1}
}
{\endtabularx\vspace{8pt plus 1pt}\noindent}
\newtcolorbox{paperbox}[2][]{
frame hidden,
boxrule=0pt,
breakable,
enhanced,
before skip=11pt plus 1pt,
toptitle=3mm,
boxsep=0.25ex,
left=8pt,
right=8pt,
fonttitle=\bfseries\color{black},
title=#2,
arc=0mm,
parbox = false,
borderline north={1pt}{-0.5pt}{black},
borderline south={1pt}{-0.5pt}{black},
colback=monstertandark,
colframe=monstertandark,
colbacktitle=monstertandark,
fuzzy shadow={0mm}{-3.5pt}{-0.5pt}{0.4mm}{black!60!white},
overlay={
\fill [fill=black] (frame.south west) -- ++(7pt,0) -- ++(0,-5pt) -- cycle;
\fill [fill=black] (frame.north west) -- ++(7pt,0) -- ++(0,5pt) -- cycle;
\fill [fill=black] (frame.north east) -- ++(-7pt,0) -- ++(0,5pt) -- cycle;
\fill [fill=black] (frame.south east) -- ++(-7pt,0) -- ++(0,-5pt) -- cycle;
},
after={\vspace{10pt plus 1pt}\noindent},
#1
}
\newtcolorbox{quotebox}[1][]{
enhanced jigsaw,
frame hidden,
boxrule=0pt,
breakable,
enhanced,
before skip=10pt plus 1pt,
boxsep=0.25ex,
left=8pt,
right=8pt,
colback=bgtan,
colframe=bgtan,
arc=0mm,
parbox = false,
borderline west={1pt}{-0.5pt}{titlered},
borderline east={1pt}{-0.5pt}{titlered},
overlay={
\foreach \n in {north east,north west,south east,south west}
{\draw [titlered, fill=titlered] (frame.\n) circle (2pt); }; },
after={\vspace{7.5pt plus 1pt}\noindent},
#1
}
\ No newline at end of file
$pdf_mode = "1";
$out_dir="build";
$pdflatex = "find chapitres -type d ! -path './.git*' -exec mkdir -p $out_dir/{} \\; && xelatex %O -interaction=nonstopmode %S";
$pdf_previewer = 'gv --watch';
\ No newline at end of file
swr-class @ 55a96f94
Subproject commit 55a96f941febcb17cb480505b17f2273f0e92f5f
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment