panres/templates/macros.sty
2019-08-30 17:50:10 -04:00

54 lines
1.2 KiB
TeX

\ProvidesPackage{macros}[2019/06/08 Macros for Latex resume]
\usepackage{xcolor}
\usepackage{fontspec}
\newfontfamily{\headerfont}{M+ 1p}[
BoldFont = *-bold,
]
\newfontfamily{\fa}{FontAwesome}
{% raw %}
% Changes the color of any text inside to the accent color
\renewcommand{\accent}[1] {{\color{red}{#1}}}
{% endraw %}
{% raw %}
% Changes the font of any text inside to title style.
\renewcommand{\title}[1] {\textbf{{\headerfont{#1}}}}
{% endraw %}
% Helper function to print the name
\renewcommand{\name}{
{% raw %}
\accent{{\Huge{%
{% endraw %}
{{ config.author.name }}%
{% raw %}
}}}
{% endraw %}
}
{% raw %}
% Generates a multirow sideways text
\newcommand{\sectiontitle}[1]{
% Multirow 1 works apparently?
\multirow{1}{5pt}{\rotatebox{90}{\Large\accent{#1}}}
}
{% endraw %}
{% raw %}
% Generates smaller, grey text for hint text
\newcommand{\hint}[1]{{\color[rgb]{.3,.3,.3}\footnotesize{#1}}}
{% endraw %}
{% raw %}
% Convience function to separate sections
\newcommand{\spacer}{\multicolumn{1}{l}{}\\[-5pt]}
{% endraw %}
{% raw %}
% Convience function for title-like rows
\newcommand{\widel}[1]{\multicolumn{2}{l}{#1}}
\newcommand{\widex}[1]{\multicolumn{2}{X}{#1}}
{% endraw %}