Add a yasnippet for an org homework header
This commit is contained in:
parent
d63fb671ab
commit
9008ef0138
@ -176,7 +176,11 @@
|
||||
|
||||
(setq org-confirm-babel-evaluate nil)
|
||||
(add-to-list 'org-babel-load-languages '(dot . t))
|
||||
(add-to-list 'org-src-lang-modes '("dot" . graphviz-dot)))
|
||||
(add-to-list 'org-src-lang-modes '("dot" . graphviz-dot))
|
||||
(defun org-insert-homework-header ()
|
||||
""
|
||||
(interactive)
|
||||
(yas-expand-snippet (yas-lookup-snippet "Homework Header" 'org-mode))))
|
||||
|
||||
(use-package windmove
|
||||
:config
|
||||
|
17
.emacs.d/snippets/org-mode/hwhead
Normal file
17
.emacs.d/snippets/org-mode/hwhead
Normal file
@ -0,0 +1,17 @@
|
||||
# -*- mode: snippet -*-
|
||||
# name: Homework Header
|
||||
# key: hwhead
|
||||
# --
|
||||
|
||||
#+Author: Adam Goldsmith
|
||||
#+Title: ${1:title}
|
||||
#+Date: `(format-time-string "%Y-%m-%d")`
|
||||
#+LaTeX_HEADER: \newcommand{\class}{${2:class}}
|
||||
|
||||
#+LATEX_CLASS_OPTIONS: [12pt]
|
||||
#+OPTIONS: toc:nil num:nil ^:{}
|
||||
#+LATEX_HEADER: \usepackage[margin=1in, nohead, nofoot]{geometry}
|
||||
#+LATEX_HEADER: \makeatletter \def\@maketitle{{\noindent\@title} {\hfill\@author\unskip\strut\par} {\noindent\class\unskip\strut} {\hfill\@date\par \vspace{\baselineskip}}\makeatother}
|
||||
#+LATEX_HEADER: \pagenumbering{gobble}
|
||||
|
||||
$0
|
Loading…
Reference in New Issue
Block a user