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 Titan-C/org-cv!10
This commit is contained in:
commit
685d48a4ab
1 changed files with 30 additions and 5 deletions
35
ox-altacv.el
35
ox-altacv.el
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue