From dcbe20b52d24b23705a4a72871a4a9ea97516c8f Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Mon, 2 Dec 2019 10:55:34 +0100 Subject: [PATCH 01/24] Initial version of ox-awesomecv Support for AwesomeCV (https://github.com/posquit0/Awesome-CV). This is based on ox-altacv, with modifications for the macros and structures supported by AwesomeCV. At the moment the following types of sections are supported: - CV_ENV "cventry" converts the section into a cventry environment. - CV_ENV "cvskills" converts the section into a cvskills environment. It must contain a description list, which gets renders as the appropriate "cvskill" elements. --- ox-awesomecv.el | 275 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 275 insertions(+) create mode 100644 ox-awesomecv.el diff --git a/ox-awesomecv.el b/ox-awesomecv.el new file mode 100644 index 0000000..001ea76 --- /dev/null +++ b/ox-awesomecv.el @@ -0,0 +1,275 @@ +;;; ox-awesomecv.el --- LaTeX awesomecv Back-End for Org Export Engine -*- lexical-binding: t; -*- + +;; Copyright (C) 2018 Free Software Foundation, Inc. + +;; Author: Oscar Najera +;; Keywords: org, wp, tex + +;; This file is not part of GNU Emacs. + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: +;; +;; This library implements a LaTeX awesomecv back-end, derived from the +;; LaTeX one. + +;;; Code: +(require 'cl-lib) +(require 'ox-latex) +(require 'org-cv-utils) + +;; Install a default set-up for awesomecv export. +(unless (assoc "awesomecv" org-latex-classes) + (add-to-list 'org-latex-classes + '("awesomecv" + "\\documentclass{awesome-cv}\n[NO-DEFAULT-PACKAGES]" + ("\\cvsection{%s}" . "\\cvsection{%s}") + ("\\cvsubsection{%s}" . "\\cvsubsection{%s}") + ("\\subsection{%s}" . "\\subsection*{%s}") + ("\\subsubsection{%s}" . "\\subsubsection*{%s}") + ("\\cvparagraph{%s}" . "\\cvparagraph{%s}")))) + +;;; User-Configurable Variables + +(defgroup org-export-cv nil + "Options specific for using the awesomecv class in LaTeX export." + :tag "Org awesomecv" + :group 'org-export + :version "25.3") + +;;; Define Back-End +(org-export-define-derived-backend 'awesomecv 'latex +; :menu-entry +; (?l 1 +; ((?w "AwesomeCV format" (lambda (a s v b) (org-export-to-file 'awesomecv (org-export-output-file-name ".tex")))))) + :options-alist + '((:latex-class "LATEX_CLASS" nil "awesomecv" t) + (:cvstyle "CVSTYLE" nil "classic" t) + (:cvcolor "CVCOLOR" nil "awesome-emerald" t) + (:mobile "MOBILE" nil nil parse) + (:homepage "HOMEPAGE" nil nil parse) + (:address "ADDRESS" nil nil newline) + (:photo "PHOTO" nil nil t) + (:photostyle "PHOTOSTYLE" nil nil t) + (:gitlab "GITLAB" nil nil parse) + (:github "GITHUB" nil nil parse) + (:linkedin "LINKEDIN" nil nil parse) + (:twitter "TWITTER" nil nil parse) + (:stackoverflow "STACKOVERFLOW" nil nil split) + (:with-email nil "email" t t) + (:fontdir "FONTDIR" nil "fonts/" t) + (:latex-title-command nil nil "\\makecvheader" t) + (:cvhighlights "CVHIGHLIGHTS" nil "true" t) + (:quote "QUOTE" nil nil t) + (:firstname "FIRSTNAME" nil nil t) + (:lastname "LASTNAME" nil nil t) + (:cvfooter_left "CVFOOTER_LEFT" nil nil t) + (:cvfooter_middle "CVFOOTER_MIDDLE" nil nil t) + (:cvfooter_right "CVFOOTER_RIGHT" nil nil t)) + :translate-alist '((template . org-awesomecv-template) + (headline . org-awesomecv-headline) + (plain-list . org-awesomecv-plain-list) + (item . org-awesomecv-item)) + ) + +;;;; Template +;; +;; Template used is similar to the one used in `latex' back-end, +;; excepted for the table of contents and awesomecv themes. + +(defun org-awesomecv-template (contents info) + "Return complete document string after LaTeX conversion. +CONTENTS is the transcoded contents string. INFO is a plist +holding export options." + (let ((title (org-export-data (plist-get info :title) info)) + (spec (org-latex--format-spec info))) + (concat + ;; Time-stamp. + (and (plist-get info :time-stamp-file) + (format-time-string "%% Created %Y-%m-%d %a %H:%M\n")) + ;; LaTeX compiler. + (org-latex--insert-compiler info) + ;; Document class and packages. + (org-latex-make-preamble info nil t) + ;; Possibly limit depth for headline numbering. + (let ((sec-num (plist-get info :section-numbers))) + (when (integerp sec-num) + (format "\\setcounter{secnumdepth}{%d}\n" sec-num))) + + (format "\\fontdir[%s]\n" (plist-get info :fontdir)) + (format "\\colorlet{awesome}{%s}\n" (plist-get info :cvcolor)) + (format "\\setbool{acvSectionColorHighlight}{%s}\n" (plist-get info :cvhighlights)) + + ;; photo + (let* ((photo (plist-get info :photo)) + (photo-style (plist-get info :photostyle)) + (_ (message "photo=%s photo-style=%s" photo photo-style)) + (style-str (if photo-style (format "[%s]" photo-style) ""))) + (when (org-string-nw-p photo) (format "\\photo%s{%s}\n" style-str photo))) + + ;; Author. + (let ((first-name (org-export-data (plist-get info :firstname) info)) + (last-name (org-export-data (plist-get info :lastname) info))) + (format "\\name{%s}{%s}\n" first-name last-name)) + + ;; Title + (format "\\position{%s}\n" title) + + ;; Hyperref options. + (let ((template (plist-get info :latex-hyperref-template))) + (and (stringp template) + (format-spec template spec))) + + ;; address + (let ((address (org-export-data (plist-get info :address) info))) + (when (org-string-nw-p address) + (format "\\address{%s}\n" (mapconcat (lambda (line) + (format "%s" line)) + (split-string address "\n") " -- ")))) + ;; email + (let ((email (and (plist-get info :with-email) + (org-export-data (plist-get info :email) info)))) + (when (org-string-nw-p email) + (format "\\email{%s}\n" email))) + ;; phone + (let ((mobile (org-export-data (plist-get info :mobile) info))) + (when (org-string-nw-p mobile) + (format "\\mobile{%s}\n" mobile))) + ;; homepage + (let ((homepage (org-export-data (plist-get info :homepage) info))) + (when (org-string-nw-p homepage) + (format "\\homepage{%s}\n" homepage))) + ;; Other social networks + (mapconcat (lambda (social-network) + (let ((command (org-export-data (plist-get info + (car social-network)) + info))) + (when (> (length command) 0) (format "\\%s{%s}\n" + (nth 1 social-network) + command)))) + '((:github "github") + (:gitlab "gitlab") + (:linkedin "linkedin") + (:twitter "twitter") + (:skype "skype") + (:reddit "reddit")) + "") + ;; Stack overflow requires two values: ID and name + (let* ((so-list (plist-get info :stackoverflow)) + (so-id (when so-list (first so-list))) + (so-name (when so-list (second so-list)))) + (when (and (org-string-nw-p so-id) (org-string-nw-p so-name)) + (format "\\stackoverflow{%s}{%s}\n" so-id so-name))) + + ;; Document start. + "\\begin{document}\n\n" + + ;; Title command. + (let* ((title-command (plist-get info :latex-title-command)) + (command (and (stringp title-command) + (format-spec title-command spec)))) + (org-element-normalize-string + (cond ((not (plist-get info :with-title)) nil) + ((string= "" title) nil) + ((not (stringp command)) nil) + ((string-match "\\(?:[^%]\\|^\\)%s" command) + (format command title)) + (t command)))) + ;; Footer command + (let* ((footer-left (format-spec (or (plist-get info :cvfooter_left) "") spec)) + (footer-mid (format-spec (or (plist-get info :cvfooter_middle) "") spec)) + (footer-right (format-spec (or (plist-get info :cvfooter_right) "") spec))) + (when (not (string= "" (concat footer-left footer-mid footer-right))) + (format "\\makecvfooter{%s}{%s}{%s}" footer-left footer-mid footer-right))) + + ;; Document's body. + contents + ;; Creator. + (and (plist-get info :with-creator) + (concat (plist-get info :creator) "\n")) + ;; Document end. + "\\end{document}"))) + + +(defun org-awesomecv--format-cventry (headline contents info) + "Format HEADLINE as as cventry. +CONTENTS holds the contents of the headline. INFO is a plist used +as a communication channel." + (let* ((entrytype (org-element-property :CV_ENV headline)) + (title (org-export-data (org-element-property :title headline) info)) + (from-date (or (org-element-property :FROM headline) (error "No FROM property provided for cventry %s" title))) + (to-date (org-element-property :TO headline)) + (employer (org-element-property :EMPLOYER headline)) + (location (or (org-element-property :LOCATION headline) ""))) + + (cond + ((string= entrytype "cventry") + (format "\n\\cventry\n{%s}\n{%s}\n{%s}\n{%s}\n{\n%s}\n" + employer + location + title + (org-cv-utils--format-time-window from-date to-date) + contents)) + ((string= entrytype "cvsubentry") + (format "\n\\cvsubentry\n{%s}\n{%s}\n{\n%s}\n" + title + (org-cv-utils--format-time-window from-date to-date) + contents))))) + +;;;; Headline +(defun org-awesomecv-headline (headline contents info) + "Transcode HEADLINE element into awesomecv code. +CONTENTS is the contents of the headline. INFO is a plist used +as a communication channel." + (unless (org-element-property :footnote-section-p headline) + (let ((environment (let ((env (org-element-property :CV_ENV headline))) + (or (org-string-nw-p env) "block")))) + (cond + ;; is a cv entry or subentry + ((or (string= environment "cventry") (string= environment "cvsubentry")) + (org-awesomecv--format-cventry headline contents info)) + ((org-export-with-backend 'latex headline contents info)))))) + +;;;; Plain List, to intercept and transform "cvskills" lists + +(defun org-awesomecv-plain-list (plain-list contents info) + "Transcode a PLAIN-LIST element from Org to LaTeX. +CONTENTS is the contents of the list. INFO is a plist holding +contextual information." + (let* ((cv-env (org-entry-get (org-element-property :begin plain-list) "CV_ENV" t))) + (cond + ((string= cv-env "cvskills") + (format "\\begin{cvskills}\n%s\\end{cvskills}" contents)) + ((or (string= cv-env "cventry") (string= cv-env "cvsubentry")) + (format "\\begin{cvitems}\n%s\\end{cvitems}" contents)) + (t + (org-latex-plain-list plain-list contents info))))) + +;;;; Item, to intercept and transform "cvskills" lists + +(defun org-awesomecv-item (item contents info) + (let* ((cv-env (org-entry-get (org-element-property :begin item) "CV_ENV" t)) + (tag (let ((tag (org-element-property :tag item))) + (and tag (org-export-data tag info))))) + (if (and (string= cv-env "cvskills") tag) + (format "\\cvskill{%s}{%s}\n" tag (org-trim contents)) + (org-latex-item item contents info)) + ) + ) + +(provide 'ox-awesomecv) +;;; ox-awesomecv ends here From 91e5a55fe105570da07bb8011fb7017f58fedb9d Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Sat, 7 Dec 2019 20:01:43 +0100 Subject: [PATCH 02/24] Updated org-cv-utils--format-time-window If both dates are the same, return only one of them, without the dash. --- org-cv-utils.el | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/org-cv-utils.el b/org-cv-utils.el index 7a972a6..a078ee0 100644 --- a/org-cv-utils.el +++ b/org-cv-utils.el @@ -45,14 +45,19 @@ today => today" date_str)) (defun org-cv-utils--format-time-window (from-date to-date) -"Join date strings in a time window. + "Join date strings in a time window. FROM-DATE -- TO-DATE -in case TO-DATE is nil return Present" - (concat - (org-cv-utils-org-timestamp-to-shortdate from-date) - " -- " - (if (not to-date) "Present" - (org-cv-utils-org-timestamp-to-shortdate to-date)))) +in case TO-DATE is nil return Present. +If both dates are the same, return just FROM-DATE" + (let ((from (when from-date (org-cv-utils-org-timestamp-to-shortdate from-date))) + (to (if (not to-date) "Present" + (org-cv-utils-org-timestamp-to-shortdate to-date)))) + + (if from + (if (string= from to) + from + (concat from " -- " to)) + ""))) (provide 'org-cv-utils) ;;; org-cv-utils ends here From 51c7ef8ed5011e2cb64ebd910b47d4ab0d1d5810 Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Sat, 7 Dec 2019 20:46:35 +0100 Subject: [PATCH 03/24] Support for AwesomeCV Added a new ox-awesomecv.el, which provides support for the AwesomeCV LaTeX class: https://github.com/posquit0/Awesome-CV Added the corresponding documentation in the README as well. An example of a CV produced with this exporter can be found at https://zzamboni.org/vita/ --- doc/content/post/latex_export.md | 83 ++++++++++++++++++++++++++++++++ ox-awesomecv.el | 77 ++++++++++++++++++++++++----- readme.org | 70 +++++++++++++++++++++++++++ 3 files changed, 218 insertions(+), 12 deletions(-) diff --git a/doc/content/post/latex_export.md b/doc/content/post/latex_export.md index 2a473e8..57e621b 100644 --- a/doc/content/post/latex_export.md +++ b/doc/content/post/latex_export.md @@ -92,3 +92,86 @@ When exporting you can call the following function to get the latex file.

Alternative text - include a link to the PDF!

+ + +## Using AwesomeCV {#using-awesomecv} + +[AwesomeCV](https://github.com/posquit0/Awesome-CV) is another LaTeX template for producing nice-looking +CVs. AwesomeCV supports a few additional types of environment types in +`CV_ENV`, including `cvemployer`, `cvskills`, `cvhonors` and `cvschool`. Some of +these support additional property fields: + +
+
+ +| Field | Description | +|------------|----------------------------------------------------------------------| +| FROM | Start date of the entry | +| TO | End date of the entry | +| DATE | Shortcut to specify both `FROM` and `TO` as the same date. | +| | Both `FROM` and `TO` override `DATE`. | +| EMPLOYER | Employer or organization, can also be specified | +| | as `ORGANIZATION`, `SCHOOL`, `EVENT` or `POSITION` (different | +| | names make more sense depending on the type of environment) | +| LABEL | In `cvsubentry` environments, adds the given text to the left | +| | of the date range, can be used to add additional information | +| | to the entry. | +| RIGHT\_IMG | path to an image to include floating to the right of a `cventry`, | +| | a `cvsubentry` or `cvschool` entry. Meant to be used to show a logo. | + +
+ +All the supported values of `CV_ENV` are described below. + + +### `cventries` {#cventries} + +Enclose all the subheaders in a `cventries` environment. Subheaders can +be of type `cventry`, `cvschool`, or `cvemployer`. + + +### `cvhonors` {#cvhonors} + +Enclose all the subheaders in a `cvhonors` environment. Subheaders must +be of type `cvhonor` + + +### `cventry` {#cventry} + +Converts to a `\cventry` command. Supports attributes `FROM`, `TO`, `DATE`, +`EMPLOYER`, `LOCATION`, `RIGHT_IMG`. + + +### `cvsubentry` {#cvsubentry} + +Converts to a `\cvsubentry` command. Supports attributes `FROM`, `TO`, `DATE`, +`LABEL` `RIGHT_IMG`. + + +### `cvemployer` {#cvemployer} + +Converts to a `\cventry` with only the title line. Supports attributes +`FROM`, `TO`, `DATE` and `LOCATION`. + + +### `cvschool` {#cvschool} + +Converts to a `\cventry`. The headline should contain the degree +obtained, shown as the main title. Supports attributes `LOCATION`, +`SCHOOL`, `FROM`, `TO`, `DATE` and `RIGHT_IMG`. + + +### `cvhonor` {#cvhonor} + +Converts to a `\cvhonor` command (must be inside a `cvhonors` +headline). Supports attributes `LOCATION`, `EMPLOYER` (in this case `EVENT` +or `POSITION` might be more semantically accurate, and can also be +used), `FROM`, `TO`, `DATE`. + + +### `cvskills` {#cvskills} + +Converts to a `\cvskills` environment. The headline must contain a +[description list](https://orgmode.org/manual/Plain-lists.html), which gets converted into a sequence of `\cvskill` +commands, with the term as the skill title and the description as its +contents. diff --git a/ox-awesomecv.el b/ox-awesomecv.el index 001ea76..9b90473 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -117,7 +117,6 @@ holding export options." ;; photo (let* ((photo (plist-get info :photo)) (photo-style (plist-get info :photostyle)) - (_ (message "photo=%s photo-style=%s" photo photo-style)) (style-str (if photo-style (format "[%s]" photo-style) ""))) (when (org-string-nw-p photo) (format "\\photo%s{%s}\n" style-str photo))) @@ -194,7 +193,7 @@ holding export options." (footer-mid (format-spec (or (plist-get info :cvfooter_middle) "") spec)) (footer-right (format-spec (or (plist-get info :cvfooter_right) "") spec))) (when (not (string= "" (concat footer-left footer-mid footer-right))) - (format "\\makecvfooter{%s}{%s}{%s}" footer-left footer-mid footer-right))) + (format "\\makecvfooter{%s}{%s}{%s}\n" footer-left footer-mid footer-right))) ;; Document's body. contents @@ -204,31 +203,78 @@ holding export options." ;; Document end. "\\end{document}"))) +;;;; Produce latex code for a right-float image +(defun org-awesomecv--cventry-right-img-code (file) + (if file + (format "\\begin{wrapfigure}{r}{0.15\\textwidth} + \\raggedleft\\vspace{-4.0mm} + \\includegraphics[width=0.1\\textwidth]{%s} +\\end{wrapfigure}" file) "")) +;;;; Individual cventry/cvsubentry/cvemployer/cvschool headlines (defun org-awesomecv--format-cventry (headline contents info) "Format HEADLINE as as cventry. CONTENTS holds the contents of the headline. INFO is a plist used as a communication channel." (let* ((entrytype (org-element-property :CV_ENV headline)) (title (org-export-data (org-element-property :title headline) info)) - (from-date (or (org-element-property :FROM headline) (error "No FROM property provided for cventry %s" title))) - (to-date (org-element-property :TO headline)) - (employer (org-element-property :EMPLOYER headline)) - (location (or (org-element-property :LOCATION headline) ""))) + (date (org-element-property :DATE headline)) + (from-date (or (org-element-property :FROM headline) date)) + (to-date (or (org-element-property :TO headline) date)) + (employer (or (org-element-property :ORGANIZATION headline) + (org-element-property :SCHOOL headline) + (org-element-property :EMPLOYER headline) + (org-element-property :EVENT headline) + (org-element-property :POSITION headline))) + (location (or (org-element-property :LOCATION headline) "")) + (right-img (org-element-property :RIGHT_IMG headline)) + (label (or (org-element-property :LABEL headline) nil)) + (label-str (if label (format "%s\\hfill{}" label) ""))) (cond + ((string= entrytype "cvemployer") + (format "\n\\cventry{%s}{%s}{}{}{}\n%s\n" + title + (format "%s\\hfill %s" (org-cv-utils--format-time-window from-date to-date) location) + contents) + ) ((string= entrytype "cventry") - (format "\n\\cventry\n{%s}\n{%s}\n{%s}\n{%s}\n{\n%s}\n" + (format "\n\\cventry\n{%s}\n{%s}\n{%s}\n{%s}\n{\n%s%s}\n" employer location title (org-cv-utils--format-time-window from-date to-date) + (org-awesomecv--cventry-right-img-code right-img) contents)) ((string= entrytype "cvsubentry") - (format "\n\\cvsubentry\n{%s}\n{%s}\n{\n%s}\n" + (format "\n\\cvsubentry\n{%s}\n{%s}\n{\n%s%s}\n" title + (format "%s%s" label-str (org-cv-utils--format-time-window from-date to-date)) + (org-awesomecv--cventry-right-img-code right-img) + contents)) + ((string= entrytype "cvschool") + (format "\n\\cventry\n{%s}\n{%s}\n{%s}\n{%s}\n{\n%s%s}\n" + title + location + employer (org-cv-utils--format-time-window from-date to-date) - contents))))) + (org-awesomecv--cventry-right-img-code right-img) + contents)) + ((string= entrytype "cvhonor") + (format "\n\\cvhonor\n{%s}\n{%s}\n{%s}\n{%s}\n" + title + employer + location + (org-cv-utils--format-time-window from-date to-date)))))) + +;;;; Headlines of type "cventries" +(defun org-awesomecv--format-cvenvironment (environment headline contents info) + "Format HEADLINE as as a cventries/cvhonors environment. +CONTENTS holds the contents of the headline. INFO is a plist used +as a communication channel." + (format "%s\n\\begin{%s}\n%s\\end{%s}\n" + (org-export-with-backend 'latex headline nil info) + environment contents environment)) ;;;; Headline (defun org-awesomecv-headline (headline contents info) @@ -240,8 +286,14 @@ as a communication channel." (or (org-string-nw-p env) "block")))) (cond ;; is a cv entry or subentry - ((or (string= environment "cventry") (string= environment "cvsubentry")) + ((or (string= environment "cventry") + (string= environment "cvsubentry") + (string= environment "cvemployer") + (string= environment "cvschool") + (string= environment "cvhonor")) (org-awesomecv--format-cventry headline contents info)) + ((or (string= environment "cventries") (string= environment "cvhonors")) + (org-awesomecv--format-cvenvironment environment headline contents info)) ((org-export-with-backend 'latex headline contents info)))))) ;;;; Plain List, to intercept and transform "cvskills" lists @@ -250,11 +302,12 @@ as a communication channel." "Transcode a PLAIN-LIST element from Org to LaTeX. CONTENTS is the contents of the list. INFO is a plist holding contextual information." - (let* ((cv-env (org-entry-get (org-element-property :begin plain-list) "CV_ENV" t))) + (let* ((cv-env (org-entry-get (org-element-property :begin plain-list) "CV_ENV" nil)) + (parent-type (car (org-element-property :parent plain-list)))) (cond ((string= cv-env "cvskills") (format "\\begin{cvskills}\n%s\\end{cvskills}" contents)) - ((or (string= cv-env "cventry") (string= cv-env "cvsubentry")) + ((and (eq parent-type 'section) (or (string= cv-env "cventry") (string= cv-env "cvsubentry") (string= cv-env "cvschool"))) (format "\\begin{cvitems}\n%s\\end{cvitems}" contents)) (t (org-latex-plain-list plain-list contents info))))) diff --git a/readme.org b/readme.org index 05ac1ef..f7d558c 100644 --- a/readme.org +++ b/readme.org @@ -213,6 +213,76 @@ When exporting you can call the following function to get the latex file. #+END_EXPORT +** Using AwesomeCV + +[[https://github.com/posquit0/Awesome-CV][AwesomeCV]] is another LaTeX template for producing nice-looking +CVs. AwesomeCV supports a few additional types of environment types in +=CV_ENV=, including =cvemployer=, =cvskills=, =cvhonors= and =cvschool=. Some of +these support additional property fields: + +#+attr_html: :class table table-striped +| Field | Description | +|-----------+------------------------------------------------------------------| +| FROM | Start date of the entry | +| TO | End date of the entry | +| DATE | Shortcut to specify both =FROM= and =TO= as the same date. | +| | Both =FROM= and =TO= override =DATE=. | +| EMPLOYER | Employer or organization, can also be specified | +| | as =ORGANIZATION=, =SCHOOL=, =EVENT= or =POSITION= (different | +| | names make more sense depending on the type of environment) | +| LABEL | In =cvsubentry= environments, adds the given text to the left | +| | of the date range, can be used to add additional information | +| | to the entry. | +| RIGHT_IMG | path to an image to include floating to the right of a =cventry=, | +| | a =cvsubentry= or =cvschool= entry. Meant to be used to show a logo. | + +All the supported values of =CV_ENV= are described below. + +*** =cventries= + +Enclose all the subheaders in a =cventries= environment. Subheaders can +be of type =cventry=, =cvschool=, or =cvemployer=. + +*** =cvhonors= + +Enclose all the subheaders in a =cvhonors= environment. Subheaders must +be of type =cvhonor= + +*** =cventry= + +Converts to a =\cventry= command. Supports attributes =FROM=, =TO=, =DATE=, +=EMPLOYER=, =LOCATION=, =RIGHT_IMG=. + +*** =cvsubentry= + +Converts to a =\cvsubentry= command. Supports attributes =FROM=, =TO=, =DATE=, +=LABEL= =RIGHT_IMG=. + +*** =cvemployer= + +Converts to a =\cventry= with only the title line. Supports attributes +=FROM=, =TO=, =DATE= and =LOCATION=. + +*** =cvschool= + +Converts to a =\cventry=. The headline should contain the degree +obtained, shown as the main title. Supports attributes =LOCATION=, +=SCHOOL=, =FROM=, =TO=, =DATE= and =RIGHT_IMG=. + +*** =cvhonor= + +Converts to a =\cvhonor= command (must be inside a =cvhonors= +headline). Supports attributes =LOCATION=, =EMPLOYER= (in this case =EVENT= +or =POSITION= might be more semantically accurate, and can also be +used), =FROM=, =TO=, =DATE=. + +*** =cvskills= + +Converts to a =\cvskills= environment. The headline must contain a +[[https://orgmode.org/manual/Plain-lists.html][description list]], which gets converted into a sequence of =\cvskill= +commands, with the term as the skill title and the description as its +contents. + * Markdown Hugo Exporter :PROPERTIES: :EXPORT_FILE_NAME: hugo_export From 2a322a9b12c925eb355807e5f1e33e0513e69a96 Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Sat, 7 Dec 2019 21:29:22 +0100 Subject: [PATCH 04/24] Updated documentation. --- doc/content/post/latex_export.md | 25 ++++++++++++++++++++++++- readme.org | 21 ++++++++++++++++++++- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/doc/content/post/latex_export.md b/doc/content/post/latex_export.md index 57e621b..d27c14d 100644 --- a/doc/content/post/latex_export.md +++ b/doc/content/post/latex_export.md @@ -97,7 +97,30 @@ When exporting you can call the following function to get the latex file. ## Using AwesomeCV {#using-awesomecv} [AwesomeCV](https://github.com/posquit0/Awesome-CV) is another LaTeX template for producing nice-looking -CVs. AwesomeCV supports a few additional types of environment types in +CVs. In addition to the regular document attributes, the following are supported: + +
+
+ +| Field | Description | +|------------------|------------------------------------------------------------| +| PHOTOSTYLE | Style of photo to use. Values include | +| | circle/rectangle,edge/noedge,left/right | +| CVCOLOR | Color of highlights. | +| STACKOVERFLOW | Stack overflow, must be specified as `ID username` | +| FONTDIR | Directory where the fonts can be found, defaults | +| | to `fonts/` (as in the standard AwesomeCV) | +| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true | +| QUOTE | Optional quote to include at the top of the CV | +| FIRSTNAME | Your first name. Must be specified (in addition to AUTHOR) | +| LASTNAME | Your last name. Must be specified. | +| CVFOOTER\_LEFT | Text to include in the left footer. | +| CVFOOTER\_MIDDLE | Text to include in the middle footer. | +| CVFOOTER\_RIGHT | Text to include in the right footer. | + +
+ +AwesomeCV supports a few additional types of environment types in `CV_ENV`, including `cvemployer`, `cvskills`, `cvhonors` and `cvschool`. Some of these support additional property fields: diff --git a/readme.org b/readme.org index f7d558c..acaae91 100644 --- a/readme.org +++ b/readme.org @@ -216,7 +216,26 @@ When exporting you can call the following function to get the latex file. ** Using AwesomeCV [[https://github.com/posquit0/Awesome-CV][AwesomeCV]] is another LaTeX template for producing nice-looking -CVs. AwesomeCV supports a few additional types of environment types in +CVs. In addition to the regular document attributes, the following are supported: + +#+attr_html: :class table table-striped +| Field | Description | +|-----------------+------------------------------------------------------------| +| PHOTOSTYLE | Style of photo to use. Values include | +| | circle/rectangle,edge/noedge,left/right | +| CVCOLOR | Color of highlights. | +| STACKOVERFLOW | Stack overflow, must be specified as =ID username= | +| FONTDIR | Directory where the fonts can be found, defaults | +| | to =fonts/= (as in the standard AwesomeCV) | +| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true | +| QUOTE | Optional quote to include at the top of the CV | +| FIRSTNAME | Your first name. Must be specified (in addition to AUTHOR) | +| LASTNAME | Your last name. Must be specified. | +| CVFOOTER_LEFT | Text to include in the left footer. | +| CVFOOTER_MIDDLE | Text to include in the middle footer. | +| CVFOOTER_RIGHT | Text to include in the right footer. | + +AwesomeCV supports a few additional types of environment types in =CV_ENV=, including =cvemployer=, =cvskills=, =cvhonors= and =cvschool=. Some of these support additional property fields: From 95c90515327a09d93d12d7802ad8da47134d6ba8 Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Sun, 8 Dec 2019 16:12:56 +0100 Subject: [PATCH 05/24] Improve first/last name handling. By default first/last name are now extracted from the value of #+AUTHOR, but #+FIRSTNAME and #+LASTNAME can be used to override the values if needed. --- doc/content/post/latex_export.md | 32 +++++++++++++++++--------------- ox-awesomecv.el | 12 +++++++++--- readme.org | 32 +++++++++++++++++--------------- 3 files changed, 43 insertions(+), 33 deletions(-) diff --git a/doc/content/post/latex_export.md b/doc/content/post/latex_export.md index d27c14d..6236053 100644 --- a/doc/content/post/latex_export.md +++ b/doc/content/post/latex_export.md @@ -102,21 +102,23 @@ CVs. In addition to the regular document attributes, the following are supported
-| Field | Description | -|------------------|------------------------------------------------------------| -| PHOTOSTYLE | Style of photo to use. Values include | -| | circle/rectangle,edge/noedge,left/right | -| CVCOLOR | Color of highlights. | -| STACKOVERFLOW | Stack overflow, must be specified as `ID username` | -| FONTDIR | Directory where the fonts can be found, defaults | -| | to `fonts/` (as in the standard AwesomeCV) | -| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true | -| QUOTE | Optional quote to include at the top of the CV | -| FIRSTNAME | Your first name. Must be specified (in addition to AUTHOR) | -| LASTNAME | Your last name. Must be specified. | -| CVFOOTER\_LEFT | Text to include in the left footer. | -| CVFOOTER\_MIDDLE | Text to include in the middle footer. | -| CVFOOTER\_RIGHT | Text to include in the right footer. | +| Field | Description | +|------------------|-----------------------------------------------------------| +| PHOTOSTYLE | Style of photo to use. Comma-separated values can include | +| | circle/rectangle,edge/noedge,left/right. | +| CVCOLOR | Color of highlights. | +| STACKOVERFLOW | Stack overflow, must be specified as `ID username` | +| FONTDIR | Directory where the fonts can be found, defaults | +| | to `fonts/` (as in the standard AwesomeCV) | +| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true | +| QUOTE | Optional quote to include at the top of the CV | +| FIRSTNAME | First name to be shown in the CV. By default the first | +| | space-separated part of AUTHOR is used. | +| LASTNAME | Last name to be shown in the CV. By default the second | +| | space-separated part of AUTHOR is used. | +| CVFOOTER\_LEFT | Text to include in the left footer. None by default | +| CVFOOTER\_MIDDLE | Text to include in the middle footer. None by default. | +| CVFOOTER\_RIGHT | Text to include in the right footer. None by default. |
diff --git a/ox-awesomecv.el b/ox-awesomecv.el index 9b90473..1fa9d5b 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -31,6 +31,7 @@ (require 'cl-lib) (require 'ox-latex) (require 'org-cv-utils) +(require 'subr) ;; Install a default set-up for awesomecv export. (unless (assoc "awesomecv" org-latex-classes) @@ -70,6 +71,7 @@ (:linkedin "LINKEDIN" nil nil parse) (:twitter "TWITTER" nil nil parse) (:stackoverflow "STACKOVERFLOW" nil nil split) + (:extrainfo "EXTRAINFO" nil nil parse) (:with-email nil "email" t t) (:fontdir "FONTDIR" nil "fonts/" t) (:latex-title-command nil nil "\\makecvheader" t) @@ -120,9 +122,13 @@ holding export options." (style-str (if photo-style (format "[%s]" photo-style) ""))) (when (org-string-nw-p photo) (format "\\photo%s{%s}\n" style-str photo))) - ;; Author. - (let ((first-name (org-export-data (plist-get info :firstname) info)) - (last-name (org-export-data (plist-get info :lastname) info))) + ;; Author. If FIRSTNAME or LASTNAME are not given, try to deduct + ;; their values by splitting AUTHOR on white space. + (let* ((author (split-string (org-export-data (plist-get info :author) info))) + (first-name-prop (org-export-data (plist-get info :firstname) info)) + (last-name-prop (org-export-data (plist-get info :lastname) info)) + (first-name (or (org-string-nw-p first-name-prop) (first author))) + (last-name (or (org-string-nw-p last-name-prop) (second author)))) (format "\\name{%s}{%s}\n" first-name last-name)) ;; Title diff --git a/readme.org b/readme.org index acaae91..061901b 100644 --- a/readme.org +++ b/readme.org @@ -219,21 +219,23 @@ When exporting you can call the following function to get the latex file. CVs. In addition to the regular document attributes, the following are supported: #+attr_html: :class table table-striped -| Field | Description | -|-----------------+------------------------------------------------------------| -| PHOTOSTYLE | Style of photo to use. Values include | -| | circle/rectangle,edge/noedge,left/right | -| CVCOLOR | Color of highlights. | -| STACKOVERFLOW | Stack overflow, must be specified as =ID username= | -| FONTDIR | Directory where the fonts can be found, defaults | -| | to =fonts/= (as in the standard AwesomeCV) | -| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true | -| QUOTE | Optional quote to include at the top of the CV | -| FIRSTNAME | Your first name. Must be specified (in addition to AUTHOR) | -| LASTNAME | Your last name. Must be specified. | -| CVFOOTER_LEFT | Text to include in the left footer. | -| CVFOOTER_MIDDLE | Text to include in the middle footer. | -| CVFOOTER_RIGHT | Text to include in the right footer. | +| Field | Description | +|-----------------+-----------------------------------------------------------| +| PHOTOSTYLE | Style of photo to use. Comma-separated values can include | +| | circle/rectangle,edge/noedge,left/right. | +| CVCOLOR | Color of highlights. | +| STACKOVERFLOW | Stack overflow, must be specified as =ID username= | +| FONTDIR | Directory where the fonts can be found, defaults | +| | to =fonts/= (as in the standard AwesomeCV) | +| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true | +| QUOTE | Optional quote to include at the top of the CV | +| FIRSTNAME | First name to be shown in the CV. By default the first | +| | space-separated part of AUTHOR is used. | +| LASTNAME | Last name to be shown in the CV. By default the second | +| | space-separated part of AUTHOR is used. | +| CVFOOTER_LEFT | Text to include in the left footer. None by default | +| CVFOOTER_MIDDLE | Text to include in the middle footer. None by default. | +| CVFOOTER_RIGHT | Text to include in the right footer. None by default. | AwesomeCV supports a few additional types of environment types in =CV_ENV=, including =cvemployer=, =cvskills=, =cvhonors= and =cvschool=. Some of From dc1889f5437f169b2b9748e2d9b87416b7f4f39d Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Sun, 8 Dec 2019 21:14:42 +0100 Subject: [PATCH 06/24] Simplified contact commands Coalesced and simplified the code for inserting the commands corresponding to contact and social network information. --- ox-awesomecv.el | 63 ++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 35 deletions(-) diff --git a/ox-awesomecv.el b/ox-awesomecv.el index 1fa9d5b..d4c898d 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -31,7 +31,6 @@ (require 'cl-lib) (require 'ox-latex) (require 'org-cv-utils) -(require 'subr) ;; Install a default set-up for awesomecv export. (unless (assoc "awesomecv" org-latex-classes) @@ -85,8 +84,7 @@ :translate-alist '((template . org-awesomecv-template) (headline . org-awesomecv-headline) (plain-list . org-awesomecv-plain-list) - (item . org-awesomecv-item)) - ) + (item . org-awesomecv-item))) ;;;; Template ;; @@ -116,12 +114,6 @@ holding export options." (format "\\colorlet{awesome}{%s}\n" (plist-get info :cvcolor)) (format "\\setbool{acvSectionColorHighlight}{%s}\n" (plist-get info :cvhighlights)) - ;; photo - (let* ((photo (plist-get info :photo)) - (photo-style (plist-get info :photostyle)) - (style-str (if photo-style (format "[%s]" photo-style) ""))) - (when (org-string-nw-p photo) (format "\\photo%s{%s}\n" style-str photo))) - ;; Author. If FIRSTNAME or LASTNAME are not given, try to deduct ;; their values by splitting AUTHOR on white space. (let* ((author (split-string (org-export-data (plist-get info :author) info))) @@ -134,10 +126,11 @@ holding export options." ;; Title (format "\\position{%s}\n" title) - ;; Hyperref options. - (let ((template (plist-get info :latex-hyperref-template))) - (and (stringp template) - (format-spec template spec))) + ;; photo + (let* ((photo (plist-get info :photo)) + (photo-style (plist-get info :photostyle)) + (style-str (if photo-style (format "[%s]" photo-style) ""))) + (when (org-string-nw-p photo) (format "\\photo%s{%s}\n" style-str photo))) ;; address (let ((address (org-export-data (plist-get info :address) info))) @@ -150,29 +143,24 @@ holding export options." (org-export-data (plist-get info :email) info)))) (when (org-string-nw-p email) (format "\\email{%s}\n" email))) - ;; phone - (let ((mobile (org-export-data (plist-get info :mobile) info))) - (when (org-string-nw-p mobile) - (format "\\mobile{%s}\n" mobile))) - ;; homepage - (let ((homepage (org-export-data (plist-get info :homepage) info))) - (when (org-string-nw-p homepage) - (format "\\homepage{%s}\n" homepage))) - ;; Other social networks - (mapconcat (lambda (social-network) - (let ((command (org-export-data (plist-get info - (car social-network)) - info))) - (when (> (length command) 0) (format "\\%s{%s}\n" - (nth 1 social-network) - command)))) - '((:github "github") - (:gitlab "gitlab") - (:linkedin "linkedin") - (:twitter "twitter") - (:skype "skype") - (:reddit "reddit")) + + ;; Other pieces of information + (mapconcat (lambda (info-key) + (let ((info (org-export-data (plist-get info info-key) info))) + (when (org-string-nw-p info) (format "\\%s{%s}\n" + (substring (symbol-name info-key) 1) + info)))) + '(:mobile + :homepage + :github + :gitlab + :linkedin + :twitter + :skype + :reddit + :extrainfo) "") + ;; Stack overflow requires two values: ID and name (let* ((so-list (plist-get info :stackoverflow)) (so-id (when so-list (first so-list))) @@ -180,6 +168,11 @@ holding export options." (when (and (org-string-nw-p so-id) (org-string-nw-p so-name)) (format "\\stackoverflow{%s}{%s}\n" so-id so-name))) + ;; Hyperref options. + (let ((template (plist-get info :latex-hyperref-template))) + (and (stringp template) + (format-spec template spec))) + ;; Document start. "\\begin{document}\n\n" From 81cc0ed4a4ca6f65182df2afadefa0731db6f81a Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Sun, 8 Dec 2019 21:17:33 +0100 Subject: [PATCH 07/24] Updated file Author info --- ox-awesomecv.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ox-awesomecv.el b/ox-awesomecv.el index d4c898d..56ec38c 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -2,7 +2,7 @@ ;; Copyright (C) 2018 Free Software Foundation, Inc. -;; Author: Oscar Najera +;; Author: Diego Zamboni based on work by Oscar Najera ;; Keywords: org, wp, tex ;; This file is not part of GNU Emacs. From de6feffebe5a2981f1a681cc2691f161d110fa8e Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Sat, 4 Jan 2020 21:11:34 +0100 Subject: [PATCH 08/24] Ignore property drawers Enabling export of property drawers might be useful to export HTML or ASCII versions of the CV, but they are not used in the AwesomeCV LaTeX export (and in fact break the compilation), so we just ignore them. Also removed some spurious newlines in some of the environments. --- ox-awesomecv.el | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ox-awesomecv.el b/ox-awesomecv.el index 56ec38c..9323b26 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -84,7 +84,8 @@ :translate-alist '((template . org-awesomecv-template) (headline . org-awesomecv-headline) (plain-list . org-awesomecv-plain-list) - (item . org-awesomecv-item))) + (item . org-awesomecv-item) + (property-drawer . org-awesomecv-property-drawer))) ;;;; Template ;; @@ -238,7 +239,7 @@ as a communication channel." contents) ) ((string= entrytype "cventry") - (format "\n\\cventry\n{%s}\n{%s}\n{%s}\n{%s}\n{\n%s%s}\n" + (format "\n\\cventry\n{%s}\n{%s}\n{%s}\n{%s}\n{%s%s}\n" employer location title @@ -246,13 +247,13 @@ as a communication channel." (org-awesomecv--cventry-right-img-code right-img) contents)) ((string= entrytype "cvsubentry") - (format "\n\\cvsubentry\n{%s}\n{%s}\n{\n%s%s}\n" + (format "\n\\cvsubentry\n{%s}\n{%s}\n{%s%s}\n" title (format "%s%s" label-str (org-cv-utils--format-time-window from-date to-date)) (org-awesomecv--cventry-right-img-code right-img) contents)) ((string= entrytype "cvschool") - (format "\n\\cventry\n{%s}\n{%s}\n{%s}\n{%s}\n{\n%s%s}\n" + (format "\n\\cventry\n{%s}\n{%s}\n{%s}\n{%s}\n{%s%s}\n" title location employer @@ -323,5 +324,13 @@ contextual information." ) ) +;;;; Property Drawer, to avoid exporting them even when the option is set + +(defun org-latex-property-drawer (property-drawer contents info) + "Transcode a PROPERTY-DRAWER element from Org to AwesomeCV. +This does not make sense in the AwesomeCV format, so it only +returns an empty string." + nil) + (provide 'ox-awesomecv) ;;; ox-awesomecv ends here From c9ddf59080a60ff813fc0443a322b16c19d8349b Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Mon, 9 Mar 2020 10:18:13 +0100 Subject: [PATCH 09/24] Added support for PAGEBREAK attribute in headings in the AwesomeCV exporter. --- doc/content/post/latex_export.md | 2 ++ ox-awesomecv.el | 27 +++++++++++++++------------ readme.org | 2 ++ 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/doc/content/post/latex_export.md b/doc/content/post/latex_export.md index 6236053..830e3cd 100644 --- a/doc/content/post/latex_export.md +++ b/doc/content/post/latex_export.md @@ -143,6 +143,8 @@ these support additional property fields: | | to the entry. | | RIGHT\_IMG | path to an image to include floating to the right of a `cventry`, | | | a `cvsubentry` or `cvschool` entry. Meant to be used to show a logo. | +| PAGEBREAK | Causes a LaTeX `\clearpage` statement to be inserted in the | +| | exported output before the heading. | diff --git a/ox-awesomecv.el b/ox-awesomecv.el index 9323b26..e8e514f 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -283,18 +283,21 @@ CONTENTS is the contents of the headline. INFO is a plist used as a communication channel." (unless (org-element-property :footnote-section-p headline) (let ((environment (let ((env (org-element-property :CV_ENV headline))) - (or (org-string-nw-p env) "block")))) - (cond - ;; is a cv entry or subentry - ((or (string= environment "cventry") - (string= environment "cvsubentry") - (string= environment "cvemployer") - (string= environment "cvschool") - (string= environment "cvhonor")) - (org-awesomecv--format-cventry headline contents info)) - ((or (string= environment "cventries") (string= environment "cvhonors")) - (org-awesomecv--format-cvenvironment environment headline contents info)) - ((org-export-with-backend 'latex headline contents info)))))) + (or (org-string-nw-p env) "block"))) + (pagebreak (org-string-nw-p (org-element-property :PAGEBREAK headline)))) + (concat + (when pagebreak "\\clearpage\n") + (cond + ;; is a cv entry or subentry + ((or (string= environment "cventry") + (string= environment "cvsubentry") + (string= environment "cvemployer") + (string= environment "cvschool") + (string= environment "cvhonor")) + (org-awesomecv--format-cventry headline contents info)) + ((or (string= environment "cventries") (string= environment "cvhonors")) + (org-awesomecv--format-cvenvironment environment headline contents info)) + ((org-export-with-backend 'latex headline contents info))))))) ;;;; Plain List, to intercept and transform "cvskills" lists diff --git a/readme.org b/readme.org index 061901b..9ebff12 100644 --- a/readme.org +++ b/readme.org @@ -256,6 +256,8 @@ these support additional property fields: | | to the entry. | | RIGHT_IMG | path to an image to include floating to the right of a =cventry=, | | | a =cvsubentry= or =cvschool= entry. Meant to be used to show a logo. | +| PAGEBREAK | Causes a LaTeX =\clearpage= statement to be inserted in the | +| | exported output before the heading. | All the supported values of =CV_ENV= are described below. From 6fcf2e43b509fbc984da058e929c647a95e91a11 Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Tue, 31 Mar 2020 09:52:35 +0200 Subject: [PATCH 10/24] Add support for the \colorizelinks and \underlinelinks in my private version of AwesomeCV --- ox-awesomecv.el | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ox-awesomecv.el b/ox-awesomecv.el index e8e514f..30d1e02 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -60,6 +60,8 @@ '((:latex-class "LATEX_CLASS" nil "awesomecv" t) (:cvstyle "CVSTYLE" nil "classic" t) (:cvcolor "CVCOLOR" nil "awesome-emerald" t) + (:cvcolorizelinks "CVCOLORIZELINKS" nil nil t) + (:cvunderlinelinks "CVUNDERLINELINKS" nil nil t) (:mobile "MOBILE" nil nil parse) (:homepage "HOMEPAGE" nil nil parse) (:address "ADDRESS" nil nil newline) @@ -114,7 +116,19 @@ holding export options." (format "\\fontdir[%s]\n" (plist-get info :fontdir)) (format "\\colorlet{awesome}{%s}\n" (plist-get info :cvcolor)) (format "\\setbool{acvSectionColorHighlight}{%s}\n" (plist-get info :cvhighlights)) - + (let ((cvcolorizelinks (plist-get info :cvcolorizelinks)) + (cvunderlinelinks (plist-get info :cvunderlinelinks))) + (concat + (when (and (org-string-nw-p cvcolorizelinks) + (not (string-equal cvcolorizelinks "false"))) + (format "\\colorizelinks%s\n" + (if (not (string-equal cvcolorizelinks "true")) + (format "[%s]" cvcolorizelinks) ""))) + (when (and (org-string-nw-p cvunderlinelinks) + (not (string-equal cvunderlinelinks "false"))) + (format "\\underlinelinks%s\n" + (if (not (string-equal cvunderlinelinks "true")) + (format "[%s]" cvunderlinelinks) ""))))) ;; Author. If FIRSTNAME or LASTNAME are not given, try to deduct ;; their values by splitting AUTHOR on white space. (let* ((author (split-string (org-export-data (plist-get info :author) info))) From 59cf8ffd5226dd6c026b1bf07c5e8cc3fc8b4f2d Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Wed, 22 Jul 2020 09:42:07 +0200 Subject: [PATCH 11/24] Added new #+leanpub option for specifying a Leanpub username. --- ox-awesomecv.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ox-awesomecv.el b/ox-awesomecv.el index 30d1e02..3589353 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -69,6 +69,7 @@ (:photostyle "PHOTOSTYLE" nil nil t) (:gitlab "GITLAB" nil nil parse) (:github "GITHUB" nil nil parse) + (:leanpub "LEANPUB" nil nil parse) (:linkedin "LINKEDIN" nil nil parse) (:twitter "TWITTER" nil nil parse) (:stackoverflow "STACKOVERFLOW" nil nil split) @@ -169,6 +170,7 @@ holding export options." :homepage :github :gitlab + :leanpub :linkedin :twitter :skype From 58fd53f74371cdcbfaa92fc2474fa766ff46b906 Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Mon, 24 Aug 2020 13:55:09 +0200 Subject: [PATCH 12/24] Removed dependency to cl-lib Replaced `first` and `second` (which have been renamed in Emacs 27 anyway) with `car` and `cadr` to avoid the dependency on cl-lib. --- ox-awesomecv.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ox-awesomecv.el b/ox-awesomecv.el index 3589353..fe75f69 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -28,7 +28,6 @@ ;; LaTeX one. ;;; Code: -(require 'cl-lib) (require 'ox-latex) (require 'org-cv-utils) @@ -135,8 +134,8 @@ holding export options." (let* ((author (split-string (org-export-data (plist-get info :author) info))) (first-name-prop (org-export-data (plist-get info :firstname) info)) (last-name-prop (org-export-data (plist-get info :lastname) info)) - (first-name (or (org-string-nw-p first-name-prop) (first author))) - (last-name (or (org-string-nw-p last-name-prop) (second author)))) + (first-name (or (org-string-nw-p first-name-prop) (car author))) + (last-name (or (org-string-nw-p last-name-prop) (cadr author)))) (format "\\name{%s}{%s}\n" first-name last-name)) ;; Title @@ -180,8 +179,8 @@ holding export options." ;; Stack overflow requires two values: ID and name (let* ((so-list (plist-get info :stackoverflow)) - (so-id (when so-list (first so-list))) - (so-name (when so-list (second so-list)))) + (so-id (when so-list (car so-list))) + (so-name (when so-list (cadr so-list)))) (when (and (org-string-nw-p so-id) (org-string-nw-p so-name)) (format "\\stackoverflow{%s}{%s}\n" so-id so-name))) From ca5b09812340e5a3b1fffcd5bc4aae3061188d39 Mon Sep 17 00:00:00 2001 From: Roger Welsh Date: Sat, 20 Mar 2021 15:50:28 +1300 Subject: [PATCH 13/24] Add option to adjust title cmd --- ox-awesomecv.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ox-awesomecv.el b/ox-awesomecv.el index fe75f69..424b59d 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -75,7 +75,7 @@ (:extrainfo "EXTRAINFO" nil nil parse) (:with-email nil "email" t t) (:fontdir "FONTDIR" nil "fonts/" t) - (:latex-title-command nil nil "\\makecvheader" t) + (:latex-title-command "LATEX_TITLE" nil "\\makecvheader" t) (:cvhighlights "CVHIGHLIGHTS" nil "true" t) (:quote "QUOTE" nil nil t) (:firstname "FIRSTNAME" nil nil t) From 7c06e78fb4e0bbb781a967d370858f06da1b9678 Mon Sep 17 00:00:00 2001 From: Roger Welsh Date: Sat, 20 Mar 2021 16:43:22 +1300 Subject: [PATCH 14/24] Adds template for AwesomeCV coverletter format Adds the components for constructing a coverletter using awesome-cv Provides additional sections CV_ENV: letterheader, lettersection, and cvletter cvletter provides the overall letter container lettersection provides underlined letter sections letterheader provides metadata as below Letterheader additional variables RECIPIENT: E.g. Company Recruitment Team LETTER_OPENING: E.g. Dear Mr./Ms./Dr. LastName, LETTER_CLOSING: E.g. Yours Sincerely, LETTER_ATTACHED: E.g. Curriculum Vitae LETTER_DATE: Uses \\today as default, E.g. <2021-01-01> Letterheader also uses the following variables EMPLOYER: E.g. Google Inc. LOCATION: E.g. 1600 Amphitheatre Parkway\\Mountain View, CA 94043 --- ox-awesomecv.el | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/ox-awesomecv.el b/ox-awesomecv.el index 424b59d..9144f93 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -244,7 +244,14 @@ as a communication channel." (location (or (org-element-property :LOCATION headline) "")) (right-img (org-element-property :RIGHT_IMG headline)) (label (or (org-element-property :LABEL headline) nil)) - (label-str (if label (format "%s\\hfill{}" label) ""))) + (label-str (if label (format "%s\\hfill{}" label) "")) + ;; Other Coverletter properties + (recipient (or (org-element-property :RECIPIENT headline) "")) + (letter-date (format "\\letterdate{%s}" (or date "\\today"))) + (letter-opening (or (format "\\letteropening{%s}" (org-element-property :LETTER_OPENING headline)) "")) + (letter-closing (or (format "\\letterclosing{%s}" (org-element-property :LETTER_CLOSING headline)) "")) + (letter-attached (or (format "\\letterenclosure[Attached]{%s}" (org-element-property :LETTER_ATTACHED headline)) "")) + ) (cond ((string= entrytype "cvemployer") @@ -280,7 +287,25 @@ as a communication channel." title employer location - (org-cv-utils--format-time-window from-date to-date)))))) + (org-cv-utils--format-time-window from-date to-date))) + ;; Coverletter sections + ((string= entrytype "letterheader") + (format "\\recipient\n {%s}\n {%s\\\\%s}\n\n%s\n%s\n%s\n%s\n" + recipient + employer + location + letter-date + letter-opening + letter-closing + letter-attached)) + ((string= entrytype "cvletter") + (format "\n\\lettertitle{%s}\n\\makelettertitle\n\n\\begin{cvletter}\n%s\n\\end{cvletter}\n\\makeletterclosing" + title + contents)) + ((string= entrytype "lettersection") + (format "\n\\lettersection{%s}\n%s" + title + contents))))) ;;;; Headlines of type "cventries" (defun org-awesomecv--format-cvenvironment (environment headline contents info) @@ -308,7 +333,11 @@ as a communication channel." (string= environment "cvsubentry") (string= environment "cvemployer") (string= environment "cvschool") - (string= environment "cvhonor")) + (string= environment "cvhonor") + (string= environment "cvletter") + (string= environment "lettersection") + (string= environment "letterheader") + ) (org-awesomecv--format-cventry headline contents info)) ((or (string= environment "cventries") (string= environment "cvhonors")) (org-awesomecv--format-cvenvironment environment headline contents info)) From e8eb9d9bc47fc29abd2b7bf36a7271587eeaf68f Mon Sep 17 00:00:00 2001 From: Roger Welsh Date: Sat, 20 Mar 2021 20:00:02 +1300 Subject: [PATCH 15/24] Implements custom dates for coverletter headers --- ox-awesomecv.el | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/ox-awesomecv.el b/ox-awesomecv.el index 9144f93..30d01a5 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -247,7 +247,11 @@ as a communication channel." (label-str (if label (format "%s\\hfill{}" label) "")) ;; Other Coverletter properties (recipient (or (org-element-property :RECIPIENT headline) "")) - (letter-date (format "\\letterdate{%s}" (or date "\\today"))) + (letter-date + (format "\\letterdate{%s}" + (if date + (format "%s" (org-awesomecv-org-timestamp-to-dateformat date)) + "\\today"))) (letter-opening (or (format "\\letteropening{%s}" (org-element-property :LETTER_OPENING headline)) "")) (letter-closing (or (format "\\letterclosing{%s}" (org-element-property :LETTER_CLOSING headline)) "")) (letter-attached (or (format "\\letterenclosure[Attached]{%s}" (org-element-property :LETTER_ATTACHED headline)) "")) @@ -379,5 +383,25 @@ This does not make sense in the AwesomeCV format, so it only returns an empty string." nil) + +(defun org-awesomecv-org-timestamp-to-dateformat (date_str &optional FORMAT-STRING) +"Format orgmode timestamp DATE_STR into a date format FORMAT-STRING. +Uses defaults that are consistent with awesomecv. +Other strings are just returned unmodified + +e.g. <2002-08-12 Mon> => August 12th, 2012 +today => today" + (if (string-match (org-re-timestamp 'active) date_str) + (let* ((dte (org-parse-time-string date_str)) + (time (encode-time dte)) + (format-string (or FORMAT-STRING + (if (eql calendar-date-style 'american) + "%B %e, %Y" + "%e %B, %Y"))) + ) + (format-time-string format-string time)) + date_str)) + + (provide 'ox-awesomecv) ;;; ox-awesomecv ends here From e372aa78bea78fc79942057498cbdc854359b924 Mon Sep 17 00:00:00 2001 From: Roger Welsh Date: Sat, 20 Mar 2021 20:59:41 +1300 Subject: [PATCH 16/24] Add ordinal date formatting --- ox-awesomecv.el | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/ox-awesomecv.el b/ox-awesomecv.el index 30d01a5..1d4b930 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -250,7 +250,7 @@ as a communication channel." (letter-date (format "\\letterdate{%s}" (if date - (format "%s" (org-awesomecv-org-timestamp-to-dateformat date)) + (format "%s" (org-awesomecv-org-timestamp-to-dateformat date nil t)) "\\today"))) (letter-opening (or (format "\\letteropening{%s}" (org-element-property :LETTER_OPENING headline)) "")) (letter-closing (or (format "\\letterclosing{%s}" (org-element-property :LETTER_CLOSING headline)) "")) @@ -384,8 +384,9 @@ returns an empty string." nil) -(defun org-awesomecv-org-timestamp-to-dateformat (date_str &optional FORMAT-STRING) +(defun org-awesomecv-org-timestamp-to-dateformat (date_str &optional FORMAT-STRING ORDINAL) "Format orgmode timestamp DATE_STR into a date format FORMAT-STRING. +ORDINAL returns the date as an ordinal number, specified as %E in format. Uses defaults that are consistent with awesomecv. Other strings are just returned unmodified @@ -394,11 +395,24 @@ today => today" (if (string-match (org-re-timestamp 'active) date_str) (let* ((dte (org-parse-time-string date_str)) (time (encode-time dte)) - (format-string (or FORMAT-STRING + (day-format (if ORDINAL "%E" "%e")) + (format-string-0 (or FORMAT-STRING (if (eql calendar-date-style 'american) - "%B %e, %Y" - "%e %B, %Y"))) - ) + (format "%%B %s, %%Y" day-format) + (format "%s %%B, %%Y" day-format)))) + (day-raw (format-time-string "%eth" time)) + (day-ordinal + (let ((r0 "\\([04-9]\\|1[0-9]\\)th$") + (r1 "\\([1]\\)th$" ) + (r2 "\\([2]\\)th$" ) + (r3 "\\([3]\\)th$" ) + ) + (cond + ((string-match r0 day-raw) (replace-regexp-in-string r0 "\\1th" day-raw)) + ((string-match r1 day-raw) (replace-regexp-in-string r1 "\\1st" day-raw)) + ((string-match r2 day-raw) (replace-regexp-in-string r2 "\\1nd" day-raw)) + ((string-match r3 day-raw) (replace-regexp-in-string r3 "\\1rd" day-raw ))))) + (format-string (replace-regexp-in-string "%E" day-ordinal format-string-0 't))) (format-time-string format-string time)) date_str)) From 99ea2e08788dfa8d8df235a210a1cb481fac9b40 Mon Sep 17 00:00:00 2001 From: Roger Welsh Date: Sat, 20 Mar 2021 21:04:02 +1300 Subject: [PATCH 17/24] Add DATEFORMAT option to letterheader Allows adjustment of the dateformat string used for the coverletter header --- ox-awesomecv.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ox-awesomecv.el b/ox-awesomecv.el index 1d4b930..74f8627 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -247,10 +247,11 @@ as a communication channel." (label-str (if label (format "%s\\hfill{}" label) "")) ;; Other Coverletter properties (recipient (or (org-element-property :RECIPIENT headline) "")) + (letter-dateformat (org-element-property :DATEFORMAT headline)) (letter-date (format "\\letterdate{%s}" (if date - (format "%s" (org-awesomecv-org-timestamp-to-dateformat date nil t)) + (format "%s" (org-awesomecv-org-timestamp-to-dateformat date letter-dateformat t)) "\\today"))) (letter-opening (or (format "\\letteropening{%s}" (org-element-property :LETTER_OPENING headline)) "")) (letter-closing (or (format "\\letterclosing{%s}" (org-element-property :LETTER_CLOSING headline)) "")) From ee6e42c85773b9228aa4c2b064ed20032e5d2330 Mon Sep 17 00:00:00 2001 From: Roger Welsh Date: Sat, 20 Mar 2021 21:43:22 +1300 Subject: [PATCH 18/24] Add available coverletter options to readme --- readme.org | 56 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 15 deletions(-) diff --git a/readme.org b/readme.org index 9ebff12..c2c21b5 100644 --- a/readme.org +++ b/readme.org @@ -219,23 +219,25 @@ When exporting you can call the following function to get the latex file. CVs. In addition to the regular document attributes, the following are supported: #+attr_html: :class table table-striped -| Field | Description | -|-----------------+-----------------------------------------------------------| -| PHOTOSTYLE | Style of photo to use. Comma-separated values can include | -| | circle/rectangle,edge/noedge,left/right. | -| CVCOLOR | Color of highlights. | +| Field | Description | +|-----------------+-------------------------------------------------------------| +| PHOTOSTYLE | Style of photo to use. Comma-separated values can include | +| | circle/rectangle,edge/noedge,left/right. | +| CVCOLOR | Color of highlights. | | STACKOVERFLOW | Stack overflow, must be specified as =ID username= | -| FONTDIR | Directory where the fonts can be found, defaults | +| FONTDIR | Directory where the fonts can be found, defaults | | | to =fonts/= (as in the standard AwesomeCV) | -| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true | -| QUOTE | Optional quote to include at the top of the CV | -| FIRSTNAME | First name to be shown in the CV. By default the first | -| | space-separated part of AUTHOR is used. | -| LASTNAME | Last name to be shown in the CV. By default the second | -| | space-separated part of AUTHOR is used. | -| CVFOOTER_LEFT | Text to include in the left footer. None by default | -| CVFOOTER_MIDDLE | Text to include in the middle footer. None by default. | -| CVFOOTER_RIGHT | Text to include in the right footer. None by default. | +| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true | +| QUOTE | Optional quote to include at the top of the CV | +| FIRSTNAME | First name to be shown in the CV. By default the first | +| | space-separated part of AUTHOR is used. | +| LASTNAME | Last name to be shown in the CV. By default the second | +| | space-separated part of AUTHOR is used. | +| CVFOOTER_LEFT | Text to include in the left footer. None by default | +| CVFOOTER_MIDDLE | Text to include in the middle footer. None by default. | +| CVFOOTER_RIGHT | Text to include in the right footer. None by default. | +| LATEX_TITLE | Text to use as the title section. \makecvheader by default. | +| | (Can specify \makecvheader[R] to justify to the right) | AwesomeCV supports a few additional types of environment types in =CV_ENV=, including =cvemployer=, =cvskills=, =cvhonors= and =cvschool=. Some of @@ -306,6 +308,30 @@ Converts to a =\cvskills= environment. The headline must contain a commands, with the term as the skill title and the description as its contents. +*** =letterheader= + +Provides heading information for a cover letter. Supports attributes =RECIPIENT=. =EMPLOYER=, =LOCATION=, =LETTER_OPENING=, =LETTER_CLOSING=, =LETTER_ATTACHED=, =DATE=, =DATEFORMAT=. + +#+attr_html: :class table table-striped +| Field | Description | +|----------------+---------------------------------------------------------------------------| +| RECIPIENT | Addressee E.g. Company Recruitment Team | +| EMPLOYER | Company name, E.g. Google Inc | +| LOCATION | Company address, E.g. 1600 Amphitheatre Parkway\\Mountain View, CA 94043 | +| LETTER_OPENING | Letter opening, E.g. Dear Ms./Mr./Dr. LastName | +| LETTER_CLOSING | Letter closing, E.g. Yours Sincerely, | +| DATE | The date used for the letter, uses \\today as default if unspecified. | +| DATEFORMAT | Specify an alternative date format for the letter header. | +| | E.g. %e %M %Y might provide 19 March 2021 | + +*** =cvletter= + +Converts to a =\cvletter= environment. This holds the content of a cover letter. + +*** =lettersection= + +Converts to a =\lettersection= command. These are the headline portions of a cover letter. + * Markdown Hugo Exporter :PROPERTIES: :EXPORT_FILE_NAME: hugo_export From 2e9d4bc8574f57df1fd2ab0cd9e744ae637fdafb Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Sat, 20 Mar 2021 21:00:55 +0100 Subject: [PATCH 19/24] Improved employer/location handling in letters - Default employee to empty string (was otherwise showing up a "nil"). - In \recipient, insert the linebreak only if both employer and location are not empty. --- ox-awesomecv.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ox-awesomecv.el b/ox-awesomecv.el index 74f8627..a88fa63 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -240,7 +240,7 @@ as a communication channel." (org-element-property :SCHOOL headline) (org-element-property :EMPLOYER headline) (org-element-property :EVENT headline) - (org-element-property :POSITION headline))) + (org-element-property :POSITION headline) "")) (location (or (org-element-property :LOCATION headline) "")) (right-img (org-element-property :RIGHT_IMG headline)) (label (or (org-element-property :LABEL headline) nil)) @@ -295,9 +295,10 @@ as a communication channel." (org-cv-utils--format-time-window from-date to-date))) ;; Coverletter sections ((string= entrytype "letterheader") - (format "\\recipient\n {%s}\n {%s\\\\%s}\n\n%s\n%s\n%s\n%s\n" + (format "\\recipient\n {%s}\n {%s%s%s}\n\n%s\n%s\n%s\n%s\n" recipient employer + (if (and employer location) "\\\\" "") location letter-date letter-opening From b885e66e866638bd96cdef1c2b4ca4285287e12b Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Wed, 12 May 2021 00:18:54 +0200 Subject: [PATCH 20/24] Improved letter support - Added new environment type cvletter_notitle, to produce a letter without a title at the top. - Added new property LETTER_SIGNATURE - Made all letter properties optional. --- ox-awesomecv.el | 23 ++++++++++++++++++----- readme.org | 4 ++++ 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/ox-awesomecv.el b/ox-awesomecv.el index a88fa63..937308a 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -253,10 +253,18 @@ as a communication channel." (if date (format "%s" (org-awesomecv-org-timestamp-to-dateformat date letter-dateformat t)) "\\today"))) - (letter-opening (or (format "\\letteropening{%s}" (org-element-property :LETTER_OPENING headline)) "")) - (letter-closing (or (format "\\letterclosing{%s}" (org-element-property :LETTER_CLOSING headline)) "")) - (letter-attached (or (format "\\letterenclosure[Attached]{%s}" (org-element-property :LETTER_ATTACHED headline)) "")) - ) + (letter-opening (if (org-element-property :LETTER_OPENING headline) + (format "\\letteropening{%s}" (org-element-property :LETTER_OPENING headline)) + "")) + (letter-closing (if (org-element-property :LETTER_CLOSING headline) + (format "\\letterclosing{%s}" (org-element-property :LETTER_CLOSING headline)) + "")) + (letter-signature (if (org-element-property :LETTER_SIGNATURE headline) + (format "\\lettersignature{%s}" (org-element-property :LETTER_SIGNATURE headline)) + "")) + (letter-attached (if (org-element-property :LETTER_ATTACHED headline) + (format "\\letterenclosure[Attached]{%s}" (org-element-property :LETTER_ATTACHED headline)) + ""))) (cond ((string= entrytype "cvemployer") @@ -295,7 +303,7 @@ as a communication channel." (org-cv-utils--format-time-window from-date to-date))) ;; Coverletter sections ((string= entrytype "letterheader") - (format "\\recipient\n {%s}\n {%s%s%s}\n\n%s\n%s\n%s\n%s\n" + (format "\\recipient\n {%s}\n {%s%s%s}\n\n%s\n%s\n%s\n%s\n%s\n" recipient employer (if (and employer location) "\\\\" "") @@ -303,11 +311,15 @@ as a communication channel." letter-date letter-opening letter-closing + letter-signature letter-attached)) ((string= entrytype "cvletter") (format "\n\\lettertitle{%s}\n\\makelettertitle\n\n\\begin{cvletter}\n%s\n\\end{cvletter}\n\\makeletterclosing" title contents)) + ((string= entrytype "cvletter_notitle") + (format "\n\\makelettertitle\n\n\\begin{cvletter}\n%s\n\\end{cvletter}\n\\makeletterclosing" + contents)) ((string= entrytype "lettersection") (format "\n\\lettersection{%s}\n%s" title @@ -341,6 +353,7 @@ as a communication channel." (string= environment "cvschool") (string= environment "cvhonor") (string= environment "cvletter") + (string= environment "cvletter_notitle") (string= environment "lettersection") (string= environment "letterheader") ) diff --git a/readme.org b/readme.org index c2c21b5..db4c495 100644 --- a/readme.org +++ b/readme.org @@ -328,6 +328,10 @@ Provides heading information for a cover letter. Supports attributes =RECIPIENT= Converts to a =\cvletter= environment. This holds the content of a cover letter. +*** =cvletter_notitle= + +Same as =cvletter=, but does not include a letter title at the top. + *** =lettersection= Converts to a =\lettersection= command. These are the headline portions of a cover letter. From 059668cb6ac2aa8615070b15db37ae23ad67ebf0 Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Wed, 7 Jul 2021 10:29:26 +0200 Subject: [PATCH 21/24] Added installs for AwesomeCV We download and install AwesomeCV. Also install the texlive-luatex and fonts-font-awesome, which are needed for AwesomeCV, which only works with XeLaTeX or LuaLaTex. NOTE: these package installs could be moved to the Dockerfile instead of doing them here. --- installs.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/installs.sh b/installs.sh index 698087a..a16134d 100755 --- a/installs.sh +++ b/installs.sh @@ -6,6 +6,9 @@ dpkg -i hugo*.deb echo "Installed Hugo:" hugo version +# These installs could be moved to the Dockerfile +apt-get update && apt-get --no-install-recommends install -y texlive-luatex fonts-font-awesome + # Latex latexdir=/root/texmf/tex/latex mkdir -p $latexdir @@ -15,3 +18,6 @@ unzip -j sections.zip -d $latexdir/AltaCV echo "Install moderncv" wget https://github.com/Titan-C/moderncv/archive/master.zip unzip -j master.zip -d $latexdir/moderncv +echo "Install AwesomeCV" +wget -O awesomecv.zip https://github.com/posquit0/Awesome-CV/archive/refs/heads/master.zip +unzip awesomecv.zip -d $latexdir From 4df7fa67a9b01970722616910f3514f6f97d5358 Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Wed, 7 Jul 2021 10:30:32 +0200 Subject: [PATCH 22/24] Generate AwesomeCV documents Both a CV and a cover letter are generated. All files are now processed with lualatex instead of pdflatex, since lualatex is needed for AwesomeCV and does not affect the others. --- genfiles.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/genfiles.el b/genfiles.el index c54be17..871faa8 100644 --- a/genfiles.el +++ b/genfiles.el @@ -10,13 +10,16 @@ (require 'ox-altacv) +(require 'ox-awesomecv) + (let ((readme (concat cwd "readme.org"))) (find-file readme) (make-directory workdir t) (cd workdir) (org-babel-tangle)) -(copy-file (concat cwd "doc/smile.png") workdir) +(copy-file (concat cwd "doc/smile.png") workdir t) +(copy-directory "/root/texmf/tex/latex/Awesome-CV-master/fonts" workdir) (defun export-latex (backend file) (let ((workfile (concat workdir file)) @@ -25,10 +28,12 @@ (find-file workfile) (org-mode) (org-export-to-file backend outfile) - (shell-command (format "pdflatex %s" outfile) "*Messages*" "*Messages*") - (copy-file (concat file ".pdf") (concat cwd "/doc/static/" (concat file ".pdf"))) + (shell-command (format "lualatex %s" outfile) "*Messages*" "*Messages*") + (copy-file (concat file ".pdf") (concat cwd "/doc/static/" (concat file ".pdf")) t) )) (make-directory (concat cwd "/doc/static/") t) (export-latex 'altacv "altacv.org") (export-latex 'moderncv "moderncv.org") +(export-latex 'awesomecv "awesomecv.org") +(export-latex 'awesomecv "awesome-letter.org") From 30c4a660e233ca30f1e903bf0d9e5b8a3fdd4292 Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Wed, 7 Jul 2021 10:31:49 +0200 Subject: [PATCH 23/24] Added AwesomeCV documentation and examples awesomecv.org and awesome-letter.org are now generated from readme.org, as for the other exporters. --- doc/content/post/latex_export.md | 179 +++++++++++++++++++++++++------ readme.org | 150 ++++++++++++++++++++------ 2 files changed, 267 insertions(+), 62 deletions(-) diff --git a/doc/content/post/latex_export.md b/doc/content/post/latex_export.md index 830e3cd..332c1c2 100644 --- a/doc/content/post/latex_export.md +++ b/doc/content/post/latex_export.md @@ -97,34 +97,59 @@ When exporting you can call the following function to get the latex file. ## Using AwesomeCV {#using-awesomecv} [AwesomeCV](https://github.com/posquit0/Awesome-CV) is another LaTeX template for producing nice-looking -CVs. In addition to the regular document attributes, the following are supported: +CVs and cover letters. This style also supports some additional options. For example: + +```org +# CV color - options include: 'awesome-red (default), 'awesome-emerald, +# 'awesome-skyblue', 'awesome-pink', 'awesome-orange', 'awesome-nephritis', +# 'awesome-concrete' and 'awesome-darknight', plus any standard color names. +#+CVCOLOR: awesome-red +# Specify the position and style of the photo +#+PHOTOSTYLE: right,noedge +``` + +When exporting you can call the following function to get the latex file. + +```emacs-lisp +(org-export-to-file 'awesomecv "awesomecv.tex") +(org-latex-compile "awesomecv.tex") +``` + +Note that AwesomeCV uses the `fontspec` package, so you need to set `org-latex-compiler` to `lualatex` or `xelatex` for it to work. + +In addition to the regular document attributes, the following are supported:
-| Field | Description | -|------------------|-----------------------------------------------------------| -| PHOTOSTYLE | Style of photo to use. Comma-separated values can include | -| | circle/rectangle,edge/noedge,left/right. | -| CVCOLOR | Color of highlights. | -| STACKOVERFLOW | Stack overflow, must be specified as `ID username` | -| FONTDIR | Directory where the fonts can be found, defaults | -| | to `fonts/` (as in the standard AwesomeCV) | -| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true | -| QUOTE | Optional quote to include at the top of the CV | -| FIRSTNAME | First name to be shown in the CV. By default the first | -| | space-separated part of AUTHOR is used. | -| LASTNAME | Last name to be shown in the CV. By default the second | -| | space-separated part of AUTHOR is used. | -| CVFOOTER\_LEFT | Text to include in the left footer. None by default | -| CVFOOTER\_MIDDLE | Text to include in the middle footer. None by default. | -| CVFOOTER\_RIGHT | Text to include in the right footer. None by default. | +| Field | Description | +|------------------|-------------------------------------------------------------| +| PHOTOSTYLE | Style of photo to use. Comma-separated values can include | +| | circle/rectangle,edge/noedge,left/right. | +| CVCOLOR | Color of highlights. | +| STACKOVERFLOW | Stack overflow info, must be specified as "`ID username`" | +| FONTDIR | Directory where the fonts can be found, defaults | +| | to `fonts/` (as in the standard AwesomeCV) | +| CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true | +| QUOTE | Optional quote to include at the top of the CV | +| FIRSTNAME | First name to be shown in the CV. By default the first | +| | space-separated part of AUTHOR is used. | +| LASTNAME | Last name to be shown in the CV. By default the second | +| | space-separated part of AUTHOR is used. | +| CVFOOTER\_LEFT | Text to include in the left footer. None by default | +| CVFOOTER\_MIDDLE | Text to include in the middle footer. None by default. | +| CVFOOTER\_RIGHT | Text to include in the right footer. None by default. | +| LATEX\_TITLE | Text to use as the title section. \makecvheader by default. | +| | (Can specify \makecvheader[R] to justify to the right) |
-AwesomeCV supports a few additional types of environment types in -`CV_ENV`, including `cvemployer`, `cvskills`, `cvhonors` and `cvschool`. Some of -these support additional property fields: + +### CV environments {#cv-environments} + +AwesomeCV supports a few additional types of environment types in `CV_ENV`, +including `cvemployer`, `cvskills`, `cvhonors` and `cvschool` (see full list below). +Some of these support additional property fields:
@@ -148,47 +173,47 @@ these support additional property fields:
-All the supported values of `CV_ENV` are described below. +All the supported values of `CV_ENV` for CVs are described below. -### `cventries` {#cventries} +#### `cventries` {#cventries} Enclose all the subheaders in a `cventries` environment. Subheaders can be of type `cventry`, `cvschool`, or `cvemployer`. -### `cvhonors` {#cvhonors} +#### `cvhonors` {#cvhonors} Enclose all the subheaders in a `cvhonors` environment. Subheaders must be of type `cvhonor` -### `cventry` {#cventry} +#### `cventry` {#cventry} Converts to a `\cventry` command. Supports attributes `FROM`, `TO`, `DATE`, `EMPLOYER`, `LOCATION`, `RIGHT_IMG`. -### `cvsubentry` {#cvsubentry} +#### `cvsubentry` {#cvsubentry} Converts to a `\cvsubentry` command. Supports attributes `FROM`, `TO`, `DATE`, `LABEL` `RIGHT_IMG`. -### `cvemployer` {#cvemployer} +#### `cvemployer` {#cvemployer} Converts to a `\cventry` with only the title line. Supports attributes `FROM`, `TO`, `DATE` and `LOCATION`. -### `cvschool` {#cvschool} +#### `cvschool` {#cvschool} Converts to a `\cventry`. The headline should contain the degree obtained, shown as the main title. Supports attributes `LOCATION`, `SCHOOL`, `FROM`, `TO`, `DATE` and `RIGHT_IMG`. -### `cvhonor` {#cvhonor} +#### `cvhonor` {#cvhonor} Converts to a `\cvhonor` command (must be inside a `cvhonors` headline). Supports attributes `LOCATION`, `EMPLOYER` (in this case `EVENT` @@ -196,9 +221,103 @@ or `POSITION` might be more semantically accurate, and can also be used), `FROM`, `TO`, `DATE`. -### `cvskills` {#cvskills} +#### `cvskills` {#cvskills} Converts to a `\cvskills` environment. The headline must contain a [description list](https://orgmode.org/manual/Plain-lists.html), which gets converted into a sequence of `\cvskill` commands, with the term as the skill title and the description as its contents. + + +

Alternative text - include a link to the PDF!

+
+ + +### Cover letter environments {#cover-letter-environments} + +AwesomeCV also supports generating cover letters. For this, `CV_ENV` can have a few additional values, shown below. + + +#### `letterheader` {#letterheader} + +This environment provides heading/signature information for a cover letter. Supports attributes `RECIPIENT`. `EMPLOYER`, `LOCATION`, `LETTER_OPENING`, `LETTER_CLOSING`, `LETTER_ATTACHED`, `DATE`, `DATEFORMAT`. + +Note that the text within the heading is not exported! You can use this, for example, to keep notes about your application or the employer. For example: + +```org +* Recipient +:PROPERTIES: +:CV_ENV: letterheader +:RECIPIENT: International Recruiting team +:EMPLOYER: Employer Co. +:LOCATION: Someplace, the world +:LETTER_OPENING: Dear International Recruiting team +:LETTER_CLOSING: Kind regards, +:LETTER_ATTACHED: Curriculum Vitae +:END: + +Title and content are not exported. +Add any notes about the recipient here +They will *not* be exported. +``` + +
+
+ +| Field | Description | +|------------------|----------------------------------------------------------------------------------| +| RECIPIENT | Addressee E.g. Company Recruitment Team | +| EMPLOYER | Company name | +| LOCATION | Company address | +| LETTER\_OPENING | Letter opening, E.g. Dear Ms./Mr./Dr. LastName | +| LETTER\_CLOSING | Letter closing, E.g. Yours Sincerely, | +| DATE | The date used for the letter, uses \\\today as default if unspecified | +| DATEFORMAT | Specify an alternative date format for the letter header | +| | E.g. %e %M %Y might provide 19 March 2021 | +| LETTER\_ATTACHED | Attachments to the letter, will be listed at the bottom. E.g. "Curriculum Vitae" | + +
+ + +#### `cvletter` {#cvletter} + +Converts to a `\cvletter` environment. This holds the content of a cover letter. The body can be subdivided using `lettersection` headings. The heading title is converted to a title line at the top of the letter. + +```org +* Application for the position of /Awesome Job/ (job reference #123456) +:PROPERTIES: +:CV_ENV: cvletter +:END: + +** About Me + :PROPERTIES: + :CV_ENV: lettersection + :END: +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ullamcorper neque sit amet lectus facilisis sed luctus nisl iaculis. Vivamus at neque arcu, sed tempor quam. Curabitur pharetra tincidunt tincidunt. Morbi volutpat feugiat mauris, quis tempor neque vehicula volutpat. Duis tristique justo vel massa fermentum accumsan. Mauris ante elit, feugiat vestibulum tempor eget, eleifend ac ipsum. Donec scelerisque lobortis ipsum eu vestibulum. Pellentesque vel massa at felis accumsan rhoncus. + +** Why Employer Co.? + :PROPERTIES: + :CV_ENV: lettersection + :END: +Suspendisse commodo, massa eu congue tincidunt, elit mauris pellentesque orci, cursus tempor odio nisl euismod augue. Aliquam adipiscing nibh ut odio sodales et pulvinar tortor laoreet. Mauris a accumsan ligula. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse vulputate sem vehicula ipsum varius nec tempus dui dapibus. Phasellus et est urna, ut auctor erat. Sed tincidunt odio id odio aliquam mattis. Donec sapien nulla, feugiat eget adipiscing sit amet, lacinia ut dolor. Phasellus tincidunt, leo a fringilla consectetur, felis diam aliquam urna, vitae aliquet lectus orci nec velit. Vivamus dapibus varius blandit. + +** Why me? + :PROPERTIES: + :CV_ENV: lettersection + :END: + Duis sit amet magna ante, at sodales diam. Aenean consectetur porta risus et sagittis. Ut interdum, enim varius pellentesque tincidunt, magna libero sodales tortor, ut fermentum nunc metus a ante. Vivamus odio leo, tincidunt eu luctus ut, sollicitudin sit amet metus. Nunc sed orci lectus. Ut sodales magna sed velit volutpat sit amet pulvinar diam venenatis. +``` + + +#### `cvletter_notitle` {#cvletter-notitle} + +Same as `cvletter`, but does not include a letter title at the top. + + +#### `lettersection` {#lettersection} + +Converts to a `\lettersection` command. These are the headline portions of a cover letter. + + +

Alternative text - include a link to the PDF!

+
diff --git a/readme.org b/readme.org index db4c495..2640ca5 100644 --- a/readme.org +++ b/readme.org @@ -216,7 +216,33 @@ When exporting you can call the following function to get the latex file. ** Using AwesomeCV [[https://github.com/posquit0/Awesome-CV][AwesomeCV]] is another LaTeX template for producing nice-looking -CVs. In addition to the regular document attributes, the following are supported: +CVs and cover letters. This style also supports some additional options. For example: + +#+BEGIN_SRC org :tangle awesomecv.org +# CV color - options include: 'awesome-red (default), 'awesome-emerald, +# 'awesome-skyblue', 'awesome-pink', 'awesome-orange', 'awesome-nephritis', +# 'awesome-concrete' and 'awesome-darknight', plus any standard color names. +,#+CVCOLOR: awesome-red +# Specify the position and style of the photo +,#+PHOTOSTYLE: right,noedge +#+END_SRC + +# Next block is to generate exports +#+BEGIN_SRC org :exports none :tangle awesomecv.org +#+include: basic_cv.org +#+include: sideactivities.org +#+include: workcontent.org +#+END_SRC + +When exporting you can call the following function to get the latex file. +#+BEGIN_SRC emacs-lisp +(org-export-to-file 'awesomecv "awesomecv.tex") +(org-latex-compile "awesomecv.tex") +#+END_SRC + +Note that AwesomeCV uses the =fontspec= package, so you need to set =org-latex-compiler= to =lualatex= or =xelatex= for it to work. + + In addition to the regular document attributes, the following are supported: #+attr_html: :class table table-striped | Field | Description | @@ -224,9 +250,9 @@ CVs. In addition to the regular document attributes, the following are supported | PHOTOSTYLE | Style of photo to use. Comma-separated values can include | | | circle/rectangle,edge/noedge,left/right. | | CVCOLOR | Color of highlights. | -| STACKOVERFLOW | Stack overflow, must be specified as =ID username= | +| STACKOVERFLOW | Stack overflow info, must be specified as "=ID username=" | | FONTDIR | Directory where the fonts can be found, defaults | -| | to =fonts/= (as in the standard AwesomeCV) | +| | to =fonts/= (as in the standard AwesomeCV) | | CVHIGHLIGHTS | Whether to colorize highlights. Defaults to true | | QUOTE | Optional quote to include at the top of the CV | | FIRSTNAME | First name to be shown in the CV. By default the first | @@ -237,11 +263,13 @@ CVs. In addition to the regular document attributes, the following are supported | CVFOOTER_MIDDLE | Text to include in the middle footer. None by default. | | CVFOOTER_RIGHT | Text to include in the right footer. None by default. | | LATEX_TITLE | Text to use as the title section. \makecvheader by default. | -| | (Can specify \makecvheader[R] to justify to the right) | +| | (Can specify \makecvheader[R] to justify to the right) | -AwesomeCV supports a few additional types of environment types in -=CV_ENV=, including =cvemployer=, =cvskills=, =cvhonors= and =cvschool=. Some of -these support additional property fields: +*** CV environments + +AwesomeCV supports a few additional types of environment types in =CV_ENV=, +including =cvemployer=, =cvskills=, =cvhonors= and =cvschool= (see full list below). +Some of these support additional property fields: #+attr_html: :class table table-striped | Field | Description | @@ -261,81 +289,139 @@ these support additional property fields: | PAGEBREAK | Causes a LaTeX =\clearpage= statement to be inserted in the | | | exported output before the heading. | -All the supported values of =CV_ENV= are described below. +All the supported values of =CV_ENV= for CVs are described below. -*** =cventries= +**** =cventries= Enclose all the subheaders in a =cventries= environment. Subheaders can be of type =cventry=, =cvschool=, or =cvemployer=. -*** =cvhonors= +**** =cvhonors= Enclose all the subheaders in a =cvhonors= environment. Subheaders must be of type =cvhonor= -*** =cventry= +**** =cventry= Converts to a =\cventry= command. Supports attributes =FROM=, =TO=, =DATE=, =EMPLOYER=, =LOCATION=, =RIGHT_IMG=. -*** =cvsubentry= +**** =cvsubentry= Converts to a =\cvsubentry= command. Supports attributes =FROM=, =TO=, =DATE=, =LABEL= =RIGHT_IMG=. -*** =cvemployer= +**** =cvemployer= Converts to a =\cventry= with only the title line. Supports attributes =FROM=, =TO=, =DATE= and =LOCATION=. -*** =cvschool= +**** =cvschool= Converts to a =\cventry=. The headline should contain the degree obtained, shown as the main title. Supports attributes =LOCATION=, =SCHOOL=, =FROM=, =TO=, =DATE= and =RIGHT_IMG=. -*** =cvhonor= +**** =cvhonor= Converts to a =\cvhonor= command (must be inside a =cvhonors= headline). Supports attributes =LOCATION=, =EMPLOYER= (in this case =EVENT= or =POSITION= might be more semantically accurate, and can also be used), =FROM=, =TO=, =DATE=. -*** =cvskills= +**** =cvskills= Converts to a =\cvskills= environment. The headline must contain a [[https://orgmode.org/manual/Plain-lists.html][description list]], which gets converted into a sequence of =\cvskill= commands, with the term as the skill title and the description as its contents. -*** =letterheader= +#+BEGIN_EXPORT md + +

Alternative text - include a link to the PDF!

+
+#+END_EXPORT -Provides heading information for a cover letter. Supports attributes =RECIPIENT=. =EMPLOYER=, =LOCATION=, =LETTER_OPENING=, =LETTER_CLOSING=, =LETTER_ATTACHED=, =DATE=, =DATEFORMAT=. +*** Cover letter environments +AwesomeCV also supports generating cover letters. For this, =CV_ENV= can have a few additional values, shown below. + +**** =letterheader= + +This environment provides heading/signature information for a cover letter. Supports attributes =RECIPIENT=. =EMPLOYER=, =LOCATION=, =LETTER_OPENING=, =LETTER_CLOSING=, =LETTER_ATTACHED=, =DATE=, =DATEFORMAT=. + +Note that the text within the heading is not exported! You can use this, for example, to keep notes about your application or the employer. For example: + +#+begin_src org :tangle awesome-letter.org +,* Recipient +:PROPERTIES: +:CV_ENV: letterheader +:RECIPIENT: International Recruiting team +:EMPLOYER: Employer Co. +:LOCATION: Someplace, the world +:LETTER_OPENING: Dear International Recruiting team +:LETTER_CLOSING: Kind regards, +:LETTER_ATTACHED: Curriculum Vitae +:END: + +Title and content are not exported. +Add any notes about the recipient here +They will *not* be exported. +#+end_src #+attr_html: :class table table-striped -| Field | Description | -|----------------+---------------------------------------------------------------------------| -| RECIPIENT | Addressee E.g. Company Recruitment Team | -| EMPLOYER | Company name, E.g. Google Inc | -| LOCATION | Company address, E.g. 1600 Amphitheatre Parkway\\Mountain View, CA 94043 | -| LETTER_OPENING | Letter opening, E.g. Dear Ms./Mr./Dr. LastName | -| LETTER_CLOSING | Letter closing, E.g. Yours Sincerely, | -| DATE | The date used for the letter, uses \\today as default if unspecified. | -| DATEFORMAT | Specify an alternative date format for the letter header. | -| | E.g. %e %M %Y might provide 19 March 2021 | +| Field | Description | +|-----------------+-----------------------------------------------------------------------------------| +| RECIPIENT | Addressee E.g. Company Recruitment Team | +| EMPLOYER | Company name | +| LOCATION | Company address | +| LETTER_OPENING | Letter opening, E.g. Dear Ms./Mr./Dr. LastName | +| LETTER_CLOSING | Letter closing, E.g. Yours Sincerely, | +| DATE | The date used for the letter, uses \\today as default if unspecified | +| DATEFORMAT | Specify an alternative date format for the letter header | +| | E.g. %e %M %Y might provide 19 March 2021 | +| LETTER_ATTACHED | Attachments to the letter, will be listed at the bottom. E.g. "Curriculum Vitae" | -*** =cvletter= +**** =cvletter= -Converts to a =\cvletter= environment. This holds the content of a cover letter. +Converts to a =\cvletter= environment. This holds the content of a cover letter. The body can be subdivided using =lettersection= headings. The heading title is converted to a title line at the top of the letter. -*** =cvletter_notitle= +#+begin_src org :tangle awesome-letter.org +,* Application for the position of /Awesome Job/ (job reference #123456) +:PROPERTIES: +:CV_ENV: cvletter +:END: + +,** About Me + :PROPERTIES: + :CV_ENV: lettersection + :END: +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ullamcorper neque sit amet lectus facilisis sed luctus nisl iaculis. Vivamus at neque arcu, sed tempor quam. Curabitur pharetra tincidunt tincidunt. Morbi volutpat feugiat mauris, quis tempor neque vehicula volutpat. Duis tristique justo vel massa fermentum accumsan. Mauris ante elit, feugiat vestibulum tempor eget, eleifend ac ipsum. Donec scelerisque lobortis ipsum eu vestibulum. Pellentesque vel massa at felis accumsan rhoncus. + +,** Why Employer Co.? + :PROPERTIES: + :CV_ENV: lettersection + :END: +Suspendisse commodo, massa eu congue tincidunt, elit mauris pellentesque orci, cursus tempor odio nisl euismod augue. Aliquam adipiscing nibh ut odio sodales et pulvinar tortor laoreet. Mauris a accumsan ligula. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse vulputate sem vehicula ipsum varius nec tempus dui dapibus. Phasellus et est urna, ut auctor erat. Sed tincidunt odio id odio aliquam mattis. Donec sapien nulla, feugiat eget adipiscing sit amet, lacinia ut dolor. Phasellus tincidunt, leo a fringilla consectetur, felis diam aliquam urna, vitae aliquet lectus orci nec velit. Vivamus dapibus varius blandit. + +,** Why me? + :PROPERTIES: + :CV_ENV: lettersection + :END: + Duis sit amet magna ante, at sodales diam. Aenean consectetur porta risus et sagittis. Ut interdum, enim varius pellentesque tincidunt, magna libero sodales tortor, ut fermentum nunc metus a ante. Vivamus odio leo, tincidunt eu luctus ut, sollicitudin sit amet metus. Nunc sed orci lectus. Ut sodales magna sed velit volutpat sit amet pulvinar diam venenatis. +#+end_src +**** =cvletter_notitle= Same as =cvletter=, but does not include a letter title at the top. -*** =lettersection= +**** =lettersection= Converts to a =\lettersection= command. These are the headline portions of a cover letter. +#+BEGIN_EXPORT md + +

Alternative text - include a link to the PDF!

+
+#+END_EXPORT * Markdown Hugo Exporter :PROPERTIES: :EXPORT_FILE_NAME: hugo_export From 59c5fe6ccaf4d2712fd362c90954cd61aeae3399 Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Wed, 7 Jul 2021 22:00:41 +0200 Subject: [PATCH 24/24] Added basic_cv.org to awesome-letter.org To fill in all the basic information. --- readme.org | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/readme.org b/readme.org index 2640ca5..cc062d4 100644 --- a/readme.org +++ b/readme.org @@ -351,6 +351,10 @@ This environment provides heading/signature information for a cover letter. Supp Note that the text within the heading is not exported! You can use this, for example, to keep notes about your application or the employer. For example: +#+BEGIN_SRC org :exports none :tangle awesome-letter.org +#+include: basic_cv.org +#+END_SRC + #+begin_src org :tangle awesome-letter.org ,* Recipient :PROPERTIES: