mathsoftware

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

live.tex (3048B)


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