" nil t)
+ (replace-match ""))
+ (goto-char (point-min))
+ (while (re-search-forward "
" nil t)
+ (replace-match ""))
+ (goto-char (point-min))
+ (while (re-search-forward "
Validate
" nil t)
+ (replace-match ""))
+ (goto-char (point-min))
+ (while (re-search-forward "
" nil t)
+ (replace-match ""))
+ (goto-char (point-min))
+ (while (re-search-forward "section-number-2\">\\([0-9]*\\)<" nil t)
+ (replace-match "section-number-2\">\\1\.<"))
+ (goto-char (point-min))
+ (while (re-search-forward "\\\\noindent\\\\rule{\\\\textwidth}{0.5pt}" nil t)
+ (replace-match "\\sephim" nil t))
+ (goto-char (point-min))
+ (while (re-search-forward "\\\\maketitle" nil t)
+ (replace-match "\\begin{titlingpage}\n\\titleGM\n\\end{titlingpage}" nil t))
+ (goto-char (point-min))
+ (while (re-search-forward "label{\\(.*\\)}\n\\([A-Z]\\)\\([a-z]*\\)" nil t)
+ (replace-match "label{\\1}\n\\\\lettrine{\\2}{\\3}"))
+ (goto-char (point-min))
+ (while (re-search-forward "label{\\(.*\\)}\n“\\([A-Z]\\)\\([a-z]*\\)" nil t)
+ (replace-match "label{\\1}\n\\\\lettrine{“\\2}{\\3}")))
+
+(defun asal-pre ()
+ (interactive)
+ (goto-char (point-min))
+ (while (re-search-forward " -" nil t)
+ (replace-match " –"))
+ (goto-char (point-min))
+ (while (re-search-forward " –" nil t)
+ (replace-match " –"))
+ (goto-char (point-min))
+ (while (re-search-forward "/ –" nil t)
+ (replace-match " –/"))
+ (goto-char (point-min))
+ (while (re-search-forward " \\.\\.\\." nil t)
+ (replace-match " …"))
+ (goto-char (point-min))
+ (while (re-search-forward " …" nil t)
+ (replace-match " …"))
+ (goto-char (point-min))
+ (while (re-search-forward "'" nil t)
+ (replace-match "’"))
+ (goto-char (point-min))
+ (while (re-search-forward " \n" nil t)
+ (replace-match "\n"))
+ (goto-char (point-min))
+ (while (re-search-forward "\n\"" nil t)
+ (replace-match "\n“"))
+ (goto-char (point-min))
+ (while (re-search-forward " \"" nil t)
+ (replace-match " “"))
+ (goto-char (point-min))
+ (while (re-search-forward "\"" nil t)
+ (replace-match "”"))
+ (goto-char (point-min))
+ (while (re-search-forward "“/" nil t)
+ (replace-match "/“"))
+ (goto-char (point-min))
+ (while (re-search-forward "/”" nil t)
+ (replace-match "”/"))
+ (goto-char (point-min))
+ (while (re-search-forward "\\[fn:\\([0-9]*\\):\\(.*\\)\\]" nil t)
+ (replace-match "@@html:
\\2@@@@latex:\\\\footnote{\\2}@@"))
+ (goto-char (point-min))
+ (insert "#+TITLE: A Shot At Life\n#+AUTHOR: ovely\n#+STARTUP: fninline\n#+OPTIONS: toc:nil author:nil creator:nil date:nil timestamp:nil html-style:nil\n#+HTML_HEAD:
\n#+LATEX_COMPILER: xelatex\n#+LATEX_CLASS: memoir\n#+LATEX_CLASS_OPTIONS: [9pt,b6paper]\n#+LATEX_HEADER: \\input{header.tex}\n\n"))
diff --git a/memoir.el b/memoir.el
new file mode 100644
index 0000000..e83a038
--- /dev/null
+++ b/memoir.el
@@ -0,0 +1,9 @@
+(require 'ox-latex)
+(add-to-list 'org-latex-classes
+ '("memoir"
+ "\\documentclass{memoir}
+ [NO-DEFAULT-PACKAGES]"
+ ("\\chapter{%s}" . "\\chapter*{%s}")
+ ("\\section{%s}" . "\\section*{%s}")
+ ("\\subsection{%s}" . "\\subsection*{%s}")
+ ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))