Adds \locationname, \datename and some accsupp tweaks (#76) with README updates

This commit is contained in:
liantze
2023-08-09 20:58:42 +08:00
parent 04e0e5ec00
commit a41572b0e4
7 changed files with 97 additions and 30 deletions

View File

@@ -1,8 +1,15 @@
# AltaCV, yet another LaTeX CV/Résumé class
v1.6.5 (3 Nov 2022), by LianTze Lim (liantze@gmail.com)
v1.7 (9 Aug 2023), by LianTze Lim (liantze@gmail.com)
* Added \mynames{...} to specify names to be highlighted in the publication list on 3 Nov 2022
* v1.7 (9 Aug 2023) changes:
- `\itemmarker` and `\ratingmarker` renamed to `\cvItemMarker` and `\cvRatingMarker`
- Added `\cvLocationMarker` and `\cvDateMarker` so that these icons in `\cvevent`
can be re-defined
- Added `\locationname` and `\datename` for replacement text of the location and date
markers in `\cvevent`
- Other tweaks with `accsupp`
* Added `\mynames{...}` to specify names to be highlighted in the publication list on 3 Nov 2022
* Starred `\NewInfoField*` command to handle Mastodon; Icons, `\cvskills`, `\wheelchart` have "copyable" text values; `\cvskill` supports numerical values {0.5, 1, ..., 4.5, 5} on 21 May 2021
* Moved `biblatex`-related code to `*.cfg` files for easier edit on 8 May 2021
* Removed dependency on `academicons` on 12 Apr 2021
@@ -41,7 +48,10 @@ Though if you're creating your own CV/résumé, you'd probably prefer using the
* Note that to compile with XeLaTeX, you should use a command line as follows, per [the `pdfx` documentation](http://mirrors.ctan.org/macros/latex/contrib/pdfx/pdfx.pdf): `xelatex -shell-escape -output-driver="xdvipdfmx -z 0" sample.tex`
* The samples here use the [Lato](http://www.latofonts.com/lato-free-fonts/) and [Roboto Slab fonts](https://github.com/googlefonts/robotoslab). Feel free to use a different typeface package instead—often a different typeface will change the entire CV's feel.
## `sample.tex` [WAS `sample-alt.tex` 2 FEBRUARY 2020, DEFAULT SINCE 10 MAY 2020] ##
## `sample.tex` ##
This file was first created as `sample-alt.tex` on 2 Feb 2020. **It is the default sample LaTeX file since 10 May 2020.**
Many users have overlooked the optional argument of `\cvsection` to insert the right sidebar contents, and often confused that the right sidebar doesn't automatically break across pages. This new layout uses the `paracol` package for typesetting the left and right columns that _can_ break across pages. It also makes changing the column widths easier:
```latex
@@ -120,7 +130,8 @@ then you can use `\mastodon` with TWO arguments where the 2nd argument is the fu
## Configurable colours
Use `\colorlet` or `\definecolor` to change these.
Use `\colorlet` or `\definecolor` to change these; see examples
in preamble of `sample.tex`.
* `accent`
* `emphasis`
* `heading`
@@ -132,7 +143,8 @@ Use `\colorlet` or `\definecolor` to change these.
## Configurable fonts
Use `\renewcommand` to change these.
Use `\renewcommand` to change these; see examples in preamble of
`sample.tex`.
* `\namefont`
* `\taglinefont`
* `\personalinfofont`
@@ -141,17 +153,33 @@ Use `\renewcommand` to change these.
## Configurable icons
Use `\renewcommand` to change these.
* `\cvItemMarker`
* `\cvRatingMarker`
* `\cvDateMarker`
* `\cvLocationMarker`
Use `\renewcommand` to change these; see examples in preamble of
`sample.tex`.
* `\cvItemMarker` (bullets for `itemize`)
* `\cvRatingMarker` (for `\cvskill`)
* `\cvDateMarker` (for date in `\cvevent`)
* `\cvLocationMarker` (for location in `\cvevent` and `\location`)
## Is this template ATS-friendly?
There is some discussion about this in issue #76. No actual claims are made, because we don't really know how each ATS system works. But this template uses `accsupp` to add replacement text for the icons, which may help — e.g. the `\faGithub` icon rendered in the PDF would copy-and-paste from Acrobat Reader, as exactly the text `\faGithub`.
You could try running `pdftotext -raw sample.pdf` to view the text-only version of the CV, with the columnar layout removed.
Alternatively running `pdftotext -layout sample.pdf` to view the text-only version in a pseudo-two-column layout.
In particular `\locationname` and `\datename` hold the replacement text for the location and date/duration icon in `\cvevent`. These can be re-defined especially if your CV is in a non-English language, e.g. Spanish (see commented examples in preamble of `sample.tex`):
```latex
\renewcommand{\locationname}{Ubicación}
\renewcommand{\datename}{Fecha}
```
---
## `legacy/sample-old.tex`
## `legacy/sample-old.tex` (for historical record only)
This is the original sample template file until 5 May 2020. The right sidebar is actually a _`marginpar`_, so it doesn't support footnote and cannot automatically break across pages if it's too long. You would need to split your right sidebar contents into separate files e.g. `p1sidebar.tex` and `p2sidebar.tex`, and insert them as the optional argument of the `\cvsection{...}` that you want to align them with:
This was the original sample template file until 5 May 2020. The right sidebar is actually a _`marginpar`_, so it doesn't support footnote and cannot automatically break across pages if it's too long. You would need to split your right sidebar contents into separate files e.g. `p1sidebar.tex` and `p2sidebar.tex`, and insert them as the optional argument of the `\cvsection{...}` that you want to align them with:
```latex
\cvsection[p1sidebar]{Experience}

View File

@@ -1,5 +1,5 @@
%%%%%%%%%%%%%%%%%
% This is altacv.cls (v1.6.5, 3 Nov 2022) written by
% This is altacv.cls (v1.7, 9 Aug 2023) written by
% LianTze Lim (liantze@gmail.com).
%
%% It may be distributed and/or modified under the
@@ -19,7 +19,7 @@
%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{altacv}[2022/11/03 AltaCV v1.6.5, yet another alternative class for a resume/curriculum vitae.]
\ProvidesClass{altacv}[2023/08/09 AltaCV v1.7, yet another alternative class for a resume/curriculum vitae.]
%% v1.1: Optionally load academicons
%% v1.4: Nope, academicons is unnecessary; fontawesome5 has \faOrcid.
@@ -96,13 +96,15 @@
\colorlet{body}{black!80!white}
\colorlet{name}{heading}
\colorlet{tagline}{accent}
% Renamed or added v1.7
\newcommand{\cvItemMarker}{{\small\textbullet}}
\newcommand{\cvRatingMarker}{\faCircle}
\let\itemmarker\cvItemMarker % for backward compatibility
\let\ratingmarker\cvRatingMarker % for backward compatibility
\newcommand{\cvDateMarker}{\faCalendar[regular]}
\newcommand{\cvLocationMarker}{\faMapMarker}
\newcommand{\locationname}{Location}
\newcommand{\datename}{Date}
\RequirePackage{tikz}
\usetikzlibrary{arrows}
@@ -144,21 +146,27 @@
%% v1.3.1: using \unfriendlydetokenize to avoid breaking unicode
%% v1.6: Use accsupp so that when copying/pasting the icon from PDF to a text
%% file, the icon name is pasted
%% v1.7: Some tweaks/corrections so that accsupp is for icons only
\ExplSyntaxOn
\NewDocumentCommand{\printinfo}{m m o}{%
\BeginAccSupp{method=escape,ActualText={#1:~#2}}
% \BeginAccSupp{method=escape,ActualText={#1:~#2}}
\IfNoValueTF{#3}{%
\mbox{\textcolor{accent}{\normalfont #1}~\utffriendlydetokenize{#2}\hspace{2em}}%
\mbox{\textcolor{accent}%
{\BeginAccSupp{method=escape,ActualText={#1:}}\normalfont #1\EndAccSupp{}}%
~\utffriendlydetokenize{#2}\hspace{2em}}%
}{%
\if@withhyper%
\mbox{\textcolor{accent}{\normalfont #1}~
\href{#3}{\utffriendlydetokenize{#2}}\hspace{2em}}
\mbox{\textcolor{accent}%
{\BeginAccSupp{method=escape,ActualText={#1:}}\normalfont #1\EndAccSupp{}}%
~\href{#3}{\utffriendlydetokenize{#2}}\hspace{2em}}
\else%
\ClassWarning{Please specify [withhyper] option to enable hyperlinks. Printing out full hyperlink prefix #1 for now.}%
\mbox{\textcolor{accent}{\normalfont #1}~{\utffriendlydetokenize{#3#2}}\hspace{2em}}%
\mbox{\textcolor{accent}
{\BeginAccSupp{method=escape,ActualText={#1:}}\normalfont #1\EndAccSupp{}}%
~{\utffriendlydetokenize{#3#2}}\hspace{2em}}%
\fi%
}%
\EndAccSupp{}
% \EndAccSupp{}
}%
@@ -284,20 +292,30 @@
}
% v1.1.4: fixes inconsistent font size
% v1.7: adds accsupp ActualText for location and date markers
\newcommand{\cvevent}[4]{%
{\large\color{emphasis}#1\par}
\smallskip\normalsize
\ifstrequal{#2}{}{}{
\textbf{\color{accent}#2}\par
\smallskip}
\ifstrequal{#3}{}{}{{\small\makebox[0.5\linewidth][l]{\cvDateMarker~#3}}}%
\ifstrequal{#4}{}{}{{\small\makebox[0.5\linewidth][l]{\cvLocationMarker~#4}}}\par
\ifstrequal{#3}{}{}{%
{\small\makebox[0.5\linewidth][l]%
{\BeginAccSupp{method=pdfstringdef,ActualText={\datename:}}\cvDateMarker\EndAccSupp{}%
~#3}%
}}%
\ifstrequal{#4}{}{}{%
{\small\makebox[0.5\linewidth][l]%
{\BeginAccSupp{method=pdfstringdef,ActualText={\locationname:}}\cvLocationMarker\EndAccSupp{}%
~#4}%
}}\par
\medskip\normalsize
}
% v1.7: adds accsupp for the icon as well
\newcommand{\cvachievement}[3]{%
\begin{tabularx}{\linewidth}{@{}p{2em} @{\hspace{1ex}} >{\raggedright\arraybackslash}X@{}}
\multirow{2}{*}{\Large\color{accent}#1} & \bfseries\textcolor{emphasis}{#2}\\
\multirow{2}{*}{\Large\color{accent}\BeginAccSupp{method=escape,ActualText={#1: }}#1\EndAccSupp{}} & \bfseries\textcolor{emphasis}{#2}\\
& #3
\end{tabularx}%
\smallskip

Binary file not shown.

View File

@@ -1,6 +1,6 @@
%%%%%%%%%%%%%%%%%
% This is an sample CV template created using altacv.cls
% (v1.6.5, 3 Nov 2022) written by LianTze Lim (liantze@gmail.com), based on the
% (v1.7, 9 Aug 2023) written by LianTze Lim (liantze@gmail.com), based on the
% CV created by BusinessInsider at http://www.businessinsider.my/a-sample-resume-for-marissa-mayer-2016-7/?r=US&IR=T
%
%% It may be distributed and/or modified under the
@@ -16,7 +16,6 @@
% \documentclass[10pt,a4paper,normalphoto]{altacv}
\documentclass[10pt,a4paper,ragged2e,withhyper]{altacv}
%% AltaCV uses the fontawesome5 package.
%% See http://texdoc.net/pkg/fontawesome5 for full list of symbols.
@@ -29,6 +28,8 @@
% Change the font if you want to, depending on whether
% you're using pdflatex or xelatex/lualatex
% WHEN COMPILING WITH XELATEX PLEASE USE
% xelatex -shell-escape -output-driver="xdvipdfmx -z 0" mmayer.tex
\ifxetexorluatex
% If using xelatex or lualatex:
\setmainfont{Lato}
@@ -60,11 +61,20 @@
% for \cvskill if you want to
\renewcommand{\cvItemMarker}{{\small\textbullet}}
\renewcommand{\cvRatingMarker}{\faCircle}
% ...and the markers for the duration/location for \cvevent
% ...and the markers for the date/location for \cvevent
% \renewcommand{\cvDateMarker}{\faCalendar*[regular]}
% \renewcommand{\cvLocationMarker}{\faMapMarker*}
% If your CV/résumé is in a language other than English,
% then you probably want to change these so that when you
% copy-paste from the PDF or run pdftotext, the location
% and date marker icons for \cvevent will paste as correct
% translations. For example Spanish:
% \renewcommand{\locationname}{Ubicación}
% \renewcommand{\datename}{Fecha}
%% Use (and optionally edit if necessary) this .cfg if you
%% want to use an author-year reference style like APA(6)
%% for your publication list

View File

@@ -1,4 +1,4 @@
\usepackage[backend=biber,style=ieee,sorting=ydnt]{biblatex}
\usepackage[backend=biber,style=ieee,sorting=ydnt,defernumbers=true]{biblatex}
%% For removing numbering entirely when using a numeric style
\setlength{\bibhang}{1.25em}
\DeclareFieldFormat{labelnumberwidth}{\makebox[\bibhang][l]{\itemmarker}}

Binary file not shown.

View File

@@ -1,6 +1,6 @@
%%%%%%%%%%%%%%%%%
% This is an sample CV template created using altacv.cls
% (v1.6.5, 3 Nov 2022) written by LianTze Lim (liantze@gmail.com). Compiles with pdfLaTeX, XeLaTeX and LuaLaTeX.
% (v1.7, 9 August 2023) written by LianTze Lim (liantze@gmail.com). Compiles with pdfLaTeX, XeLaTeX and LuaLaTeX.
%
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -26,6 +26,8 @@
% Change the font if you want to, depending on whether
% you're using pdflatex or xelatex/lualatex
% WHEN COMPILING WITH XELATEX PLEASE USE
% xelatex -shell-escape -output-driver="xdvipdfmx -z 0" sample.tex
\ifxetexorluatex
% If using xelatex or lualatex:
\setmainfont{Roboto Slab}
@@ -65,11 +67,20 @@
% for \cvskill if you want to
\renewcommand{\cvItemMarker}{{\small\textbullet}}
\renewcommand{\cvRatingMarker}{\faCircle}
% ...and the markers for the duration/location for \cvevent
% ...and the markers for the date/location for \cvevent
% \renewcommand{\cvDateMarker}{\faCalendar*[regular]}
% \renewcommand{\cvLocationMarker}{\faMapMarker*}
% If your CV/résumé is in a language other than English,
% then you probably want to change these so that when you
% copy-paste from the PDF or run pdftotext, the location
% and date marker icons for \cvevent will paste as correct
% translations. For example Spanish:
% \renewcommand{\locationname}{Ubicación}
% \renewcommand{\datename}{Fecha}
%% Use (and optionally edit if necessary) this .tex if you
%% want to use an author-year reference style like APA(6)
%% for your publication list