Commit 9dbd3d95 authored by Marthym's avatar Marthym

feat(style): Finish dnd refactor and remove old files

parent 9a065666
This diff is collapsed.
......@@ -62,11 +62,11 @@ Voici le liste des Atouts disponibles dans \swfe.
\emph{[Novice]}\\
Que votre héros soit né avec une cuillère en argent dans la bouche ou bien qu’il ait bien réussi en affaires, une chose est sûre : il est beaucoup plus fortuné que la plupart des gens.
Un héros Riche débute avec 3x les fonds initiaux prévus. Si le héro travaille il reçoit un salaire annuel de 150 000 Cr.
Un héros Riche débute avec 3x les fonds initiaux prévus. Si le héro travaille il reçoit un salaire annuel de 150 000\crg.
\item [Très riche]
\emph{[Novice, Riche ou Noble]}\\
Votre héros est riche comme Crésus. Il débute avec 5x les fonds initiaux prévus, et, si c’est approprié, reçoit un revenu annuel de 500 000 Cr. Un héros Très riche doit avoir une histoire personnelle très détaillée à valider avec le MJ. Les biens et la fortune qu’il possède impliquent autant de gestion que de lourdes responsabilités.
Votre héros est riche comme Crésus. Il débute avec 5x les fonds initiaux prévus, et, si c’est approprié, reçoit un revenu annuel de 500 000\crg. Un héros Très riche doit avoir une histoire personnelle très détaillée à valider avec le MJ. Les biens et la fortune qu’il possède impliquent autant de gestion que de lourdes responsabilités.
\item [Séduisant]
\emph{[Novice, Vigueur d6+]}\\
......
......@@ -39,14 +39,14 @@ Rajoutez les détails concernant le personnage qui vous semblent importants.
\subsection{Progression}
Le rang détermine la puissance approximative de votre héros. Le nombre de points d’XP que vous avez gagné détermine le rang selon le tableau suivant :
\begin{dnditemtable}[ l l ]
\begin{itemtable}[ l l ]
\textbf{XP} & \textbf{Rang} \\
00-19 & Novice \\
20-39 & Aguerri \\
40-59 & Vétéran \\
60-79 & Héroïque \\
80+ & Légendaire
\end{dnditemtable}
\end{itemtable}
Tout les 5XP votre héros bénéficie d’une progression. Lors d’une progression il peut :
\begin{rebelist}
......
......@@ -12,7 +12,7 @@ Dans l’univers Star Wars il est vite tentant de vouloir se faire un personnage
\subsection{Contribution}
Comme je le disais plus haut, l’idée principale de ce document est de permettre à tous ceux qui le souhaitent de participer. Le document est donc écrit en \LaTeX et disponible sur Github.\\
\cite{jdrp-starwars-reloaded}.
\cite{jdrp-starwars}.
\subsection{Licence}
Cette \oe{uvre} est mise à disposition sous licence Attribution-ShareAlike 4.0 International. Pour voir une copie de cette licence, visitez \url{https://creativecommons.org/licenses/by-sa/4.0/} ou écrivez à Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
......
% DND 5e LaTeX Style File
% Created by Evan Bergeron
% Modified by Christopher Liu December 2015
% Modified by Yannic Meyer Feb 2016
\ProvidesPackage{dnd}[2016/03/13]
%
% Prerequisite Packages
%
\RequirePackage{titlesec} % Used to adjust (sub)section colors and fonts
\RequirePackage{lipsum} % Filler text
\RequirePackage[cm]{fullpage} % Small margins
\RequirePackage{bookman} % Closest built-in font I could find
\RequirePackage[table]{xcolor}
\RequirePackage{array}
\RequirePackage{tabularx}
\RequirePackage{tikz}
\RequirePackage{keycommand}
\RequirePackage{fancyhdr} % Adaptation of the footers
\RequirePackage[most]{tcolorbox} % used for some boxes
% Load other modules of this package
\usepackage{lib/dndfont}
\usepackage{lib/dndmonster}
\usepackage{lib/dndsections}
\usepackage{lib/dndcomment}
\usepackage{lib/dnditemtable}
\usepackage{lib/dndtable}
\usepackage{lib/dndquote}
\usepackage{lib/dndpaperbox}
\usepackage{lib/dndbackgroundimg}
%
% Options
%
% 'bg-letter-img','bg-letter-print' and 'bg-none' options
\newtoggle{bool-bg-a4}
\newtoggle{bool-bg-print}
\newtoggle{bool-bg-none}
\DeclareOption{bg-none}{\toggletrue{bool-bg-none}}
\DeclareOption{bg-a4}{\toggletrue{bool-bg-a4}}
\DeclareOption{bg-letter}{\togglefalse{bool-bg-a4}}
\DeclareOption{bg-print}{\toggletrue{bool-bg-print}}
\DeclareOption{bg-full}{\togglefalse{bool-bg-print}}
% Default Settings
\ExecuteOptions{bg-letter, bg-full}
\ProcessOptions\relax
%
% Style Parameters
%
% Font environment
\newenvironment{lmss}{\fontfamily{lmss}\selectfont}{}
% Columns setup
\setlength{\columnsep}{1cm}
% Define colors, sampled from the books.
\usepackage{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
% Setup for custom footer
\pagestyle{fancy}
\footskip = 50pt %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.9cm}
\raisebox{12pt}{\textsc{\textcolor{uppergold}{\nouppercase\leftmark}}}
}
\fancyfoot[RO]{
\raisebox{12pt}{\textsc{\textcolor{uppergold}{\nouppercase\rightmark}}}
\hspace*{1cm}
\textcolor{uppergold}{\thepage}
}
% Either hilariously, or infuriatingly, the \ifcommandkey
% implementation is buggy. Here is a re-implementation
% from tex.stackexchange.
\begingroup
\makeatletter
\catcode`\/=8 %
\@firstofone
{
\endgroup
\renewcommand{\ifcommandkey}[1]{%
\csname @\expandafter \expandafter \expandafter
\expandafter \expandafter \expandafter \expandafter
\kcmd@nbk \commandkey {#1}//{first}{second}//oftwo\endcsname
}
}
......@@ -29,6 +29,8 @@
\RequirePackage{wrapfig}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Biblio management
\RequirePackage[style=verbose,sorting=none]{biblatex}
\setlength\bibitemsep{1.5\itemsep}
\bibliography{references}
......@@ -151,7 +153,7 @@
\RequirePackage{tabularx}
\newenvironment{dnditemtable}[1][XX]{
\newenvironment{itemtable}[1][XX]{
\par\vspace*{8pt}
\noindent
\rowcolors{1}{bgtan}{itemtablepink} % Alternate colors
......
\ProvidesPackage{lib/dndbackgroundimg}[2016/07/24]
\usepackage{eso-pic}
\newcommand\FirstPageBackground{%
\put(0,0){%
\parbox[b][\paperheight]{\paperwidth}{%
\vfill
\centering
\includegraphics[width=\paperwidth,height=\paperheight]{img/starwars__sith_vs__jedi_by_feuerkorn.jpg}%
\vfill
}}}
\newcommand\MainPageBackground{%
\put(0,0){%
\parbox[b][\paperheight]{\paperwidth}{%
\vfill
\centering
\includegraphics[width=\paperwidth,height=\paperheight]{img/bg-a4-odd.jpg}%
\vfill
}}}
\ No newline at end of file
% Green comment box definition
\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=\fontfamily{fosj}\selectfont\scshape\bfseries\color{black},
fontupper=\fontfamily{lmss}\selectfont,
title=#2,
parbox = false,
colback=commentgreen,
colframe=commentgreen,
colbacktitle=commentgreen,
after={\vspace{5pt plus 1pt}\noindent},
#1
}
%
% Old implementation using mdframed
%
%\newenvironment{commentbox}[1]
%{\fontfamily{lmss}\selectfont\begin{mdframed}[frametitle={#1},
% frametitlefont=\fontfamily{fosj}\selectfont\scshape\bfseries\color{black},
% linecolor=commentgreen,
% backgroundcolor=commentgreen]}
%{\end{mdframed}}
\ No newline at end of file
\ProvidesPackage{lib/dndfont}[2016/07/24]
\RequirePackage[quiet]{fontspec}
\setmainfont[
Extension=.otf,
UprightFont= *-regular,
BoldFont=*-bold,
ItalicFont=*-italic,
BoldItalicFont=*-bolditalic,
]{texgyreheros}
\newfontfamily\jedifont[]{Star Jedi}
\ No newline at end of file
% Table Environment
\newenvironment{dnditemtable}[1][XX]{
\par\vspace*{8pt}
\noindent
\fontfamily{lmss}\selectfont %Select font
\rowcolors{1}{bgtan}{itemtablepink} % Alternate colors
\tabularx{\linewidth}{#1}
}
{\endtabularx\vspace{8pt plus 1pt}\noindent}
% Monster environment sty file
\usepackage{fp}
% Macro to print stats with autocomputed modifier
% e.g. \stat{12} prints "12 (+1)"
\newcommand{\stat}[1]{%
\FPeval{\mod}{(#1 - 6)}%
\FPifzero\mod%
\FPeval{\mod}{clip(trunc(mod,0))}D#1%
\else%
\FPeval{\mod}{clip(trunc(mod,0))}D#1 (+\mod)%
\fi%
}
% Monster box made to look like the Monster Manual NPC definitions
\newtcolorbox{monsterboxnobg}[2][]{
enhanced,
frame hidden,
before skip=7pt plus2pt,
boxrule=0pt,
breakable,
boxsep=0.25ex,
toptitle=3mm,
left=2.5mm,
right=2.15mm,
arc=0mm,
opacityback=0,
colframe=titlered,
fonttitle=\scshape\bfseries\color{titlered}\Large,
fontupper=\fontfamily{lmss}\selectfont,
title=#2,
after={\vspace{7pt plus 1pt}\noindent},
#1
}
% new Monsterbox
\newtcolorbox{monsterbox}[2][]{
enhanced,
frame hidden,
before skip=7pt plus2pt,
boxrule=0pt,
breakable,
boxsep=0.25ex,
toptitle=3mm,
left=2.5mm,
right=2.15mm,
arc=0mm,
borderline north={4pt}{0pt}{titlered},
borderline north={2.5pt}{0.75pt}{puregold},
borderline south={4pt}{0pt}{titlered},
borderline south={2.5pt}{0.75pt}{puregold},
colback=monstertan,
colbacktitle=monstertan,
colframe=titlered,
fonttitle=\scshape\bfseries\color{titlered}\Large,
fontupper=\fontfamily{lmss}\selectfont,
title=#2,
after={\vspace{7pt plus 1pt}\noindent},
#1
}
% Define Monster subsection header style
%\newcommand{\monstersection}[1]{\subsubsection*{#1}}
\newcommand{\monstersection}[1]{
{\par
\color{titlered}\normalfont\scshape\Large #1 \vspace{3pt}
\titleline{\color{titlered}\titlerule[0.6pt]}
\par\medskip}
}
%\titlespacing*{\subsubsection}{0pt}{*0.5}{5pt}
%\titleformat{\subsubsection}
%{\color{titlered}\normalfont\scshape\Large}{\thesubsection}{1em}{}[{\color{titlered}\titlerule[0.5pt]\color{black}}]
\newenvironment{monsteraction}[1][\unskip]{\emph{\textbf{#1.}}}{\vspace{0.5em}}
%
% Macros for use within the monster environment
%
\newkeycommand\basics[type=0, planet=0, language=0]{%
\color{titlered}
\textbf{Type} \commandkey{type}\\
\textbf{Planète} \commandkey{planet}\\
\textbf{Langage} \commandkey{language}\\
}
% Taubular enviornment for stats-block
\newkeycommand\traits[AGI=\stat{6},
AME=\stat{6},
FOR=\stat{6},
INT=\stat{6},
VIG=\stat{6}]{
{
\vspace{-10pt}
\begin{center}
\begin{tabular*}{0.95\linewidth}{c @{\extracolsep{\fill}} cccc}
\textbf{AGI} & \textbf{AME} & \textbf{FOR} & \textbf{INT} & \textbf{VIG}\\
\commandkey{AGI} & \commandkey{AME} & \commandkey{FOR} & \commandkey{INT} & \commandkey{VIG}
\end{tabular*}
\end{center}
}
}
\newkeycommand\stats[ALL=6,
PAR=2, % 2 + 0,5 x la compétence de combat arrondie à l'inférieur (d12+1 en combat = 8)
RES=4,
CHA=3]{ % 2 + 0,5 x VIG
{
\vspace{-10pt}
\begin{center}
\begin{tabular*}{0.85\linewidth}{c @{\extracolsep{\fill}} cccc}
\textbf{ALL} & \textbf{PAR} & \textbf{RES} & \textbf{CHA} & \textbf{}\\
\commandkey{ALL} & \commandkey{PAR} & \commandkey{RES} & \commandkey{CHA} & \textbf{}
\end{tabular*}
\end{center}
}
}
\newkeycommand\details[skills=,
damageimmunities=,
savingthrows=,
conditionimmunities=,
damageresistances=,
damagevulnerabilities=,
senses=,
size=,
challenge=]{%
\ifcommandkey{savingthrows}
{\textbf{Saving Throws} \commandkey{savingthrows}\\}{}
\ifcommandkey{skills}
{\textbf{Skills} \commandkey{skills}\\}{}
\ifcommandkey{damagevulnerabilities}
{\textbf{Damage Vulnerabilities} \commandkey{damagevulnerabilities}\\}{}
\ifcommandkey{damageresistances}
{\textbf{Damage Resistances} \commandkey{damageresistances}\\}{}
\ifcommandkey{damageimmunities}
{\textbf{Damage Immunities} \commandkey{damageimmunities}\\}{}
\ifcommandkey{conditionimmunities}
{\textbf{Condition Immunities} \commandkey{conditionimmunities}\\}{}
% These traits appear to always be present.
\ifcommandkey{senses}
{\textbf{Senses} \commandkey{senses}\\}{}
\ifcommandkey{size}
{\textbf{Taille} \commandkey{size}\\}{}
\ifcommandkey{challenge}
{\textbf{Challenge} \commandkey{challenge}\\}{}
\color{black}
}
\newtcolorbox{paperbox}[2][]{
frame hidden,
boxrule=0pt,
breakable,
enhanced,
before skip=11pt plus 1pt,
toptitle=3mm,
boxsep=0.25ex,
left=8pt,
right=8pt,
fonttitle=\fontfamily{fosj}\selectfont\scshape\bfseries\color{black},
fontupper=\fontfamily{lmss}\selectfont,
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
}
\ No newline at end of file
\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},
fontupper = \fontfamily{lmss}\selectfont,
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
}
%Remove Numbering from section (If you want Numbering on the sections comment the following three lines and change the "0em" separation-definitions in the lower part to 1em)
\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}\normalfont\scshape\Huge}{\thesection}{0em}{}
\titleformat{\subsection}
{\color{titlered}\normalfont\scshape\Large}{\thesubsection}{0em}{}[{\titleline{\color{undergold}\titlerule[1pt]}}]
\titleformat{\subsubsection}
{\color{titlered}\normalfont\scshape\large}{\thesubsubsection}{0em}{}[]
\ No newline at end of file
% Table Header
\newcommand{\header}[1]{{
\par\vspace*{8pt}
\noindent
\sffamily\bfseries\scshape
#1}}
% Table Environment
\newenvironment{dndtable}[1][XX]{
\par\vspace*{8pt}
\noindent
\fontfamily{lmss}\selectfont %Select font
\rowcolors{1}{bgtan}{commentgreen} % Alternate colors
\tabularx{\linewidth}{#1}
}
{\endtabularx\vspace{8pt plus 1pt}\noindent}
@manual{jdrp-starwars-reloaded,
@manual{jdrp-starwars,
title = "Star Wars: Freedom Expansion",
author = "Marthym",
url = "https://github.com/Marthym/jdrp-sw-freedom-expension",
......
......@@ -5,26 +5,27 @@
\documentclass{jdrp}
%\usepackage[bg-letter]{dnd} % Options: bg-a4, bg-letter, bg-full, bg-print, bg-none.
\newcommand*{\docversion}{0.1}
\newcommand*{\doctitle}{ Star Wars, Freedom Expansion}
\newcommand*{\crg}{{\aurebesh\Large \$}} % Symbol for Galactic Credits
\newcommand*{\docversion}{\citefield{jdrp-starwars}{version}}
\newcommand*{\doctitle}{~\citetitle{jdrp-starwars}~}
\newcommand*{\swfe}{{\jedifont \doctitle}}
\title{\TitleFont \doctitle \normalsize \\v\docversion}
\author{}
\date{}
\newcommand*{\crg}{{\aurebesh\Large \$}}
\begin{document}
\begin{document} % Start document
\AddToShipoutPicture*{\FirstPageBackground}
\include{chapitres/preambule/couverture}
\AddToShipoutPicture{\MainPageBackground}
\include{chapitres/preambule/preface}
\include{chapitres/regles/regles}
\include{chapitres/personnages/personnages}
\include{chapitres/equipement/equipement}
\include{chapitres/pouvoirs/pouvoirs}
\onecolumn
\nocite{*}
\printbibliography
\AddToShipoutPicture*{\FirstPageBackground}
\include{chapitres/preambule/couverture}
\AddToShipoutPicture{\MainPageBackground}
\include{chapitres/preambule/preface}
\include{chapitres/regles/regles}
\include{chapitres/personnages/personnages}
\include{chapitres/equipement/equipement}
\include{chapitres/pouvoirs/pouvoirs}
\onecolumn
\nocite{*}
\printbibliography
\end{document} % End document
\end{document}
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