Update alta & modern to use new date and host properties

This commit is contained in:
Oscar Najera 2023-10-22 00:53:19 +02:00
parent 4ac644cc34
commit eae0b9a789
2 changed files with 8 additions and 12 deletions

View file

@ -37,7 +37,7 @@
(add-to-list 'org-latex-classes (add-to-list 'org-latex-classes
'("altacv" '("altacv"
"\\documentclass{altacv}" "\\documentclass{altacv}"
("\\section{%s}" . "\\section*{%s}") ("\n\\section{%s}" . "\n\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))) ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
@ -83,8 +83,7 @@
colorlinks=true, colorlinks=true,
urlcolor=olive!50!black!30!green, urlcolor=olive!50!black!30!green,
} }
" ")
)
;;;; Template ;;;; Template
;; ;;
;; Template used is similar to the one used in `latex' back-end, ;; Template used is similar to the one used in `latex' back-end,
@ -195,11 +194,10 @@ CONTENTS holds the contents of the headline. INFO is a plist used
as a communication channel." as a communication channel."
(let* ((entry (org-cv-utils--parse-cventry headline info)) (let* ((entry (org-cv-utils--parse-cventry headline info))
(divider (if (org-export-last-sibling-p headline info) "\n" "\\divider"))) (divider (if (org-export-last-sibling-p headline info) "\n" "\\divider")))
(format "\n\\cvevent{%s}{%s}{%s}{%s}%s\n%s" (format "\n\\cvevent{%s}{%s}{%s}{%s}%s\n%s\n\n"
(alist-get 'title entry) (alist-get 'title entry)
(alist-get 'employer entry) (alist-get 'host entry)
(org-cv-utils--format-time-window (alist-get 'from-date entry) (alist-get 'date entry)
(alist-get 'to-date entry))
(alist-get 'location entry) contents divider))) (alist-get 'location entry) contents divider)))
;;;; Headline ;;;; Headline

View file

@ -185,12 +185,10 @@ CONTENTS holds the contents of the headline. INFO is a plist used
as a communication channel." as a communication channel."
(let* ((entry (org-cv-utils--parse-cventry headline info)) (let* ((entry (org-cv-utils--parse-cventry headline info))
(note (or (org-element-property :NOTE headline) ""))) (note (or (org-element-property :NOTE headline) "")))
(format "\\cventry{%s}{%s}{%s}{%s}{%s}{%s}\n"
(format "\\cventry{\\textbf{%s}}{%s}{%s}{%s}{%s}{%s}\n" (alist-get 'date entry)
(org-cv-utils--format-time-window (alist-get 'from-date entry)
(alist-get 'to-date entry))
(alist-get 'title entry) (alist-get 'title entry)
(alist-get 'employer entry) (alist-get 'host entry)
(alist-get 'location entry) (alist-get 'location entry)
note contents))) note contents)))