SlideShare une entreprise Scribd logo
1  sur  91
Télécharger pour lire hors ligne
Lezione Due: Ambienti
08 Maggio 2014
Valentina Ferro
valentina.ferro89@gmail.com
Nelle puntate precedenti...
Sintassi LATEX e simboli speciali
Struttura del documento: dichiarazione classe, preambolo
(pacchetti, info ausiliarie), corpo del documento
Capitoli e sezioni
Formattazione del testo
Elenchi puntati
Indice e Titlepage
Lezione 2 2/39 V. Ferro
Outline
1 Ambienti “fluttuanti”
2 Figure
Figura nel flusso del testo
Più figure insieme
3 Tabelle
Colonne e righe multiple
Migliorarne l’aspetto
4 Formule matematiche
Ambienti matematici
Simboli matematici
Array e matrici
Equazioni numerate
unità SI
5 Riferimenti
6 Immagini e tabelle in un documento
Lezione 2 3/39 V. Ferro
Outline
1 Ambienti “fluttuanti”
2 Figure
Figura nel flusso del testo
Più figure insieme
3 Tabelle
Colonne e righe multiple
Migliorarne l’aspetto
4 Formule matematiche
Ambienti matematici
Simboli matematici
Array e matrici
Equazioni numerate
unità SI
5 Riferimenti
6 Immagini e tabelle in un documento
Lezione 2 3/39 V. Ferro
Outline
1 Ambienti “fluttuanti”
2 Figure
Figura nel flusso del testo
Più figure insieme
3 Tabelle
Colonne e righe multiple
Migliorarne l’aspetto
4 Formule matematiche
Ambienti matematici
Simboli matematici
Array e matrici
Equazioni numerate
unità SI
5 Riferimenti
6 Immagini e tabelle in un documento
Lezione 2 3/39 V. Ferro
Outline
1 Ambienti “fluttuanti”
2 Figure
Figura nel flusso del testo
Più figure insieme
3 Tabelle
Colonne e righe multiple
Migliorarne l’aspetto
4 Formule matematiche
Ambienti matematici
Simboli matematici
Array e matrici
Equazioni numerate
unità SI
5 Riferimenti
6 Immagini e tabelle in un documento
Lezione 2 3/39 V. Ferro
Outline
1 Ambienti “fluttuanti”
2 Figure
Figura nel flusso del testo
Più figure insieme
3 Tabelle
Colonne e righe multiple
Migliorarne l’aspetto
4 Formule matematiche
Ambienti matematici
Simboli matematici
Array e matrici
Equazioni numerate
unità SI
5 Riferimenti
6 Immagini e tabelle in un documento
Lezione 2 3/39 V. Ferro
Outline
1 Ambienti “fluttuanti”
2 Figure
Figura nel flusso del testo
Più figure insieme
3 Tabelle
Colonne e righe multiple
Migliorarne l’aspetto
4 Formule matematiche
Ambienti matematici
Simboli matematici
Array e matrici
Equazioni numerate
unità SI
5 Riferimenti
6 Immagini e tabelle in un documento
Lezione 2 3/39 V. Ferro
Outline
1 Ambienti “fluttuanti”
2 Figure
Figura nel flusso del testo
Più figure insieme
3 Tabelle
Colonne e righe multiple
Migliorarne l’aspetto
4 Formule matematiche
Ambienti matematici
Simboli matematici
Array e matrici
Equazioni numerate
unità SI
5 Riferimenti
6 Immagini e tabelle in un documento
Lezione 2 4/39 V. Ferro
Ambienti “fluttuanti”
Inserire figure e tabelle
I “Float” in LaTeX sono contenitori per elementi che non possono
essere divisi su più pagine.
Ambienti Float sono figure e tabelle
Se lo spazio non è sufficiente nella pagina, l’oggetto viene
spostato in modo da ottimizzare lo spazio
Caratteristiche
Didascalia
Numerazione (per riferimenti)
Lezione 2 5/39 V. Ferro
Ambienti “fluttuanti”
Inserire figure e tabelle
I “Float” in LaTeX sono contenitori per elementi che non possono
essere divisi su più pagine.
Ambienti Float sono figure e tabelle
Se lo spazio non è sufficiente nella pagina, l’oggetto viene
spostato in modo da ottimizzare lo spazio
Caratteristiche
Didascalia
Numerazione (per riferimenti)
Lezione 2 5/39 V. Ferro
Ambienti “fluttuanti”
Inserire figure e tabelle
I “Float” in LaTeX sono contenitori per elementi che non possono
essere divisi su più pagine.
Ambienti Float sono figure e tabelle
Se lo spazio non è sufficiente nella pagina, l’oggetto viene
spostato in modo da ottimizzare lo spazio
Caratteristiche
Didascalia
Numerazione (per riferimenti)
Lezione 2 5/39 V. Ferro
Ambienti “fluttuanti”
Inserire figure e tabelle
I “Float” in LaTeX sono contenitori per elementi che non possono
essere divisi su più pagine.
Ambienti Float sono figure e tabelle
Se lo spazio non è sufficiente nella pagina, l’oggetto viene
spostato in modo da ottimizzare lo spazio
Caratteristiche
Didascalia
Numerazione (per riferimenti)
Lezione 2 5/39 V. Ferro
Ambienti “fluttuanti”
Inserire figure e tabelle
begin{figure/table}[posizione]
label{etichetta}
... % Comandi per inserire
... % immagini o tabella
caption[abbr.]{didascalia}
end{figure/table}
posizione = [htbp]
L’ordine viene scelto dall’utente
h = here – Approssimantivamente
t = top – All’inizio della pagina
b = bottom – Alla fine della pagina
p = page – In una pagina dedicata
! = Forza la posizione dell’elemento.
I.e. [t!] inserisce il float all’inizio della pagina anche
se c’è più spazio altrove
Lezione 2 6/39 V. Ferro
Ambienti “fluttuanti”
Inserire figure e tabelle
begin{figure/table}[posizione]
label{etichetta}
... % Comandi per inserire
... % immagini o tabella
caption[abbr.]{didascalia}
end{figure/table}
label Non obbligatorio, ma utile!
Consiglio: usa nomi che indichino anche il
tipo di oggetto.
I.e. fig:nomefigura per delle immagini e
tab:nometabella per delle tabelle
Lezione 2 6/39 V. Ferro
Ambienti “fluttuanti”
Inserire figure e tabelle
begin{figure/table}[posizione]
label{etichetta}
... % Comandi per inserire
... % immagini o tabella
caption[abbr.]{didascalia}
end{figure/table}
caption Non obbligatorio, ma utile!
La versione abbreviata viene inserita
nell’elenco delle figure/tabelle
Lezione 2 6/39 V. Ferro
Outline
1 Ambienti “fluttuanti”
2 Figure
Figura nel flusso del testo
Più figure insieme
3 Tabelle
Colonne e righe multiple
Migliorarne l’aspetto
4 Formule matematiche
Ambienti matematici
Simboli matematici
Array e matrici
Equazioni numerate
unità SI
5 Riferimenti
6 Immagini e tabelle in un documento
Lezione 2 7/39 V. Ferro
Figure
Pacchetti e comandi base
includegraphics[opzioni]{percorso/nomeimmagine}
Pacchetto: graphicx Accetta: .jpg, .pdf, .png con pdflatex
Opzioni
width=xx in pt, mm, cm, in, ex, em; oppure come frazione della larghezza o
della altezza del testo xxtextwidth
height=xx come width (N.B. xxtextheight)
scale=xx fattore xx di cui si vuole scalare l’immagine
angle=xx ruota di xx gradi l’immagine
resolution=xx risoluzione espressa in dpi
trim = l b r t taglia l’immagine di l unità da sinistra, di b unità dal basso, di r
unità da destra e di t unità dall’alto. Necessita del comando clip
Lezione 2 8/39 V. Ferro
Figure
Pacchetti e comandi base
includegraphics[opzioni]{percorso/nomeimmagine}
Pacchetto: graphicx Accetta: .jpg, .pdf, .png con pdflatex
Opzioni
width=xx in pt, mm, cm, in, ex, em; oppure come frazione della larghezza o
della altezza del testo xxtextwidth
height=xx come width (N.B. xxtextheight)
scale=xx fattore xx di cui si vuole scalare l’immagine
angle=xx ruota di xx gradi l’immagine
resolution=xx risoluzione espressa in dpi
trim = l b r t taglia l’immagine di l unità da sinistra, di b unità dal basso, di r
unità da destra e di t unità dall’alto. Necessita del comando clip
Lezione 2 8/39 V. Ferro
Figure
Esempi
begin{figure}
label{fig:mybeer}
centering
includegraphics[width=1textwidth]
{pictures/mybeer}
caption{Una donna felice!}
end{figure}
N.B. Ho inserito un centering !! Figura : Una donna
felice!
Lezione 2 9/39 V. Ferro
Figure
Esempi
begin{figure}
label{fig:mybeer}
centering
includegraphics[width=2cm]
{pictures/mybeer}
caption{Una donna felice!}
end{figure}
Figura : Una donna
felice!
Lezione 2 9/39 V. Ferro
Figure
Esempi
begin{figure}
label{fig:mybeer}
centering
includegraphics[scale=0.1,
trim=45cm 55cm 20cm 40cm,
clip] {pictures/mybeer}
caption{Una donna felice!}
end{figure}
Figura : Una donna
felice!
Lezione 2 9/39 V. Ferro
Figura nel flusso del testo
Il pacchetto wrapfig
begin{wrapfigure}[opzioni]{posizione}{dimensione}
...
end{wrapfigure}
Opzioni e Argomenti
opzioni lineheight = altezza del Float espressa in numero di linee di testo
posizione r, l = posizionato a destra (r) o a sinistra (l)
dimensione espressa sia in xx unità che in frazione del testo (con textwidth)
Lezione 2 10/39 V. Ferro
Figura nel flusso del testo
Il pacchetto wrapfig
begin{wrapfigure}[opzioni]{posizione}{dimensione}
...
end{wrapfigure}
Opzioni e Argomenti
opzioni lineheight = altezza del Float espressa in numero di linee di testo
posizione r, l = posizionato a destra (r) o a sinistra (l)
dimensione espressa sia in xx unità che in frazione del testo (con textwidth)
Lezione 2 10/39 V. Ferro
Figura nel flusso del testo
Il pacchetto wrapfig – Esempio
... %testo
begin{wrapfigure}{l}{0.25textwidth}
vspace{-5pt}
begin{center}
includegraphics[width=0.25textwidth]{pictures/VaLeia}
end{center}
vspace{-5pt}
caption{Vatextbf{Leia}}label{fig:Leia}
vspace{5pt}
end{wrapfigure}
... %altro testo
begin{wrapfigure}{r}{0.2textwidth}
begin{center}
includegraphics[width=0.18textwidth]{pictures/MagicMe}
end{center}
caption{textbf{Magic}Me}label{fig:Mage}
end{wrapfigure}
... %ancora testo
Lezione 2 11/39 V. Ferro
Figura nel flusso del testo
Il pacchetto wrapfig – Esempio
... %testo
begin{wrapfigure}{l}{0.25textwidth}
vspace{-5pt}
begin{center}
includegraphics[width=0.25textwidth]{pictures/VaLeia}
end{center}
vspace{-5pt}
caption{Vatextbf{Leia}}label{fig:Leia}
vspace{5pt}
end{wrapfigure}
... %altro testo
begin{wrapfigure}{r}{0.2textwidth}
begin{center}
includegraphics[width=0.18textwidth]{pictures/MagicMe}
end{center}
caption{textbf{Magic}Me}label{fig:Mage}
end{wrapfigure}
... %ancora testo
Lezione 2 11/39 V. Ferro
Figura nel flusso del testo
Il pacchetto wrapfig – Esempio
... %testo
begin{wrapfigure}{l}{0.25textwidth}
vspace{-5pt}
begin{center}
includegraphics[width=0.25textwidth]{pictures/VaLeia}
end{center}
vspace{-5pt}
caption{Vatextbf{Leia}}label{fig:Leia}
vspace{5pt}
end{wrapfigure}
... %altro testo
begin{wrapfigure}{r}{0.2textwidth}
begin{center}
includegraphics[width=0.18textwidth]{pictures/MagicMe}
end{center}
caption{textbf{Magic}Me}label{fig:Mage}
end{wrapfigure}
... %ancora testo
Lezione 2 11/39 V. Ferro
Figura nel flusso del testo
Il pacchetto wrapfig – Esempio
Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iu-
re reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proi-
dent, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisici elit,
sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
Figura 1.1: VaLeia
Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut la-
bore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ul-
lamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit
in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat
cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquid ex ea commodi consequat. Lorem ipsum dolor sit amet, consectetur adipisici
elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute
iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Figura 1.2: MagicMe
Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt
mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt
mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor
incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquid ex ea commodi consequat.
Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt
mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat.
Lezione 2 11/39 V. Ferro
Più figure insieme
Il pacchetto subcaption (e caption)
begin{subfigure}{dimensione}
includegraphics[...]{...}
caption{didascalia subfig}label{subfig}
end{subfigure}
Proprietà
Tra una figura e l’altra di possono inserire degli spazi con i comandi
appositi — i.e. hspace{} oppure hfill
Per portare a capo una figura, è sufficiente lasciare un rigo vuoto
Si usa all’interno dell’ambiente figure
Lezione 2 12/39 V. Ferro
Più figure insieme
Il pacchetto subcaption (e caption)
begin{subfigure}{dimensione}
includegraphics[...]{...}
caption{didascalia subfig}label{subfig}
end{subfigure}
Proprietà
Tra una figura e l’altra di possono inserire degli spazi con i comandi
appositi — i.e. hspace{} oppure hfill
Per portare a capo una figura, è sufficiente lasciare un rigo vuoto
Si usa all’interno dell’ambiente figure
Lezione 2 12/39 V. Ferro
Più figure insieme
Il pacchetto subcaption – Esempio
begin{figure}
centering
begin{subfigure}{0.45textwidth}
includegraphics[width=textwidth]{pictures/Sax}
caption{Playing with Mr. Sax}label{fig:Sax}
end{subfigure}%
hfill
begin{subfigure}{0.45textwidth}
includegraphics[width=textwidth]{pictures/Charlie}
caption{Joking with Charlie}label{fig:Charlie}
end{subfigure}
%qui abbiamo lasciato un rigo vuoto
vspace{5mm}
begin{subfigure}{textwidth}
includegraphics[width=textwidth]{pictures/Oscars}
caption{A nice chat with Mr. Oscar Wilde and Mr. Oscar Wilde} label{fig:Oscars}
end{subfigure}
caption{Best friends forever..}label{fig:BFF}
end{figure}
Lezione 2 13/39 V. Ferro
Più figure insieme
Il pacchetto subcaption – Esempio
begin{figure}
centering
begin{subfigure}{0.45textwidth}
includegraphics[width=textwidth]{pictures/Sax}
caption{Playing with Mr. Sax}label{fig:Sax}
end{subfigure}%
hfill
begin{subfigure}{0.45textwidth}
includegraphics[width=textwidth]{pictures/Charlie}
caption{Joking with Charlie}label{fig:Charlie}
end{subfigure}
%qui abbiamo lasciato un rigo vuoto
vspace{5mm}
begin{subfigure}{textwidth}
includegraphics[width=textwidth]{pictures/Oscars}
caption{A nice chat with Mr. Oscar Wilde and Mr. Oscar Wilde} label{fig:Oscars}
end{subfigure}
caption{Best friends forever..}label{fig:BFF}
end{figure}
Lezione 2 13/39 V. Ferro
Più figure insieme
Il pacchetto subcaption – Esempio
begin{figure}
centering
begin{subfigure}{0.45textwidth}
includegraphics[width=textwidth]{pictures/Sax}
caption{Playing with Mr. Sax}label{fig:Sax}
end{subfigure}%
hfill
begin{subfigure}{0.45textwidth}
includegraphics[width=textwidth]{pictures/Charlie}
caption{Joking with Charlie}label{fig:Charlie}
end{subfigure}
%qui abbiamo lasciato un rigo vuoto
vspace{5mm}
begin{subfigure}{textwidth}
includegraphics[width=textwidth]{pictures/Oscars}
caption{A nice chat with Mr. Oscar Wilde and Mr. Oscar Wilde} label{fig:Oscars}
end{subfigure}
caption{Best friends forever..}label{fig:BFF}
end{figure}
Lezione 2 13/39 V. Ferro
Più figure insieme
Il pacchetto subcaption – Esempio
(a) Playing with Mr. Sax (b) Joking with Charlie
(c) A nice chat with Mr. Oscar Wilde and Mr. Oscar Wilde
Figura 1.1: Best friends forever..
Lezione 2 13/39 V. Ferro
Outline
1 Ambienti “fluttuanti”
2 Figure
Figura nel flusso del testo
Più figure insieme
3 Tabelle
Colonne e righe multiple
Migliorarne l’aspetto
4 Formule matematiche
Ambienti matematici
Simboli matematici
Array e matrici
Equazioni numerate
unità SI
5 Riferimenti
6 Immagini e tabelle in un documento
Lezione 2 14/39 V. Ferro
Tabelle
L’ambiente tabular
begin{tabular}{colonne e allineamento}
riga1_col1 & riga1_col2 & riga1_col3 
riga2_col1 & ....
end{tabular}
Proprietà
Colonne e allineamento: dichiara quante colonne e come allineare il testo
& separa le colonne
 inizia una nuova riga
hline inserisce una linea orizzontale
| inserisce una linea verticale (si inserisce in {Colonne e allineamento})
Lezione 2 15/39 V. Ferro
Tabelle
L’ambiente tabular
begin{tabular}{colonne e allineamento}
riga1_col1 & riga1_col2 & riga1_col3 
riga2_col1 & ....
end{tabular}
Proprietà
Colonne e allineamento: dichiara quante colonne e come allineare il testo
l c r 3 colonne, nella prima il testo è allineato a sinistra (l), nella seconda a
centro (c), nella terza a destra (r)
p{dim} specifica la larghezza della colonna
*{num}{x} ripete l’allineamento x per un certo num di colonne
& separa le colonne
 inizia una nuova riga
hline inserisce una linea orizzontale
| inserisce una linea verticale (si inserisce in {Colonne e allineamento})
Lezione 2 15/39 V. Ferro
Tabelle
L’ambiente tabular
begin{tabular}{colonne e allineamento}
riga1_col1 & riga1_col2 & riga1_col3 
riga2_col1 & ....
end{tabular}
Proprietà
Colonne e allineamento: dichiara quante colonne e come allineare il testo
& separa le colonne
 inizia una nuova riga
hline inserisce una linea orizzontale
| inserisce una linea verticale (si inserisce in {Colonne e allineamento})
Lezione 2 15/39 V. Ferro
Tabelle
Una semplice tabella
a destra centro centro a sinistra
prova eh eh ? !
1 2 prova yeah
begin{table}
centering
begin{tabular}{rccl}
a destra & centro & centro & a sinistra 
prova & eh eh & ? & ! 
1 & 2 & prova & yeah 
end{tabular}
end{table}
Lezione 2 16/39 V. Ferro
Tabelle
Una semplice tabella
a destra centro centro a sinistra
prova eh eh ? !
1 2 prova yeah
begin{table}
centering
begin{tabular}{|rcc|l||}
hline
a destra & centro & centro & a sinistra  hline
prova & eh eh & ? & !  hline
1 & 2 & prova & yeah 
hline
end{tabular}
end{table}
Lezione 2 16/39 V. Ferro
Tabelle
Una semplice tabella
a destra centro centro a sinistra
prova eh eh ? !
1 2 prova yeah
begin{table}
centering
begin{tabular}{|p{90pt}|*{3}{l|}}
hline
a destra & centro & centro & a sinistra  hline
prova & eh eh & ? & !  hline
1 & 2 & prova & yeah 
hline
end{tabular}
end{table}
Lezione 2 16/39 V. Ferro
Tabelle
Colonne e righe multiple
multicolumn{num}{col}{name}
multirow{num}{width}{name}
Argomenti
num Numero di colonne o di righe da unire in una sola
col Allineamento del testo nella colonna
name Testo da inserire nella colonna o nella riga
width Larghezza della nuova unica riga (* usa la larghezza
naturale)
Con multirow è utile cline{num1-num2} = linea orizzontale dalla colonna num1 alla colonna num2
Lezione 2 17/39 V. Ferro
Tabelle
Colonne e righe multiple
multicolumn{num}{col}{name}
multirow{num}{width}{name}
Argomenti
num Numero di colonne o di righe da unire in una sola
col Allineamento del testo nella colonna
name Testo da inserire nella colonna o nella riga
width Larghezza della nuova unica riga (* usa la larghezza
naturale)
Con multirow è utile cline{num1-num2} = linea orizzontale dalla colonna num1 alla colonna num2
Lezione 2 17/39 V. Ferro
Tabelle
Una tabella un po’ più complessa
a destra centro centro a sinistra
prova eh eh ? !
1 2 prova yeah
Lezione 2 18/39 V. Ferro
Tabelle
Una tabella un po’ più complessa
Unica Colonna centro
Unica rigaprova eh eh ?
1 2 prova
begin{table}
centering
begin{tabular}{|r|c|c|l|}
hline
multicolumn{2}{|c|}{Unica Colonna} & centro & multirow{3}{*}{Unica riga} 
cline{1-3}
prova & eh eh & ? & 
cline{1-3}
1 & 2 & prova & 
hline
end{tabular}
end{table}
Lezione 2 18/39 V. Ferro
Tabelle
tabular* VS tabularx
L’ambiente tabular assegna alla tabella la minima larghezza
sufficiente ad allocare tutti i contenuti.
E se volessimo allargare la nostra tabella?
tabular consente di farlo con un asterisco! ⇒ tabular*
altrimenti usando il pacchetto tabularx
Lezione 2 19/39 V. Ferro
Tabelle
tabular* VS tabularx
L’ambiente tabular assegna alla tabella la minima larghezza
sufficiente ad allocare tutti i contenuti.
E se volessimo allargare la nostra tabella?
tabular consente di farlo con un asterisco! ⇒ tabular*
altrimenti usando il pacchetto tabularx
Lezione 2 19/39 V. Ferro
Tabelle
tabular* VS tabularx
L’ambiente tabular assegna alla tabella la minima larghezza
sufficiente ad allocare tutti i contenuti.
E se volessimo allargare la nostra tabella?
tabular consente di farlo con un asterisco! ⇒ tabular*
altrimenti usando il pacchetto tabularx
begin{tabular*/tabularx}{width}{col} ...
Lezione 2 19/39 V. Ferro
Tabelle
tabular* VS tabularx
parola una frase un po’ più lunga tanto per
provare
due parole una seconda frase lunga, forse anche
un po’ di di più
begin{table}
centering
begin{tabular*}{textwidth}{l@{extracolsep{fill}}p{6cm}}
hline
parola & una frase un po’ piu lunga tanto per provare 
hline
due parole & una seconda frase lunga, forse anche un po’ di piu 
hline
end{tabular*}
end{table}
Lezione 2 20/39 V. Ferro
Tabelle
tabular* VS tabularx
parola una frase un po’ più lunga tanto per provare
due parole una seconda frase lunga, forse anche un po’ di di più
begin{table}
centering
begin{tabularx}{textwidth}{lX}
hline
parola & una frase un po’ piu lunga tanto per provare 
hline
due parole & una seconda frase lunga, forse anche un po’ di piu 
hline
end{tabular*}
end{table}
Lezione 2 20/39 V. Ferro
Tabelle
Un trucco facile e veloce
Un titolo
parola una frase un po’ più lunga tanto per provare
due parole una seconda frase lunga, forse anche un po’
di più
ancora due una terza frase meno lunga
Le righe vi sembrano troppo strette?
Lezione 2 21/39 V. Ferro
Tabelle
Un trucco facile e veloce
Un titolo
parola una frase un po’ più lunga tanto per provare
due parole una seconda frase lunga, forse anche un po’ di
più
ancora due una terza frase meno lunga
⇒ Aggiungi il pacchetto booktabs!!
Lezione 2 21/39 V. Ferro
Tabelle
Un trucco facile e veloce
begin{table}
centering
begin{tabularx}{0.95textwidth}{lX}
toprule
multicolumn{2}{c}{Un titolo} 
toprule
parola & una frase un po’ piu lunga tanto per provare 
midrule
due parole & una seconda frase lunga, forse anche un po’ di
piu 
midrule
ancora due & una terza frase meno lunga 
bottomrule
end{tabularx}
end{table}
Lezione 2 21/39 V. Ferro
Outline
1 Ambienti “fluttuanti”
2 Figure
Figura nel flusso del testo
Più figure insieme
3 Tabelle
Colonne e righe multiple
Migliorarne l’aspetto
4 Formule matematiche
Ambienti matematici
Simboli matematici
Array e matrici
Equazioni numerate
unità SI
5 Riferimenti
6 Immagini e tabelle in un documento
Lezione 2 22/39 V. Ferro
Formule ed equazioni
Ambienti matematici
Pacchetti: amsmath, amsfonts
L’ambiente matematica può essere visualizzato con multipli
comandi/shorthand in modalità inline o in modalità displayed
modalità “inline” modalità “displayed”
Ambiente math displaymath
LATEXshorthand (...) [...]
TEXshorthand $ ... $ $$ ... $$
Un altro ambiente è equation = equazione numerata in modalità
“displayed”
Lezione 2 23/39 V. Ferro
Formule ed equazioni
Ambienti matematici
Pacchetti: amsmath, amsfonts
L’ambiente matematica può essere visualizzato con multipli
comandi/shorthand in modalità inline o in modalità displayed
modalità “inline” modalità “displayed”
Ambiente math displaymath
LATEXshorthand (...) [...]
TEXshorthand $ ... $ $$ ... $$
Un altro ambiente è equation = equazione numerata in modalità
“displayed”
Lezione 2 23/39 V. Ferro
Formule ed equazioni
inline VS displayed
Questa semplice equazione 2x − 1 = 1 è
un esempio di modalità “inline”
La stessa semplice equazione
2x − 1 = 1
inserita anche in modalità “displayed”
Questa semplice
equazione $2x - 1 = 1$
e’ un esempio di
modalita’ ‘‘inline’’
La stessa semplice
equazione $$2x - 1 = 1$$
inserita anche in
modalita’ ‘‘displayed’’
Lezione 2 24/39 V. Ferro
Formule ed equazioni
Simboli matematici — Qualche esempio
+ − < ... + - < ll ...
α Γ ε... alpha Gamma epsilon varepsilon
x2
xij x^2 x_{ij}
cos exp ... cos exp
n
∑
i=0
sum_{i=0}^{n}
∞
0
∞
0
int_{0}^{infty} intlimits_{0}^{infty}
lim
x→0
lim_{x rightarrow 0}
1
c
frac{1}{c}
Esempio “inline” : ∑n
i=0
Lezione 2 25/39 V. Ferro
Formule ed equazioni
Simboli matematici — Qualche esempio
+ − < ... + - < ll ...
α Γ ε... alpha Gamma epsilon varepsilon
x2
xij x^2 x_{ij}
cos exp ... cos exp
n
∑
i=0
sum_{i=0}^{n}
∞
0
∞
0
int_{0}^{infty} intlimits_{0}^{infty}
lim
x→0
lim_{x rightarrow 0}
1
c
frac{1}{c}
Esempio “inline” : ∑n
i=0
Lezione 2 25/39 V. Ferro
Formule ed equazioni
Frazioni
frac e dfrac
1
x + 1
y
y − z
1
x
+
1
y
y − z
cfrac
x = a0 +
1
a1 +
1
a2 +
1
a3
Lezione 2 26/39 V. Ferro
Formule ed equazioni
Frazioni
frac e dfrac
1
x + 1
y
y − z
1
x
+
1
y
y − z
cfrac
begin{equation*}
x = a_0 + cfrac{1}{a_1
+ cfrac{1}{a_2 + cfrac{1}{a_3}}}
end{equation*}
x = a0 +
1
a1 +
1
a2 +
1
a3
Lezione 2 26/39 V. Ferro
Formule ed equazioni
Parentesi
(
x2
y3
)
x2
y3
Altre parentesi: left[ leftlbrace leftlangle
N.B. Un comando left deve sempre essere “chiuso” da un comando right
Lezione 2 27/39 V. Ferro
Formule ed equazioni
Parentesi
(
x2
y3
)
x2
y3
begin{equation*}
( dfrac{x^2}{y^3} )
end{equation*}
begin{equation*}
left( dfrac{x^2}{y^3} right)
end{equation*}
Altre parentesi: left[ leftlbrace leftlangle
N.B. Un comando left deve sempre essere “chiuso” da un comando right
Lezione 2 27/39 V. Ferro
Formule ed equazioni
Parentesi
(
x2
y3
)
x2
y3
begin{equation*}
( dfrac{x^2}{y^3} )
end{equation*}
begin{equation*}
left( dfrac{x^2}{y^3} right)
end{equation*}
Altre parentesi: left[ leftlbrace leftlangle
N.B. Un comando left deve sempre essere “chiuso” da un comando right
Lezione 2 27/39 V. Ferro
Formule ed equazioni
Equazioni su più righe
E se abbiamo una equazione molto lunga?
f (x) = 2π x10
+ x9
+ 3x8
+ 2x7
+ x6
− 3x5
+ x4
+ 7x3
+ 2x2
+ 10x +
Lezione 2 28/39 V. Ferro
Formule ed equazioni
Equazioni su più righe
Possiamo usare l’ambiente aling
f (x) = 2π x11
− x10
+ x9
+ 3x8
+ 2x7
+ x6
− 3x5
+ x4
+ 7x3
+2x2
+ 10x + 12 (1)
begin{align}
f(x) = 2 pi & left{x^{11} - x^{10} + x^9 right. nonumber
& + 3x^8 + 2x^7 + x^6 nonumber 
& - 3x^5 + x^4 + 7x^3 nonumber 
& left. + 2x^2 + 10x + 12 right}
end{align}
Lezione 2 28/39 V. Ferro
Formule ed equazioni
Equazioni su più righe
Possiamo usare l’ambiente aling
f (x) = 2π x11
− x10
+ x9
+ 3x8
+ 2x7
+ x6
− 3x5
+ x4
+ 7x3
+2x2
+ 10x + 12 (1)
begin{align}
f(x) = 2 pi &left{x^{11} - x^{10} + x^9 right. nonumber
& + 3x^8 + 2x^7 + x^6 nonumber 
& - 3x^5 + x^4 + 7x^3 nonumber 
& left. + 2x^2 + 10x + 12 right}
end{align}
Lezione 2 28/39 V. Ferro
Formule ed equazioni
Equazioni su più righe - casi speciali
Come scriviamo ΘH (n) =
0 se n < 0
1 se n ≥ 0
?
Lezione 2 29/39 V. Ferro
Formule ed equazioni
Equazioni su più righe - casi speciali
Come scriviamo ΘH (n) =
0 se n < 0
1 se n ≥ 0
?
Possiamo usare l’ambiente array
Si usa all’interno di un ambiente
matematico
E’ un comando generico che
permette di fare anche altre cose
begin{displaymath}
Theta_H(n) = left{
begin{array}{lr}
0 & mbox{se } n < 0 
1 & mbox{se } n geq 0
end{array} right.
end{displaymath}
Lezione 2 29/39 V. Ferro
Formule ed equazioni
Equazioni su più righe - casi speciali
Come scriviamo ΘH (n) =
0 se n < 0
1 se n ≥ 0
?
Possiamo usare l’ambiente cases
Si usa all’interno di un ambiente
matematico
E’ un comando specifico
begin{displaymath}
Theta_H(n) =
begin{cases}
0 & mbox{se } n < 0 
1 & mbox{se } n geq 0
end{cases}
end{displaymath}
Tips Con il pacchetto mathtools, esiste il comando dcase
Lezione 2 29/39 V. Ferro
Formule ed equazioni
Equazioni su più righe - casi speciali
Come scriviamo ΘH (n) =
0 se n < 0
1 se n ≥ 0
?
Possiamo usare l’ambiente cases
Si usa all’interno di un ambiente
matematico
E’ un comando specifico
begin{displaymath}
Theta_H(n) =
begin{cases}
0 & mbox{se } n < 0 
1 & mbox{se } n geq 0
end{cases}
end{displaymath}
N.B. Inserto di testo in ambiente math = mbox oppure text
Lezione 2 29/39 V. Ferro
Formule ed equazioni
Esempio di matrici
Am,n =





a1,1 a1,2 · · · a1,n
a2,1 a2,2 · · · a2,n
...
...
...
...
am,1 am,2 · · · am,n





[
A_{m,n} =
begin{pmatrix}
a_{1,1} & a_{1,2} & cdots & a_{1,n} 
a_{2,1} & a_{2,2} & cdots & a_{2,n} 
vdots & vdots & ddots & vdots 
a_{m,1} & a_{m,2} & cdots & a_{m,n}
end{pmatrix}
]
Comandi: matrix = matrice senza parentesi, pmatrix = parentesi tonde,
b/B/v/Vmatrix = matrice delimitata da [...], {...}, |...|, ||...||
Lezione 2 30/39 V. Ferro
Formule ed equazioni
Esempio di matrici
Am,n =





a1,1 a1,2 · · · a1,n
a2,1 a2,2 · · · a2,n
...
...
...
...
am,1 am,2 · · · am,n





[
A_{m,n} =
begin{pmatrix}
a_{1,1} & a_{1,2} & cdots & a_{1,n} 
a_{2,1} & a_{2,2} & cdots & a_{2,n} 
vdots & vdots & ddots & vdots 
a_{m,1} & a_{m,2} & cdots & a_{m,n}
end{pmatrix}
]
Comandi: matrix = matrice senza parentesi, pmatrix = parentesi tonde,
b/B/v/Vmatrix = matrice delimitata da [...], {...}, |...|, ||...||
Lezione 2 30/39 V. Ferro
Formule ed equazioni
Equazioni numerate singole
M
d2
dt2
x(t) + Kx(t) = 0 (2)
begin{equation} label{eq:oscil_generalizzato}
mathcal{M}frac{d^2}{dt^2}x(t)+mathcal{K}x(t)=0
end{equation}
N.B. mathcal esempio di formattazione di stile testo in ambiente math
Lezione 2 31/39 V. Ferro
Formule ed equazioni
Equazioni numerate singole
M
d2
dt2
x(t) + Kx(t) = 0
begin{equation*} label{eq:oscil_generalizzato}
mathcal{M}frac{d^2}{dt^2}x(t)+mathcal{K}x(t)=0
end{equation*}
N.B. mathcal esempio di formattazione di stile testo in ambiente math
Lezione 2 31/39 V. Ferro
Formule ed equazioni
Equazioni numerate singole
M
d2
dt2
x(t) + Kx(t) = 0
begin{equation*} label{eq:oscil_generalizzato}
mathcal{M}frac{d^2}{dt^2}x(t)+mathcal{K}x(t)=0
end{equation*}
N.B. mathcal esempio di formattazione di stile testo in ambiente math
Lezione 2 31/39 V. Ferro
Formule ed equazioni
Equazioni numerate raggruppate
|r = |x, y, z ≡ |r, θ, φ (2)
r| = x, y, z| ≡ r, θ, φ|
r | r =
∞
0
r2
dr
π
0
sin θdθ
2π
0
φdφ r | r r | r (3)
begin{eqnarray}
ket{vec{r}}&=&ket{x,y,z} equiv ket{r,theta,phi} label{eq:ket} 
bra{vec{r}}&=&bra{x,y,z} equiv bra{r,theta,phi} nonumber 
pr{vec{r},’’}{vec{r},’} &=& int_0^infty r^2 dr int_0^pi sin theta d 
theta int_0^{2pi} phi d phi pr{vec{r},’’}{vec{r}} pr{vec{r}}{vec
{r},’} label{eq:delta}
end{eqnarray}
E se non avessi soluto numerare nessuna equazione? → Esatto! Inserisco *
Spoiler: i comandi ket e bra non sono definiti in amsmath!! Vedremo come scriverli la prossima lezione
Lezione 2 32/39 V. Ferro
Formule ed equazioni
Equazioni numerate raggruppate
|r = |x, y, z ≡ |r, θ, φ (2)
r| = x, y, z| ≡ r, θ, φ|
r | r =
∞
0
r2
dr
π
0
sin θdθ
2π
0
φdφ r | r r | r (3)
begin{eqnarray}
ket{vec{r}}&=&ket{x,y,z} equiv ket{r,theta,phi} label{eq:ket} 
bra{vec{r}}&=&bra{x,y,z} equiv bra{r,theta,phi} nonumber 
pr{vec{r},’’}{vec{r},’} &=& int_0^infty r^2 dr int_0^pi sin theta d 
theta int_0^{2pi} phi d phi pr{vec{r},’’}{vec{r}} pr{vec{r}}{vec
{r},’} label{eq:delta}
end{eqnarray}
E se non avessi soluto numerare nessuna equazione? → Esatto! Inserisco *
Spoiler: i comandi ket e bra non sono definiti in amsmath!! Vedremo come scriverli la prossima lezione
Lezione 2 32/39 V. Ferro
Formule ed equazioni
Equazioni numerate raggruppate
|r = |x, y, z ≡ |r, θ, φ (2)
r| = x, y, z| ≡ r, θ, φ|
r | r =
∞
0
r2
dr
π
0
sin θdθ
2π
0
φdφ r | r r | r (3)
begin{eqnarray}
ket{vec{r}}&=&ket{x,y,z} equiv ket{r,theta,phi} label{eq:ket} 
bra{vec{r}}&=&bra{x,y,z} equiv bra{r,theta,phi} nonumber 
pr{vec{r},’’}{vec{r},’} &=& int_0^infty r^2 dr int_0^pi sin theta d 
theta int_0^{2pi} phi d phi pr{vec{r},’’}{vec{r}} pr{vec{r}}{vec
{r},’} label{eq:delta}
end{eqnarray}
E se non avessi soluto numerare nessuna equazione? → Esatto! Inserisco *
Spoiler: i comandi ket e bra non sono definiti in amsmath!! Vedremo come scriverli la prossima lezione
Lezione 2 32/39 V. Ferro
Formule ed equazioni
Equazioni numerate raggruppate
|r = |x, y, z ≡ |r, θ, φ (2)
r| = x, y, z| ≡ r, θ, φ|
r | r =
∞
0
r2
dr
π
0
sin θdθ
2π
0
φdφ r | r r | r (3)
begin{eqnarray}
ket{vec{r}}&=&ket{x,y,z} equiv ket{r,theta,phi} label{eq:ket} 
bra{vec{r}}&=&bra{x,y,z} equiv bra{r,theta,phi} nonumber 
pr{vec{r},’’}{vec{r},’} &=& int_0^infty r^2 dr int_0^pi sin theta d 
theta int_0^{2pi} phi d phi pr{vec{r},’’}{vec{r}} pr{vec{r}}{vec
{r},’} label{eq:delta}
end{eqnarray}
E se non avessi soluto numerare nessuna equazione? → Esatto! Inserisco *
Spoiler: i comandi ket e bra non sono definiti in amsmath!! Vedremo come scriverli la prossima lezione
Lezione 2 32/39 V. Ferro
Formule ed equazioni
Equazioni numerate raggruppate
|r = |x, y, z ≡ |r, θ, φ (2)
r| = x, y, z| ≡ r, θ, φ|
r | r =
∞
0
r2
dr
π
0
sin θdθ
2π
0
φdφ r | r r | r (3)
begin{eqnarray}
ket{vec{r}}&=&ket{x,y,z} equiv ket{r,theta,phi} label{eq:ket} 
bra{vec{r}}&=&bra{x,y,z} equiv bra{r,theta,phi} nonumber 
pr{vec{r},’’}{vec{r},’} &=& int_0^infty r^2 dr int_0^pi sin theta d 
theta int_0^{2pi} phi d phi pr{vec{r},’’}{vec{r}} pr{vec{r}}{vec
{r},’} label{eq:delta}
end{eqnarray}
E se non avessi soluto numerare nessuna equazione? → Esatto! Inserisco *
Spoiler: i comandi ket e bra non sono definiti in amsmath!! Vedremo come scriverli la prossima lezione
Lezione 2 32/39 V. Ferro
Formule ed equazioni
Unità di misura SI
Richiede: siunitx (e tanti altri.. vedi documentazione )
Senza siunitx 0.51MeV /c2
0
Con siunitx 0.51 MeV/c0
2
si[per-mode=symbol]{megaelectronvoltperclight^2}
si{megaelectronvoltperclight^2}
si{MeV.clight^{-2}}
Si può utilizzare sia in ambiente math che fuori
Lezione 2 33/39 V. Ferro
Outline
1 Ambienti “fluttuanti”
2 Figure
Figura nel flusso del testo
Più figure insieme
3 Tabelle
Colonne e righe multiple
Migliorarne l’aspetto
4 Formule matematiche
Ambienti matematici
Simboli matematici
Array e matrici
Equazioni numerate
unità SI
5 Riferimenti
6 Immagini e tabelle in un documento
Lezione 2 34/39 V. Ferro
Riferimenti
Finalmente quel famoso label...
Lezione 2 35/39 V. Ferro
Riferimenti
OGGETTO label{OGG:nomeoggetto}
...
ref{OGG:nomeoggetto}
pageref{OGG:nomeoggetto}
eqref{OGG:nomeoggetto}
Lezione 2 35/39 V. Ferro
Riferimenti
Esempi ed utilizzi
ref L’eq. ref{eq:ket} L’eq. 2
eqref L’eq. eqref{eq:ket} L’eq. (2)
pageref L’eq. a pag. pageref{eq:ket} L’eq. a pag. 77
Semplicemente aggiungendo il pacchetto hyperref, tutti i riferimenti
vengono convertiti in link nel pdf!!!
Lezione 2 36/39 V. Ferro
Riferimenti
Esempi ed utilizzi
ref L’eq. ref{eq:ket} L’eq. 2
eqref L’eq. eqref{eq:ket} L’eq. (2)
pageref L’eq. a pag. pageref{eq:ket} L’eq. a pag. 77
Semplicemente aggiungendo il pacchetto hyperref, tutti i riferimenti
vengono convertiti in link nel pdf!!!
Lezione 2 36/39 V. Ferro
Outline
1 Ambienti “fluttuanti”
2 Figure
Figura nel flusso del testo
Più figure insieme
3 Tabelle
Colonne e righe multiple
Migliorarne l’aspetto
4 Formule matematiche
Ambienti matematici
Simboli matematici
Array e matrici
Equazioni numerate
unità SI
5 Riferimenti
6 Immagini e tabelle in un documento
Lezione 2 37/39 V. Ferro
Figure e tabelle
List of...
Ancora una volta solo due semplici comandi
begin{document}
maketitle
tableofcontents
listoffigures
listoftables
...
Lezione 2 38/39 V. Ferro
Figure e tabelle
List of...
Ancora una volta solo due semplici comandi
begin{document}
maketitle
tableofcontents
listoffigures
listoftables
...
Elenco delle figure
1.1 Roound Door . . . . . . . . . . . . . . . . 6
1.2 Bilbo Baggins . . . . . . . . . . . . . . . . 8
2
Elenco delle tabelle
1.1 Caratteristiche di un hobbit . . . . . . . . 9
3
Lezione 2 38/39 V. Ferro
Grazie dell’attenzione!
Expand (a + b)n:
(a + b)n
(a + b)n
(a + b)n
(a + b)n
Expand $(a+b)^n$:
begin{gather∗}
(a + b)^n
(a +  b)^n
(aquad + quad b)^n
(aqquad + qquad b)^n
end{gather∗}
Lezione 2 39/39 V. Ferro

Contenu connexe

Dernier

La produzione e la gestione degli Open Data
La produzione e la gestione degli Open DataLa produzione e la gestione degli Open Data
La produzione e la gestione degli Open DataGianluigi Cogo
 
La seconda guerra mondiale per licei e scuole medie
La seconda guerra mondiale per licei e scuole medieLa seconda guerra mondiale per licei e scuole medie
La seconda guerra mondiale per licei e scuole medieVincenzoPantalena1
 
IL CHIAMATO ALLA CONVERSIONE - catechesi per candidati alla Cresima
IL CHIAMATO ALLA CONVERSIONE - catechesi per candidati alla CresimaIL CHIAMATO ALLA CONVERSIONE - catechesi per candidati alla Cresima
IL CHIAMATO ALLA CONVERSIONE - catechesi per candidati alla CresimaRafael Figueredo
 
Esperimenti_laboratorio di fisica per la scuola superiore
Esperimenti_laboratorio di fisica per la scuola superioreEsperimenti_laboratorio di fisica per la scuola superiore
Esperimenti_laboratorio di fisica per la scuola superiorevaleriodinoia35
 
lezione di fisica_I moti nel piano_Amaldi
lezione di fisica_I moti nel piano_Amaldilezione di fisica_I moti nel piano_Amaldi
lezione di fisica_I moti nel piano_Amaldivaleriodinoia35
 
Ticonzero news 148.pdf aprile 2024 Terza cultura
Ticonzero news 148.pdf aprile 2024 Terza culturaTiconzero news 148.pdf aprile 2024 Terza cultura
Ticonzero news 148.pdf aprile 2024 Terza culturaPierLuigi Albini
 
Storia dell’Inghilterra nell’Età Moderna.pptx
Storia dell’Inghilterra nell’Età Moderna.pptxStoria dell’Inghilterra nell’Età Moderna.pptx
Storia dell’Inghilterra nell’Età Moderna.pptxOrianaOcchino
 
Esame finale - riunione genitori 2024.pptx
Esame finale - riunione genitori 2024.pptxEsame finale - riunione genitori 2024.pptx
Esame finale - riunione genitori 2024.pptxfedericodellacosta2
 

Dernier (8)

La produzione e la gestione degli Open Data
La produzione e la gestione degli Open DataLa produzione e la gestione degli Open Data
La produzione e la gestione degli Open Data
 
La seconda guerra mondiale per licei e scuole medie
La seconda guerra mondiale per licei e scuole medieLa seconda guerra mondiale per licei e scuole medie
La seconda guerra mondiale per licei e scuole medie
 
IL CHIAMATO ALLA CONVERSIONE - catechesi per candidati alla Cresima
IL CHIAMATO ALLA CONVERSIONE - catechesi per candidati alla CresimaIL CHIAMATO ALLA CONVERSIONE - catechesi per candidati alla Cresima
IL CHIAMATO ALLA CONVERSIONE - catechesi per candidati alla Cresima
 
Esperimenti_laboratorio di fisica per la scuola superiore
Esperimenti_laboratorio di fisica per la scuola superioreEsperimenti_laboratorio di fisica per la scuola superiore
Esperimenti_laboratorio di fisica per la scuola superiore
 
lezione di fisica_I moti nel piano_Amaldi
lezione di fisica_I moti nel piano_Amaldilezione di fisica_I moti nel piano_Amaldi
lezione di fisica_I moti nel piano_Amaldi
 
Ticonzero news 148.pdf aprile 2024 Terza cultura
Ticonzero news 148.pdf aprile 2024 Terza culturaTiconzero news 148.pdf aprile 2024 Terza cultura
Ticonzero news 148.pdf aprile 2024 Terza cultura
 
Storia dell’Inghilterra nell’Età Moderna.pptx
Storia dell’Inghilterra nell’Età Moderna.pptxStoria dell’Inghilterra nell’Età Moderna.pptx
Storia dell’Inghilterra nell’Età Moderna.pptx
 
Esame finale - riunione genitori 2024.pptx
Esame finale - riunione genitori 2024.pptxEsame finale - riunione genitori 2024.pptx
Esame finale - riunione genitori 2024.pptx
 

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Corso LaTeX - Lezione Due: Ambienti Float e Math

  • 1. Lezione Due: Ambienti 08 Maggio 2014 Valentina Ferro valentina.ferro89@gmail.com
  • 2. Nelle puntate precedenti... Sintassi LATEX e simboli speciali Struttura del documento: dichiarazione classe, preambolo (pacchetti, info ausiliarie), corpo del documento Capitoli e sezioni Formattazione del testo Elenchi puntati Indice e Titlepage Lezione 2 2/39 V. Ferro
  • 3. Outline 1 Ambienti “fluttuanti” 2 Figure Figura nel flusso del testo Più figure insieme 3 Tabelle Colonne e righe multiple Migliorarne l’aspetto 4 Formule matematiche Ambienti matematici Simboli matematici Array e matrici Equazioni numerate unità SI 5 Riferimenti 6 Immagini e tabelle in un documento Lezione 2 3/39 V. Ferro
  • 4. Outline 1 Ambienti “fluttuanti” 2 Figure Figura nel flusso del testo Più figure insieme 3 Tabelle Colonne e righe multiple Migliorarne l’aspetto 4 Formule matematiche Ambienti matematici Simboli matematici Array e matrici Equazioni numerate unità SI 5 Riferimenti 6 Immagini e tabelle in un documento Lezione 2 3/39 V. Ferro
  • 5. Outline 1 Ambienti “fluttuanti” 2 Figure Figura nel flusso del testo Più figure insieme 3 Tabelle Colonne e righe multiple Migliorarne l’aspetto 4 Formule matematiche Ambienti matematici Simboli matematici Array e matrici Equazioni numerate unità SI 5 Riferimenti 6 Immagini e tabelle in un documento Lezione 2 3/39 V. Ferro
  • 6. Outline 1 Ambienti “fluttuanti” 2 Figure Figura nel flusso del testo Più figure insieme 3 Tabelle Colonne e righe multiple Migliorarne l’aspetto 4 Formule matematiche Ambienti matematici Simboli matematici Array e matrici Equazioni numerate unità SI 5 Riferimenti 6 Immagini e tabelle in un documento Lezione 2 3/39 V. Ferro
  • 7. Outline 1 Ambienti “fluttuanti” 2 Figure Figura nel flusso del testo Più figure insieme 3 Tabelle Colonne e righe multiple Migliorarne l’aspetto 4 Formule matematiche Ambienti matematici Simboli matematici Array e matrici Equazioni numerate unità SI 5 Riferimenti 6 Immagini e tabelle in un documento Lezione 2 3/39 V. Ferro
  • 8. Outline 1 Ambienti “fluttuanti” 2 Figure Figura nel flusso del testo Più figure insieme 3 Tabelle Colonne e righe multiple Migliorarne l’aspetto 4 Formule matematiche Ambienti matematici Simboli matematici Array e matrici Equazioni numerate unità SI 5 Riferimenti 6 Immagini e tabelle in un documento Lezione 2 3/39 V. Ferro
  • 9. Outline 1 Ambienti “fluttuanti” 2 Figure Figura nel flusso del testo Più figure insieme 3 Tabelle Colonne e righe multiple Migliorarne l’aspetto 4 Formule matematiche Ambienti matematici Simboli matematici Array e matrici Equazioni numerate unità SI 5 Riferimenti 6 Immagini e tabelle in un documento Lezione 2 4/39 V. Ferro
  • 10. Ambienti “fluttuanti” Inserire figure e tabelle I “Float” in LaTeX sono contenitori per elementi che non possono essere divisi su più pagine. Ambienti Float sono figure e tabelle Se lo spazio non è sufficiente nella pagina, l’oggetto viene spostato in modo da ottimizzare lo spazio Caratteristiche Didascalia Numerazione (per riferimenti) Lezione 2 5/39 V. Ferro
  • 11. Ambienti “fluttuanti” Inserire figure e tabelle I “Float” in LaTeX sono contenitori per elementi che non possono essere divisi su più pagine. Ambienti Float sono figure e tabelle Se lo spazio non è sufficiente nella pagina, l’oggetto viene spostato in modo da ottimizzare lo spazio Caratteristiche Didascalia Numerazione (per riferimenti) Lezione 2 5/39 V. Ferro
  • 12. Ambienti “fluttuanti” Inserire figure e tabelle I “Float” in LaTeX sono contenitori per elementi che non possono essere divisi su più pagine. Ambienti Float sono figure e tabelle Se lo spazio non è sufficiente nella pagina, l’oggetto viene spostato in modo da ottimizzare lo spazio Caratteristiche Didascalia Numerazione (per riferimenti) Lezione 2 5/39 V. Ferro
  • 13. Ambienti “fluttuanti” Inserire figure e tabelle I “Float” in LaTeX sono contenitori per elementi che non possono essere divisi su più pagine. Ambienti Float sono figure e tabelle Se lo spazio non è sufficiente nella pagina, l’oggetto viene spostato in modo da ottimizzare lo spazio Caratteristiche Didascalia Numerazione (per riferimenti) Lezione 2 5/39 V. Ferro
  • 14. Ambienti “fluttuanti” Inserire figure e tabelle begin{figure/table}[posizione] label{etichetta} ... % Comandi per inserire ... % immagini o tabella caption[abbr.]{didascalia} end{figure/table} posizione = [htbp] L’ordine viene scelto dall’utente h = here – Approssimantivamente t = top – All’inizio della pagina b = bottom – Alla fine della pagina p = page – In una pagina dedicata ! = Forza la posizione dell’elemento. I.e. [t!] inserisce il float all’inizio della pagina anche se c’è più spazio altrove Lezione 2 6/39 V. Ferro
  • 15. Ambienti “fluttuanti” Inserire figure e tabelle begin{figure/table}[posizione] label{etichetta} ... % Comandi per inserire ... % immagini o tabella caption[abbr.]{didascalia} end{figure/table} label Non obbligatorio, ma utile! Consiglio: usa nomi che indichino anche il tipo di oggetto. I.e. fig:nomefigura per delle immagini e tab:nometabella per delle tabelle Lezione 2 6/39 V. Ferro
  • 16. Ambienti “fluttuanti” Inserire figure e tabelle begin{figure/table}[posizione] label{etichetta} ... % Comandi per inserire ... % immagini o tabella caption[abbr.]{didascalia} end{figure/table} caption Non obbligatorio, ma utile! La versione abbreviata viene inserita nell’elenco delle figure/tabelle Lezione 2 6/39 V. Ferro
  • 17. Outline 1 Ambienti “fluttuanti” 2 Figure Figura nel flusso del testo Più figure insieme 3 Tabelle Colonne e righe multiple Migliorarne l’aspetto 4 Formule matematiche Ambienti matematici Simboli matematici Array e matrici Equazioni numerate unità SI 5 Riferimenti 6 Immagini e tabelle in un documento Lezione 2 7/39 V. Ferro
  • 18. Figure Pacchetti e comandi base includegraphics[opzioni]{percorso/nomeimmagine} Pacchetto: graphicx Accetta: .jpg, .pdf, .png con pdflatex Opzioni width=xx in pt, mm, cm, in, ex, em; oppure come frazione della larghezza o della altezza del testo xxtextwidth height=xx come width (N.B. xxtextheight) scale=xx fattore xx di cui si vuole scalare l’immagine angle=xx ruota di xx gradi l’immagine resolution=xx risoluzione espressa in dpi trim = l b r t taglia l’immagine di l unità da sinistra, di b unità dal basso, di r unità da destra e di t unità dall’alto. Necessita del comando clip Lezione 2 8/39 V. Ferro
  • 19. Figure Pacchetti e comandi base includegraphics[opzioni]{percorso/nomeimmagine} Pacchetto: graphicx Accetta: .jpg, .pdf, .png con pdflatex Opzioni width=xx in pt, mm, cm, in, ex, em; oppure come frazione della larghezza o della altezza del testo xxtextwidth height=xx come width (N.B. xxtextheight) scale=xx fattore xx di cui si vuole scalare l’immagine angle=xx ruota di xx gradi l’immagine resolution=xx risoluzione espressa in dpi trim = l b r t taglia l’immagine di l unità da sinistra, di b unità dal basso, di r unità da destra e di t unità dall’alto. Necessita del comando clip Lezione 2 8/39 V. Ferro
  • 22. Figure Esempi begin{figure} label{fig:mybeer} centering includegraphics[scale=0.1, trim=45cm 55cm 20cm 40cm, clip] {pictures/mybeer} caption{Una donna felice!} end{figure} Figura : Una donna felice! Lezione 2 9/39 V. Ferro
  • 23. Figura nel flusso del testo Il pacchetto wrapfig begin{wrapfigure}[opzioni]{posizione}{dimensione} ... end{wrapfigure} Opzioni e Argomenti opzioni lineheight = altezza del Float espressa in numero di linee di testo posizione r, l = posizionato a destra (r) o a sinistra (l) dimensione espressa sia in xx unità che in frazione del testo (con textwidth) Lezione 2 10/39 V. Ferro
  • 24. Figura nel flusso del testo Il pacchetto wrapfig begin{wrapfigure}[opzioni]{posizione}{dimensione} ... end{wrapfigure} Opzioni e Argomenti opzioni lineheight = altezza del Float espressa in numero di linee di testo posizione r, l = posizionato a destra (r) o a sinistra (l) dimensione espressa sia in xx unità che in frazione del testo (con textwidth) Lezione 2 10/39 V. Ferro
  • 25. Figura nel flusso del testo Il pacchetto wrapfig – Esempio ... %testo begin{wrapfigure}{l}{0.25textwidth} vspace{-5pt} begin{center} includegraphics[width=0.25textwidth]{pictures/VaLeia} end{center} vspace{-5pt} caption{Vatextbf{Leia}}label{fig:Leia} vspace{5pt} end{wrapfigure} ... %altro testo begin{wrapfigure}{r}{0.2textwidth} begin{center} includegraphics[width=0.18textwidth]{pictures/MagicMe} end{center} caption{textbf{Magic}Me}label{fig:Mage} end{wrapfigure} ... %ancora testo Lezione 2 11/39 V. Ferro
  • 26. Figura nel flusso del testo Il pacchetto wrapfig – Esempio ... %testo begin{wrapfigure}{l}{0.25textwidth} vspace{-5pt} begin{center} includegraphics[width=0.25textwidth]{pictures/VaLeia} end{center} vspace{-5pt} caption{Vatextbf{Leia}}label{fig:Leia} vspace{5pt} end{wrapfigure} ... %altro testo begin{wrapfigure}{r}{0.2textwidth} begin{center} includegraphics[width=0.18textwidth]{pictures/MagicMe} end{center} caption{textbf{Magic}Me}label{fig:Mage} end{wrapfigure} ... %ancora testo Lezione 2 11/39 V. Ferro
  • 27. Figura nel flusso del testo Il pacchetto wrapfig – Esempio ... %testo begin{wrapfigure}{l}{0.25textwidth} vspace{-5pt} begin{center} includegraphics[width=0.25textwidth]{pictures/VaLeia} end{center} vspace{-5pt} caption{Vatextbf{Leia}}label{fig:Leia} vspace{5pt} end{wrapfigure} ... %altro testo begin{wrapfigure}{r}{0.2textwidth} begin{center} includegraphics[width=0.18textwidth]{pictures/MagicMe} end{center} caption{textbf{Magic}Me}label{fig:Mage} end{wrapfigure} ... %ancora testo Lezione 2 11/39 V. Ferro
  • 28. Figura nel flusso del testo Il pacchetto wrapfig – Esempio Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iu- re reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proi- dent, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco Figura 1.1: VaLeia Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut la- bore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ul- lamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Figura 1.2: MagicMe Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Lezione 2 11/39 V. Ferro
  • 29. Più figure insieme Il pacchetto subcaption (e caption) begin{subfigure}{dimensione} includegraphics[...]{...} caption{didascalia subfig}label{subfig} end{subfigure} Proprietà Tra una figura e l’altra di possono inserire degli spazi con i comandi appositi — i.e. hspace{} oppure hfill Per portare a capo una figura, è sufficiente lasciare un rigo vuoto Si usa all’interno dell’ambiente figure Lezione 2 12/39 V. Ferro
  • 30. Più figure insieme Il pacchetto subcaption (e caption) begin{subfigure}{dimensione} includegraphics[...]{...} caption{didascalia subfig}label{subfig} end{subfigure} Proprietà Tra una figura e l’altra di possono inserire degli spazi con i comandi appositi — i.e. hspace{} oppure hfill Per portare a capo una figura, è sufficiente lasciare un rigo vuoto Si usa all’interno dell’ambiente figure Lezione 2 12/39 V. Ferro
  • 31. Più figure insieme Il pacchetto subcaption – Esempio begin{figure} centering begin{subfigure}{0.45textwidth} includegraphics[width=textwidth]{pictures/Sax} caption{Playing with Mr. Sax}label{fig:Sax} end{subfigure}% hfill begin{subfigure}{0.45textwidth} includegraphics[width=textwidth]{pictures/Charlie} caption{Joking with Charlie}label{fig:Charlie} end{subfigure} %qui abbiamo lasciato un rigo vuoto vspace{5mm} begin{subfigure}{textwidth} includegraphics[width=textwidth]{pictures/Oscars} caption{A nice chat with Mr. Oscar Wilde and Mr. Oscar Wilde} label{fig:Oscars} end{subfigure} caption{Best friends forever..}label{fig:BFF} end{figure} Lezione 2 13/39 V. Ferro
  • 32. Più figure insieme Il pacchetto subcaption – Esempio begin{figure} centering begin{subfigure}{0.45textwidth} includegraphics[width=textwidth]{pictures/Sax} caption{Playing with Mr. Sax}label{fig:Sax} end{subfigure}% hfill begin{subfigure}{0.45textwidth} includegraphics[width=textwidth]{pictures/Charlie} caption{Joking with Charlie}label{fig:Charlie} end{subfigure} %qui abbiamo lasciato un rigo vuoto vspace{5mm} begin{subfigure}{textwidth} includegraphics[width=textwidth]{pictures/Oscars} caption{A nice chat with Mr. Oscar Wilde and Mr. Oscar Wilde} label{fig:Oscars} end{subfigure} caption{Best friends forever..}label{fig:BFF} end{figure} Lezione 2 13/39 V. Ferro
  • 33. Più figure insieme Il pacchetto subcaption – Esempio begin{figure} centering begin{subfigure}{0.45textwidth} includegraphics[width=textwidth]{pictures/Sax} caption{Playing with Mr. Sax}label{fig:Sax} end{subfigure}% hfill begin{subfigure}{0.45textwidth} includegraphics[width=textwidth]{pictures/Charlie} caption{Joking with Charlie}label{fig:Charlie} end{subfigure} %qui abbiamo lasciato un rigo vuoto vspace{5mm} begin{subfigure}{textwidth} includegraphics[width=textwidth]{pictures/Oscars} caption{A nice chat with Mr. Oscar Wilde and Mr. Oscar Wilde} label{fig:Oscars} end{subfigure} caption{Best friends forever..}label{fig:BFF} end{figure} Lezione 2 13/39 V. Ferro
  • 34. Più figure insieme Il pacchetto subcaption – Esempio (a) Playing with Mr. Sax (b) Joking with Charlie (c) A nice chat with Mr. Oscar Wilde and Mr. Oscar Wilde Figura 1.1: Best friends forever.. Lezione 2 13/39 V. Ferro
  • 35. Outline 1 Ambienti “fluttuanti” 2 Figure Figura nel flusso del testo Più figure insieme 3 Tabelle Colonne e righe multiple Migliorarne l’aspetto 4 Formule matematiche Ambienti matematici Simboli matematici Array e matrici Equazioni numerate unità SI 5 Riferimenti 6 Immagini e tabelle in un documento Lezione 2 14/39 V. Ferro
  • 36. Tabelle L’ambiente tabular begin{tabular}{colonne e allineamento} riga1_col1 & riga1_col2 & riga1_col3 riga2_col1 & .... end{tabular} Proprietà Colonne e allineamento: dichiara quante colonne e come allineare il testo & separa le colonne inizia una nuova riga hline inserisce una linea orizzontale | inserisce una linea verticale (si inserisce in {Colonne e allineamento}) Lezione 2 15/39 V. Ferro
  • 37. Tabelle L’ambiente tabular begin{tabular}{colonne e allineamento} riga1_col1 & riga1_col2 & riga1_col3 riga2_col1 & .... end{tabular} Proprietà Colonne e allineamento: dichiara quante colonne e come allineare il testo l c r 3 colonne, nella prima il testo è allineato a sinistra (l), nella seconda a centro (c), nella terza a destra (r) p{dim} specifica la larghezza della colonna *{num}{x} ripete l’allineamento x per un certo num di colonne & separa le colonne inizia una nuova riga hline inserisce una linea orizzontale | inserisce una linea verticale (si inserisce in {Colonne e allineamento}) Lezione 2 15/39 V. Ferro
  • 38. Tabelle L’ambiente tabular begin{tabular}{colonne e allineamento} riga1_col1 & riga1_col2 & riga1_col3 riga2_col1 & .... end{tabular} Proprietà Colonne e allineamento: dichiara quante colonne e come allineare il testo & separa le colonne inizia una nuova riga hline inserisce una linea orizzontale | inserisce una linea verticale (si inserisce in {Colonne e allineamento}) Lezione 2 15/39 V. Ferro
  • 39. Tabelle Una semplice tabella a destra centro centro a sinistra prova eh eh ? ! 1 2 prova yeah begin{table} centering begin{tabular}{rccl} a destra & centro & centro & a sinistra prova & eh eh & ? & ! 1 & 2 & prova & yeah end{tabular} end{table} Lezione 2 16/39 V. Ferro
  • 40. Tabelle Una semplice tabella a destra centro centro a sinistra prova eh eh ? ! 1 2 prova yeah begin{table} centering begin{tabular}{|rcc|l||} hline a destra & centro & centro & a sinistra hline prova & eh eh & ? & ! hline 1 & 2 & prova & yeah hline end{tabular} end{table} Lezione 2 16/39 V. Ferro
  • 41. Tabelle Una semplice tabella a destra centro centro a sinistra prova eh eh ? ! 1 2 prova yeah begin{table} centering begin{tabular}{|p{90pt}|*{3}{l|}} hline a destra & centro & centro & a sinistra hline prova & eh eh & ? & ! hline 1 & 2 & prova & yeah hline end{tabular} end{table} Lezione 2 16/39 V. Ferro
  • 42. Tabelle Colonne e righe multiple multicolumn{num}{col}{name} multirow{num}{width}{name} Argomenti num Numero di colonne o di righe da unire in una sola col Allineamento del testo nella colonna name Testo da inserire nella colonna o nella riga width Larghezza della nuova unica riga (* usa la larghezza naturale) Con multirow è utile cline{num1-num2} = linea orizzontale dalla colonna num1 alla colonna num2 Lezione 2 17/39 V. Ferro
  • 43. Tabelle Colonne e righe multiple multicolumn{num}{col}{name} multirow{num}{width}{name} Argomenti num Numero di colonne o di righe da unire in una sola col Allineamento del testo nella colonna name Testo da inserire nella colonna o nella riga width Larghezza della nuova unica riga (* usa la larghezza naturale) Con multirow è utile cline{num1-num2} = linea orizzontale dalla colonna num1 alla colonna num2 Lezione 2 17/39 V. Ferro
  • 44. Tabelle Una tabella un po’ più complessa a destra centro centro a sinistra prova eh eh ? ! 1 2 prova yeah Lezione 2 18/39 V. Ferro
  • 45. Tabelle Una tabella un po’ più complessa Unica Colonna centro Unica rigaprova eh eh ? 1 2 prova begin{table} centering begin{tabular}{|r|c|c|l|} hline multicolumn{2}{|c|}{Unica Colonna} & centro & multirow{3}{*}{Unica riga} cline{1-3} prova & eh eh & ? & cline{1-3} 1 & 2 & prova & hline end{tabular} end{table} Lezione 2 18/39 V. Ferro
  • 46. Tabelle tabular* VS tabularx L’ambiente tabular assegna alla tabella la minima larghezza sufficiente ad allocare tutti i contenuti. E se volessimo allargare la nostra tabella? tabular consente di farlo con un asterisco! ⇒ tabular* altrimenti usando il pacchetto tabularx Lezione 2 19/39 V. Ferro
  • 47. Tabelle tabular* VS tabularx L’ambiente tabular assegna alla tabella la minima larghezza sufficiente ad allocare tutti i contenuti. E se volessimo allargare la nostra tabella? tabular consente di farlo con un asterisco! ⇒ tabular* altrimenti usando il pacchetto tabularx Lezione 2 19/39 V. Ferro
  • 48. Tabelle tabular* VS tabularx L’ambiente tabular assegna alla tabella la minima larghezza sufficiente ad allocare tutti i contenuti. E se volessimo allargare la nostra tabella? tabular consente di farlo con un asterisco! ⇒ tabular* altrimenti usando il pacchetto tabularx begin{tabular*/tabularx}{width}{col} ... Lezione 2 19/39 V. Ferro
  • 49. Tabelle tabular* VS tabularx parola una frase un po’ più lunga tanto per provare due parole una seconda frase lunga, forse anche un po’ di di più begin{table} centering begin{tabular*}{textwidth}{l@{extracolsep{fill}}p{6cm}} hline parola & una frase un po’ piu lunga tanto per provare hline due parole & una seconda frase lunga, forse anche un po’ di piu hline end{tabular*} end{table} Lezione 2 20/39 V. Ferro
  • 50. Tabelle tabular* VS tabularx parola una frase un po’ più lunga tanto per provare due parole una seconda frase lunga, forse anche un po’ di di più begin{table} centering begin{tabularx}{textwidth}{lX} hline parola & una frase un po’ piu lunga tanto per provare hline due parole & una seconda frase lunga, forse anche un po’ di piu hline end{tabular*} end{table} Lezione 2 20/39 V. Ferro
  • 51. Tabelle Un trucco facile e veloce Un titolo parola una frase un po’ più lunga tanto per provare due parole una seconda frase lunga, forse anche un po’ di più ancora due una terza frase meno lunga Le righe vi sembrano troppo strette? Lezione 2 21/39 V. Ferro
  • 52. Tabelle Un trucco facile e veloce Un titolo parola una frase un po’ più lunga tanto per provare due parole una seconda frase lunga, forse anche un po’ di più ancora due una terza frase meno lunga ⇒ Aggiungi il pacchetto booktabs!! Lezione 2 21/39 V. Ferro
  • 53. Tabelle Un trucco facile e veloce begin{table} centering begin{tabularx}{0.95textwidth}{lX} toprule multicolumn{2}{c}{Un titolo} toprule parola & una frase un po’ piu lunga tanto per provare midrule due parole & una seconda frase lunga, forse anche un po’ di piu midrule ancora due & una terza frase meno lunga bottomrule end{tabularx} end{table} Lezione 2 21/39 V. Ferro
  • 54. Outline 1 Ambienti “fluttuanti” 2 Figure Figura nel flusso del testo Più figure insieme 3 Tabelle Colonne e righe multiple Migliorarne l’aspetto 4 Formule matematiche Ambienti matematici Simboli matematici Array e matrici Equazioni numerate unità SI 5 Riferimenti 6 Immagini e tabelle in un documento Lezione 2 22/39 V. Ferro
  • 55. Formule ed equazioni Ambienti matematici Pacchetti: amsmath, amsfonts L’ambiente matematica può essere visualizzato con multipli comandi/shorthand in modalità inline o in modalità displayed modalità “inline” modalità “displayed” Ambiente math displaymath LATEXshorthand (...) [...] TEXshorthand $ ... $ $$ ... $$ Un altro ambiente è equation = equazione numerata in modalità “displayed” Lezione 2 23/39 V. Ferro
  • 56. Formule ed equazioni Ambienti matematici Pacchetti: amsmath, amsfonts L’ambiente matematica può essere visualizzato con multipli comandi/shorthand in modalità inline o in modalità displayed modalità “inline” modalità “displayed” Ambiente math displaymath LATEXshorthand (...) [...] TEXshorthand $ ... $ $$ ... $$ Un altro ambiente è equation = equazione numerata in modalità “displayed” Lezione 2 23/39 V. Ferro
  • 57. Formule ed equazioni inline VS displayed Questa semplice equazione 2x − 1 = 1 è un esempio di modalità “inline” La stessa semplice equazione 2x − 1 = 1 inserita anche in modalità “displayed” Questa semplice equazione $2x - 1 = 1$ e’ un esempio di modalita’ ‘‘inline’’ La stessa semplice equazione $$2x - 1 = 1$$ inserita anche in modalita’ ‘‘displayed’’ Lezione 2 24/39 V. Ferro
  • 58. Formule ed equazioni Simboli matematici — Qualche esempio + − < ... + - < ll ... α Γ ε... alpha Gamma epsilon varepsilon x2 xij x^2 x_{ij} cos exp ... cos exp n ∑ i=0 sum_{i=0}^{n} ∞ 0 ∞ 0 int_{0}^{infty} intlimits_{0}^{infty} lim x→0 lim_{x rightarrow 0} 1 c frac{1}{c} Esempio “inline” : ∑n i=0 Lezione 2 25/39 V. Ferro
  • 59. Formule ed equazioni Simboli matematici — Qualche esempio + − < ... + - < ll ... α Γ ε... alpha Gamma epsilon varepsilon x2 xij x^2 x_{ij} cos exp ... cos exp n ∑ i=0 sum_{i=0}^{n} ∞ 0 ∞ 0 int_{0}^{infty} intlimits_{0}^{infty} lim x→0 lim_{x rightarrow 0} 1 c frac{1}{c} Esempio “inline” : ∑n i=0 Lezione 2 25/39 V. Ferro
  • 60. Formule ed equazioni Frazioni frac e dfrac 1 x + 1 y y − z 1 x + 1 y y − z cfrac x = a0 + 1 a1 + 1 a2 + 1 a3 Lezione 2 26/39 V. Ferro
  • 61. Formule ed equazioni Frazioni frac e dfrac 1 x + 1 y y − z 1 x + 1 y y − z cfrac begin{equation*} x = a_0 + cfrac{1}{a_1 + cfrac{1}{a_2 + cfrac{1}{a_3}}} end{equation*} x = a0 + 1 a1 + 1 a2 + 1 a3 Lezione 2 26/39 V. Ferro
  • 62. Formule ed equazioni Parentesi ( x2 y3 ) x2 y3 Altre parentesi: left[ leftlbrace leftlangle N.B. Un comando left deve sempre essere “chiuso” da un comando right Lezione 2 27/39 V. Ferro
  • 63. Formule ed equazioni Parentesi ( x2 y3 ) x2 y3 begin{equation*} ( dfrac{x^2}{y^3} ) end{equation*} begin{equation*} left( dfrac{x^2}{y^3} right) end{equation*} Altre parentesi: left[ leftlbrace leftlangle N.B. Un comando left deve sempre essere “chiuso” da un comando right Lezione 2 27/39 V. Ferro
  • 64. Formule ed equazioni Parentesi ( x2 y3 ) x2 y3 begin{equation*} ( dfrac{x^2}{y^3} ) end{equation*} begin{equation*} left( dfrac{x^2}{y^3} right) end{equation*} Altre parentesi: left[ leftlbrace leftlangle N.B. Un comando left deve sempre essere “chiuso” da un comando right Lezione 2 27/39 V. Ferro
  • 65. Formule ed equazioni Equazioni su più righe E se abbiamo una equazione molto lunga? f (x) = 2π x10 + x9 + 3x8 + 2x7 + x6 − 3x5 + x4 + 7x3 + 2x2 + 10x + Lezione 2 28/39 V. Ferro
  • 66. Formule ed equazioni Equazioni su più righe Possiamo usare l’ambiente aling f (x) = 2π x11 − x10 + x9 + 3x8 + 2x7 + x6 − 3x5 + x4 + 7x3 +2x2 + 10x + 12 (1) begin{align} f(x) = 2 pi & left{x^{11} - x^{10} + x^9 right. nonumber & + 3x^8 + 2x^7 + x^6 nonumber & - 3x^5 + x^4 + 7x^3 nonumber & left. + 2x^2 + 10x + 12 right} end{align} Lezione 2 28/39 V. Ferro
  • 67. Formule ed equazioni Equazioni su più righe Possiamo usare l’ambiente aling f (x) = 2π x11 − x10 + x9 + 3x8 + 2x7 + x6 − 3x5 + x4 + 7x3 +2x2 + 10x + 12 (1) begin{align} f(x) = 2 pi &left{x^{11} - x^{10} + x^9 right. nonumber & + 3x^8 + 2x^7 + x^6 nonumber & - 3x^5 + x^4 + 7x^3 nonumber & left. + 2x^2 + 10x + 12 right} end{align} Lezione 2 28/39 V. Ferro
  • 68. Formule ed equazioni Equazioni su più righe - casi speciali Come scriviamo ΘH (n) = 0 se n < 0 1 se n ≥ 0 ? Lezione 2 29/39 V. Ferro
  • 69. Formule ed equazioni Equazioni su più righe - casi speciali Come scriviamo ΘH (n) = 0 se n < 0 1 se n ≥ 0 ? Possiamo usare l’ambiente array Si usa all’interno di un ambiente matematico E’ un comando generico che permette di fare anche altre cose begin{displaymath} Theta_H(n) = left{ begin{array}{lr} 0 & mbox{se } n < 0 1 & mbox{se } n geq 0 end{array} right. end{displaymath} Lezione 2 29/39 V. Ferro
  • 70. Formule ed equazioni Equazioni su più righe - casi speciali Come scriviamo ΘH (n) = 0 se n < 0 1 se n ≥ 0 ? Possiamo usare l’ambiente cases Si usa all’interno di un ambiente matematico E’ un comando specifico begin{displaymath} Theta_H(n) = begin{cases} 0 & mbox{se } n < 0 1 & mbox{se } n geq 0 end{cases} end{displaymath} Tips Con il pacchetto mathtools, esiste il comando dcase Lezione 2 29/39 V. Ferro
  • 71. Formule ed equazioni Equazioni su più righe - casi speciali Come scriviamo ΘH (n) = 0 se n < 0 1 se n ≥ 0 ? Possiamo usare l’ambiente cases Si usa all’interno di un ambiente matematico E’ un comando specifico begin{displaymath} Theta_H(n) = begin{cases} 0 & mbox{se } n < 0 1 & mbox{se } n geq 0 end{cases} end{displaymath} N.B. Inserto di testo in ambiente math = mbox oppure text Lezione 2 29/39 V. Ferro
  • 72. Formule ed equazioni Esempio di matrici Am,n =      a1,1 a1,2 · · · a1,n a2,1 a2,2 · · · a2,n ... ... ... ... am,1 am,2 · · · am,n      [ A_{m,n} = begin{pmatrix} a_{1,1} & a_{1,2} & cdots & a_{1,n} a_{2,1} & a_{2,2} & cdots & a_{2,n} vdots & vdots & ddots & vdots a_{m,1} & a_{m,2} & cdots & a_{m,n} end{pmatrix} ] Comandi: matrix = matrice senza parentesi, pmatrix = parentesi tonde, b/B/v/Vmatrix = matrice delimitata da [...], {...}, |...|, ||...|| Lezione 2 30/39 V. Ferro
  • 73. Formule ed equazioni Esempio di matrici Am,n =      a1,1 a1,2 · · · a1,n a2,1 a2,2 · · · a2,n ... ... ... ... am,1 am,2 · · · am,n      [ A_{m,n} = begin{pmatrix} a_{1,1} & a_{1,2} & cdots & a_{1,n} a_{2,1} & a_{2,2} & cdots & a_{2,n} vdots & vdots & ddots & vdots a_{m,1} & a_{m,2} & cdots & a_{m,n} end{pmatrix} ] Comandi: matrix = matrice senza parentesi, pmatrix = parentesi tonde, b/B/v/Vmatrix = matrice delimitata da [...], {...}, |...|, ||...|| Lezione 2 30/39 V. Ferro
  • 74. Formule ed equazioni Equazioni numerate singole M d2 dt2 x(t) + Kx(t) = 0 (2) begin{equation} label{eq:oscil_generalizzato} mathcal{M}frac{d^2}{dt^2}x(t)+mathcal{K}x(t)=0 end{equation} N.B. mathcal esempio di formattazione di stile testo in ambiente math Lezione 2 31/39 V. Ferro
  • 75. Formule ed equazioni Equazioni numerate singole M d2 dt2 x(t) + Kx(t) = 0 begin{equation*} label{eq:oscil_generalizzato} mathcal{M}frac{d^2}{dt^2}x(t)+mathcal{K}x(t)=0 end{equation*} N.B. mathcal esempio di formattazione di stile testo in ambiente math Lezione 2 31/39 V. Ferro
  • 76. Formule ed equazioni Equazioni numerate singole M d2 dt2 x(t) + Kx(t) = 0 begin{equation*} label{eq:oscil_generalizzato} mathcal{M}frac{d^2}{dt^2}x(t)+mathcal{K}x(t)=0 end{equation*} N.B. mathcal esempio di formattazione di stile testo in ambiente math Lezione 2 31/39 V. Ferro
  • 77. Formule ed equazioni Equazioni numerate raggruppate |r = |x, y, z ≡ |r, θ, φ (2) r| = x, y, z| ≡ r, θ, φ| r | r = ∞ 0 r2 dr π 0 sin θdθ 2π 0 φdφ r | r r | r (3) begin{eqnarray} ket{vec{r}}&=&ket{x,y,z} equiv ket{r,theta,phi} label{eq:ket} bra{vec{r}}&=&bra{x,y,z} equiv bra{r,theta,phi} nonumber pr{vec{r},’’}{vec{r},’} &=& int_0^infty r^2 dr int_0^pi sin theta d theta int_0^{2pi} phi d phi pr{vec{r},’’}{vec{r}} pr{vec{r}}{vec {r},’} label{eq:delta} end{eqnarray} E se non avessi soluto numerare nessuna equazione? → Esatto! Inserisco * Spoiler: i comandi ket e bra non sono definiti in amsmath!! Vedremo come scriverli la prossima lezione Lezione 2 32/39 V. Ferro
  • 78. Formule ed equazioni Equazioni numerate raggruppate |r = |x, y, z ≡ |r, θ, φ (2) r| = x, y, z| ≡ r, θ, φ| r | r = ∞ 0 r2 dr π 0 sin θdθ 2π 0 φdφ r | r r | r (3) begin{eqnarray} ket{vec{r}}&=&ket{x,y,z} equiv ket{r,theta,phi} label{eq:ket} bra{vec{r}}&=&bra{x,y,z} equiv bra{r,theta,phi} nonumber pr{vec{r},’’}{vec{r},’} &=& int_0^infty r^2 dr int_0^pi sin theta d theta int_0^{2pi} phi d phi pr{vec{r},’’}{vec{r}} pr{vec{r}}{vec {r},’} label{eq:delta} end{eqnarray} E se non avessi soluto numerare nessuna equazione? → Esatto! Inserisco * Spoiler: i comandi ket e bra non sono definiti in amsmath!! Vedremo come scriverli la prossima lezione Lezione 2 32/39 V. Ferro
  • 79. Formule ed equazioni Equazioni numerate raggruppate |r = |x, y, z ≡ |r, θ, φ (2) r| = x, y, z| ≡ r, θ, φ| r | r = ∞ 0 r2 dr π 0 sin θdθ 2π 0 φdφ r | r r | r (3) begin{eqnarray} ket{vec{r}}&=&ket{x,y,z} equiv ket{r,theta,phi} label{eq:ket} bra{vec{r}}&=&bra{x,y,z} equiv bra{r,theta,phi} nonumber pr{vec{r},’’}{vec{r},’} &=& int_0^infty r^2 dr int_0^pi sin theta d theta int_0^{2pi} phi d phi pr{vec{r},’’}{vec{r}} pr{vec{r}}{vec {r},’} label{eq:delta} end{eqnarray} E se non avessi soluto numerare nessuna equazione? → Esatto! Inserisco * Spoiler: i comandi ket e bra non sono definiti in amsmath!! Vedremo come scriverli la prossima lezione Lezione 2 32/39 V. Ferro
  • 80. Formule ed equazioni Equazioni numerate raggruppate |r = |x, y, z ≡ |r, θ, φ (2) r| = x, y, z| ≡ r, θ, φ| r | r = ∞ 0 r2 dr π 0 sin θdθ 2π 0 φdφ r | r r | r (3) begin{eqnarray} ket{vec{r}}&=&ket{x,y,z} equiv ket{r,theta,phi} label{eq:ket} bra{vec{r}}&=&bra{x,y,z} equiv bra{r,theta,phi} nonumber pr{vec{r},’’}{vec{r},’} &=& int_0^infty r^2 dr int_0^pi sin theta d theta int_0^{2pi} phi d phi pr{vec{r},’’}{vec{r}} pr{vec{r}}{vec {r},’} label{eq:delta} end{eqnarray} E se non avessi soluto numerare nessuna equazione? → Esatto! Inserisco * Spoiler: i comandi ket e bra non sono definiti in amsmath!! Vedremo come scriverli la prossima lezione Lezione 2 32/39 V. Ferro
  • 81. Formule ed equazioni Equazioni numerate raggruppate |r = |x, y, z ≡ |r, θ, φ (2) r| = x, y, z| ≡ r, θ, φ| r | r = ∞ 0 r2 dr π 0 sin θdθ 2π 0 φdφ r | r r | r (3) begin{eqnarray} ket{vec{r}}&=&ket{x,y,z} equiv ket{r,theta,phi} label{eq:ket} bra{vec{r}}&=&bra{x,y,z} equiv bra{r,theta,phi} nonumber pr{vec{r},’’}{vec{r},’} &=& int_0^infty r^2 dr int_0^pi sin theta d theta int_0^{2pi} phi d phi pr{vec{r},’’}{vec{r}} pr{vec{r}}{vec {r},’} label{eq:delta} end{eqnarray} E se non avessi soluto numerare nessuna equazione? → Esatto! Inserisco * Spoiler: i comandi ket e bra non sono definiti in amsmath!! Vedremo come scriverli la prossima lezione Lezione 2 32/39 V. Ferro
  • 82. Formule ed equazioni Unità di misura SI Richiede: siunitx (e tanti altri.. vedi documentazione ) Senza siunitx 0.51MeV /c2 0 Con siunitx 0.51 MeV/c0 2 si[per-mode=symbol]{megaelectronvoltperclight^2} si{megaelectronvoltperclight^2} si{MeV.clight^{-2}} Si può utilizzare sia in ambiente math che fuori Lezione 2 33/39 V. Ferro
  • 83. Outline 1 Ambienti “fluttuanti” 2 Figure Figura nel flusso del testo Più figure insieme 3 Tabelle Colonne e righe multiple Migliorarne l’aspetto 4 Formule matematiche Ambienti matematici Simboli matematici Array e matrici Equazioni numerate unità SI 5 Riferimenti 6 Immagini e tabelle in un documento Lezione 2 34/39 V. Ferro
  • 84. Riferimenti Finalmente quel famoso label... Lezione 2 35/39 V. Ferro
  • 86. Riferimenti Esempi ed utilizzi ref L’eq. ref{eq:ket} L’eq. 2 eqref L’eq. eqref{eq:ket} L’eq. (2) pageref L’eq. a pag. pageref{eq:ket} L’eq. a pag. 77 Semplicemente aggiungendo il pacchetto hyperref, tutti i riferimenti vengono convertiti in link nel pdf!!! Lezione 2 36/39 V. Ferro
  • 87. Riferimenti Esempi ed utilizzi ref L’eq. ref{eq:ket} L’eq. 2 eqref L’eq. eqref{eq:ket} L’eq. (2) pageref L’eq. a pag. pageref{eq:ket} L’eq. a pag. 77 Semplicemente aggiungendo il pacchetto hyperref, tutti i riferimenti vengono convertiti in link nel pdf!!! Lezione 2 36/39 V. Ferro
  • 88. Outline 1 Ambienti “fluttuanti” 2 Figure Figura nel flusso del testo Più figure insieme 3 Tabelle Colonne e righe multiple Migliorarne l’aspetto 4 Formule matematiche Ambienti matematici Simboli matematici Array e matrici Equazioni numerate unità SI 5 Riferimenti 6 Immagini e tabelle in un documento Lezione 2 37/39 V. Ferro
  • 89. Figure e tabelle List of... Ancora una volta solo due semplici comandi begin{document} maketitle tableofcontents listoffigures listoftables ... Lezione 2 38/39 V. Ferro
  • 90. Figure e tabelle List of... Ancora una volta solo due semplici comandi begin{document} maketitle tableofcontents listoffigures listoftables ... Elenco delle figure 1.1 Roound Door . . . . . . . . . . . . . . . . 6 1.2 Bilbo Baggins . . . . . . . . . . . . . . . . 8 2 Elenco delle tabelle 1.1 Caratteristiche di un hobbit . . . . . . . . 9 3 Lezione 2 38/39 V. Ferro
  • 91. Grazie dell’attenzione! Expand (a + b)n: (a + b)n (a + b)n (a + b)n (a + b)n Expand $(a+b)^n$: begin{gather∗} (a + b)^n (a + b)^n (aquad + quad b)^n (aqquad + qquad b)^n end{gather∗} Lezione 2 39/39 V. Ferro