1
0
Fork 1
mirror of https://gitlab.com/Titan-C/org-cv.git synced 2025-04-16 18:29:29 +00:00

Merge branch '#11-moderncv-support-all-cv-commands' into 'master'

Draft: feat(ox-moderncv.el): Add support for all cv commands and environments

See merge request 
This commit is contained in:
Louis.vgn 2025-01-23 22:30:57 +00:00
commit c43c7847a8
3 changed files with 25 additions and 1 deletions

5
.gitignore vendored
View file

@ -1,2 +1,7 @@
*.elc
/dev.org
.dir-locals.el
Makefile
*~
test/
export-latex.el

View file

@ -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)

View file

@ -139,8 +139,14 @@ org file.
#+BEGIN_SRC org :tangle moderncv.org
# CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
,#+CVSTYLE: banking
# CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
# CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'burgundy', 'purple', 'grey' and 'black'
,#+CVCOLOR: green
# Page number - for multiple pages CV you can choose to disable page number
,#+CVPAGENUMBER: false
# Date column width - you specify the width of the date column
,#+CVCOLUMNWIDTH: 3cm
# Page geomerty - you can set the page geometry with anything that goes into parameters of the geometry latex package
,#+CVGEOMETRY: scale=0.95
#+END_SRC
# Next block is to generate exports