From b4474a4d73a36b4e35875b05d6c5b3202fa2773e Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 7 Mar 2016 23:19:54 -0500 Subject: [PATCH] Ship a style file that makes it easy to include "everything." The style file is very dumb and just includes all of the files, one after another. To avoid redefinition errors, get rid of DeclarePairedDelimiter from mathtools and define everything ourselves. Update the README with the "simple" instructions for documents what as not bein published. --- README | 11 +++++++---- mjo-common.tex | 12 +++++------- mjo-linear_algebra.tex | 2 +- mjotex.sty | 8 ++++++++ 4 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 mjotex.sty diff --git a/README b/README index 9c76735..bc88639 100644 --- a/README +++ b/README @@ -18,9 +18,12 @@ Now add those as dependencies of your document: example.pdf: example.tex example.bbl ... $(MJOTEXPATHS) -If you're not planning on publishing your document, great, you're -done. If you are, you probably also want to create a "dist" target -that will bundle all of your nonstandard TeX libraries along with the -code for your document. +If you're planning on publishing your document, then you probably also +want to create a "dist" target that will bundle all of your +nonstandard TeX libraries along with the code for your document. A full makefile example is provided in the repository. + +If you're not planning on publishing your document, then you can save +yourself some trouble and just \usepackage{mjotex}. That will ignore +any changes to the mjotex library, but hey, YOLO. diff --git a/mjo-common.tex b/mjo-common.tex index 4df86a0..8299916 100644 --- a/mjo-common.tex +++ b/mjo-common.tex @@ -2,22 +2,20 @@ % Only the most commonly-used macros. Needed by everything else. % -\usepackage{mathtools} - % Place the argument in matching left/right parntheses. -\DeclarePairedDelimiter{\of}{ \lparen }{ \rparen } +\providecommand*{\of}[1]{ \left( {#1} \right) } % Group terms using parentheses. -\newcommand*{\qty}[1]{ \left\lparen {#1} \right\rparen } +\providecommand*{\qty}[1]{ \left( {#1} \right) } % Create a set from the given elements -\DeclarePairedDelimiter{\set}{ \lbrace }{ \rbrace } +\providecommand*{\set}[1]{ \left\lbrace {#1} \right\rbrace } % A set comprehension, where the ``such that...'' bar is added % automatically. The bar was chosen over a colon to avoid ambiguity % with the L : V -> V notation. We can't leverage \set here because \middle % needs \left and \right present. -\newcommand*{\setc}[2]{ \left\lbrace {#1}\ \middle|\ {#2} \right\rbrace } +\providecommand*{\setc}[2]{ \left\lbrace {#1}\ \middle|\ {#2} \right\rbrace } % A pair of things. -\DeclarePairedDelimiterX{\pair}[2]{ \lparen }{ \rparen}{ {#1}, {#2} } +\providecommand*{\pair}[2]{ \left( {#1}, {#2} \right) } diff --git a/mjo-linear_algebra.tex b/mjo-linear_algebra.tex index 0fce684..91cc42d 100644 --- a/mjo-linear_algebra.tex +++ b/mjo-linear_algebra.tex @@ -5,7 +5,7 @@ \input{mjo-common} % The inner product between its two arguments. -\DeclarePairedDelimiterX{\ip}[2]{ \langle }{ \rangle}{ {#1}, {#2} } +\newcommand*{\ip}[2]{ \langle {#1}, {#2} \rangle } % The tensor product of its two arguments. \newcommand*{\tp}[2]{ {#1} \otimes {#2} } diff --git a/mjotex.sty b/mjotex.sty new file mode 100644 index 0000000..1003760 --- /dev/null +++ b/mjotex.sty @@ -0,0 +1,8 @@ +\input{mjo-algorithm} +\input{mjo-cone} +\input{mjo-convex} +\input{mjo-fonts} +\input{mjo-linear_algebra} +\input{mjo-pcases} +\input{mjo-theorems} +\input{mjo-topology} -- 2.43.2