1
0
Fork 1
mirror of https://gitlab.com/Titan-C/org-cv.git synced 2025-04-17 10:49:27 +00:00

Merge branch 'alta-updates' into 'master'

AltaCV upates

See merge request 
This commit is contained in:
Jesse Millwood 2025-02-18 11:40:24 +00:00
commit 685d48a4ab

View file

@ -27,6 +27,17 @@
;; This library implements a LaTeX altacv back-end, derived from the
;; LaTeX one.
;; To add more social-network icons. Look at the fontawesome icon list
;; find the \faSymbol macro.
;; Add the Org option bellow in the options-alist
;; ...
;; (:symbol "SYMBOL" nil nil parse)
;; ...
;; Then add to the fontaweome macro you found earlier to the template
;; ...
;; (:symbol "\\faSymbol")
;; ...
;;; Code:
(require 'cl-lib)
(require 'ox-latex)
@ -62,9 +73,10 @@
(:photo "PHOTO" nil nil parse)
(:gitlab "GITLAB" nil nil parse)
(:github "GITHUB" nil nil parse)
(:mastodon "MASTODON" nil nil parse)
(:linkedin "LINKEDIN" nil nil parse)
(:with-email nil "email" t t)
(:latex-title-command nil nil "\\begin{fullwidth}\n\\makecvheader\n\\end{fullwidth}")
(:latex-title-command nil nil "\n\\makecvheader\n")
)
:translate-alist '((template . org-altacv-template)
(headline . org-altacv-headline)))
@ -160,12 +172,13 @@ holding export options."
(let ((command (org-export-data (plist-get info
(car social-network))
info)))
(and command (format "\\%s{%s}\n"
(and command (format "\\printinfo{%s}{%s}\n"
(nth 1 social-network)
command))))
'((:github "github")
(:gitlab "gitlab")
(:linkedin "linkedin"))
'((:github "\\faGithub")
(:gitlab "\\faGitlab")
(:linkedin "\\faLinkedin")
(:mastodon "\\faMastodon"))
"")
"}\n"
;; Title command.
@ -200,6 +213,16 @@ as a communication channel."
(alist-get 'date entry)
(alist-get 'location entry) contents divider)))
(defun org-altacv--format-cvsection (headline contents info)
"Format HEADLINE as as cvsection.
CONTENTS holds the contents of the headline. INFO is a plist used
as a communication channel."
(let* ((divider (if (org-export-last-sibling-p headline info) "\n" "\\divider")))
(format "\n\\cvsection{%s}%s"
(car (org-element-property :title headline))
contents)))
;;;; Headline
(defun org-altacv-headline (headline contents info)
"Transcode HEADLINE element into altacv code.
@ -212,6 +235,8 @@ as a communication channel."
;; is a cv entry
((member "cventry" environment)
(org-altacv--format-cventry headline contents info))
((member "cvsection" environment)
(org-altacv--format-cvsection headline contents info))
((org-export-with-backend 'latex headline contents info))))))
(provide 'ox-altacv)