mathsoftware

A course about LaTeX and SageMath
git clone https://git.tronto.net/mathsoftware
Download | Log | Files | Refs | README | LICENSE

old.tex (3200B)


      1 \documentclass[10pt,a4paper]{article}
      2 \usepackage[utf8]{inputenc}
      3 \usepackage{amsmath}
      4 \usepackage{amsfonts}
      5 \usepackage{amssymb}
      6 \usepackage{amsthm}
      7 \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
      8 
      9 \usepackage{enumitem}
     10 \title{Latex Example Live}
     11 \author{Sebastiano Tronto}
     12 \date{20-02-2021}
     13 
     14 \newcommand{\reals}{\mathbb{R}}
     15 \DeclareMathOperator{\sinus}{sinus}
     16 
     17 
     18 \newtheorem{mythm}{My Theorem}[section]
     19 
     20 \theoremstyle{definition}
     21 \newtheorem{prop}[mythm]{Proposition}
     22 \newtheorem{defi}{Definition}
     23 
     24 \theoremstyle{remark}
     25 \newtheorem*{warning}{Achtung}
     26 
     27 \usepackage{xcolor}
     28 
     29 
     30 \begin{document}
     31 
     32 \maketitle
     33 
     34 \section{Introduction}
     35 
     36 {\color{pink} Hello, world!
     37 
     38 This is a comment}
     39 
     40 \texttt{This looks like computer code}
     41 
     42 \section{Text}
     43 
     44 \textbf{This sentence is in boldface}
     45 
     46 \underline{\textit{italicized} maybe in a sentence \textbf{something}}
     47 
     48 \underline{\textit{one inside the other}}
     49 
     50 \emph{also italicized???}
     51 
     52 This is an important sentence, maybe a quote or something, and this \emph{word} is very important. Let's make this sentence longer than one line.
     53 
     54 {\Huge Large words}
     55 
     56 %\appendix
     57 
     58 \section{Math mode}
     59 
     60 This is an inline formula \( \displaystyle \sum_i \frac{i}{22} \), it appears within the text
     61 
     62 This is a displaystyle formula \[ \textstyle \sum_{\alpha=0}^{2^{10}}   \frac2 \alpha{22} \] it appears on its own line
     63 
     64 How sqrt works: \( \sqrt[\phi]{25} \)
     65 
     66 
     67 
     68 \begin{flalign}
     69 \label{eq}
     70 e^x &= \left(\sum_{i=0}^\infty \frac{x^i}{i!} \right) = & \\
     71 &= \left( 1 + x  + \frac{x^2}2  \right)+ \frac{x^3}{6} + \cdots \nonumber
     72 \end{flalign}
     73 
     74 \[
     75    \left\{ x \in \reals \quad \text{such that} \quad \frac{ \sinus(x)}{x^2}>0 \right\}\reals
     76 \]
     77 
     78 \[ \sum_i \]
     79 
     80 The first equation we wrote is \eqref{eq}
     81 
     82 \section{Environments}
     83 
     84 \subsection{Lists}
     85 \label{subsectionLists}
     86 
     87 \begin{itemize}
     88 	\item One \textbf{item}
     89 	\item Another \(2+2=4\)
     90 	\item a third one \[\sum_{i=0}^n\]
     91 	\item A sublist:
     92 		\begin{itemize}
     93 			\item[+] First subitem
     94 			\item[+] and so on
     95 		\end{itemize}
     96 	\item Again in the main list
     97 \end{itemize}
     98 
     99 \begin{enumerate}[label=\Roman*]
    100 	\item One
    101 	\item Two
    102 	\item Actually three
    103 	\item Three (or not)
    104 \end{enumerate}
    105 
    106 \subsection*{Tables}
    107 
    108 Let's write a table:
    109 
    110 \vspace{1cm}
    111 \begin{tabular}{r||l|c}
    112 \hline
    113 This is a table & second column & third column \\
    114 \hline
    115 Things          & a             & \( 2+2 = 4 \)\\
    116 \hline
    117 more things     & b             & c
    118 \end{tabular}
    119 
    120 \vspace{1cm}
    121 \[
    122 	\left(\begin{array}{cc}
    123 		\int_0^1 e^x  &  \frac{2}{25} \\
    124 		0 & 0 \\
    125 		1111 & 234\alpha
    126 	\end{array}\right)
    127 \]
    128 
    129 \[
    130 	\begin{pmatrix}
    131 		\int_0^1 e^x  &  \frac{2}{25} \\
    132 		0 & 0 \\
    133 		1111 & 234\alpha
    134 	\end{pmatrix}
    135 \]
    136 
    137 \[
    138 \begin{pmatrix}
    139 1 & 2\\
    140 3 & 4
    141 \end{pmatrix}
    142 \overset{L2\rightarrow L2+L3}\longrightarrow
    143 \begin{pmatrix}
    144 1 & 2\\
    145 4 & 6
    146 \end{pmatrix}
    147 \]
    148 
    149 \section{Last section}
    150 
    151 In section \ref{subsectionLists} we saw how to write lists
    152 
    153 \begin{mythm}[Gauss]
    154 The equation \(2+x=4\) is true for \(x=2\).
    155 \end{mythm}
    156 
    157 \begin{prop}
    158 A less important fact
    159 \end{prop}
    160 
    161 \begin{defi}
    162 a definition
    163 \end{defi}
    164 
    165 \begin{mythm}
    166 Another important fact.
    167 \end{mythm}
    168 
    169 \begin{warning}
    170 It is a common mistake to think that \(2+2=5\)
    171 \end{warning}
    172 \[\binom45\]
    173 
    174 \[ 2 \nmid 10 \]
    175 
    176 \end{document}