mirror of
https://gitlab.com/Titan-C/org-cv.git
synced 2025-04-17 10:49:27 +00:00
feat(ox-moderncv.el): Add support for some latex preamble variables
Adds support for the latex variables set in the preamble: - pagenumber: true or false - columnwidth for the date columns using `setlegnth` - page geometry: use anything that goes into the parameters of the geometry latex package
This commit is contained in:
parent
dd2f840050
commit
1f182a2340
2 changed files with 18 additions and 0 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,2 +1,7 @@
|
|||
*.elc
|
||||
/dev.org
|
||||
.dir-locals.el
|
||||
Makefile
|
||||
*~
|
||||
test/
|
||||
export-latex.el
|
||||
|
|
|
@ -56,6 +56,9 @@
|
|||
'((:latex-class "LATEX_CLASS" nil "moderncv" t)
|
||||
(:cvstyle "CVSTYLE" nil "classic" t)
|
||||
(:cvcolor "CVCOLOR" nil "blue" t)
|
||||
(:cvgeometry "CVGEOMETRY" nil nil t)
|
||||
(:cvcolumnwidth "CVCOLUMNWIDTH" nil nil t)
|
||||
(:cvpagenumber "CVPAGENUMBER" nil nil t)
|
||||
(:mobile "MOBILE" nil nil parse)
|
||||
(:homepage "HOMEPAGE" nil nil parse)
|
||||
(:address "ADDRESS" nil nil newline)
|
||||
|
@ -94,6 +97,16 @@ holding export options."
|
|||
;; cvcolor
|
||||
(let ((cvcolor (org-export-data (plist-get info :cvcolor) info)))
|
||||
(when (not (string-empty-p cvcolor)) (format "\\moderncvcolor{%s}\n" cvcolor)))
|
||||
;; cvgeometry
|
||||
(let ((cvgeometry (org-export-data (plist-get info :cvgeometry) info)))
|
||||
(when (not (string-empty-p cvgeometry)) (format "\\usepackage[%s]{geometry}\n" cvgeometry)))
|
||||
;; cvcolumnwidth: if you want to change the width of the column with the dates
|
||||
(let ((cvcolumnwidth (org-export-data (plist-get info :cvcolumnwidth) info)))
|
||||
(when (not (string-empty-p cvcolumnwidth)) (format "\\setlength{\\hintscolumnwidth}{%s}\n" cvcolumnwidth)))
|
||||
;; cvpagenumber: to suppress automatic page numbering for CVs longer than one page
|
||||
(let ((cvpagenumber (org-export-data (plist-get info :cvpagenumber) info)))
|
||||
(when (and cvpagenumber (equal cvpagenumber "false"))
|
||||
(format "\\nopagenumbers{}\n")))
|
||||
;; Possibly limit depth for headline numbering.
|
||||
(let ((sec-num (plist-get info :section-numbers)))
|
||||
(when (integerp sec-num)
|
||||
|
|
Loading…
Add table
Reference in a new issue