simple notes
This commit is contained in:
parent
d2910d5884
commit
2b1536fb4b
|
@ -1 +1,2 @@
|
|||
$pdf_previewer = "zathura %O %S";
|
||||
$pdflatex = "xelatex -shell-escape %O %S";
|
||||
|
|
|
@ -173,7 +173,7 @@ return require('packer').startup({ function(use)
|
|||
'lervag/vimtex',
|
||||
config = function()
|
||||
vim.g.vimtex_view_general_viewer = 'zathura'
|
||||
vim.g.vimtex_compiler_method = "xelatex"
|
||||
vim.g.vimtex_compiler_method = "latexmk"
|
||||
-- vim.g.vimtex_view_general_options = = '-x nvim -n -c "Vimtex'
|
||||
-- 'file:@pdf\\#src:@line@tex'
|
||||
-- vim.g.vimtex_quickfix_enabled = 0
|
||||
|
|
|
@ -28,6 +28,7 @@ snippet template "Basic template" b
|
|||
$3
|
||||
|
||||
\begin{document}
|
||||
\maketitle
|
||||
$0
|
||||
\end{document}
|
||||
endsnippet
|
||||
|
@ -59,8 +60,8 @@ endsnippet
|
|||
snippet table "Table" b
|
||||
\begin{table}[${1:htpb}]
|
||||
\centering
|
||||
\caption{${2:caption}}
|
||||
\label{tab:${3:label}}
|
||||
\caption{$2}
|
||||
\label{tab:$3}
|
||||
\begin{tabular}{${5:c}}
|
||||
$6${5/((?<=.)c|l|r)|./(?1: & )/g}
|
||||
\end{tabular}
|
||||
|
@ -76,6 +77,30 @@ snippet ~~ "Sim" iA
|
|||
\sim
|
||||
endsnippet
|
||||
|
||||
snippet section "Section" bA
|
||||
\sect{$1}$0
|
||||
endsnippet
|
||||
|
||||
snippet chapter "Chapter" bA
|
||||
\chapter{$1}$0
|
||||
endsnippet
|
||||
|
||||
snippet part "Part" bA
|
||||
\part{$1}$0
|
||||
endsnippet
|
||||
|
||||
snippet theorem "Theorem" bA
|
||||
\begin{theorem}[$1]
|
||||
$2
|
||||
\end{theorem} $0
|
||||
endsnippet
|
||||
|
||||
snippet definition "Definition" bA
|
||||
\begin{definition}[$1]
|
||||
$2
|
||||
\end{definition} $0
|
||||
endsnippet
|
||||
|
||||
# Math
|
||||
|
||||
snippet sm "Math" wA
|
||||
|
@ -156,11 +181,6 @@ snippet nabl "Nabla" iA
|
|||
\nabla
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet del "Nabla" iA
|
||||
\nabla
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet \\\ "Set minus" iA
|
||||
\setminus
|
||||
|
@ -210,7 +230,7 @@ endsnippet
|
|||
|
||||
priority 10
|
||||
context "math()"
|
||||
snippet in "In" iA
|
||||
snippet inn "In" iA
|
||||
\in
|
||||
endsnippet
|
||||
|
||||
|
@ -326,13 +346,13 @@ endsnippet
|
|||
|
||||
priority 10
|
||||
context "math()"
|
||||
snippet "hat" "Hat" riA
|
||||
snippet "hat" "Hat" ri
|
||||
\hat{$1}$0
|
||||
endsnippet
|
||||
|
||||
priority 100
|
||||
context "math()"
|
||||
snippet "([a-zA-Z])hat" "Hat" riA
|
||||
snippet "([a-zA-Z])hat" "Hat" ri
|
||||
\hat{`!p snip.rv = match.group(1)`}
|
||||
endsnippet
|
||||
|
||||
|
@ -354,7 +374,13 @@ snippet '(?<!\\)(sin|cos|arccot|cot|csc|ln|log|exp|star|perp|arcsin|arccos|arcta
|
|||
\\`!p snip.rv = match.group(1)`
|
||||
endsnippet
|
||||
|
||||
priority 200
|
||||
priority 1000
|
||||
context "math()"
|
||||
snippet epsi "Epsilon" wA
|
||||
\epsilon
|
||||
endsnippet
|
||||
|
||||
priority 500
|
||||
context "math()"
|
||||
snippet '(?<!\\)(alpha|beta|gamma|Delta|delta|epsilon|zeta|eta|Theta|theta|iota|kappa|Lambda|lambda|mu|nu|Xi|xi|Pi|pi|varpi|Sigma|sigma|tau|Phi|phi|varphi|chi|Psi|psi|Omega|omega)' "Greek" rwA
|
||||
\\`!p snip.rv = match.group(1)`
|
||||
|
@ -586,7 +612,7 @@ endsnippet
|
|||
|
||||
context "math()"
|
||||
snippet sum "Bounded Sum" w
|
||||
\sum_{${1:n=${2:1}}}^{${3:\infty}} $3
|
||||
\sum_{${1:n=${2:1}}}^{${3:\infty}} $4
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
|
@ -704,7 +730,7 @@ endsnippet
|
|||
|
||||
# Code
|
||||
|
||||
snippet sc "Code" wA
|
||||
snippet bsc "Blank Inline Code" wA
|
||||
\texttt{${1}}`!p
|
||||
if t[2] and t[2][0] not in [',', '.', '?', '-', ' ']:
|
||||
snip.rv = ' '
|
||||
|
@ -713,13 +739,30 @@ else:
|
|||
`$2
|
||||
endsnippet
|
||||
|
||||
snippet dc "Display Code" wA
|
||||
\begin{minted}[$1]
|
||||
$2
|
||||
\end{minted} $0
|
||||
snippet sc "Inline Code" wA
|
||||
\inlinecode{${1}}{${2}}`!p
|
||||
if t[2] and t[2][0] not in [',', '.', '?', '-', ' ']:
|
||||
snip.rv = ' '
|
||||
else:
|
||||
snip.rv = ''
|
||||
`$2
|
||||
endsnippet
|
||||
|
||||
snippet dc "Block Code" wA
|
||||
\begin{listing}[${1:H}]
|
||||
\caption{$2}
|
||||
\label{lst:$3}
|
||||
\begin{code}{$4}
|
||||
$5
|
||||
\end{code} $0
|
||||
\end{listing}
|
||||
endsnippet
|
||||
|
||||
snippet impc "Import Code" wA
|
||||
\inputminted{$1}{$2}$0
|
||||
\begin{listing}[${1:H}]
|
||||
\caption{$2}
|
||||
\label{lst:$3}
|
||||
\importcode{$1}{$2}$0
|
||||
\end{listing}
|
||||
endsnippet
|
||||
|
||||
|
|
|
@ -42,5 +42,6 @@
|
|||
\newcommand{\Z}{\ensuremath{\mathbb{Z}}}
|
||||
\newcommand{\R}{\ensuremath{\mathbb{R}}}
|
||||
\newcommand{\Q}{\ensuremath{\mathbb{Q}}}
|
||||
\newcommand\C{\ensuremath{\mathbb{C}}}
|
||||
|
||||
\geometry{top=20mm,bottom=20mm}
|
||||
|
|
157
tex/simplenotes.cls
Normal file
157
tex/simplenotes.cls
Normal file
|
@ -0,0 +1,157 @@
|
|||
|
||||
\ProvidesClass{simplenotes}
|
||||
\LoadClass[twoside]{report}
|
||||
|
||||
\RequirePackage[T1]{fontenc}
|
||||
\RequirePackage{textcomp}
|
||||
\RequirePackage{stmaryrd}
|
||||
\SetSymbolFont{stmry}{bold}{U}{stmry}{m}{n}
|
||||
\RequirePackage{url}
|
||||
\RequirePackage{float}
|
||||
\RequirePackage{booktabs}
|
||||
\RequirePackage{emptypage}
|
||||
\RequirePackage{subcaption}
|
||||
\RequirePackage{multicol}
|
||||
\RequirePackage{cancel}
|
||||
\RequirePackage{mathrsfs}
|
||||
\RequirePackage{minted}
|
||||
\usemintedstyle{bw}
|
||||
\RequirePackage{listings}
|
||||
\RequirePackage{systeme}
|
||||
\RequirePackage{amsfonts, amsmath, mathtools, amssymb, amsthm}
|
||||
\RequirePackage{enumitem}
|
||||
\RequirePackage{bm}
|
||||
\RequirePackage{listings}
|
||||
\RequirePackage{geometry}
|
||||
\RequirePackage{graphicx}
|
||||
\RequirePackage[usenames,dvipsnames]{xcolor}
|
||||
\RequirePackage{bm}
|
||||
\RequirePackage{siunitx}
|
||||
\RequirePackage{physics}
|
||||
\let\qty\SI%
|
||||
\RequirePackage{etoolbox}
|
||||
\RequirePackage{xifthen}
|
||||
\RequirePackage{import}
|
||||
\RequirePackage{pdfpages}
|
||||
\RequirePackage{fancyhdr}
|
||||
\RequirePackage{tikz}
|
||||
\RequirePackage{tikz-cd}
|
||||
\RequirePackage{pgfplots}
|
||||
|
||||
\pgfplotsset{
|
||||
compat=newest,
|
||||
}
|
||||
\usepgfplotslibrary{fillbetween}
|
||||
\usetikzlibrary{patterns, intersections, angles, quotes, calc, positioning}
|
||||
\usetikzlibrary{arrows.meta}
|
||||
\RequirePackage{thmtools}
|
||||
\RequirePackage[framemethod=TikZ]{mdframed}
|
||||
\mdfsetup{skipabove=1em, skipbelow=0em, innertopmargin=5pt, innerbottommargin=6pt}
|
||||
|
||||
\newcommand\N{\ensuremath{\mathbb{N}}}
|
||||
\newcommand\R{\ensuremath{\mathbb{R}}}
|
||||
\newcommand\Z{\ensuremath{\mathbb{Z}}}
|
||||
\newcommand\Q{\ensuremath{\mathbb{Q}}}
|
||||
\newcommand\C{\ensuremath{\mathbb{C}}}
|
||||
|
||||
\let\sidesum\sum%
|
||||
\let\sidelim\lim%
|
||||
\renewcommand\sum{\sidesum\limits}
|
||||
\renewcommand\lim{\sidelim\limits}
|
||||
|
||||
|
||||
\theoremstyle{definition}
|
||||
\makeatletter
|
||||
|
||||
\declaretheoremstyle[
|
||||
headfont=\bfseries\sffamily, bodyfont=\normalfont,
|
||||
mdframed={nobreak}
|
||||
]{thmboxed}
|
||||
|
||||
\declaretheoremstyle[
|
||||
headfont=\bfseries\sffamily, bodyfont=\normalfont,
|
||||
]{thmsimple}
|
||||
|
||||
\declaretheoremstyle[
|
||||
headfont=\bfseries\sffamily, bodyfont=\normalfont,
|
||||
numbered=no,
|
||||
mdframed={
|
||||
rightline=false, topline=false, bottomline=false,
|
||||
},
|
||||
qed=\qedsymbol,
|
||||
]{thmproof}
|
||||
|
||||
|
||||
\declaretheoremstyle[
|
||||
headfont=\bfseries\sffamily, bodyfont=\normalfont,
|
||||
numbered=no,
|
||||
mdframed={
|
||||
rightline=false, topline=false, bottomline=false,
|
||||
}
|
||||
]{thmline}
|
||||
|
||||
\declaretheorem[style=thmboxed, name=Definition]{definition}
|
||||
\declaretheorem[style=thmboxed, name=Lemma]{lemma}
|
||||
\declaretheorem[style=thmboxed, name=Theorem]{theorem}
|
||||
\declaretheorem[style=thmboxed, name=Proposition]{proposition}
|
||||
\declaretheorem[style=thmboxed, numbered=no, name=Corollary]{corollary}
|
||||
\declaretheorem[style=thmsimple, numbered=no, name=Example]{eg}
|
||||
|
||||
\AtEndEnvironment{eg}{\null\hfill$\diamond$}
|
||||
|
||||
\declaretheorem[style=thmproof, name=Proof]{thmproof}
|
||||
\renewenvironment{proof}[1][\proofname]{\begin{thmproof}}{\end{thmproof}}
|
||||
\declaretheorem[style=thmline, name=Proof]{expl}
|
||||
|
||||
\declaretheorem[style=thmsimple, numbered=no, name=Remark]{remark}
|
||||
\declaretheorem[style=thmsimple, numbered=no, name=Note]{note}
|
||||
|
||||
\newcommand{\exercise}[1]{%
|
||||
\def\@exercise{#1}%
|
||||
\subsection*{Exercise #1}
|
||||
}
|
||||
|
||||
\newcommand{\subexercise}[1]{%
|
||||
\subsubsection*{Exercise \@exercise.#1}
|
||||
}
|
||||
|
||||
\newcommand{\sect}[1]{
|
||||
\def\@section{#1}
|
||||
\section{#1}
|
||||
}
|
||||
|
||||
\def\@lecture{}
|
||||
\newcommand{\lecture}[2]{
|
||||
\ifthenelse{\isempty{#2}}{
|
||||
\def\@lecture{Lecture #1}%
|
||||
}{%
|
||||
\def\@lecture{Lecture #1: #2}%
|
||||
}%
|
||||
\subsection*{\@lecture}
|
||||
}
|
||||
|
||||
\pagestyle{fancy}
|
||||
\fancyhead[RO,LE]{\@section}
|
||||
\fancyhead[RE,LO]{\leftmark}
|
||||
|
||||
\newcommand{\incfig}[1]{%
|
||||
\def\svgwidth{\columnwidth}
|
||||
\import{./}{#1.pdf_tex}
|
||||
}
|
||||
|
||||
\newenvironment{code}[1]{\VerbatimEnvironment\begin{minted}[frame=lines,framesep=7pt, linenos]{#1}}{\end{minted}}
|
||||
|
||||
\newcommand{\inlinecode}[2]{\mintinline{#1}|#2|}
|
||||
|
||||
\newcommand{\importcode}[2]{\VerbatimEnvironment\inputminted[frame=lines, framesep=7pt, linenos]{#1}{#2}}
|
||||
|
||||
\DeclareMathOperator{\GL}{GL}
|
||||
\DeclareMathOperator{\Imm}{Im}
|
||||
\DeclareMathOperator{\Ker}{Ker}
|
||||
\DeclareMathOperator{\Aut}{Aut}
|
||||
\DeclareMathOperator{\Hom}{Hom}
|
||||
\DeclareMathOperator{\Hol}{Hol}
|
||||
|
||||
|
||||
\makeatother
|
||||
|
Loading…
Reference in New Issue
Block a user