cv-bubble

Personal PDF CV, fork of github.com/mateuszbaransanok/BubbleCV
git clone https://git.in0rdr.ch/cv-bubble.git
Log | Files | Refs | Pull requests | README | LICENSE

commit 05f646ac08519d06047ab91d4c9c6308683b8bcc
parent 764fd91c77c21a8c2935dabbbb7e1fd7ee48d174
Author: Mateusz Baran <mateusz.baran.sanok@gmail.com>
Date:   Fri, 23 Jun 2023 23:38:40 +0200

feat: add cv scale parameter

Diffstat:
MREADME.md | 26++++++++++++++++++++++----
Aassets/BubbleCV.png | 0
Mbubblecv.sty | 522++++++++++++++++++++++++++++++++++++++++++-------------------------------------
Mmain.tex | 26++++++++++++++------------
4 files changed, 317 insertions(+), 257 deletions(-)

diff --git a/README.md b/README.md @@ -3,12 +3,30 @@ This is a professional CV template inspired by the legendary secret agent James Bond. BubbleCV is designed to effectively showcase your skills, work experience, education, and contact information in a sleek and impactful manner. - ## Key Features -- `\begin{cv}[<avatar>][<avatar_size>][<avatar_color>]{<name>}{<description>}`: Creates the main CV environment with optional parameters for avatar image, size, and color. It also includes the name and description of the individual. +<img src="assets/BubbleCV.png" alt="BubbleCV example" align="right" width="420" /> + +- Personal Image -- The template allows you to include a personal image in your CV, adding a touch of professionalism and personalization. + +- Timeline -- You can use the timeline feature to display the dates of your employment history or educational background, providing a clear and organized overview. + +- Fully Customizable -- With just a single parameter, you can change the size of all elements in the template. This flexibility allows you to manipulate your CV to accommodate all the necessary information on single page. Additionaly, all elements are parameterized, enabling you to adjust margins, spaces, and column ratio effortlessly. + +- Easy Extensibility -- You have the option to upload your own [resources](resources/), such as icons, to further personalize your CV and make it unique to your style. + +- Configurable Colors -- The bubbles and icons in the template can be easily changed with a single line of code. By adjusting the RGB color parameters, you can customize the appearance to suit your preferences. + +- Functionalities for Easy Content Management -- The template provides functions that facilitate the easy addition of features and the management of content, ensuring a seamless CV creation process. + +Feel free to explore and make use of the BubbleCV Template to create a standout CV that captures the attention of potential employers or clients. + + +## Functions + +- `\begin{cv}[<avatar>][<avatar_scale>][<avatar_color>]{<name>}{<description>}`: Creates the main CV environment with optional parameters for avatar image, scale, and color. It also includes the name and description of the individual. -- `\cvsection[<icon>][<icon_size>][<icon_color>]{<section_title>}`: Creates a new section with an optional icon, size, and color parameters. It helps in organizing different parts of the CV, such as Profile, Work Experience, Education, etc. +- `\cvsection[<icon>][<icon_scale>][<icon_color>]{<section_title>}`: Creates a new section with an optional icon, scale, and color parameters. It helps in organizing different parts of the CV, such as Profile, Work Experience, Education, etc. - `\begin{cvevent}[<start_year>][<end_year>]`: Begins a new work experience or educational event. Optional start and end years can be specified to indicate the duration of the event. @@ -18,7 +36,7 @@ BubbleCV is designed to effectively showcase your skills, work experience, educa - `\cvsidebar`: Changes the column from the main section to the sidebar. -- `\cvitem[<fa_icon>][<fa_icon_size>]`: Creates an item in the CV sidebar with an optional icon and size parameter. The full list of FontAwesome icons is available at [this link](https://mirrors.ibiblio.org/CTAN/fonts/fontawesome/doc/fontawesome.pdf). +- `\cvitem[<fa_icon>][<fa_icon_scale>]`: Creates an item in the CV sidebar with an optional icon and scale parameter. The full list of FontAwesome icons is available at [this link](https://mirrors.ibiblio.org/CTAN/fonts/fontawesome/doc/fontawesome.pdf). - `\cvskill{<skill>}{<level_name>}{<level_value>}`: Displays a skill and its corresponding proficiency level. diff --git a/assets/BubbleCV.png b/assets/BubbleCV.png Binary files differ. diff --git a/bubblecv.sty b/bubblecv.sty @@ -1,31 +1,82 @@ +%======================================================================================== +% Parameters +%======================================================================================== + %---------------------------------------------------------------------------------------- -% PARAMETERS +% GLOBAL %---------------------------------------------------------------------------------------- -\newcommand\packagename{bubblecv} -\newcommand\getcvfont{ppl} -\newcommand\getcvmainspace{0.5} -\newcommand\getcvsidebarspace{0.5} -\newcommand\getcvcolumnratio{0.6} -\newcommand\getcvspcebetweencolumns{1.5} -\newcommand\getcvheadermargin{0.5} -\newcommand\getcveventmargin{0.2} -\newcommand\getcveventdatesize{1.6} - -\newcommand\getcvavatarsize{2} -\newcommand\getcvavatarbordersize{0.1} - -\newcommand\getcvmainbubblesize{0.6} -\newcommand\getcvmainbubblebordersize{0.1} -\newcommand\getcvsidebarbubblesize{0.6} -\newcommand\getcvsidebarbubblebordersize{0.1} -\newcommand\getcveventbubblesize{0.3} -\newcommand\getceventbubblebordersize{0.1} +\newcommand\cvscale{1} + +%---------------------------------------------------------------------------------------- +% FONT +%---------------------------------------------------------------------------------------- +\newcommand\cvfont{ppl} +\newcommand\cvheadertitlefontscale{2.25} +\newcommand\cvheadersubtitlefontscale{1.5} +\newcommand\cvsectionfontscale{1.75} +\newcommand\cvnamefontscale{1.25} +\newcommand\cvdescriptionfontscale{1} + +%---------------------------------------------------------------------------------------- +% MARGIN +%---------------------------------------------------------------------------------------- +\newcommand\cvtopmargin{5} +\newcommand\cvbottommargin{5} +\newcommand\cvleftmargin{35} +\newcommand\cvrightmargin{10} + +%---------------------------------------------------------------------------------------- +% HEADER +%---------------------------------------------------------------------------------------- +\newcommand\cvavatarradius{20} +\newcommand\cvavatarborderwidth{1} +\newcommand\cvheaderoffset{5} + +%---------------------------------------------------------------------------------------- +% TIMELINE +%---------------------------------------------------------------------------------------- +\newcommand\cvtimelineoffset{25} +\newcommand\cvtimelinewidth{0.5} + +%---------------------------------------------------------------------------------------- +% MAIN +%---------------------------------------------------------------------------------------- +\newcommand\cvmainspace{3} +\newcommand\cvmainbubbleradius{6} +\newcommand\cvmainbubbleborderwidth{1} + +%---------------------------------------------------------------------------------------- +% EVENT +%---------------------------------------------------------------------------------------- +\newcommand\cveventdatewidth{16} +\newcommand\cveventbubbleradius{3} +\newcommand\cveventbubbleborderwidth{1} + +%---------------------------------------------------------------------------------------- +% SIDEBAR +%---------------------------------------------------------------------------------------- +\newcommand\cvsidebarspace{3} +\newcommand\cvsidebarbubbleradius{6} +\newcommand\cvsidebarbubbleborderwidth{1} +\newcommand\cvsitebaroffset{2} + +%---------------------------------------------------------------------------------------- +% COLUMN +%---------------------------------------------------------------------------------------- +\newcommand\cvcolumnratio{0.6} +\newcommand\cvspacebetweencolumns{12} + +%---------------------------------------------------------------------------------------- +% SEPARATOR +%---------------------------------------------------------------------------------------- +\newcommand\cvseparatorscale{1} %---------------------------------------------------------------------------------------- % COLORS %---------------------------------------------------------------------------------------- \usepackage{xcolor} -\definecolor{cvprimarycolor}{RGB}{43, 85, 128} % primary color + +\definecolor{cvprimarycolor}{RGB}{20, 20, 20} % primary color \definecolor{cvalternativecolor}{RGB}{255, 255, 255} % alternative color \definecolor{cvbordercolor}{RGB}{255, 255, 255} % border color \definecolor{cvavatarbordercolor}{RGB}{255, 255, 255} % avatar border color @@ -34,18 +85,36 @@ \definecolor{cvdarkcolor}{RGB}{70, 70, 70} % dark color \definecolor{cvlightcolor}{RGB}{245, 245, 245} % light color - %======================================================================================== -% PRIVATE +% CONFIGURATION %======================================================================================== %---------------------------------------------------------------------------------------- +% RESCALE +%---------------------------------------------------------------------------------------- +\usepackage{fp} +\FPeval{\cvavatarradius}{\cvscale*\cvavatarradius} +\FPeval{\cvavatarborderwidth}{\cvscale*\cvavatarborderwidth} +\FPeval{\cvmainspace}{\cvscale*\cvmainspace} +\FPeval{\cvmainbubbleradius}{\cvscale*\cvmainbubbleradius} +\FPeval{\cvmainbubbleborderwidth}{\cvscale*\cvmainbubbleborderwidth} +\FPeval{\cveventdatewidth}{\cvscale*\cveventdatewidth} +\FPeval{\cveventbubbleradius}{\cvscale*\cveventbubbleradius} +\FPeval{\cveventbubbleborderwidth}{\cvscale*\cveventbubbleborderwidth} +\FPeval{\cvsidebarspace}{\cvscale*\cvsidebarspace} +\FPeval{\cvsidebarbubbleradius}{\cvscale*\cvsidebarbubbleradius} +\FPeval{\cvsidebarbubbleborderwidth}{\cvscale*\cvsidebarbubbleborderwidth} +\FPeval{\cvseparatorscale}{\cvscale*\cvseparatorscale} + +%---------------------------------------------------------------------------------------- % SETTINGS %---------------------------------------------------------------------------------------- +\newcommand\packagename{bubblecv} + \usepackage[a4paper]{geometry} -\geometry{top=0.5cm, bottom=1cm, left=3.5cm, right=1cm} % setup margins +\geometry{top=\cvtopmargin mm, bottom=\cvbottommargin mm, left=\cvleftmargin mm, right=\cvrightmargin mm} -\setlength{\parindent}{0cm} % no indent default +\setlength{\parindent}{0mm} % no indent default \pagenumbering{gobble} % disable page numbering \usepackage{enumitem} @@ -64,13 +133,14 @@ % COLUMNS %---------------------------------------------------------------------------------------- \usepackage{paracol} -\setlength{\columnsep}{\getcvspcebetweencolumns cm} % space between columns +\setlength{\columnsep}{\cvspacebetweencolumns mm} % space between columns \newcommand\iscvsidebar{0} % flag if sidebar is active \newcommand\iscv{0} % flag if cv is active %---------------------------------------------------------------------------------------- % FONTS & ICONS %---------------------------------------------------------------------------------------- +\usepackage{relsize} % for font scaling \usepackage{fontawesome} % allow icons to scale \DeclareFontFamily{U}{fontawesomeOne}{} @@ -86,10 +156,15 @@ \SetBgScale{1} \SetBgAngle{0} \SetBgColor{cvtimelinecolor} -\SetBgContents{\rule{0.05cm}{\textheight}} -\SetBgHshift{-7.925cm} +\SetBgContents{\rule{\cvtimelinewidth mm}{\textheight}} +\SetBgHshift{\dimexpr(\cvtimelineoffset mm - 105 mm)} +\newcommand{\timelinespace}{\the\numexpr\cvleftmargin - \cvtimelineoffset\relax} -\newcommand\getcvtimelinemargin{1.05} +%---------------------------------------------------------------------------------------- +% FOOTNOTE +%---------------------------------------------------------------------------------------- +% \addtolength{\skip\footins}{-12pt} +\setlength{\skip\footins}{0.25\baselineskip} %---------------------------------------------------------------------------------------- % RGB TO ARRAY @@ -97,21 +172,21 @@ % Convert RGB to decode array. % Parameter 1: RGB color. % Parameter 2: Variable to which the array will be assigned. -\newcommand{\rgbtoarray}[2]{ - \extractcolorspecs{#1}\ParseResultModel\ParseResultColor - \convertcolorspec\ParseResultModel\ParseResultColor{rgb}\ParseRgb - \let#2\@empty - \@for\ParseValue:=\ParseRgb\do{ - \edef#2{ - #2 - \ifx#2\@empty - \else - \space - \fi - \ParseValue\space 1 - } - } -} +\newcommand{\rgbtoarray}[2]{% + \extractcolorspecs{#1}\ParseResultModel\ParseResultColor% + \convertcolorspec\ParseResultModel\ParseResultColor{rgb}\ParseRgb% + \let#2\@empty% + \@for\ParseValue:=\ParseRgb\do{% + \edef#2{% + #2% + \ifx#2\@empty% + \else% + \space% + \fi% + \ParseValue\space 1% + }% + }% +}% %---------------------------------------------------------------------------------------- % DRAW CIRCLE @@ -120,76 +195,74 @@ % Parameter 1 (optional): Path to image resource. % Parameter 2 (optional): Image scale. % Parameter 3 (optional): Image color in RGB. -% Parameter 4: Circle radius size in centimeters. -% Parameter 5: Circle border size in centimeters. +% Parameter 4: Circle radius in millimeters. +% Parameter 5: Circle border width in millimeters. % Parameter 6: Circle color in RGB. % Parameter 7: Circle radius color in RGB. -\NewDocumentCommand{\drawcircle}{O{} O{1} O{} m m m m}{ - \ifthenelse{\equal{#3}{}}{}{ - \rgbtoarray{#3}\customdecodearray - }{} - \begin{tikzpicture} - \draw[ - draw=#7, fill=#6, line width=#5cm, - path picture={ - \ifthenelse{\equal{#1}{}}{}{ - \node at (path picture bounding box.center){ - \ifthenelse{\equal{#3}{}}{ - \includegraphics[ - width=\dimexpr#4cm*#2, - height=\dimexpr#4cm*#2]{#1} - }{ - \includegraphics[ - width=\dimexpr#4cm*#2, - height=\dimexpr#4cm*#2, - decodearray={\customdecodearray}]{#1} - } - }; - } - } - ] (0,0) circle (\dimexpr#4cm-#5cm/2\relax); - \end{tikzpicture} -} - +\NewDocumentCommand{\drawcircle}{O{} O{1} O{} m m m m}{% + \ifthenelse{\equal{#3}{}}{}{% + \rgbtoarray{#3}\customdecodearray% + }{}% + \begin{tikzpicture}% + \draw[% + draw=#7, fill=#6, line width=#5mm,% + path picture={% + \ifthenelse{\equal{#1}{}}{}{% + \node at (path picture bounding box.center){% + \ifthenelse{\equal{#3}{}}{% + \includegraphics[% + width=#2\dimexpr#4mm\relax,% + height=#2\dimexpr#4mm\relax]{#1}% + }{% + \includegraphics[% + width=#2\dimexpr#4mm\relax,% + height=#2\dimexpr#4mm\relax,% + decodearray={\customdecodearray}]{#1}% + }% + };% + }% + }% + ] (0,0) circle (\dimexpr#4mm-#5mm/2\relax);% + \end{tikzpicture}% +}% %======================================================================================== -% PUBLIC +% PUBLIC FUNCTIONS %======================================================================================== - %---------------------------------------------------------------------------------------- % CV %---------------------------------------------------------------------------------------- % Main CV function that prepares the entire layout. % Parameter 1 (optional): Path to avatar resource. -% Parameter 2 (optional): Avatar size. +% Parameter 2 (optional): Avatar scale. % Parameter 3 (optional): Avatar color in RGB. % Parameter 4: Name. % Parameter 5: Description. -% Parameter 6: Content. -\NewDocumentEnvironment{cv}{O{} O{2} O{} m m +b}{ - \fontfamily{\getcvfont} +\NewDocumentEnvironment{cv}{O{} O{2} O{} m m}{% + \relscale{\cvscale}% + \fontfamily{\cvfont}% - \unskip\hspace*{-\getcvtimelinemargin cm} - \unskip\hspace*{-\getcvavatarsize cm} - \begin{minipage}{\dimexpr(\getcvavatarsize cm + \getcvavatarsize cm + \fboxsep)} - \protect\ifthenelse{\equal{#1}{}} - {\drawcircle{\getcvavatarsize}{\getcvavatarbordersize}{cvprimarycolor}{cvavatarbordercolor}} - {\drawcircle[resources/#1][#2][#3]{\getcvavatarsize}{\getcvavatarbordersize}{cvprimarycolor}{cvavatarbordercolor}} - \end{minipage} - \unskip\hspace*{\getcvheadermargin cm} - \begin{minipage}{\dimexpr(\linewidth + \getcvtimelinemargin cm - \getcvavatarsize cm - \getcvheadermargin cm - \fboxsep)} - {\Huge #4} - \cvseparator[3] - {\Large #5} - \end{minipage} + \hspace*{-\timelinespace mm}% + \hspace*{-\cvavatarradius mm}% + \begin{minipage}{\dimexpr(\cvavatarradius mm + \cvavatarradius mm)}% + \protect\ifthenelse{\equal{#1}{}}% + {\drawcircle{\cvavatarradius}{\cvavatarborderwidth}{cvprimarycolor}{cvavatarbordercolor}}% + {\drawcircle[resources/#1][#2][#3]{\cvavatarradius}{\cvavatarborderwidth}{cvprimarycolor}{cvavatarbordercolor}}% + \end{minipage}% + \hspace*{\cvheaderoffset mm}% + \begin{minipage}{\dimexpr(\linewidth + \timelinespace mm - \cvavatarradius mm - \cvheaderoffset mm)}% + \textscale{\cvheadertitlefontscale}{#4}% + \cvseparator[3]% + \textscale{\cvheadersubtitlefontscale}{#5}% + \end{minipage}% - \columnratio{\getcvcolumnratio} + \columnratio{\cvcolumnratio}% - \begin{paracol}{2} - #6 - \end{paracol} -}{} + \begin{paracol}{2}% +}{% + \end{paracol}% +}% %---------------------------------------------------------------------------------------- % CV SECTION @@ -199,130 +272,128 @@ % Parameter 2 (optional): Icon scale. % Parameter 3 (optional): Icon color in RGB. % Parameter 4: Section title. -\NewDocumentCommand{\cvsection}{O{} O{1} O{cvalternativecolor} m}{ - \ifthenelse{\equal{\iscvsidebar}{0}}{ - \vspace{\getcvmainspace cm} - \unskip\hspace*{-\getcvtimelinemargin cm} - \unskip\hspace*{-\getcvmainbubblesize cm} - \unskip\hspace*{0.045 cm} - \begin{minipage}{\dimexpr(\getcvmainbubblesize cm + \getcvmainbubblesize cm + \fboxsep)} - \ifthenelse{\equal{#1}{}} - {\protect\drawcircle{\getcvmainbubblesize}{\getcvmainbubblebordersize}{cvprimarycolor}{cvbordercolor}} - {\protect\drawcircle[resources/#1][#2][#3]{\getcvmainbubblesize}{\getcvmainbubblebordersize}{cvprimarycolor}{cvbordercolor}} - \end{minipage} - \unskip\hspace*{\getcveventmargin cm} - \begin{minipage}{\dimexpr(\linewidth + \getcvtimelinemargin cm - \getcvmainbubblesize cm - \getcveventmargin cm - \fboxsep)} - {\LARGE\textbf{#4}} - \end{minipage} - \par - }{ - \vspace{\getcvsidebarspace cm} - \unskip\hspace*{-\getcvsidebarbubblesize cm} - \unskip\hspace*{-\fboxsep} - \begin{minipage}{\dimexpr(\getcvsidebarbubblesize cm + \getcvsidebarbubblesize cm + \fboxsep)} - \protect\ifthenelse{\equal{#1}{}} - {\drawcircle{\getcvsidebarbubblesize}{\getcvsidebarbubblebordersize}{cvprimarycolor}{cvbordercolor}} - {\drawcircle[resources/#1][#2][#3]{\getcvsidebarbubblesize}{\getcvsidebarbubblebordersize}{cvprimarycolor}{cvbordercolor}} - \end{minipage} - \begin{minipage}{\dimexpr(\linewidth - \getcvsidebarbubblesize cm - \fboxsep - \fboxsep)} - {\LARGE\textbf{#4}} - \end{minipage} - \cvseparator - } -} +\NewDocumentCommand{\cvsection}{O{} O{1} O{cvalternativecolor} m}{% + \ifthenelse{\equal{\iscvsidebar}{0}}{% + \vspace*{\cvmainspace mm}% + \hspace*{-\timelinespace mm}% + \hspace*{-\cvmainbubbleradius mm}% + \begin{minipage}{\dimexpr(\cvmainbubbleradius mm + \cvmainbubbleradius mm)}% + \ifthenelse{\equal{#1}{}}% + {\protect\drawcircle{\cvmainbubbleradius}{\cvmainbubbleborderwidth}{cvprimarycolor}{cvbordercolor}}% + {\protect\drawcircle[resources/#1][#2][#3]{\cvmainbubbleradius}{\cvmainbubbleborderwidth}{cvprimarycolor}{cvbordercolor}}% + \end{minipage}% + \hspace*{\dimexpr(\timelinespace mm - \cvmainbubbleradius mm)}% + \begin{minipage}{\linewidth}% + \textscale{\cvsectionfontscale}{\textbf{#4}}% + \end{minipage}% + \cvseparator% + }{% + \vspace*{\cvsidebarspace mm}% + \hspace*{-\cvsidebarbubbleradius mm}% + \begin{minipage}{\dimexpr(\cvsidebarbubbleradius mm + \cvsidebarbubbleradius mm)}% + \protect\ifthenelse{\equal{#1}{}}% + {\drawcircle{\cvsidebarbubbleradius}{\cvsidebarbubbleborderwidth}{cvprimarycolor}{cvbordercolor}}% + {\drawcircle[resources/#1][#2][#3]{\cvsidebarbubbleradius}{\cvsidebarbubbleborderwidth}{cvprimarycolor}{cvbordercolor}}% + \end{minipage}% + \hspace*{\cvsitebaroffset mm}% + \begin{minipage}{\dimexpr(\linewidth - \cvsidebarbubbleradius mm - \cvsitebaroffset mm)}% + \textscale{\cvsectionfontscale}{\textbf{#4}}% + \end{minipage}% + \cvseparator% + }% +}% %---------------------------------------------------------------------------------------- % CV EVENT %---------------------------------------------------------------------------------------- % Contains information about the event. -% Parameter 1 (optional): Date of the event (ending). -% Parameter 2 (optional): Start date of the event. +% Parameter 1 (optional): Start date of the event. +% Parameter 2 (optional): End date of the event. % Parameter 3: Content. -\NewDocumentEnvironment{cvevent}{O{} O{} +b}{ - \ifthenelse{\equal{\iscvsidebar}{0}}{ - \vspace{\getcvmainspace cm} - \unskip\hspace*{-\getcveventbubblesize cm} - \unskip\hspace*{-\getcvtimelinemargin cm} - \unskip\hspace*{-\getcveventdatesize cm} - \unskip\hspace*{-0.03 cm} - \begin{minipage}[t]{\getcveventdatesize cm} - \begin{center} - \ifthenelse{\equal{#1}{}}{}{ - \textbf{#1}\\ - } - \ifthenelse{\equal{#2}{}}{}{ - \textbf{$\uparrow$}\\ - \textbf{#2}\\ - } - \end{center} - \end{minipage} - \begin{minipage}{\dimexpr(\getcveventbubblesize cm + \getcveventbubblesize cm + \fboxsep)} - \protect\drawcircle{\getcveventbubblesize}{\getceventbubblebordersize}{cvprimarycolor}{cvbordercolor} - \end{minipage} - \unskip\hspace*{\dimexpr(\getcveventmargin cm + \getcvmainbubblesize cm - \getcveventbubblesize cm)} - \begin{minipage}[t]{\dimexpr(\linewidth + \getcvtimelinemargin cm - \getcveventmargin cm - \getcvmainbubblesize cm - \fboxsep)} - #3 - \end{minipage} - \par - }{ - \PackageError{\packagename}{The cvevent can be used only in the main column}{} - } -}{} - -%---------------------------------------------------------------------------------------- -% CV SIDEBAR -%---------------------------------------------------------------------------------------- -% Switches the main column to the sidebar. -\newcommand{\cvsidebar}[0]{ - \ifthenelse{\equal{\iscvsidebar}{0}}{ - \switchcolumn - \renewcommand{\iscvsidebar}{1} - }{ - \PackageError{\packagename}{The cvsidebar can be used only once}{} - } -} +\NewDocumentEnvironment{cvevent}{O{} O{} +b}{% + \ifthenelse{\equal{\iscvsidebar}{0}}{% + \hspace*{-\cveventbubbleradius mm}% + \hspace*{-\timelinespace mm}% + \hspace*{-\cveventdatewidth mm}% + \begin{minipage}[t]{\cveventdatewidth mm}% + \begin{center}% + \ifthenelse{\equal{#2}{}}{% + \ifthenelse{\equal{#1}{}}{}{% + \textbf{#1}\par% + }% + }{% + \textbf{#2}\par% + \textbf{$\uparrow$}\par% + \textbf{#1}% + }% + \end{center}% + \end{minipage}% + \begin{minipage}{\dimexpr(\cveventbubbleradius mm + \cveventbubbleradius mm)}% + \protect\drawcircle{\cveventbubbleradius}{\cveventbubbleborderwidth}{cvprimarycolor}{cvbordercolor}% + \end{minipage}% + \hspace*{\dimexpr(\timelinespace mm - \cveventbubbleradius mm)}% + \begin{minipage}[t]{\linewidth}% + #3% + \end{minipage}% + }{% + \PackageError{\packagename}{The cvevent can be used only in the main column}{}% + }% +}{}% %---------------------------------------------------------------------------------------- % CV SEPARATOR %---------------------------------------------------------------------------------------- % Vertical space between paragraphs. % Parameter 1 (optional): Space size in millimeters. -\NewDocumentCommand{\cvseparator}{O{1}}{\vspace{#1mm}\par} +\NewDocumentCommand{\cvseparator}{O{1}}{\vspace*{#1\dimexpr\cvseparatorscale mm\relax}\par} %---------------------------------------------------------------------------------------- % CV NAME %---------------------------------------------------------------------------------------- % The title of the event header. % Parameter 1: Event title. -\newcommand{\cvname}[1]{{\large\textbf{#1}}\cvseparator} +\newcommand{\cvname}[1]{\textscale{\cvnamefontscale}{\textbf{#1}}\cvseparator} %---------------------------------------------------------------------------------------- % CV DESCRIPTION %---------------------------------------------------------------------------------------- % The description of the event header. % Parameter 1: Event description. -\newcommand{\cvdescription}[1]{\textbf{\textit{#1}}\cvseparator[2]} +\newcommand{\cvdescription}[1]{\textscale{\cvdescriptionfontscale}{\textit{\textbf{#1}}}\cvseparator[2]} + +%---------------------------------------------------------------------------------------- +% CV SIDEBAR +%---------------------------------------------------------------------------------------- +% Switches the main column to the sidebar. +\newcommand{\cvsidebar}[0]{% + \ifthenelse{\equal{\iscvsidebar}{0}}{% + \switchcolumn% + \renewcommand{\iscvsidebar}{1}% + }{% + \PackageError{\packagename}{The cvsidebar can be used only once}{}% + }% +}% %---------------------------------------------------------------------------------------- % CV ITEM %---------------------------------------------------------------------------------------- % List item with a label. % Parameter 1 (optional): Icon name from fontawesome package. -% Parameter 2 (optional): Icon scale in range [0, 1]. +% Parameter 2 (optional): Icon diameter in milimeters. % Parameter 3: Content. -\NewDocumentEnvironment{cvitem}{O{Circle} O{0.5} +b}{ - \ifthenelse{\equal{\iscvsidebar}{1}}{ - \begin{minipage}{\dimexpr(#2cm + \fboxsep)} - \makebox(0, 0){\textcolor{cvprimarycolor}{\fontsize{#2\linewidth)}{#2\linewidth)}\csname fa#1\endcsname}} - \end{minipage} - \begin{minipage}{\dimexpr(\linewidth - #2cm - \fboxsep)} - #3 - \end{minipage} - \par - }{ - \PackageError{\packagename}{The cvitem can be used only in the sidebar column}{} - } -}{} +\NewDocumentEnvironment{cvitem}{O{Circle} O{2.5} +b}{% + \ifthenelse{\equal{\iscvsidebar}{1}}{% + \begin{minipage}{\cvscale\dimexpr#2mm\relax}% + \makebox(0, 0){\textcolor{cvprimarycolor}{\fontsize{\cvscale\dimexpr#2mm\relax}{\cvscale\dimexpr#2mm\relax}\csname fa#1\endcsname}}% + \end{minipage}% + \hspace*{\cvsitebaroffset mm}% + \begin{minipage}{\dimexpr(\linewidth - \cvsitebaroffset mm - \cvscale\dimexpr#2mm\relax)}% + #3% + \end{minipage}% + }{% + \PackageError{\packagename}{The cvitem can be used only in the sidebar column}{}% + }% +}{}% %---------------------------------------------------------------------------------------- % CV SKILL @@ -331,62 +402,31 @@ % Parameter 1: Name of skill. % Parameter 2: Skill level. % Parameter 3: Percent of the progress-bar in range [0, 1]. -\newcommand{\cvskill}[3] { - \ifthenelse{\equal{\iscvsidebar}{1}}{ - \begin{tabularx}{\linewidth}{>{\raggedright\arraybackslash}X>{\raggedleft\arraybackslash}X} - \textcolor{black}{\textbf{#1}} & \textcolor{cvprimarycolor}{#2} \\ - \end{tabularx} +\newcommand{\cvskill}[3] {% + \ifthenelse{\equal{\iscvsidebar}{1}}{% + \begin{tabularx}{\linewidth}{>{\raggedright\arraybackslash}X>{\raggedleft\arraybackslash}X}% + \textcolor{black}{\textbf{#1}} & \textcolor{cvprimarycolor}{#2} \\% + \end{tabularx}% - \begin{tikzpicture}[scale=1,rounded corners=2pt,very thin] - \fill [cvlightcolor] (0,0) rectangle (1\linewidth, 0.15); - \fill [cvprimarycolor] (0,0) rectangle (#3\linewidth, 0.15); - \end{tikzpicture} - \par\cvseparator[2] - }{ - \PackageError{\packagename}{The cvskill can be used only in the sidebar column}{} - } -} + \begin{tikzpicture}[scale=1,rounded corners=\cvscale*0.5mm,very thin]% + \fill [cvlightcolor] (0,0) rectangle (\linewidth, 0.15*\cvscale);% + \fill [cvprimarycolor] (0,0) rectangle (#3\linewidth, 0.15*\cvscale);% + \end{tikzpicture}% + \cvseparator[2]% + }{% + \PackageError{\packagename}{The cvskill can be used only in the sidebar column}{}% + }% +}% %---------------------------------------------------------------------------------------- % CV FOOTNOTE %---------------------------------------------------------------------------------------- % Footnote without order number and hyperlink. % Parameter 1: Footnote content. -\newcommand\cvfootnote[1]{ - \begingroup - \renewcommand\thefootnote{}\NoHyper\footnote{#1} - \addtocounter{footnote}{-1} - \endgroup -} - -%---------------------------------------------------------------------------------------- -% CV FONT -%---------------------------------------------------------------------------------------- -% Change font family. -% Parameter 1: Font code. -\newcommand{\cvfont}[1]{\renewcommand{\getcvfont}[0]{#1}} +\newcommand\cvfootnote[1]{% + \begingroup% + \renewcommand\thefootnote{}\NoHyper\footnote{#1}% + \addtocounter{footnote}{-1}% + \endgroup% +}% -%---------------------------------------------------------------------------------------- -% CV MAIN SPACING -%---------------------------------------------------------------------------------------- -% Spacing between elements in main column. -% Parameter 1: Main column spacing in centimeters. -\newcommand{\cvmainspacing}[1]{ - \renewcommand{\getcvmainspace}[0]{#1} -} - -%---------------------------------------------------------------------------------------- -% CV SIDEBAR SPACING -%---------------------------------------------------------------------------------------- -% Spacing between elements in sidebar column. -% Parameter 1: Sidebar column spacing in centimeters. -\newcommand{\cvsidebarspacing}[1]{ - \renewcommand{\getcvsidebarspace}[0]{#1} -} - -%---------------------------------------------------------------------------------------- -% CV COLUMN RATIO -%---------------------------------------------------------------------------------------- -% Change column ratio. -% Parameter 1: New ratio in range [0, 1]. -\newcommand{\cvcolumnratio}[1]{\renewcommand{\getcvcolumnratio}[0]{#1}} diff --git a/main.tex b/main.tex @@ -1,17 +1,14 @@ \documentclass{article} \usepackage{bubblecv} -\cvmainspacing{0.25} -\cvsidebarspacing{0.3} -\cvcolumnratio{0.63} -\definecolor{cvprimarycolor}{RGB}{20, 20, 20} - \begin{document} + \begin{cv}[avatar]{James Bond}{Secret Agent} \cvsection[summary]{Profile} %----------------------------------------------------------- + Highly skilled secret agent with a license to kill. Bringing together outstanding combat and intelligence abilities with a charismatic and persuasive personality. A dedicated and adaptable professional committed to global security. @@ -19,7 +16,7 @@ A dedicated and adaptable professional committed to global security. \cvsection[work]{Work experience} %------------------------------------------------------ -\begin{cvevent}[present][1962] +\begin{cvevent}[1962][present] \cvname{Secret Agent} \cvdescription{MI6 Intelligence Agency, London} \begin{itemize} @@ -33,7 +30,7 @@ A dedicated and adaptable professional committed to global security. \cvsection[education]{Education} %------------------------------------------------------ -\begin{cvevent}[1962][1958] +\begin{cvevent}[1958][1962] \cvname{Intelligence Academy} \cvdescription{MI6 Training Facility, London} \textbf{Courses and Achievements:} @@ -48,22 +45,24 @@ A dedicated and adaptable professional committed to global security. \cvsection[target]{Missions} %---------------------------------------------------------- - \begin{cvevent}[2002] \cvname{Die Another Day} Uncovered a North Korean general's plan to use a satellite weapon to create a war between North and South Korea. \end{cvevent} +\cvseparator[2] \begin{cvevent}[1999] \cvname{The World Is Not Enough} Protected an oil heiress from a terrorist plotting to exploit her family's resources and trigger a global meltdown. \end{cvevent} +\cvseparator[2] \begin{cvevent}[1997] \cvname{Tomorrow Never Dies} Investigated a media mogul's plot to provoke a war between the UK and China for increased ratings and power. \end{cvevent} +\cvseparator[2] \begin{cvevent}[1995] \cvname{GoldenEye} Prevented the use of the GoldenEye satellite weapon system by a rogue agent to cause global financial chaos. @@ -72,27 +71,28 @@ A dedicated and adaptable professional committed to global security. \cvsidebar %----------------------------------------------------------------------------- + \cvsection[contact]{Contact} %---------------------------------------------------------- -\begin{cvitem}[Envelope][0.6] +\begin{cvitem}[Envelope][4] \textbf{Email}\\ \href{mailto:james.bond@mi6.gov}{\texttt{james.bond@mi6.gov}} \end{cvitem} \cvseparator[3] -\begin{cvitem}[Phone][0.6] +\begin{cvitem}[Phone][4] \textbf{Phone}\\ \href{tel:+442071234567}{\texttt{+44 207 123 4567}} \end{cvitem} \cvseparator[3] -\begin{cvitem}[Home][0.6] +\begin{cvitem}[Home][4] \textbf{Address}\\ MI6 Headquarters\\ London, United Kingdom \end{cvitem} \cvseparator[3] -\begin{cvitem}[Globe][0.6] +\begin{cvitem}[Globe][4] \textbf{Website}\\ \href{https://www.mi6.gov.uk}{\texttt{www.mi6.gov.uk}} \end{cvitem} @@ -141,6 +141,7 @@ A dedicated and adaptable professional committed to global security. \cvsection[languages]{Languages} %-------------------------------------------------------- + \cvskill{English}{Fluent}{1.0} \cvskill{French}{Intermediate}{0.6} \cvskill{Russian}{Basic}{0.3} @@ -153,3 +154,4 @@ A dedicated and adaptable professional committed to global security. } \end{document} +