mirror of
https://gitlab.com/Titan-C/org-cv.git
synced 2024-11-15 02:58:29 +00:00
hacky way to get multi-line address
This commit is contained in:
parent
fad1070eca
commit
df20a24976
1 changed files with 8 additions and 2 deletions
10
ox-cv.el
10
ox-cv.el
|
@ -24,13 +24,19 @@
|
||||||
:options-alist
|
:options-alist
|
||||||
'((:mobile "MOBILE" nil nil parse)
|
'((:mobile "MOBILE" nil nil parse)
|
||||||
(:homepage "HOMEPAGE" nil nil parse)
|
(:homepage "HOMEPAGE" nil nil parse)
|
||||||
(:address "ADDRESS" nil nil parse)
|
(:address "ADDRESS" nil nil newline)
|
||||||
(:gitlab "GITLAB" nil nil parse)
|
(:gitlab "GITLAB" nil nil parse)
|
||||||
(:github "GITHUB" nil nil parse)
|
(:github "GITHUB" nil nil parse)
|
||||||
(:linkedin "LINKEDIN" nil nil parse)
|
(:linkedin "LINKEDIN" nil nil parse)
|
||||||
)
|
)
|
||||||
:translate-alist '((template . org-cv-template)))
|
:translate-alist '((template . org-cv-template)))
|
||||||
|
|
||||||
|
(defun org-cv--add-latex-newlines (string)
|
||||||
|
"Replace regular newlines with LaTeX newlines (i.e. `\\\\')"
|
||||||
|
(let ((str (org-trim string)))
|
||||||
|
(when (org-string-nw-p str)
|
||||||
|
(concat (replace-regexp-in-string "\n" "\\\\\\\\\n" str) "\\\\"))))
|
||||||
|
|
||||||
;;;; 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,
|
||||||
|
@ -80,7 +86,7 @@ holding export options."
|
||||||
(when linkedin (format "\\social[linkedin]{%s}\n" linkedin)))
|
(when linkedin (format "\\social[linkedin]{%s}\n" linkedin)))
|
||||||
;; address
|
;; address
|
||||||
(let ((address (org-export-data (plist-get info :address) info)))
|
(let ((address (org-export-data (plist-get info :address) info)))
|
||||||
(when address (format "\\address{%s}\n" address)))
|
(when address (format "\\address{%s}\n" (org-cv--add-latex-newlines address))))
|
||||||
;; Date.
|
;; Date.
|
||||||
(let ((date (and (plist-get info :with-date) (org-export-get-date info))))
|
(let ((date (and (plist-get info :with-date) (org-export-get-date info))))
|
||||||
(format "\\date{%s}\n" (org-export-data date info)))
|
(format "\\date{%s}\n" (org-export-data date info)))
|
||||||
|
|
Loading…
Reference in a new issue