newtables #4

Merged
Dandaedre merged 2 commits from newtables into main 2024-06-15 22:26:59 +02:00
2 changed files with 13 additions and 9 deletions

View File

@ -1,16 +1,20 @@
[classes]
header = '\subsubsection{Tier {}}'
row = '''{\footnotesize
\rowcolors{2}{gray!25}{white}
\begin{tabularx}{\textwidth}{|p{0.17\linewidth\hyphenpenalty=9000}lp{0.13\linewidth}p{0.042\linewidth}X|}
\hline\rowcolor{gray!50}\hline
Technique & Niv & Type & Coût & Effet\\
\hline'''
row = '''\begin{longtblr}{
colspec = {Q[h,j,wd=3.5cm] Q[c,h, wd=0.52cm] h{2.5cm} Q[c,h,wd=0.75cm] Q[h,j,wd=9cm]},
hspan = minimal, vspan=minimal,
width = 1\columnwidth,
colsep = 1mm, abovesep=0px,belowsep=0px, leftsep=2px, rightsep=2px,
row{odd} = {gray!25}, row{1} = {gray!50},
cells = {font = \footnotesize\selectfont}
}
\hline
Technique & Niv & Type & Coût & Effet\\
\hline'''
end = ''' \hline
\end{tabularx}
}'''
\end{longtblr}'''
[craft]
header_alchemy = ''' Ingrédient & Partie & Rareté & Effet (Principal) & Effets (Catalysé) & Difficulté & Toxicité \\

View File

@ -154,7 +154,7 @@ pub fn make_latex_string(arg: &str) -> String {
.replace('½', "\\sfrac{1}{2}")
.replace('&', "\\&");
let res = RE.replace_all(&temp, |caps: &Captures| {
format!("\\ddlevel{{{}}}", caps[0].chars().count())
format!("\\ddlvl{{{}}}", caps[0].chars().count())
});
res.to_string()
}