mirror of
https://gitlab.com/Titan-C/org-cv.git
synced 2024-11-23 22:48:35 +00:00
Improved letter support
- Added new environment type cvletter_notitle, to produce a letter without a title at the top. - Added new property LETTER_SIGNATURE - Made all letter properties optional.
This commit is contained in:
parent
2e9d4bc857
commit
b885e66e86
2 changed files with 22 additions and 5 deletions
|
@ -253,10 +253,18 @@ as a communication channel."
|
||||||
(if date
|
(if date
|
||||||
(format "%s" (org-awesomecv-org-timestamp-to-dateformat date letter-dateformat t))
|
(format "%s" (org-awesomecv-org-timestamp-to-dateformat date letter-dateformat t))
|
||||||
"\\today")))
|
"\\today")))
|
||||||
(letter-opening (or (format "\\letteropening{%s}" (org-element-property :LETTER_OPENING headline)) ""))
|
(letter-opening (if (org-element-property :LETTER_OPENING headline)
|
||||||
(letter-closing (or (format "\\letterclosing{%s}" (org-element-property :LETTER_CLOSING headline)) ""))
|
(format "\\letteropening{%s}" (org-element-property :LETTER_OPENING headline))
|
||||||
(letter-attached (or (format "\\letterenclosure[Attached]{%s}" (org-element-property :LETTER_ATTACHED headline)) ""))
|
""))
|
||||||
)
|
(letter-closing (if (org-element-property :LETTER_CLOSING headline)
|
||||||
|
(format "\\letterclosing{%s}" (org-element-property :LETTER_CLOSING headline))
|
||||||
|
""))
|
||||||
|
(letter-signature (if (org-element-property :LETTER_SIGNATURE headline)
|
||||||
|
(format "\\lettersignature{%s}" (org-element-property :LETTER_SIGNATURE headline))
|
||||||
|
""))
|
||||||
|
(letter-attached (if (org-element-property :LETTER_ATTACHED headline)
|
||||||
|
(format "\\letterenclosure[Attached]{%s}" (org-element-property :LETTER_ATTACHED headline))
|
||||||
|
"")))
|
||||||
|
|
||||||
(cond
|
(cond
|
||||||
((string= entrytype "cvemployer")
|
((string= entrytype "cvemployer")
|
||||||
|
@ -295,7 +303,7 @@ as a communication channel."
|
||||||
(org-cv-utils--format-time-window from-date to-date)))
|
(org-cv-utils--format-time-window from-date to-date)))
|
||||||
;; Coverletter sections
|
;; Coverletter sections
|
||||||
((string= entrytype "letterheader")
|
((string= entrytype "letterheader")
|
||||||
(format "\\recipient\n {%s}\n {%s%s%s}\n\n%s\n%s\n%s\n%s\n"
|
(format "\\recipient\n {%s}\n {%s%s%s}\n\n%s\n%s\n%s\n%s\n%s\n"
|
||||||
recipient
|
recipient
|
||||||
employer
|
employer
|
||||||
(if (and employer location) "\\\\" "")
|
(if (and employer location) "\\\\" "")
|
||||||
|
@ -303,11 +311,15 @@ as a communication channel."
|
||||||
letter-date
|
letter-date
|
||||||
letter-opening
|
letter-opening
|
||||||
letter-closing
|
letter-closing
|
||||||
|
letter-signature
|
||||||
letter-attached))
|
letter-attached))
|
||||||
((string= entrytype "cvletter")
|
((string= entrytype "cvletter")
|
||||||
(format "\n\\lettertitle{%s}\n\\makelettertitle\n\n\\begin{cvletter}\n%s\n\\end{cvletter}\n\\makeletterclosing"
|
(format "\n\\lettertitle{%s}\n\\makelettertitle\n\n\\begin{cvletter}\n%s\n\\end{cvletter}\n\\makeletterclosing"
|
||||||
title
|
title
|
||||||
contents))
|
contents))
|
||||||
|
((string= entrytype "cvletter_notitle")
|
||||||
|
(format "\n\\makelettertitle\n\n\\begin{cvletter}\n%s\n\\end{cvletter}\n\\makeletterclosing"
|
||||||
|
contents))
|
||||||
((string= entrytype "lettersection")
|
((string= entrytype "lettersection")
|
||||||
(format "\n\\lettersection{%s}\n%s"
|
(format "\n\\lettersection{%s}\n%s"
|
||||||
title
|
title
|
||||||
|
@ -341,6 +353,7 @@ as a communication channel."
|
||||||
(string= environment "cvschool")
|
(string= environment "cvschool")
|
||||||
(string= environment "cvhonor")
|
(string= environment "cvhonor")
|
||||||
(string= environment "cvletter")
|
(string= environment "cvletter")
|
||||||
|
(string= environment "cvletter_notitle")
|
||||||
(string= environment "lettersection")
|
(string= environment "lettersection")
|
||||||
(string= environment "letterheader")
|
(string= environment "letterheader")
|
||||||
)
|
)
|
||||||
|
|
|
@ -328,6 +328,10 @@ Provides heading information for a cover letter. Supports attributes =RECIPIENT=
|
||||||
|
|
||||||
Converts to a =\cvletter= environment. This holds the content of a cover letter.
|
Converts to a =\cvletter= environment. This holds the content of a cover letter.
|
||||||
|
|
||||||
|
*** =cvletter_notitle=
|
||||||
|
|
||||||
|
Same as =cvletter=, but does not include a letter title at the top.
|
||||||
|
|
||||||
*** =lettersection=
|
*** =lettersection=
|
||||||
|
|
||||||
Converts to a =\lettersection= command. These are the headline portions of a cover letter.
|
Converts to a =\lettersection= command. These are the headline portions of a cover letter.
|
||||||
|
|
Loading…
Reference in a new issue