Skip to content
Snippets Groups Projects
Commit 85792607 authored by Brady James Garvin's avatar Brady James Garvin
Browse files

Initial commit.

parents
No related branches found
No related tags found
No related merge requests found
# Disable line-ending conversions for this repository.
* -text
# dependencies
/node_modules
# testing
/coverage
# production
/build
# environments
.env.local
.env.development.local
.env.test.local
.env.production.local
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# misc
*~
.DS_Store
[submodule "lint-latex"]
path = lint-latex
url = git@git.unl.edu:soft-core/soft-260/lint-latex.git
# Linted LaTeX
A bare-bones LaTeX project with a simple linter included to be used as starter
code for homework in the SOFT 260 course at UNL if students opt to typeset their
work in LaTeX. The file `template.tex` demonstrates the basic LaTeX commands
that are relevant to the course, and the linter detects common LaTeX mistakes.
# Quick Start
Recursively clone this repository and `cd` into the root folder:
```bash
$ git clone --recursive git@git.unl.edu:soft-core/soft-260/linted-latex.git
$ cd linted-latex
```
(If you forget `--recursive` when cloning, you can `cd` into your clone and run
`git submodule update --init --recursive` instead.)
Install dependencies:
```bash
$ npm install
```
Optionally run the linter:
```
$ npm run lint
```
# Instructions
Copy `template.tex` to a new file in the `src` folder and edit and build it
using your preferred LaTeX toolchain. The linter is run by a pre-commit hook,
so it will check your LaTeX style whenever you commit.
Subproject commit b71d01015948ee5900aad330e71facddcb0e8a32
This diff is collapsed.
{
"name": "@unlsoft/linted-latex",
"version": "1.0.0",
"description": "A LaTeX project with a simple linter included.",
"private": true,
"license": "UNLICENSED",
"scripts": {
"postinstall:lint-latex": "cd lint-latex && npm install",
"postinstall": "run-s postinstall:**",
"lint": "lint-latex src/*.tex"
},
"dependencies": {
"npm-run-all": "^4.1.5"
},
"devDependencies": {
"@unlsoft/lint-latex": "file:lint-latex/lint-latex",
"ghooks": "^2.0.4"
},
"config": {
"ghooks": {
"pre-commit": "npm run lint"
}
}
}
## Source: <https://github.com/github/gitignore/blob/362abacebe59448407e47a014e09288d8cddb7a7/TeX.gitignore>
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.fmt
*.fot
*.cb
*.cb2
.*.lb
## Intermediate documents:
*.dvi
*.xdv
*-converted-to.*
# these rules might exclude image files for figures etc.
*.ps
*.eps
*.pdf
## Generated if empty string is given at "Please type another file name for output:"
.pdf
## Bibliography auxiliary files (bibtex/biblatex/biber):
*.bbl
*.bcf
*.blg
*-blx.aux
*-blx.bib
*.run.xml
## Build tool auxiliary files:
*.fdb_latexmk
*.synctex
*.synctex(busy)
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
## Build tool directories for auxiliary files
# latexrun
latex.out/
## Auxiliary and intermediate files from other packages:
# algorithms
*.alg
*.loa
# achemso
acs-*.bib
# amsthm
*.thm
# beamer
*.nav
*.pre
*.snm
*.vrb
# changes
*.soc
# comment
*.cut
# cprotect
*.cpt
# elsarticle (documentclass of Elsevier journals)
*.spl
# endnotes
*.ent
# fixme
*.lox
# feynmf/feynmp
*.mf
*.mp
*.t[1-9]
*.t[1-9][0-9]
*.tfm
#(r)(e)ledmac/(r)(e)ledpar
*.end
*.?end
*.[1-9]
*.[1-9][0-9]
*.[1-9][0-9][0-9]
*.[1-9]R
*.[1-9][0-9]R
*.[1-9][0-9][0-9]R
*.eledsec[1-9]
*.eledsec[1-9]R
*.eledsec[1-9][0-9]
*.eledsec[1-9][0-9]R
*.eledsec[1-9][0-9][0-9]
*.eledsec[1-9][0-9][0-9]R
# glossaries
*.acn
*.acr
*.glg
*.glo
*.gls
*.glsdefs
*.lzo
*.lzs
*.slg
*.slo
*.sls
# uncomment this for glossaries-extra (will ignore makeindex's style files!)
# *.ist
# gnuplot
*.gnuplot
*.table
# gnuplottex
*-gnuplottex-*
# gregoriotex
*.gaux
*.glog
*.gtex
# htlatex
*.4ct
*.4tc
*.idv
*.lg
*.trc
*.xref
# hyperref
*.brf
# knitr
*-concordance.tex
# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files
# *.tikz
*-tikzDictionary
# listings
*.lol
# luatexja-ruby
*.ltjruby
# makeidx
*.idx
*.ilg
*.ind
# minitoc
*.maf
*.mlf
*.mlt
*.mtc[0-9]*
*.slf[0-9]*
*.slt[0-9]*
*.stc[0-9]*
# minted
_minted*
*.pyg
# morewrites
*.mw
# newpax
*.newpax
# nomencl
*.nlg
*.nlo
*.nls
# pax
*.pax
# pdfpcnotes
*.pdfpc
# sagetex
*.sagetex.sage
*.sagetex.py
*.sagetex.scmd
# scrwfile
*.wrt
# svg
svg-inkscape/
# sympy
*.sout
*.sympy
sympy-plots-for-*.tex/
# pdfcomment
*.upa
*.upb
# pythontex
*.pytxcode
pythontex-files-*/
# tcolorbox
*.listing
# thmtools
*.loe
# TikZ & PGF
*.dpth
*.md5
*.auxlock
# titletoc
*.ptc
# todonotes
*.tdo
# vhistory
*.hst
*.ver
# easy-todo
*.lod
# xcolor
*.xcp
# xmpincl
*.xmpi
# xindy
*.xdy
# xypic precompiled matrices and outlines
*.xyc
*.xyd
# endfloat
*.ttt
*.fff
# Latexian
TSWLatexianTemp*
## Editors:
# WinEdt
*.bak
*.sav
# Texpad
.texpadtmp
# LyX
*.lyx~
# Kile
*.backup
# gummi
.*.swp
# KBibTeX
*~[0-9]*
# TeXnicCenter
*.tps
# auto folder when using emacs and auctex
./auto/*
*.el
# expex forward references with \gathertags
*-tags.tex
# standalone packages
*.sta
# Makeindex log files
*.lpz
# xwatermark package
*.xwm
# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib
# option is specified. Footnotes are the stored in a file with suffix Notes.bib.
# Uncomment the next line to have this generated file ignored.
#*Notes.bib
% LaTeX variables and commands usually start with a backslash (\):
% \example
% Characters like a tilde (~), underscore (_), or caret (^) are also commands.
% Arguments longer than one character are written in curlies ({ and }):
% \example{first argument}{second argument}
% A LaTeX file begins with a prelude containing imports and settings.
% The actual content starts after the \begin{document} (on line 50).
% Show up to 8 layers of macro expansion (backtrace) when an error is hit.
% Some editors will hide these details, but they'll still appear in the log file.
\errorcontextlines=8
% Choose a document class.
\documentclass{article}
% Don't allow widows or club lines (a.k.a. orphans).
\widowpenalty=10000
\clubpenalty=10000
% Use full pages with headers and footers.
\usepackage{fullpage}
\usepackage{fancyhdr}
\pagestyle{fancy}
% Base the header on the document's date, title, and author.
\headheight=14pt
\headsep=16pt
\makeatletter
\lhead{\@author}
\chead{\@title}
\rhead{\@date}
\makeatother
% Set up paragraph formatting.
\parindent=0pt
\parskip=6pt
% Import common math commands.
\usepackage{amsmath}
\usepackage{amssymb}
% And define some others.
\newcommand{\card}[1]{\ensuremath{\left\lvert #1\right\rvert}}
\newcommand{\floor}[1]{\ensuremath{\left\lfloor #1\right\rfloor}}
\newcommand{\ceil}[1]{\ensuremath{\left\lceil #1\right\rceil}}
% The part between \begin{document} and \end{document} is the actual content.
% Make your changes starting here.
\begin{document}
% Set the title, author, and date.
% If you leave out the date command, LaTeX will use the current date.
\title{Homework~X.Y}
\author{Ada~Lovelace}
\date{Month~XX,~20YY}
This document contains commented LaTeX code to demonstrate commands that you
might find useful for the homework.
% \paragraph creates a paragraph caption; you can use it for problem numbers.
% Blank lines separate paragraphs.
\paragraph{1.} This is a paragraph.
This is another paragraph.
This is another sentence in the second paragraph.
% Content between \( and \) is typeset as inline math.
% Content between \[ and \] is typeset as display math.
% \ll is ≪, \le is ≤, \ge is ≥, \gg is ≫, and \ne is ≠.
% \neg or \lnot is ¬.
% \wedge or \land is ∧.
% \vee or \lor is ∨.
% \cdot is · and \frac creates a fraction.
% Extra (ignored) spaces separate j, p, and q from preceding command names.
\paragraph{2.} Relational operators: \(i\ll j\), \(i<j\), \(i\le j\), \(i=j\),
\(i\ge j\), \(i>j\), \(i\gg j\), and \(i\ne j\). Boolean operators: \(\neg p\),
\(\lnot p\), \(p\wedge q\), \(p\land q\), \(p\vee q\), and \(p\lor q\).
Nonrelational binary operators:
\[a+b-c\cdot\frac{d}{e}.\]
% \mathbin{\%} is the mod operator (% normally starts a comment).
% \floor and \ceil are the floor and ceiling operators.
% \log creates a logarithm.
% \sum creates a summation.
% \int creates an integral, and \, creates the space before its differential.
% \left. and \right\rvert surround an evaluated-at expression.
% \lim creates a limit, and \to is "goes-to", normally \rightarrow (→).
% _ creates a subscript and ^ creates a superscript.
% \Theta and \Omega are capital Greek letters.
% \left( and \right) are parentheses that grow to match their contents.
\paragraph{3.} Some expressions: \(a\mathbin{\%} b\), \(\floor{x}+\ceil{x}\),
\(\log_2 n\), \(\sum_{i=0}^{n-1}i^2\), \(\int_{-10}^{10}x\,dx\),
\(\left.\frac{x^2}{2}\right\rvert_{-10}^{10}\),
\(\lim_{x\to\infty}x\), \(O\left(\frac{n}{\log n}\right)\),
\(\Theta\left(\frac{n}{\log n}\right)\), and
\(\Omega\left(\frac{n}{\log n}\right)\).
% Content between \begin{align*} and \end{align*} is typeset as multiline math.
% In the align environment, & advances to the next tabstop.
% In the align environment, \\ advances to the next line.
\paragraph{4.} The simplification of an expression in several steps:
\begin{align*}
\sum_{i=0}^{n-1}12i
&=12\sum_{i=0}^{n-1}i\\
&=12\left.\frac{i(i-1)}{2}\right\rvert_0^n\\
&=6n(n-1).
\end{align*}
% \text places text inside of math; just \(foo\) would be f times o times o.
% \varnothing is Ø.
% \{ and \} are curly braces.
% \ldots is ….
% \card applies vertical bars for cardinality.
% \in is ∈.
% \not draws a slash through the following symbol.
\paragraph{5.} Some set-related expressions: \(\text{foo}(0)=\varnothing\),
\(\card{\{0\ldots n-1\}}=n\), \(a\in A\), and \(A\not\in A\).
% Content between \begin{cases} and \end{cases} is typeset as a case expression.
\paragraph{6.} A recurrence:
\[T(n)=\begin{cases}
10T\left(\ceil{\frac{n}{7}}\right)+n\floor{\log_2{n}}&\text{if\ }n>1\\
4n^2+7&\text{otherwise.}
\end{cases}\]
% The second argument to \underbrace is written under the first argument.
\paragraph{7.} An application of the Master Theorem:
\begin{align*}
T(n)
&=\underbrace{8T\left(\frac{n}{2}\right)}_{\text{about\ }\Theta(n^3)}+n^4\\
&=\Theta(n^3+n^4)\\
&=\Theta(n^4).
\end{align*}
\end{document}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment