diff options
author | Arun Isaac | 2020-12-31 13:05:29 +0530 |
---|---|---|
committer | Arun Isaac | 2020-12-31 15:07:19 +0530 |
commit | 5b430437143e471724c9e6576e01e76ce3c1ed1d (patch) | |
tree | 604d422faf7820848d4921ad6ccf2d24fdeb3018 | |
parent | 08c3f930b7e607fc4d62b10ed8861744e7faed57 (diff) | |
download | ksh-reports-5b430437143e471724c9e6576e01e76ce3c1ed1d.tar.gz ksh-reports-5b430437143e471724c9e6576e01e76ce3c1ed1d.tar.lz ksh-reports-5b430437143e471724c9e6576e01e76ce3c1ed1d.zip |
Abstract out latex usepackage statement.
* ksh-report-header.el (latex-use-package): New function.
(make-report-header): Use latex-use-package.
-rw-r--r-- | ksh-report-header.el | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/ksh-report-header.el b/ksh-report-header.el index 6194250..1177662 100644 --- a/ksh-report-header.el +++ b/ksh-report-header.el @@ -1,20 +1,25 @@ +(defun latex-use-package (package &optional arguments) + (if arguments + (format "\\usepackage[%s]{%s}" arguments package) + (format "\\usepackage{%s}" package))) + (defun make-report-header (title) (org-keywords '(("TITLE" . "Kuzhanthai Sanjeevi Hospital") ("AUTHOR" . "Dr. Serene Isaac, MD, DGO, DNB"))) (org-latex-headers - `("\\usepackage{fullpage}" - "\\usepackage{nopageno}" - "\\usepackage[ddmmyyyy]{datetime}" - "\\renewcommand{\\dateseparator}{-}" - "\\setlength{\\parindent}{0cm}" - "\\usepackage[tiny]{titlesec}" - "\\usepackage{wasysym}" - "\\usepackage{titling}" - ,(format "\\pretitle{\\hrule \\begin{center} {\\Large \\textbf{%s}} \\par \\small \\sc}" title) - "\\posttitle{\\par 17, Jawahar Street, Ramavarmapuram, Nagercoil - 629001 \\par \\phone \\, 223374 \\end{center}}" - "\\preauthor{}" - "\\postauthor{\\par Obstetrician and Gynaecologist}" - "\\predate{\\hfill \\textbf{Date: }}" - "\\date{\\today}" - "\\postdate{\\vspace{1em} \\hrule \\par}"))) + (list (latex-use-package "fullpage") + (latex-use-package "nopageno") + (latex-use-package "datetime" "ddmmyyyy") + "\\renewcommand{\\dateseparator}{-}" + "\\setlength{\\parindent}{0cm}" + (latex-use-package "titlesec" "tiny") + (latex-use-package "wasysym") + (latex-use-package "titling") + ,(format "\\pretitle{\\hrule \\begin{center} {\\Large \\textbf{%s}} \\par \\small \\sc}" title) + "\\posttitle{\\par 17, Jawahar Street, Ramavarmapuram, Nagercoil - 629001 \\par \\phone \\, 223374 \\end{center}}" + "\\preauthor{}" + "\\postauthor{\\par Obstetrician and Gynaecologist}" + "\\predate{\\hfill \\textbf{Date: }}" + "\\date{\\today}" + "\\postdate{\\vspace{1em} \\hrule \\par}"))) |