v2.3.0
===================================================================== --- New Scripts -------------------------- zsh ) latex + latex template engine - latex/build-pdf - latex/cleanup - latex/create-new - latex/get-pdf - latex/open-pdf beta SQL script -- got tired of floating this; works, but only OK - db/run-sql/postgres --- Changes ------------------------------ - Added 'math', 'basic', and 'times-new-roman' templates to latex - Added 'readlink' to list of required coreutils - Added __INPUT to read into a variable with prompt (zsh/utils/io) - Added $EXECUTION_DIR to interact with the user's working directory --- Bug Fixes ---------------------------- - subscwrypts no longer force stdout/stderr to tty
This commit is contained in:
37
zsh/latex/templates/basic/template.tex
Normal file
37
zsh/latex/templates/basic/template.tex
Normal file
@ -0,0 +1,37 @@
|
||||
\usepackage[margin=.75in,bottom=0.5in,top=1.0in]{geometry}
|
||||
|
||||
\usepackage{enumitem}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{hyperref}
|
||||
\usepackage{lastpage}
|
||||
|
||||
\newcommand{\headerL} {\documentTitle: \documentDate}
|
||||
\newcommand{\headerC} {\documentId}
|
||||
\newcommand{\headerR} {\authorName\ (\authorId)}
|
||||
\newcommand{\pageOfTotal} {\thepage\ of~\pageref{LastPage}}
|
||||
|
||||
\pagestyle{fancy}
|
||||
\fancypagestyle{plain}{%
|
||||
\fancyhf{}
|
||||
\fancyhead[L]{\headerL}\fancyhead[R]{\headerR}\fancyhead[C]{\headerC}
|
||||
\fancyfoot[C]{\pageOfTotal}
|
||||
}
|
||||
|
||||
\renewcommand{\baselinestretch}{1}
|
||||
\setlength{\parskip}{0em}
|
||||
\hyphenpenalty=5000%
|
||||
|
||||
\fancyhf{}
|
||||
\fancyhead[L]{\headerL}\fancyhead[R]{\headerR}\fancyhead[C]{\headerC}
|
||||
\fancyfoot[C]{\pageOfTotal}
|
||||
|
||||
\title{\documentTitle}
|
||||
\author{\authorName\ \\ \authorId}
|
||||
\date{\documentDate}
|
||||
|
||||
\begin{document}
|
||||
\maketitle%
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
% ---------------------------------------------------------------------
|
||||
\end{document}
|
5
zsh/latex/templates/gitignore
Normal file
5
zsh/latex/templates/gitignore
Normal file
@ -0,0 +1,5 @@
|
||||
*.aux
|
||||
*.log
|
||||
*.out
|
||||
*.pdf
|
||||
*.dvi
|
9
zsh/latex/templates/main.tex
Normal file
9
zsh/latex/templates/main.tex
Normal file
@ -0,0 +1,9 @@
|
||||
\documentclass[letterpaper]{article}
|
||||
|
||||
\newcommand{\documentTitle} {LATEX-DOC-TITLE}
|
||||
\newcommand{\documentDate} {LATEX-DOC-DATE}
|
||||
\newcommand{\documentId} {LATEX-DOC-ID}
|
||||
|
||||
\newcommand{\authorName} {LATEX-AUTHOR-NAME}
|
||||
\newcommand{\authorId} {LATEX-AUTHOR-ID}
|
||||
|
11
zsh/latex/templates/math/code.sty
Normal file
11
zsh/latex/templates/math/code.sty
Normal file
@ -0,0 +1,11 @@
|
||||
\ProvidesPackage{code}
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
\newcommand{\clispsnippet}[2]{%
|
||||
\lstinputlisting[%
|
||||
caption=#1,
|
||||
language=Lisp,
|
||||
showstringspaces=false,
|
||||
numbers=left,
|
||||
]{#2}
|
||||
}
|
46
zsh/latex/templates/math/formatting.sty
Normal file
46
zsh/latex/templates/math/formatting.sty
Normal file
@ -0,0 +1,46 @@
|
||||
\ProvidesPackage{formatting}
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
\newcommand{\headerLeft} {\documentTitle: \documentDate}
|
||||
\newcommand{\headerCenter} {\documentId}
|
||||
\newcommand{\headerRight} {\authorName\ (\authorId)}
|
||||
\newcommand{\pageOfTotal} {\thepage\ of~\pageref{LastPage}}
|
||||
|
||||
\newtheorem{theorem}{Theorem}[section]
|
||||
\newtheorem{lemma}[theorem]{Lemma}
|
||||
\newtheorem{corollary}{Corollary}[theorem]
|
||||
|
||||
\RequirePackage[margin=1in,bottom=.5in,includefoot]{geometry}
|
||||
\RequirePackage{lastpage}
|
||||
\RequirePackage{fancyhdr}
|
||||
|
||||
% ---------------------------------------------------------------------
|
||||
% Page 1
|
||||
|
||||
\pagestyle{fancy}
|
||||
\fancypagestyle{plain}{%
|
||||
\fancyhf{}
|
||||
\fancyhead[L]{\headerLeft}
|
||||
\fancyhead[R]{\headerRight}
|
||||
\fancyhead[C]{\headerCenter}
|
||||
\fancyfoot[C]{\pageOfTotal}
|
||||
}
|
||||
|
||||
\renewcommand{\baselinestretch}{1}
|
||||
\setlength{\parskip}{0em}
|
||||
\setlength{\parindent}{0em}
|
||||
|
||||
% ---------------------------------------------------------------------
|
||||
% Pages 2+
|
||||
|
||||
\fancyhf{}
|
||||
\fancyhead[L]{\headerLeft}
|
||||
\fancyhead[R]{\headerRight}
|
||||
\fancyhead[C]{\headerCenter}
|
||||
\fancyfoot[C]{\pageOfTotal}
|
||||
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
\title{\documentTitle}
|
||||
\author{\authorName\ \\ \authorId}
|
||||
\date{\documentDate}
|
0
zsh/latex/templates/math/gitignore
Normal file
0
zsh/latex/templates/math/gitignore
Normal file
16
zsh/latex/templates/math/imports.sty
Normal file
16
zsh/latex/templates/math/imports.sty
Normal file
@ -0,0 +1,16 @@
|
||||
\ProvidesPackage{imports}
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
\RequirePackage{amssymb} % "bold" math letters (e.g. set of integers ℤ)
|
||||
\RequirePackage{amsmath} % advanced math symbols
|
||||
|
||||
\RequirePackage{listings} % code snippet styling block
|
||||
|
||||
\RequirePackage{tikz} % graphic drawing / generation
|
||||
\usetikzlibrary{arrows,automata}
|
||||
\usetikzlibrary{trees}
|
||||
|
||||
\RequirePackage{graphicx} % include images
|
||||
\graphicspath{{./graphics/}}
|
||||
|
||||
\RequirePackage[english]{babel} % -- English compilation rules
|
13
zsh/latex/templates/math/shorthand.sty
Normal file
13
zsh/latex/templates/math/shorthand.sty
Normal file
@ -0,0 +1,13 @@
|
||||
\ProvidesPackage{shorthand}
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
\newcommand{\egfcoefficient}{\ensuremath{\left[\frac{x^n}{n!}\right]}}
|
||||
\newcommand{\ogfcoefficient}{\ensuremath{\left[x^n\right]}}
|
||||
\newcommand{\falling}[1]{^{\underline{#1}}}
|
||||
\newcommand{\divides}{\ensuremath{\;\backslash\;}}
|
||||
|
||||
\newcommand{\sumgz}{\ensuremath{\sum_{n\geq 0}}}
|
||||
\newcommand{\sumdiv}{\ensuremath{\sum_{d\divides n}}}
|
||||
|
||||
\newcommand{\union}{\ensuremath{\cup}}
|
||||
\newcommand{\intersect}{\ensuremath{\cap}}
|
12
zsh/latex/templates/math/template.tex
Normal file
12
zsh/latex/templates/math/template.tex
Normal file
@ -0,0 +1,12 @@
|
||||
\usepackage{imports}
|
||||
\usepackage{formatting}
|
||||
\usepackage{shorthand}
|
||||
\usepackage{code}
|
||||
|
||||
\begin{document}
|
||||
\maketitle
|
||||
% ---------------------------------------------------------------------
|
||||
% \input{sections/01.introduction.tex}
|
||||
% \includegraphic{graphics/diagram-a.png}
|
||||
% ---------------------------------------------------------------------
|
||||
\end{document}
|
@ -0,0 +1,7 @@
|
||||
\ProvidesPackage{custom-headers}
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
\newcommand{\firstH}[1] {\begin{large}\textbf{#1}\end{large}\par}
|
||||
\newcommand{\secondH}[1] {\textbf{#1}\par}
|
||||
\newcommand{\thirdH}[1] {\textbf{#1}. }
|
||||
\newcommand{\fourthH}[1] {\textbf{\textit{#1}}. }
|
31
zsh/latex/templates/times-new-roman-12/formatting.sty
Normal file
31
zsh/latex/templates/times-new-roman-12/formatting.sty
Normal file
@ -0,0 +1,31 @@
|
||||
\ProvidesPackage{formatting}
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
\newcommand{\horizontalHeader} {%
|
||||
\authorName\hfill
|
||||
\authorId\hfill
|
||||
\documentId\hfill
|
||||
\documentDate%
|
||||
}
|
||||
|
||||
\RequirePackage[margin=1in]{geometry}
|
||||
\RequirePackage{fancyhdr}
|
||||
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
\pagestyle{fancy}
|
||||
\renewcommand{\headrulewidth}{0pt}
|
||||
\fancyhead[C]{\horizontalHeader}
|
||||
\fancyfoot[C]{\thepage}
|
||||
|
||||
\renewcommand{\baselinestretch}{1}
|
||||
\setlength{\parskip}{1em}
|
||||
\setlength{\parindent}{0em}
|
||||
\raggedright%
|
||||
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
\newcommand{\insertTitle} {%
|
||||
\centerline{\begin{large}\textbf{\documentTitle}\end{large}}
|
||||
}
|
||||
|
11
zsh/latex/templates/times-new-roman-12/imports.sty
Normal file
11
zsh/latex/templates/times-new-roman-12/imports.sty
Normal file
@ -0,0 +1,11 @@
|
||||
\ProvidesPackage{imports}
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
\RequirePackage{times} % "Times New Roman" font
|
||||
|
||||
\RequirePackage{kantlipsum} % generate Kantian lorem ipsum
|
||||
|
||||
\RequirePackage{graphicx} % include images
|
||||
\graphicspath{{./graphics/}}
|
||||
|
||||
\RequirePackage[english]{babel} % -- English compilation rules
|
15
zsh/latex/templates/times-new-roman-12/template.tex
Normal file
15
zsh/latex/templates/times-new-roman-12/template.tex
Normal file
@ -0,0 +1,15 @@
|
||||
\usepackage{imports}
|
||||
\usepackage{formatting}
|
||||
\usepackage{custom-headers}
|
||||
|
||||
\begin{document}
|
||||
\insertTitle%
|
||||
% ---------------------------------------------------------------------
|
||||
|
||||
% \input{sections/abstract.tex}
|
||||
% \includgraphics{graphics/table-a.png}
|
||||
\firstH{First-level Header}
|
||||
\kant%
|
||||
|
||||
% ---------------------------------------------------------------------
|
||||
\end{document}
|
Reference in New Issue
Block a user