Skip to content

Commit

Permalink
add a type
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Feb 25, 2024
1 parent 81cae6a commit 9b53c77
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions ox-manuscript/ox-manuscript.el
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"Customization group for ox-manuscript.")

(defcustom ox-manuscript-latex-command
"pdflatex"
"lualatex"
"Command to run latex."
:group 'ox-manuscript)

Expand All @@ -52,6 +52,13 @@
"Command to run bibtex."
:group 'ox-manuscript)

(defcustom ox-manuscript-page-numbering
""
"Command to influence page-numbering.
Set it to \"\\pagenumbering{gobble}\n\" if you want no page numbers."
:group 'ox-manuscript
:type 'string)

(defcustom ox-manuscript-interactive-build
nil
"Determines if pdfs are built with interaction from the user.
Expand Down Expand Up @@ -205,7 +212,7 @@ grestore
;; ** Wiley
;; I have not been able to find a LaTeX package for Wiley

;; customized article. better margins
;; ** customized article. better margins
(add-to-list 'org-latex-classes
'("cmu-article" ;class-name
"\\documentclass{article}
Expand All @@ -218,6 +225,24 @@ grestore
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

;; ** NSF proposal - with Times New Roman
(add-to-list 'org-latex-classes
'("NSF" ;class-name
"\\documentclass[12pt]{article}
\\usepackage{fontspec}
\\setmainfont{Times New Roman}
\\usepackage[top=1in, bottom=1.in, left=1in, right=1in]{geometry}
[PACKAGES]
[EXTRA]" ;;header-string
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*a{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
("\\paragraph{%s}" . "\\paragraph*{%s}")
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))




;; * Functions
;;;###autoload
(defun ox-manuscript-toggle-interactive-build ()
Expand Down Expand Up @@ -340,6 +365,7 @@ references should go into a separate file."
(goto-char (point-min))
(re-search-forward "begin{document}" (point-max))
(forward-line)
(insert ox-manuscript-page-numbering)
(beginning-of-line)
(setq p1 (point))
(re-search-forward "end{document}")
Expand Down Expand Up @@ -386,7 +412,7 @@ This function checks for the presence of minted, and uses
-shell-escape if needed. You can run this interactively, and you
will be prompted for a tex file name."
(interactive "fTex file: ")
(message "running pdflatex on %s" tex-file)
(message "running %s on %s" ox-manuscript-latex-command tex-file)

(let ((minted-p (with-temp-buffer
(insert-file-contents tex-file)
Expand Down

0 comments on commit 9b53c77

Please sign in to comment.