Skip to content

Commit

Permalink
Documentation for new sidebar line
Browse files Browse the repository at this point in the history
The user-level commands for the sidebar line and the corresponding skill
and language templates have been addded to the manual.
The options for the hint width and the indentation have also been added.
The progressbar linewdith option is documented and described.
The examples have been recompiled to check for inconsistencies.

This commit should properly complete #7 (after necessary further testing).
  • Loading branch information
polyluxus committed Aug 24, 2020
1 parent 7dade15 commit 59999d3
Show file tree
Hide file tree
Showing 28 changed files with 150 additions and 15 deletions.
Binary file modified doc/latex/polycv.pdf
Binary file not shown.
Binary file modified examples/letter-mwe/main.page-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/letter-mwe/main.pdf
Binary file not shown.
Binary file modified examples/letter-one-page-appendix/main.page-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/letter-one-page-appendix/main.page-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/letter-one-page-appendix/main.pdf
Binary file not shown.
Binary file modified examples/letter-one-page/main.page-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/letter-one-page/main.page-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/letter-one-page/main.pdf
Binary file not shown.
Binary file modified examples/one-page-color/main.page-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/one-page-color/main.pdf
Binary file not shown.
Binary file modified examples/one-page-letter/main.page-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/one-page-letter/main.page-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/one-page-letter/main.pdf
Binary file not shown.
Binary file modified examples/one-page/main.page-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/one-page/main.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/one-page/main.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\documentclass[%draft,
\documentclass[draft,
biblatex, signcv, sidebarwidth=5.5cm, 11pt, a4paper]{polycv}

\usepackage{mwe} % Only for this example
Expand Down
Binary file added examples/skill-redefinition-side/main.page-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/skill-redefinition-side/main.pdf
Binary file not shown.
82 changes: 82 additions & 0 deletions examples/skill-redefinition-side/main.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
\documentclass[draft,
signcv, sidebarwidth=5.5cm, 11pt, a4paper]{polycv}

\usepackage{mwe} % Only for this example
\errorcontextlines=20

% Fonts declaration
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{libertine}

% Language settings
\usepackage[english]{babel}
\usepackage{csquotes}

% Custom setup for the CV

\definecolor{mycol}{HTML}{387147}
\setcolprimary{mycol}

% Redefine language command to use squares, not the progress bar
% Needs change in the command
\renewcommand\cvlanguage[2]{%
\cvline{\levelbarsquares[0.7\linewidth]{#2}}{#1}}

\renewcommand\cvskill[2]{%
\cvline{\levelbarcircles[0.8\linewidth]{#2}}{#1}}

% Redefine the skill setup in the sidebar
% This is a v1.0 workaround
\renewcommand{\sidebarskill}[2]{%
\sbline{#1}{\levelbarcircles[\linewidth]{#2}}}

% Fill some contents variables
\title{Curriculum Vitae}
\author{Example Author}
\position{Title / Position}
\street{Street 123}
\location{Town, Country}
\email{[email protected]}
\phone{+1 234 56 78 900}
\mobile{+1 234 56 78 999}
\orcid{0000-0001-0002-0003}
\github{ex-ample}
\signaturefile{example-image-16x9}

\begin{document}
\begin{polycvfirstpage}
\begin{polycvsidebar}%
\includegraphics[width=1.0\linewidth]{example-image-1x1}\\[2ex]

\section{Personal Details}
% Universally usable line:
\cvitemline{\faStar}{01. 01. 1984,\newline Birthplace, Country}
\cvlineaddress
\cvlineemail
\cvlinephone
\cvlinemobile
\cvlineorcid
\cvlinegithub
\cvitemline{\faTerminal}{bash, zsh, fish}
\null
\section{Redef. Skills}
\cvskill{\LaTeX}{0.8}
\cvskill{Reading}{0.9}
\cvskill{Writing}{0.7}
\cvskill{Calculating}{0.3}
\cvskill{Gaming}{0.95}
\end{polycvsidebar}%
\section{Languages}
\cvlanguage{English (native)}{5}
\cvlanguage{Leetspeak (B2)}{3}

\section{Skills}
\cvskill{\LaTeX}{0.8}
\cvskill{Reading}{0.9}
\cvskill{Writing}{0.7}
\cvskill{Calculating}{0.3}
\cvskill{Gaming}{0.95}
\end{polycvfirstpage}
\end{document}

Binary file modified examples/skill-redefinition/main.page-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/skill-redefinition/main.pdf
Binary file not shown.
Binary file modified examples/two-page-letter/main.page-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/two-page-letter/main.page-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/two-page-letter/main.page-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/two-page-letter/main.pdf
Binary file not shown.
69 changes: 61 additions & 8 deletions source/latex/polycv.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
%</driver>
% \fi
%
% \CheckSum{0} %%% 1035
% \CheckSum{1043}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
Expand Down Expand Up @@ -360,6 +360,20 @@
% \lstinline`\sethintcolwidth`\marg{length} and
% via \lstinline`\sethintcolsep`\marg{length}, respectively.
%
% \DescribeOption{sidebarhint}
% \DescribeDefault{1.6cm}
% \margintag{v1.1.dev}
% The hint column width (for the command \lstinline`\sbline`) for the sidebar can be set
% via the \lstinline`sidebarhint` option. One notable difference to the main frame is that
% the hint follows the description.
%
% \DescribeOption{sidebarindent}
% \DescribeDefault{0.2cm}
% \margintag{v1.1.dev}
% In order to align better with the items in the sidebar, an indentation value can be specified.
% This values will also be used to separate the description from the hint in the
% \lstinline`\sbline` macro.
%
% \DescribeOption{letterindent}
% \DescribeDefault{1em}
% In the letter environment the indentation of the first line of a paragraph can be adjusted
Expand Down Expand Up @@ -413,6 +427,15 @@
% The height of the bar can be controlled with the \lstinline`progbarheight` option.
% \DescribeMacro{\setprogbarheight}
% It can also be set via \lstinline`\setprogbarheight`\marg{length}.
% \DescribeOption{progbarlinewidth}
% \DescribeDefault{0.2mm}
% \margintag{v1.1.dev}
% The line width with which the progressbar is drawn can be set with the
% \lstinline`progbarlienwidth` option. There is no corresponding set macro.
% This linewidth will also be used by the level bar for the individual items.
% Setting this value to zero does not mean not drawing the line; it'll only use the
% smallest possible value (depending on the platform) and is not recommended.
% It is currently not possible to switch of the outline.
% \DescribeOption{progbarunits}
% \DescribeDefault{5}
% The level bar is divided into boxes or circles. The number of these items can be set
Expand Down Expand Up @@ -594,6 +617,13 @@
% is available.
% This command is primarily intended for the sidebar, but it could be used somewhere else.
% It is also used for the specialised templates (see section~\ref{sec:templates-special}).
%
% \DescribeMacro{\sbline}
% The \lstinline`\sbline`\oarg{width}\marg{description}\marg{hint} macro is intended to be used in
% the sidebar of the first page. It divides a line into two boxes. Oposite to the \lstinline`\cvline`
% macro described above, the variable width description is set first, followed by the fixed width
% hint. The first box is indented, and they are both separated by the same value, which can be controlled
% via the options at load time.
%
% \DescribeMacro{\progressbar}
% The \lstinline`\progressbar`\oarg{width}\marg{level} typesets a progress bar.
Expand Down Expand Up @@ -716,6 +746,24 @@
% \iffalse
%</example>
% \fi
%
% \DescribeMacro{\sidebarskill}
% \DescribeMacro{\sidebarlanguage}
% \margintag{v1.1.dev}
% There are alternative versions for the languages and skills which use the \lstinline`\sbline` template.
% This has been introduced to allow for easier modification of the sidebar progress indicators analogous
% to what is described above for the main document.
% The following example switches from the progress bar to squares:
% \iffalse
%<*example>
% \fi
\begin{lstlisting}
\renewcommand\sbskill[2]{%
\sbline{#1}{\levelbarsquares{#2}}}
\end{lstlisting}
% \iffalse
%</example>
% \fi
%
% \DescribeMacro{\cvlineaddress}
% \DescribeMacro{\cvlineemail}
Expand Down Expand Up @@ -1692,18 +1740,20 @@
%
% First a few simple filled and unfilled symbols are defined as tikz pictures.
% \begin{macro}{\polycv@square@nofill}
% \changes{v1.1.dev}{2020/08/24}{use linewidth option for progressbar}
% \begin{macro}{\polycv@square@filled}
% \changes{v1.1.dev}{2020/08/24}{use linewidth option for progressbar}
% Square symbols, the height and width are set to the height of the progress bar,
% which is defined via the options.
%
% \begin{macrocode}
\newcommand{\polycv@square@nofill}[1][\polycvprogbarheight]{%
\begin{tikzpicture}[x=#1, y=#1]%
\begin{tikzpicture}[x=#1-\polycvprogbarlinewidth, y=#1-\polycvprogbarlinewidth]%
\filldraw[polycvprogbarnofill] (0,0) rectangle (1,1);%
\draw[polycvtextcolor, line width=\polycvprogbarlinewidth] (0,0) rectangle (1,1);%
\end{tikzpicture}}
\newcommand{\polycv@square@filled}[1][\polycvprogbarheight]{%
\begin{tikzpicture}[x=#1, y=#1]%
\begin{tikzpicture}[x=#1-\polycvprogbarlinewidth, y=#1-\polycvprogbarlinewidth]%
\filldraw[polycvprogbarfilled] (0,0) rectangle (1,1);%
\draw[polycvtextcolor, line width=\polycvprogbarlinewidth] (0,0) rectangle (1,1);%
\end{tikzpicture}}
Expand All @@ -1712,16 +1762,18 @@
% \end{macro}
%
% \begin{macro}{\polycv@circle@nofill}
% \changes{v1.1.dev}{2020/08/24}{use linewidth option for progressbar}
% \begin{macro}{\polycv@circle@filled}
% \changes{v1.1.dev}{2020/08/24}{use linewidth option for progressbar}
% Analogous circle symbols.
% \begin{macrocode}
\newcommand{\polycv@circle@nofill}[1][\polycvprogbarheight]{%
\begin{tikzpicture}[x=#1, y=#1]%
\begin{tikzpicture}[x=#1-\polycvprogbarlinewidth, y=#1-\polycvprogbarlinewidth]%
\filldraw[polycvprogbarnofill] (0.5,0.5) circle [radius=0.5];%
\draw[polycvtextcolor, line width=\polycvprogbarlinewidth] (0.5,0.5) circle [radius=0.5];%
\end{tikzpicture}}
\newcommand{\polycv@circle@filled}[1][\polycvprogbarheight]{%
\begin{tikzpicture}[x=#1, y=#1]%
\begin{tikzpicture}[x=#1-\polycvprogbarlinewidth, y=#1-\polycvprogbarlinewidth]%
\filldraw[polycvprogbarfilled] (0.5,0.5) circle [radius=0.5];%
\draw[polycvtextcolor, line width=\polycvprogbarlinewidth] (0.5,0.5) circle [radius=0.5];%
\end{tikzpicture}}
Expand Down Expand Up @@ -1847,6 +1899,7 @@
% \end{macro}
%
% \begin{macro}{\progressbar}
% \changes{v1.1.dev}{2020/08/24}{use linewidth option for progressbar}
% The progress bar is a simple tikz image consisting of three rectangles:
% one denoting the level using the fill color, one using the empty color,
% and an empty box encompassing all as a frame.
Expand Down Expand Up @@ -1877,8 +1930,8 @@
}{\edef\level@coord{1}}%
\hfill%
\begin{tikzpicture}[%
x=#1-2*\polycvprogbarlinewidth,%
y=\polycvprogbarheight-2*\polycvprogbarlinewidth]%
x=#1-\polycvprogbarlinewidth,%
y=\polycvprogbarheight-\polycvprogbarlinewidth]%
\filldraw[polycvprogbarnofill]%
(0, 0) rectangle (1, 1) ;%
\filldraw[polycvprogbarfilled]%
Expand Down Expand Up @@ -2000,7 +2053,7 @@
% A generic command to typeset a line in the sidebar as a single parbox.
% It consists of two parboxes, the right being the sidebar hint column, and the left the description.
% It is basically the reverse layout of the \lstinline`\cvline` macro.
% One example usage is: \lstinline`\sbline[width]{hint}{description}`.
% One example usage is: \lstinline`\sbline[width]{description}{hint}`.
% This macro essentially replaces the original internal macro \lstinline`\polycv@sidebar@skill`.
% \begin{macrocode}
\providecommand\sbline{}
Expand Down
12 changes: 6 additions & 6 deletions tex/latex/polycv.cls
Original file line number Diff line number Diff line change
Expand Up @@ -358,22 +358,22 @@
\ignorespaces%
}
\newcommand{\polycv@square@nofill}[1][\polycvprogbarheight]{%
\begin{tikzpicture}[x=#1, y=#1]%
\begin{tikzpicture}[x=#1-\polycvprogbarlinewidth, y=#1-\polycvprogbarlinewidth]%
\filldraw[polycvprogbarnofill] (0,0) rectangle (1,1);%
\draw[polycvtextcolor, line width=\polycvprogbarlinewidth] (0,0) rectangle (1,1);%
\end{tikzpicture}}
\newcommand{\polycv@square@filled}[1][\polycvprogbarheight]{%
\begin{tikzpicture}[x=#1, y=#1]%
\begin{tikzpicture}[x=#1-\polycvprogbarlinewidth, y=#1-\polycvprogbarlinewidth]%
\filldraw[polycvprogbarfilled] (0,0) rectangle (1,1);%
\draw[polycvtextcolor, line width=\polycvprogbarlinewidth] (0,0) rectangle (1,1);%
\end{tikzpicture}}
\newcommand{\polycv@circle@nofill}[1][\polycvprogbarheight]{%
\begin{tikzpicture}[x=#1, y=#1]%
\begin{tikzpicture}[x=#1-\polycvprogbarlinewidth, y=#1-\polycvprogbarlinewidth]%
\filldraw[polycvprogbarnofill] (0.5,0.5) circle [radius=0.5];%
\draw[polycvtextcolor, line width=\polycvprogbarlinewidth] (0.5,0.5) circle [radius=0.5];%
\end{tikzpicture}}
\newcommand{\polycv@circle@filled}[1][\polycvprogbarheight]{%
\begin{tikzpicture}[x=#1, y=#1]%
\begin{tikzpicture}[x=#1-\polycvprogbarlinewidth, y=#1-\polycvprogbarlinewidth]%
\filldraw[polycvprogbarfilled] (0.5,0.5) circle [radius=0.5];%
\draw[polycvtextcolor, line width=\polycvprogbarlinewidth] (0.5,0.5) circle [radius=0.5];%
\end{tikzpicture}}
Expand Down Expand Up @@ -468,8 +468,8 @@
}{\edef\level@coord{1}}%
\hfill%
\begin{tikzpicture}[%
x=#1-2*\polycvprogbarlinewidth,%
y=\polycvprogbarheight-2*\polycvprogbarlinewidth]%
x=#1-\polycvprogbarlinewidth,%
y=\polycvprogbarheight-\polycvprogbarlinewidth]%
\filldraw[polycvprogbarnofill]%
(0, 0) rectangle (1, 1) ;%
\filldraw[polycvprogbarfilled]%
Expand Down

0 comments on commit 59999d3

Please sign in to comment.