(defun asal-post () (interactive) (goto-char (point-min)) (while (re-search-forward "
\n
" nil t) (replace-match "\n")) (goto-char (point-min)) (while (re-search-forward "
\n\n

" nil t) (replace-match "\n

\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 "

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"))