Skip to content

Commit

Permalink
modify cv templates to work in swiftlatex
Browse files Browse the repository at this point in the history
  • Loading branch information
ducaale committed Dec 18, 2023
1 parent d912c77 commit 8669012
Show file tree
Hide file tree
Showing 122 changed files with 691 additions and 7,605 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@

% Set main fonts
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[Color=primary, Path = fonts/raleway/]{Raleway-ExtraLight}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text, Path = fonts/raleway/]{Raleway-ExtraLight}
\newcommand{\custombold}[1]{\color{subheadings}\fontspec[Path = fonts/raleway/]{Raleway-Regular}\selectfont #1 \normalfont}
\setmainfont[Color=primary, Path = fonts/]{Raleway-ExtraLight}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text, Path = fonts/]{Raleway-ExtraLight}
\newcommand{\custombold}[1]{\color{subheadings}\fontspec[Path = fonts/]{Raleway-Regular}\selectfont #1 \normalfont}

% Date command
\setlength{\TPHorizModule}{1mm}
\setlength{\TPVertModule}{1mm}
\textblockorigin{0mm}{5mm} % start everyth
\newcommand{\lastupdated}{\begin{textblock}{60}(165,0)
\color{date}\fontspec[Path = fonts/raleway/]{Raleway-ExtraLight}\fontsize{8pt}{10pt}\selectfont
\color{date}\fontspec[Path = fonts/]{Raleway-ExtraLight}\fontsize{8pt}{10pt}\selectfont
Last Updated on
\today
\end{textblock}}
Expand All @@ -45,33 +45,33 @@ Last Updated on
\newcommand{\namesection}[3]{
\centering{
\sffamily
\fontspec[Path = fonts/raleway/]{Raleway-ExtraLight}\fontsize{40pt}{10cm}\selectfont #1
\fontspec[Path = fonts/raleway/]{Raleway-ExtraLight}\selectfont #2
\fontspec[Path = fonts/]{Raleway-ExtraLight}\fontsize{40pt}{10cm}\selectfont #1
\fontspec[Path = fonts/]{Raleway-ExtraLight}\selectfont #2
} \\
\vspace{5pt}
\centering{ \color{headings}\fontspec[Path = fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{14pt}\selectfont #3}
\centering{ \color{headings}\fontspec[Path = fonts/]{Raleway-Medium}\fontsize{11pt}{14pt}\selectfont #3}
\noindent\makebox[\linewidth]{\rule{\paperwidth}{0.4pt}}
\vspace{-15pt}
}
\titlespacing{\section}{0pt}{0pt}{0pt}

% Headings command
\titleformat{\section}{\color{headings}
\scshape\fontspec[Path = fonts/raleway/]{Raleway-Medium}\fontsize{16pt}{24pt}\selectfont \raggedright\uppercase}{} {0em}{}
\scshape\fontspec[Path = fonts/]{Raleway-Medium}\fontsize{16pt}{24pt}\selectfont \raggedright\uppercase}{} {0em}{}

% Subeadings command
\titleformat{\subsection}{\color{subheadings}
\fontspec[Path = fonts/raleway/]{Raleway-Medium}\fontsize{12pt}{12pt}\selectfont\bfseries\uppercase}{}{0em}{}
\fontspec[Path = fonts/]{Raleway-Medium}\fontsize{12pt}{12pt}\selectfont\bfseries\uppercase}{}{0em}{}
\titlespacing{\subsection}{0pt}{\parskip}{-\parskip}
\titlespacing{\subsubsection}{0pt}{\parskip}{-\parskip}
\newcommand{\runsubsection}[1]{\color{subheadings}
\fontspec[Path = fonts/raleway/]{Raleway-Medium}\fontsize{12pt}{12pt}\selectfont\bfseries\uppercase {#1} \normalfont}
\fontspec[Path = fonts/]{Raleway-Medium}\fontsize{12pt}{12pt}\selectfont\bfseries\uppercase {#1} \normalfont}

% Descriptors command
\newcommand{\descript}[1]{\color{subheadings}\raggedright\scshape\fontspec[Path = fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1} \normalfont}
\newcommand{\descript}[1]{\color{subheadings}\raggedright\scshape\fontspec[Path = fonts/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1} \normalfont}

% Location command
\newcommand{\location}[1]{\color{headings}\raggedright\fontspec[Path = fonts/raleway/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1} \normalfont}
\newcommand{\location}[1]{\color{headings}\raggedright\fontspec[Path = fonts/]{Raleway-Medium}\fontsize{11pt}{13pt}\selectfont {#1} \normalfont}

% Section seperators command
\newcommand{\sectionsep}[0]{\vspace{8pt}}
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions public/templates/template6/minimal-resume-config.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
%sty file

\usepackage{minimal-resume}

% custom command and packages

\input{custom-command}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\ProvidesPackage{config/minimal-resume}
\ProvidesPackage{minimal-resume}

% margin
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%% start of file `moderncvcollection.sty'.
%% Copyright 2013-2015 Xavier Danaux ([email protected]), 2020-2022 moderncv maintainers (github.com/moderncv).
%% start of file `collection.sty'.
%% Copyright 2013-2013 Xavier Danaux ([email protected]).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
Expand All @@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{moderncvcollection}[2022-02-21 v2.3.1 moderncv collections]
\ProvidesPackage{collection}[2013/03/28 v1.0.0 collections]


%-------------------------------------------------------------------------------
Expand All @@ -27,66 +27,59 @@

% creates a new collection
% usage: \collectionnew{<collection name>}
\NewDocumentCommand\collectionnew{m}{%
\newcounter{collection@#1@count}%
}%
\newcommand*{\collectionnew}[1]{%
\newcounter{collection@#1@count}}

% adds an item to a collection
% usage: \collectionadd[<optional key>]{<collection name>}{<item to add>}
\NewDocumentCommand\collectionadd{ O{} m m }{%
\newcommand*{\collectionadd}[3][]{%
\expandafter\def\csname collection@#2@item\roman{collection@#2@count}\endcsname{#3}%
\def\optional@FirstArg{#1}%
\ifdefempty{\optional@FirstArg}{%
\relax% if #1 is empty
}{%
\expandafter\def\csname collection@#2@key\roman{collection@#2@count}\endcsname{#1}%
}%
\stepcounter{collection@#2@count}%
}%
\if\relax\noexpand#1\relax% if #1 is empty
\else\expandafter\def\csname collection@#2@key\roman{collection@#2@count}\endcsname{#1}\fi%
\stepcounter{collection@#2@count}}

% returns the number of items in a collection
% usage: \collectioncount{<collection name>}
\NewDocumentCommand\collectioncount{m}{%
\value{collection@#1@count}%
}%
\newcommand*{\collectioncount}[1]{%
\value{collection@#1@count}}

% gets an item from a collection
% usage: \collectiongetitem{<collection name>}{<element id>}
% where <element id> is an integer between 0 and (collectioncount-1)
\NewDocumentCommand\collectiongetitem{m m}{%
\csname collection@#1@item\romannumeral #2\endcsname%
}%
\newcommand*{\collectiongetitem}[2]{%
\csname collection@#1@item\romannumeral #2\endcsname}

% gets a key from a collection
% usage: \collectiongetkey{<collection name>}{<element id>}
% where <element id> is an integer between 0 and (collectioncount-1)
\NewDocumentCommand\collectiongetkey{m m}{%
\csname collection@#1@key\romannumeral #2\endcsname%
}%
\newcommand*{\collectiongetkey}[2]{%
\csname collection@#1@key\romannumeral #2\endcsname}

% loops through a collection and perform the given operation on every element
% usage: \collectionloop{<collection name>}{<operation sequence>}
% where <operation sequence> is the code sequence to be evaluated for each collection item,
% code which can refer to \collectionloopid, \collectionloopkey, \collectionloopitem and
% \collectionloopbreak
\newcounter{collection@iterator}
\NewDocumentCommand\collectionloopbreak{}{\let\iterate\relax}
\NewDocumentCommand\collectionloop{m m}{%
\newcommand*{\collectionloopbreak}{\let\iterate\relax}
\newcommand*{\collectionloop}[2]{%
\setcounter{collection@iterator}{0}%
\loop\ifnum\value{collection@iterator}<\value{collection@#1@count}%
\def\collectionloopid{\arabic{collection@iterator}}%
\def\collectionloopitem{\collectiongetitem{#1}{\collectionloopid}}%
\def\collectionloopkey{\collectiongetkey{#1}{\collectionloopid}}%
#2%
\stepcounter{collection@iterator}%
\repeat%
}
\repeat}

% loops through a collection and finds the (first) element matching the given key
% usage: \collectionfindbykey{<collection name>}{key>}
\NewDocumentCommand\collectionfindbykey{m m}{%
\newcommand*{\collectionfindbykey}[2]{%
\collectionloop{#1}{%
\ifthenelse{\equal{\collectionloopkey}{#2}}{\collectionloopitem\collectionloopbreak}{}}%
}%
\ifthenelse{\equal{\collectionloopkey}{#2}}{\collectionloopitem\collectionloopbreak}{}}}


\endinput


%% end of file `moderncvcollection.cls'.
%% end of file `collection.cls'.
Loading

0 comments on commit 8669012

Please sign in to comment.