diff options
author | Karl Berry <karl@freefriends.org> | 2022-03-07 21:54:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-03-07 21:54:49 +0000 |
commit | 324313fd1e49fa1e695cf00eae717710e6d23bb5 (patch) | |
tree | 8827bbcc4f966a54e8f09e4aa3b5357f7706945d | |
parent | c1fc10b69735cc7b53606c71bfcda240dc2ddbbe (diff) |
latex-for-undergraduates (7mar22)
git-svn-id: svn://tug.org/texlive/trunk@62496 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/latex-for-undergraduates/LaTeX_for_Undergraduates.pdf | bin | 1744273 -> 1744790 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/latex-for-undergraduates/LaTeX_for_Undergraduates.tex | 21 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/latex-for-undergraduates/README.md | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/latex-for-undergraduates/alounsburymacros-doc.pdf | bin | 210112 -> 210116 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/latex-for-undergraduates/alounsburymacros-doc.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/latex-for-undergraduates/alounsburymacros.sty | 29 |
6 files changed, 37 insertions, 19 deletions
diff --git a/Master/texmf-dist/doc/latex/latex-for-undergraduates/LaTeX_for_Undergraduates.pdf b/Master/texmf-dist/doc/latex/latex-for-undergraduates/LaTeX_for_Undergraduates.pdf Binary files differindex 4a98277a867..05886453472 100644 --- a/Master/texmf-dist/doc/latex/latex-for-undergraduates/LaTeX_for_Undergraduates.pdf +++ b/Master/texmf-dist/doc/latex/latex-for-undergraduates/LaTeX_for_Undergraduates.pdf diff --git a/Master/texmf-dist/doc/latex/latex-for-undergraduates/LaTeX_for_Undergraduates.tex b/Master/texmf-dist/doc/latex/latex-for-undergraduates/LaTeX_for_Undergraduates.tex index 898d85c1ad8..eaad3e62b23 100644 --- a/Master/texmf-dist/doc/latex/latex-for-undergraduates/LaTeX_for_Undergraduates.tex +++ b/Master/texmf-dist/doc/latex/latex-for-undergraduates/LaTeX_for_Undergraduates.tex @@ -33,7 +33,7 @@ } } \author{Andrew Lounsbury} - \date{February 5, 2022} + \date{March 6, 2022} \maketitle \vspace{1.5in} @@ -110,7 +110,7 @@ View error messages by clicking the icons in the bottom-left corner. The font size \texttt{[12pt]} is optional and may be set to sizes other than \texttt{12}. The \href{https://ctan.org/pkg/article}{\texttt{article}} class is for regular documents.\footnote{ The \href{https://ctan.org/pkg/beamer}{\texttt{beamer}} class allows us to make presentation slides and posters in \LaTeX. } -The preamble is everything between \texttt{\textbackslash documentclass\{article\}} and \texttt{\textbackslash begin\{document\}}, in other words, your margins and text dimensions,\footnote{ +The preamble is everything between \verb$\documentclass{article}$ and \verb$\begin{document}$, in other words, your margins and text dimensions,\footnote{ An alternative method of setting these values is \texttt{\textbackslash setlength\{\textbackslash lengthname\}\{}\opt{dimension}\texttt{\}}. } which are optional, and your packages. \p @@ -254,7 +254,7 @@ like this. \item This is \texttt{itemize}. \item% dot - Good labeling for \texttt{itemize} might be ``dot'', ``dash'', ``star'', ``point,'' but the utility of this depends on whether you put \texttt{\textbackslash item} on its own line or the same line as your text. + Good labeling for \texttt{itemize} might be ``dot'', ``dash'', ``star'', ``point,'' but the utility of this depends on whether you put \verb$\item$ on its own line or the same line as your text. \item% dot \begin{itemize} @@ -446,7 +446,7 @@ makes it much easier to see where everything is. $\sup_n (b_n)$, $\int_a^b$, $\max_n\{\delta_n\}$, etc. \par - We can often override this by putting \texttt{\textbackslash limits} + We can often override this by putting \verb$\limits$ after each command. So, we can write $\sum\limits_{i=1}^n$, @@ -666,29 +666,30 @@ Additionally, there are various ways to insert a space in math mode (but some of \text{\textbackslash :} & \phi(x)\:\forall x & \rightarrow\:\leftarrow \\ \hline \texttt{\textbackslash ;} & \phi(x)\;\forall x & \rightarrow\;\leftarrow \\ \hline \text{\texttt{\textbackslash} (slash space)} & \phi(x)\ \forall x & \rightarrow \ \leftarrow\\ \hline + \texttt{\textbackslash nobreakspace} & \phi(x)\nobreakspace\forall x & \rightarrow\nobreakspace\leftarrow \\ \hline \sim \text{ (tilde)} & \phi(x)~\forall x & \rightarrow~\leftarrow \\ \hline \texttt{\textbackslash quad} & \phi(x) \quad \forall x & \rightarrow \quad \leftarrow \\ \hline \texttt{\textbackslash qquad} & \phi(x) \qquad \forall x & \rightarrow \qquad \leftarrow \\ \hline \end{array} \] -Tildes are an example of unbreakable space, meaning the adjacent strings won't be separated over line breaks.\footnote{ - Note that, for unknown reasons, the two tildes above didn't produce the same space, so tildes are perhaps unreliable. -} +The command \verb$\nobreakspace$ and tildes are examples of unbreakable space, meaning the adjacent strings won't be separated over line breaks.\footnote{ + In particular, a tilde is equivalent to \texttt{\textbackslash nobreakspace \{\}}. The extra \texttt{\{\}} may cause inconsistent spacing when used with certain math symbols, as it did in the above chart. +} E.g.,\\ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - string1~string2 \par Rather than printing \hspace*{\fill} string1 \\ string2, \\ it keeps the two strings on the same line. If we remove the space between the last dash and string1, both strings will move to the previous line. This could be useful for keeping inline mathematical statements together; it may sometimes be difficult to read a formula broken up over two lines. \par -Tildes are unbreakable in math mode and in paragraph mode. Some other options here are only unbreakable in paragraph mode; e.g., (\verb$\,$), (\verb$\:$), and (\verb$\;$). +The command \verb$\nobreakspace$ and tildes are unbreakable in math mode and in paragraph mode. Some other options here are only unbreakable in paragraph mode; e.g., (\verb$\,$), (\verb$\:$), and (\verb$\;$). \section{Macros} \label{sec:macros} The command \verb$\newcommand{\macroname}{$\opt{definition}\verb$}$ creates a macro instruction invoked with \verb$\macroname$ that inserts the \opt{definition} wherever \verb$\macroname$ appears.\footnote{ The \opt{definition} can either be written on one line for potentially faster compile times or left in a readable format, but compile times won't be much faster in the former case since \LaTeX\ Workshop keeps auxiliary files. The first compilation is long, but subsequent compilations are quick because most of the compilation is already done. Hence, saving memory by reducing the number of tokens isn't very important since most of those tokens aren't recompiled. In the latter case, it's good practice to put a \texttt{\%} at the end of most lines to prevent whitespace created by \texttt{EOL} (end of line) characters. BTW: 2 \texttt{EOL} = empty line in code = \texttt{\textbackslash par}. } -The command \verb$\newcommand*{\macroname}[n]{$\opt{definition}\verb$}$\footnote{ +The command \verb$\newcommand*{\macroname}[$\opt{n}\verb$]{$\opt{definition}\verb$}$\footnote{ The \texttt{*} creates a ``short'' command that invokes error messages if the \opt{definition} is broken up over paragraphs (\texttt{\textbackslash par} or an empty line). The utility here is that this will also make your compiler tell you the line number if you leave an opening brace unclosed. } -is invoked with \texttt{n} arguments $\mathit{\langle a_1 \rangle,\dots,\langle a_n \rangle}$ as $\mathtt{\texttt{\textbackslash} macroname\{\langle\mathit{a_1}\rangle\} \cdots \{\langle\mathit{a_n}\rangle\}}$. +is invoked with \opt{n} arguments $\mathit{\langle a_1 \rangle,\dots,\langle a_n \rangle}$ as \verb%\macroname{%$\langle\mathit{a_1}\rangle$\verb%}%$\cdots$\verb%{%$\langle\mathit{a_n}\rangle$\verb%}%. In the \opt{definition}, \texttt{\#i} indicates where the \texttt{i}-th argument \opt{$a_i$} will be placed, and \verb$\hfill$ inserts white-space until a space---the space in a matrix entry, for instance---is filled. \pagebreak \[ diff --git a/Master/texmf-dist/doc/latex/latex-for-undergraduates/README.md b/Master/texmf-dist/doc/latex/latex-for-undergraduates/README.md index 3a2ec78cbf9..0d6ae6b6b6d 100644 --- a/Master/texmf-dist/doc/latex/latex-for-undergraduates/README.md +++ b/Master/texmf-dist/doc/latex/latex-for-undergraduates/README.md @@ -1,7 +1,7 @@ # LaTeX for Undergraduates ## Author: Andrew Lounsbury, alounsbury8@gmail.com -## Version 1.0 -## 2022/02/05 +## Version 1.0.1 +## 2022/03/06 ## License: Public Domain ## Author's Note diff --git a/Master/texmf-dist/doc/latex/latex-for-undergraduates/alounsburymacros-doc.pdf b/Master/texmf-dist/doc/latex/latex-for-undergraduates/alounsburymacros-doc.pdf Binary files differindex fb458004c06..007db2b2802 100644 --- a/Master/texmf-dist/doc/latex/latex-for-undergraduates/alounsburymacros-doc.pdf +++ b/Master/texmf-dist/doc/latex/latex-for-undergraduates/alounsburymacros-doc.pdf diff --git a/Master/texmf-dist/doc/latex/latex-for-undergraduates/alounsburymacros-doc.tex b/Master/texmf-dist/doc/latex/latex-for-undergraduates/alounsburymacros-doc.tex index 66cf701fb55..85aa2d32d0c 100644 --- a/Master/texmf-dist/doc/latex/latex-for-undergraduates/alounsburymacros-doc.tex +++ b/Master/texmf-dist/doc/latex/latex-for-undergraduates/alounsburymacros-doc.tex @@ -11,7 +11,7 @@ \begin{document} \title{The \texttt{alounsburymacros} package} - \author{1.0 \ 2022/02/05} + \author{1.0.1 \ 2022/03/06} \date{Andrew Lounsbury} \maketitle diff --git a/Master/texmf-dist/doc/latex/latex-for-undergraduates/alounsburymacros.sty b/Master/texmf-dist/doc/latex/latex-for-undergraduates/alounsburymacros.sty index 39788e6ad4b..495c38efa0b 100644 --- a/Master/texmf-dist/doc/latex/latex-for-undergraduates/alounsburymacros.sty +++ b/Master/texmf-dist/doc/latex/latex-for-undergraduates/alounsburymacros.sty @@ -1,4 +1,4 @@ -% alounsburymacros.sty 1.0 2022/02/05 +% alounsburymacros.sty 1.0.1 2022/03/06 % Andrew Lounsbury % This file was not generated from source code. @@ -6,7 +6,7 @@ % Marking this file as a package \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{alounsburymacros}[2022/02/05 1.0 miscellaneous commands] +\ProvidesPackage{alounsburymacros}[2022/03/06 1.0.1 miscellaneous commands] % This allows commands that use things from these packages to work even if we % haven't put them in \usepackage{} in the preamble. @@ -624,10 +624,27 @@ \newcommand*{\mddit}[1][1]{\forloop{i}{0}{\value{i}<#1}{\ddit}} % VERSE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\inp}[1]{\newpage\input{#1}} + \newcommand{\attrib}[1]{\nopagebreak{\raggedleft\footnotesize#1\par}\ } -\newcommand{\dinkus}{% - \begin{center}% - \textbf{***}\vspace{-0.25cm}% - \end{center}% +\newcommand{\gap}[1][1]{\hspace{#1\vgap}} +\newcommand{\ngap}[1][1]{\hspace{-#1\vgap}} + +\newcommand{\nin}{\hspace{-\vgap}} +\newcommand{\bin}{\hspace{2\vgap}} +\newcommand{\tin}{\hspace{3\vgap}} +\newcommand{\fin}{\hspace{4\vgap}} +\newcommand{\cin}{\hspace{5\vgap}} +\newcommand{\nbin}{\hspace{-2\vgap}} +\newcommand{\ntin}{\hspace{-3\vgap}} +\newcommand{\nfin}{\hspace{-4\vgap}} +\newcommand{\ncin}{\hspace{-5\vgap}} +\newcommand{\hin}{\hspace{0.5\vgap}} +\newcommand{\nhin}{\hspace{-0.5\vgap}} + +\newcommand{\dinkus}{ + \begin{center} + \textbf{***}\vspace{-0.25cm} + \end{center} }
\ No newline at end of file |