diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-05-25 17:10:49 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-05-25 17:10:49 +0200 |
| commit | d6c61d988bfa4255baf9cdae42db59ebee38363f (patch) | |
| tree | 118ff3c2424e735149c145524965a4a337e50beb /src/Lecture2/live/sentencecounter.tex | |
| parent | 46eef66b1e1571c77dc828d7e950b129b4c8bfd0 (diff) | |
| download | mathsoftware-d6c61d988bfa4255baf9cdae42db59ebee38363f.tar.gz mathsoftware-d6c61d988bfa4255baf9cdae42db59ebee38363f.zip | |
Added files
Diffstat (limited to '')
| -rw-r--r-- | src/Lecture2/live/sentencecounter.tex | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/Lecture2/live/sentencecounter.tex b/src/Lecture2/live/sentencecounter.tex new file mode 100644 index 0000000..6428918 --- /dev/null +++ b/src/Lecture2/live/sentencecounter.tex | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | \documentclass[10pt,a5paper]{article} | ||
| 2 | \usepackage[utf8]{inputenc} | ||
| 3 | \usepackage{amsmath} | ||
| 4 | \usepackage{amsfonts} | ||
| 5 | \usepackage{amssymb} | ||
| 6 | \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} | ||
| 7 | |||
| 8 | \usepackage{xcolor} | ||
| 9 | |||
| 10 | \newcounter{sentence}[section] | ||
| 11 | \renewcommand{\thesentence}{[\thesection,\arabic{sentence}]} | ||
| 12 | |||
| 13 | \newcommand{\R}{\mathbb{R}} | ||
| 14 | \newcommand{\words}{blah bla blha} | ||
| 15 | |||
| 16 | \newcommand{\todo}[1]{{\color{red}\large TODO: #1}} | ||
| 17 | |||
| 18 | \newcommand{\sent}[1]{\refstepcounter{sentence}#1\textsuperscript{\arabic{sentence}}} | ||
| 19 | |||
| 20 | \newcommand{\mymatrix}[4]{\begin{pmatrix} | ||
| 21 | #1 & #2 \\ | ||
| 22 | #3 & #4 | ||
| 23 | \end{pmatrix}} | ||
| 24 | |||
| 25 | \newcommand{\twocases}[4]{\begin{cases} | ||
| 26 | #1 & #2 \\ | ||
| 27 | #3 & #4 | ||
| 28 | \end{cases}} | ||
| 29 | |||
| 30 | |||
| 31 | \begin{document} | ||
| 32 | |||
| 33 | \section{First section} | ||
| 34 | |||
| 35 | \sent{A sentence before the first one} | ||
| 36 | |||
| 37 | \sent{This is a sentence.} | ||
| 38 | \label{s1} | ||
| 39 | \sent{This is another sentence.} | ||
| 40 | |||
| 41 | \todo{finish the first section} | ||
| 42 | |||
| 43 | This is a longer sentence that takes more than one line line maybe~no still it random words to show that how tilde works i dont know Theorem~10 | ||
| 44 | |||
| 45 | \section{Second section} | ||
| 46 | |||
| 47 | \sent{A sentence in the second section.} | ||
| 48 | \label{sanother} | ||
| 49 | |||
| 50 | \vspace{2cm} | ||
| 51 | |||
| 52 | In sentence~\ref{s1}... \todo{what did I want to say?} | ||
| 53 | |||
| 54 | \[ \R \] | ||
| 55 | |||
| 56 | \words | ||
| 57 | |||
| 58 | \[ | ||
| 59 | \mymatrix{x}{a_{2,2}}{0}{f(10)} | ||
| 60 | \] | ||
| 61 | |||
| 62 | \[ | ||
| 63 | f(x)=\twocases{x^2}{\text{if }x>0}{-x^3}{\text{otherwise.}} | ||
| 64 | \] | ||
| 65 | |||
| 66 | \end{document} \ No newline at end of file | ||
