From 637a7aac6877461b90a1906688ea840381a17809 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 1 Oct 2022 01:42:05 +0530 Subject: Make biometry readings a standalone figure not part of a section. * ksh-report.el (insert-biometry): Accept caption argument. (make-report-header): Import latex caption package. * ksh-scan2.el (form-to-org): Pass caption argument to insert-biometry. * ksh-scan3.el (form-to-org): Pass caption argument to insert-biometry. --- ksh-report.el | 6 ++++-- ksh-scan2.el | 2 +- ksh-scan3.el | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ksh-report.el b/ksh-report.el index 1fc23b5..0cd2815 100644 --- a/ksh-report.el +++ b/ksh-report.el @@ -38,10 +38,11 @@ } " percentile param-name param param-age)) -(defun insert-biometry (readings) +(defun insert-biometry (caption readings) (princ "#+BEGIN_EXPORT latex\n") (princ "\\begin{figure}\n") (princ "\\centering\n") + (princ (format "\\caption*{%s}" caption)) (seq-do (lambda (reading) (princ (apply 'biometry-subfloat (seq-map 'get-field reading)))) @@ -62,7 +63,8 @@ '(("TITLE" . "Kuzhanthai Sanjeevi Hospital") ("AUTHOR" . "Dr. Serene Isaac, MD, DGO, DNB"))) (seq-do 'ksh-forms-org-latex-header - (list (latex-use-package "fullpage") + (list (latex-use-package "caption") + (latex-use-package "fullpage") (latex-use-package "nopageno") (latex-use-package "datetime" "ddmmyyyy") (latex-use-package "subfig") diff --git a/ksh-scan2.el b/ksh-scan2.el index 6a5dc74..cdfe74b 100644 --- a/ksh-scan2.el +++ b/ksh-scan2.el @@ -138,8 +138,8 @@ ("Umbilical cord" . ,survey-umbilical-cord) ("Fetal activity" . ,survey-fetal-activity) ("Cardiac activity" . ,survey-cardiac-activity))) - (princ "* Fetal Biometry\n") (insert-biometry + "Fetal Biometry" `(("BPD" ,biometry-bpd ,biometry-bpd-age ,biometry-bpd-percentile) ("HC" ,biometry-hc ,biometry-hc-age ,biometry-hc-percentile) ("AC" ,biometry-ac ,biometry-ac-age ,biometry-ac-percentile) diff --git a/ksh-scan3.el b/ksh-scan3.el index e607a2d..71506e8 100644 --- a/ksh-scan3.el +++ b/ksh-scan3.el @@ -107,8 +107,8 @@ ("Fetal activity" . ,survey-fetal-activity) ("Cardiac activity" . ,survey-cardiac-activity) ("Fetal heart rate" . ,survey-fetal-heart-rate))) - (princ "* Fetal Biometry\n") (insert-biometry + "Fetal Biometry" `(("BPD" ,biometry-bpd ,biometry-bpd-age ,biometry-bpd-percentile) ("HC" ,biometry-hc ,biometry-hc-age ,biometry-hc-percentile) ("AC" ,biometry-ac ,biometry-ac-age ,biometry-ac-percentile) -- cgit v1.2.3