commit 7ca4ac43a38e45fcb0c1e8eb0399795c6d54895a Author: Kenneth Odle Date: Fri Jul 28 19:35:57 2023 -0400 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..63d8710 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +Covers +*bklt* +*.aux +*.log +*.out +*.synctex.gz +*.toc +*.dvi +*.odt +metric* +*.mx1 +*.abc +*.bak +*wc* +*pdf* diff --git a/Notes on Python.tex b/Notes on Python.tex new file mode 100644 index 0000000..4682a9a --- /dev/null +++ b/Notes on Python.tex @@ -0,0 +1,172 @@ +\documentclass[letterpaper, 10pt, twoside]{article} + +% Packages without options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{lipsum} +\usepackage{verbatim} % Better code blocks +\usepackage{fancyvrb} % Even better code blocks +\usepackage{fvextra} % Even more better code blocks +\usepackage{enumitem} % Control spacing inside list environments +\usepackage{microtype} +\usepackage{wrapfig} % Allows us to use \wrapfigure command +\usepackage{adjustbox} % Adjust padding inside \minipage environment + +% Packages with options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\usepackage{multicol} + \setlength\columnsep{25pt} +\usepackage{fancyhdr} +\pagestyle{fancy} + \fancyhf{} % Clear existing header/footer entries + \fancyhead[LE, RO]{\thepage} % Page number is always on the outside + \fancyhead[CE, CO]{Notes on Python} + \fancyhfoffset[LE,RO]{0in} % Adjust header and footer width to match text width +% \cfoot{Page \thepage} +% \renewcommand{\footrulewidth}{0.5pt} + \renewcommand{\headrulewidth}{0.5pt} + +\usepackage{geometry} +\geometry{ + bmargin=1in, + tmargin=1in, + hmargin=1in, + bindingoffset=0.25in +} + +% My macros %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Make a nice border and box for the tops of our examples +\newcommand\klab[3]{\vspace{#1}\noindent{}\hrulefill~~\fbox{\texttt{~#2~}}~~\hrulefill\vspace{#3}} + +% Add an \hrule with space above and below +\newcommand\krule[2]{\vspace{#1}\hrule\vspace{#2}} + +% Make hrefs easier (must load package hyperref} +\newcommand\kref[2]{\href{#1}{{\texttt{#2}}}} + +% Make some pull quotes +\newcommand\kpull[2]{ +\setlength{\intextsep}{5.0pt plus 2.0pt minus 2.0pt}% +\setlength{\columnsep}{10pt} +\begin{wrapfigure}[]{r}[8pt]{0pt} + \fbox{ + \adjustbox{padding*=0pt 2pt 0pt 1pt}{ + \begin{minipage}{#2} + \begin{small} + \begin{flushleft} + {#1} + \end{flushleft} + \end{small} + \end{minipage} + } % End adjustbox + } % End fbox +\end{wrapfigure} +} +% And make them work nicely with out multicol environment +% Not quite sure if commented lines are needed. More testing is required. +%\def\ksep{25pt} +\newcommand\kcolb{ +% \setlength{\columnsep}{\ksep} + \begin{multicols}{2} +} +\newcommand\kcole{ + \end{multicols} +} + +% Additional options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\raggedbottom + +% Title info %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\title{\textbf{Notes on Python}} +\author{Kenneth John Odle\\ \texttt{ken at kjodle dot net}} +\date{2023\\ \medskip v. 0.0.1} + +\begin{document} + +\maketitle + +\begin{abstract} + This document consists of notes on Python. +\end{abstract} + +\section{Preliminaries} + +\begin{multicols}{2} +\lipsum[1] + +\lipsum[1] + +\lipsum[1] + +\lipsum[1] + +\begin{wrapfigure}[]{r}[8pt]{0pt} + \fbox{ + \adjustbox{padding*=0pt 2pt 0pt 1pt}{ + \begin{minipage}{1.5in} + \begin{small} + \begin{flushleft} + This is written by hand, but it's a lot of work, so we converted it to a macro. + \end{flushleft} + \end{small} + \end{minipage} + } % End adjustbox + } % End fbox +\end{wrapfigure} + +\lipsum[1] + +\lipsum[1] + +It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. \kpull{This is done via a macro.}{1in} Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like). + + +\lipsum[1] + +\lipsum[1] +\end{multicols} + +\newpage +\section{More Stuff} +\begin{multicols}{2} +\lipsum[1] + +\lipsum[1] + +\lipsum[1] + +\lipsum[1] + +\begin{wrapfigure}[]{r}[8pt]{0pt} + \fbox{ + \adjustbox{padding*=0pt 2pt 0pt 1pt}{ + \begin{minipage}{1.5in} + \begin{small} + \begin{flushleft} + This is written by hand, but it's a lot of work, so we converted it to a macro. + \end{flushleft} + \end{small} + \end{minipage} + } % End adjustbox + } % End fbox +\end{wrapfigure} + +\lipsum[1] + +\lipsum[1] + +It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. \kpull{This is done via a macro.}{1in} Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like). + + +\lipsum[1] + +\lipsum[1] +\end{multicols} + +\newpage + +\section{New Stuff} +\kcolb +\lipsum[1-5]\kpull{Oh look, this is so lovely. We have little boxes to call out important information.}{1in}\lipsum[6-10] +\kcole + +\end{document} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..7c8c03c --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +Just some notes on Python. + +Also, learning more about the article document class and creating macros.