0

Thanks to the help provided on my question How can I write a LaTex command with 'if'-'then'-'else'?

I was able to accomplish that. Latex character sheet for Vampire RPG

I still need to adjust some positioning. This is where I am fighting to solve and ask help

This is the code of the character sheet

\documentclass[HQ,english,Vampire]{WoDTeX}
\usepackage{ragged2e}
\usepackage{wasysym}
\newcounter{squarecount}
\newcommand{\EmptyDot}{\Circle}
\newcommand{\FilledDot}{$\CIRCLE$}

\newcommand{\NewdottedSkill}[2]{% %parameter 1 the filled dots %parameter 2 the max dots
\multido{\ix=1+1}{#1}{\FilledDot}% \ifnum#1<#2 \multido{\ix=#1+1}{\numexpr#2-#1}{\EmptyDot, \kern-0.2pt}\fi }%

% Defina o comando \Humanity \newcommand{\Humanity}[1]{% \noindent \begin{center} \vspace{-0.5\baselineskip} \setlength{\tabcolsep}{0pt} \begin{tabular}{c} #1\[-10.0pt] \rule{78pt}{0.4pt}\ \NewdottedSkill{0}{10} \end{tabular}% \end{center} }

% Defina o comando \Willpower \newcommand{\Willpower}[0]{% \noindent \begin{center} \vspace{-0.5\baselineskip} \setlength{\tabcolsep}{0pt} \begin{tabular}{c} \Squarerow \end{tabular}% \end{center} }

\newcommand{\Squarerow}{% $\square$, \kern-0.2pt $\square$, \kern-0.2pt $\square$, \kern-0.2pt $\square$, \kern-0.2pt $\square$, \kern-0.2pt $\square$, \kern-0.2pt $\square$, \kern-0.2pt $\square$, \kern-0.2pt $\square$, \kern-0.2pt $\square$\ \EmptyDot, \kern-0.2pt \EmptyDot, \kern-0.2pt \EmptyDot, \kern-0.2pt \EmptyDot, \kern-0.2pt \EmptyDot, \kern-0.2pt \EmptyDot, \kern-0.2pt \EmptyDot, \kern-0.2pt \EmptyDot, \kern-0.2pt \EmptyDot, \kern-0.2pt \EmptyDot\ }

\newcommand{\Bloodpool}[1]{% % parameter 1: total number of squares \setcounter{squarecount}{0} % Inicializa o contador \noindent \foreach \ix in {1,...,#1}{% $\square$\ifnum\ix<#1 \kern-1.0pt\fi % Adiciona espaço entre quadrados \stepcounter{squarecount} \ifnum\value{squarecount}=10 \ % Inicia uma nova linha após 10 quadrados \setcounter{squarecount}{0} % Reinicia o contador para uma nova linha \fi } }%

\newcommand{\experience}{ \begin{tikzpicture}[remember picture, overlay] \draw[thick, black, solid] (-2.5,-1.7) rectangle ++(5,2); \end{tikzpicture} }

% Defina sua imagem de fundo aqui

\backgroundsetup{ scale=1, angle=0, opacity=1, color=black, contents={% \begin{tikzpicture}[remember picture,overlay] \node[inner sep=0] at (current page.center) {\includegraphics[width=\paperwidth, height=\paperheight]{art/backgrounds/\genrePath/BG\isLQ}}; \end{tikzpicture} } } \begin{document} \RaggedRight \begin{center} \begin{minipage}[b]{0.33333\textwidth} \raggedright \PlayerCharGameInfo{Name}{Player}{Chronicle} \end{minipage}% \begin{minipage}[b]{0.33333\textwidth} \raggedright \PlayerCharGameInfo{Nature}{Demeanor}{Concept} \end{minipage}% \begin{minipage}[b]{0.33333\textwidth} \raggedright \PlayerCharGameInfo{Clan}{Generation}{Sire} \end{minipage} \end{center} \vspace{-2.5\baselineskip} \BigWoDSeperatorSheet{Attributes} \begin{center} \vspace{-0.5\baselineskip} \begin{minipage}[b]{0.33333\textwidth} \raggedright \centerline{Physical}\par \Attributes{Strength}{Dexterity}{Stamina} \end{minipage}% \begin{minipage}[b]{0.33333\textwidth} \centering \centerline{Social}\par \Attributes{Charisma}{Manipulation}{Appearance} \end{minipage}% \begin{minipage}[b]{0.33333\textwidth} \raggedleft \centerline{Mental}\par \Attributes{Perception}{Intelligence}{Wits} \end{minipage} \end{center} \vspace{-2.5\baselineskip} \BigWoDSeperatorSheet{Abilities} \begin{center} \vspace{-0.5\baselineskip} \begin{minipage}[b]{0.33333\textwidth} \raggedright \centerline{Talents}\par \Abilities{Alertness}{Athletics}{Awarness}{Brawl}{Empathy}{Expression}{Intimidation}{Leadership}{Legendermain|Subterfuge} \end{minipage}% \begin{minipage}[b]{0.33333\textwidth} \centering \centerline{Skills}\par \Abilities{Animal Ken}{Archery}{Commerce}{Crafts}{Etiquette}{Melee}{Performance}{Ride}{Stealth|Survival} \end{minipage}% \begin{minipage}[b]{0.33333\textwidth} \raggedleft \centerline{Knowledge}\par \Abilities{Academics}{Hearth Wisdom}{Investigation}{Law}{Linguistics}{Medicine}{Ocult}{Politics}{Seneschal|Science} \end{minipage} \end{center} \vspace{-2.5\baselineskip} \BigWoDSeperatorSheet{Advantages} \begin{center} \vspace{-0.5\baselineskip} \begin{minipage}[b]{0.33333\textwidth} \raggedright \centerline{Discipline}\par \Disciplines{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_} \end{minipage}% \begin{minipage}[b]{0.33333\textwidth} \centering \centerline{Background}\par \Backgrounds{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_} \end{minipage}% \begin{minipage}[b]{0.33333\textwidth} \raggedleft \centerline{Virtues}\par \Virtues{Conscience/Conviction}{Self-Control/Instinct/}{Courage} \end{minipage} \end{center} %\vspace{-2.5\baselineskip} \BigWoDSeperatorSheetNonText{} \begin{center} \vspace{-0.5\baselineskip} \begin{minipage}[b]{0.33333\textwidth} \raggedright \SmallWoDSeperatorSheet{Other Traits}\par \OtherTraits{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_}{_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_\kern-.14ex_} %{OT9|OT10|OT11|OT12|OT13|OT14} \end{minipage}% \begin{minipage}[b]{0.33333\textwidth} \centering \SmallWoDSeperatorSheet{Humanity / Path}\par \Humanity{Humanity}\par \SmallWoDSeperatorSheet{Willpower}\par \Willpower\par \SmallWoDSeperatorSheet{Bloodpool}\par \Bloodpool{40} \end{minipage}% \begin{minipage}[b]{0.33333\textwidth} \raggedleft \SmallWoDSeperatorSheet{Health}\par \Healthlevel\par \SmallWoDSeperatorSheet{Experience}\par \experience \end{minipage} \end{center} \end{document}

This is the code of the cls file named WoDTeX

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{WoDTeX}[2018/07/06 World of Darkness LaTeX]
\LoadClass[a4paper,twocolumns,oneside]{book}
\PassOptionsToPackage{table}{xcolor}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{pgffor}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{amssymb}
\usepackage{mwe,tikz}
\usepackage{textcomp}
\usepackage{background}
\usepackage{intcalc}
\usepackage{calc}
\usepackage{fmtcount}
\usepackage[percent]{overpic}
\usepackage{relsize}
\usepackage[most]{tcolorbox}
\usepackage{wasysym}
\usepackage{fontspec}
\usepackage{sectsty}
\usepackage[outline]{contour}% http://ctan.org/pkg/contour
\usepackage{multido}
\usepackage{xstring}

\definecolor{coverGold}{RGB}{235,186,118} \definecolor{coverFontTitleColor}{RGB}{253, 215, 215} \definecolor{tablebackground}{RGB}{255,255,255}

%\rowcolors{2}{gray!15}{white} %\newcommand{\head}[1]{\textcolor{white}{\textbf{#1}}} %\newcommand{\firstColumn}[1]{\textcolor{white}{\textbf{#1}}}

\DeclareOption{portuguese}{\PassOptionsToClass{\CurrentOption}{artigo}} \DeclareOption{english}{\PassOptionsToClass{\CurrentOption}{article}} \DeclareOption{LQ}{\providecommand{\isLQ}{_LQ}} \DeclareOption{HQ}{\providecommand{\isLQ}{}} \DeclareOption{Vampire}{ \providecommand{\genrePath}{Vampire} \providecommand{\genreFont}{Delavan} \providecommand{\titleFont}{DeRoos} \providecommand{\genreFrontTextColor}{black!10} \providecommand{\genreGeometryTop}{2.5cm} \providecommand{\genreGeometryBottom}{3.5cm} \providecommand{\genreGeometryInner}{2.5cm} \providecommand{\genreGeometryOuter}{2.5cm} \providecommand{\genreChapterSpacing}{6cm} \providecommand{\genreTOCSpacing}{10cm} \providecommand{\genreLeftMargin}{1.8cm} \providecommand{\genreChapTitlePos}{.01\paperwidth,-.01\paperheight} \providecommand{\genreCreditsPos}{.352\paperwidth,-.404\paperheight} \providecommand{\genreTOCTitleColor}{white!80!black} \providecommand{\genreTOCBodyColor}{white!80!black} }%end of Vampire Specifics

\ProcessOptions\relax \ExecuteOptions{english,LQ,Vampire}%setting Default \usepackage{babel} \usepackage[a4paper,top=\genreGeometryTop, bottom=\genreGeometryBottom, outer=\genreGeometryOuter, inner=\genreGeometryInner, left=\genreLeftMargin]{geometry} \usetikzlibrary{calc} \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} \usetikzlibrary{calc,fit,intersections} \usetikzlibrary{fadings,shadings,decorations.text} \usetikzlibrary{patterns}

\newcommand{\theFont }{\genreFont} \newcommand{\theFontSection }{\genreFont} \newcommand{\theFontSubSection }{\genreFont} \newcommand{\theFontSubSubSection}{\genreFont}

\newcommand{\coverTitleFont}{\titleFont}

%\newcommand{\EmptyDot}{\Circle} %\newcommand{\FilledDot}{$\CIRCLE$}

\providecommand{\SmallWoDSeperatorSheet}[1] { \center \begin{tikzpicture} \node { \includegraphics[width=0.95\textwidth] { art/sidebar/\genrePath/SidebarSheet\isLQ } }; \node [anchor=center, align=center, fill=white, inner sep=5pt] {#1}; \end{tikzpicture} }

\providecommand{\BigWoDSeperatorSheet}[1] { \center \begin{tikzpicture} \node {\includegraphics[width=1\textwidth]{ art/sidebar/\genrePath/SidebarBrokenSheet\isLQ} }; \node [anchor=center, align=center]at (0,-2.8mm){ \textbf{ \fontspec{ \theFont } \fontsize{23}{20}\selectfont #1} }; \end{tikzpicture} }

\providecommand{\BigWoDSeperatorSheetNonText}[0] { \center \begin{tikzpicture} \node {\includegraphics[width=1\textwidth]{ art/sidebar/\genrePath/SidebarSheet\isLQ} }; \end{tikzpicture} }

\setmainfont{Goudy Old Style} % Comando que cria o grupo de atributos com a fila de dots \newcommand{\PlayerCharGameInfo}[3]{% \noindent \begin{center} \setlength{\tabcolsep}{10pt} \begin{tabular}{ll} \makebox[4.7em][l]{#1} & \ \makebox[4.7em][l]{#2} & \ \makebox[4.7em][l]{#3} & \end{tabular}% \end{center} }

% Comando que cria o grupo de atributos com a fila de dots \newcommand{\Attributes}[3]{% \noindent \begin{center} \vspace{-1.0\baselineskip} \setlength{\tabcolsep}{10pt} \begin{tabular}{ll} \makebox[4.7em][l]{#1} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#2} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#3} & \dottedSkill{1}{10} \end{tabular}% \end{center} }

\newcommand{\dottedSkill}[2]{% %parameter 1 the filled dots %parameter 2 the max dots
\multido{\ix=1+1}{#1}{\FilledDot}% \ifnum#1<#2 \multido{\ix=#1+1}{\numexpr#2-#1}{\EmptyDot}\fi }%

\newcommand{\Healthlevel}[0]{% \noindent \begin{center} \begin{tabular}{@{}l@{\hskip 0.5em}c@{\hskip 0.5em}c@{}} Bruised & & $\square$ \ Hurt & -1 & $\square$ \ Injured & -1 & $\square$ \ Wounded & -2 & $\square$ \ Mauled & -2 & $\square$ \ Crippled & -5 & $\square$ \ Incapacitated & & $\square$ \ \end{tabular}% \end{center} }

\newcommand{\Abilities}[9]{% \noindent \begin{center} \vspace{-1.0\baselineskip} \setlength{\tabcolsep}{10pt} \begin{tabular}{ll} \makebox[4.7em][l]{#1} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#2} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#3} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#4} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#5} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#6} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#7} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#8} & \dottedSkill{1}{10}\ \ComplAbilities{#9}{|} \end{tabular}% \end{center} }

% Comando intermediário para dividir a string \newcommand{\ComplAbilities}[2]{% \noindent \makebox[4.7em][l]{\StrBefore{#1}{#2}} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{\StrBehind{#1}{#2}} & \dottedSkill{1}{10} }

\newcommand{\Disciplines}[6]{% \noindent \begin{center} \vspace{-1.0\baselineskip} \setlength{\tabcolsep}{10pt} \begin{tabular}{ll} \makebox[4.7em][l]{#1} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#2} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#3} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#4} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#5} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#6} & \dottedSkill{1}{10}\ \end{tabular}% \end{center} }

\newcommand{\Backgrounds}[6]{% \noindent \begin{center} \vspace{-1.0\baselineskip} \setlength{\tabcolsep}{10pt} \begin{tabular}{ll} \makebox[4.7em][l]{#1} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#2} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#3} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#4} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#5} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#6} & \dottedSkill{1}{10}\ \end{tabular}% \end{center} }

\newcommand{\Virtues}[3]{% \noindent \begin{center} \vspace{-1.0\baselineskip} \setlength{\tabcolsep}{10pt} \begin{tabular}{ll} \makebox[7.6em][l]{#1} & \dottedSkill{1}{5}\[11.5pt] \makebox[7.6em][l]{#2} & \dottedSkill{1}{5}\[11.5pt] \makebox[7.6em][l]{#3} & \dottedSkill{1}{5}\[11.5pt] \end{tabular}% \end{center} }

\newcommand{\OtherTraits}[8]{% \noindent \begin{center} \vspace{-1.0\baselineskip} \setlength{\tabcolsep}{10pt} \begin{tabular}{ll} \makebox[4.7em][l]{#1} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#2} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#3} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#4} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#5} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#6} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#7} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{#8} & \dottedSkill{1}{10}\ %\ComplAbilities{#9}{|} \end{tabular}% \end{center} }

% Comando intermediário para dividir a string \newcommand{\ComplOtherTraits}[2]{% \noindent \makebox[4.7em][l]{\StrBefore{#1}{#2}} & \dottedSkill{1}{10}\ \makebox[4.7em][l]{\StrBehind{#1}{#2}} & \dottedSkill{1}{10} } \endinput

Resources used

Background enter image description here

Sidebar Sidebar

Sidebar not broken

Sidebar not broken

Question: I would like to have all the last block aligned in the same way that other blocks above are. How can it be done?

  • It is not too clear of what is the desired the output? – Tom Jan 07 '24 at 17:42
  • It was clear in a numbered list but I managed to fix and edit the topic to reflect my question that is now simpler. – Daniel Ferreira Castro Jan 07 '24 at 19:00
  • Have you tried to change the minipage[b] to minipage[t]? Only in the three minipages that you have in the bottom – Jes Jan 07 '24 at 22:38
  • It works better but I am still having misalignments – Daniel Ferreira Castro Jan 08 '24 at 00:13
  • For me it gets quite well aligned when I change the \includegraphics[width=0.95\textwidth] from \SmallWoDSeperatorSheet to \includegraphics[width=0.99\textwidth]. I post it as a comment as I am not sure where the issue is, and I do not have your fonts installed on my system (I changed them to Arial). There are "paragraph too wide" errors everywhere, so maybe it has to do with that. – Jes Jan 08 '24 at 17:07

0 Answers0