Added support for PAGEBREAK attribute in headings in the AwesomeCV exporter.

This commit is contained in:
Diego Zamboni 2020-03-09 10:18:13 +01:00
parent de6feffebe
commit c9ddf59080
3 changed files with 19 additions and 12 deletions

View file

@ -143,6 +143,8 @@ these support additional property fields:
| | to the entry. | | | to the entry. |
| RIGHT\_IMG | path to an image to include floating to the right of a `cventry`, | | RIGHT\_IMG | path to an image to include floating to the right of a `cventry`, |
| | a `cvsubentry` or `cvschool` entry. Meant to be used to show a logo. | | | a `cvsubentry` or `cvschool` entry. Meant to be used to show a logo. |
| PAGEBREAK | Causes a LaTeX `\clearpage` statement to be inserted in the |
| | exported output before the heading. |
</div> </div>

View file

@ -283,18 +283,21 @@ CONTENTS is the contents of the headline. INFO is a plist used
as a communication channel." as a communication channel."
(unless (org-element-property :footnote-section-p headline) (unless (org-element-property :footnote-section-p headline)
(let ((environment (let ((env (org-element-property :CV_ENV headline))) (let ((environment (let ((env (org-element-property :CV_ENV headline)))
(or (org-string-nw-p env) "block")))) (or (org-string-nw-p env) "block")))
(cond (pagebreak (org-string-nw-p (org-element-property :PAGEBREAK headline))))
;; is a cv entry or subentry (concat
((or (string= environment "cventry") (when pagebreak "\\clearpage\n")
(string= environment "cvsubentry") (cond
(string= environment "cvemployer") ;; is a cv entry or subentry
(string= environment "cvschool") ((or (string= environment "cventry")
(string= environment "cvhonor")) (string= environment "cvsubentry")
(org-awesomecv--format-cventry headline contents info)) (string= environment "cvemployer")
((or (string= environment "cventries") (string= environment "cvhonors")) (string= environment "cvschool")
(org-awesomecv--format-cvenvironment environment headline contents info)) (string= environment "cvhonor"))
((org-export-with-backend 'latex headline contents info)))))) (org-awesomecv--format-cventry headline contents info))
((or (string= environment "cventries") (string= environment "cvhonors"))
(org-awesomecv--format-cvenvironment environment headline contents info))
((org-export-with-backend 'latex headline contents info)))))))
;;;; Plain List, to intercept and transform "cvskills" lists ;;;; Plain List, to intercept and transform "cvskills" lists

View file

@ -256,6 +256,8 @@ these support additional property fields:
| | to the entry. | | | to the entry. |
| RIGHT_IMG | path to an image to include floating to the right of a =cventry=, | | RIGHT_IMG | path to an image to include floating to the right of a =cventry=, |
| | a =cvsubentry= or =cvschool= entry. Meant to be used to show a logo. | | | a =cvsubentry= or =cvschool= entry. Meant to be used to show a logo. |
| PAGEBREAK | Causes a LaTeX =\clearpage= statement to be inserted in the |
| | exported output before the heading. |
All the supported values of =CV_ENV= are described below. All the supported values of =CV_ENV= are described below.