-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathLezione_4.tex
1271 lines (1259 loc) · 44.7 KB
/
Lezione_4.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% GuIT - Gruppo Italiano Utilizzatori di TeX %
% %
% M. Himmelmann, E. Vavassori, F. Busdraghi %
% %
% --- Introduzione al mondo di LaTeX --- %
% Versione 1.1 %
% %
% Questo materiale è rilasciato sotto licenza CCPL 2.5 %
% Consultare la documentazione allegata per maggiori dettagli %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% vim:sts=2:ts=2:tw=70
\documentclass[svgnames,%
ucs,% Serve per l'encoding UTF8
pdftex]{guitbeamer}
\usepackage[utf8x]{inputenc}
\graphicspath{{img/}}
\usepackage{setspace,textcomp}
% pacchetti necessari per le slide
\usepackage{rotating}
% esempio del testo rotante
\newcounter{wang}
\newlength{\wangspace}
\newsavebox{\wangtext}
\newcommand{\wheel}[1]{%
\savebox{\wangtext}{#1}%
\settowidth{\wangspace}{#1}
\addtolength{\wangspace}{1cm}
\centerline{%
\rule{0pt}{\wangspace}%
\rule[-\wangspace]{0pt}{%
\wangspace}%
\setcounter{wang}{-180}%
\whiledo{%
\value{wang} < 180}{%
\rlap{\begin{rotate}{%
\value{wang}}
\rule{1cm}{0pt}#1%
\end{rotate}}
\addtocounter{wang}{10}}}}
\singlespacing
% Titolo del corso, autore, data
\title{Introduzione al mondo di \LaTeX}
\author[Maurizio W.\,Himmelmann]{Maurizio W.\,Himmelmann}
\date{12 dicembre 2008} % qui ci va anche l'evento
% Si comincia :)
\begin{document}
% Pagina del titolo
\frame{\titlepage}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Guide consigliate}
\begin{thebibliography}{Fer66}
\bibitem [GC05]{CAS}
Caschili, Massimo.
\newblock\textit{Semplici Figure con l'Ambiente Picture}.
\newblock Ars\TeX nica, 1/2006
\bibitem [TT04]{TAN}
Tantau, Till.
\newblock\textit{User's Guide to the Beamer Class}.
\newblock
{\small\url{http://latex-beamer.sourceforce.net/}}
\end{thebibliography}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Piano della presentazione}
\tableofcontents
\end{frame}
%-----------------------------------------------------------
%------------------------------------------------- SECTION -
\section{Figure ed immagini}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Figure ed immagini}
\LaTeX prevede sia la possibilit\`a di produrre figure per proprio conto che di inserire figure esterne prodotte da altri programmi. In quest'ultimo caso si segue una metodica diversa dai comuni editor WYSIWYG:
\begin{itemize}
\item le figure rimangono in \emph{file separati}, cio\`e la figura non va ``incollata'' nel documento ma \`e sufficiente scrivere un collegamento ad essa.\\
\end{itemize}
Risulta quindi conveniente:
\begin{itemize}
\item creare nella directory di lavoro una cartella \LCmd[]{img}
\item salvare in questa directory tutti i file da inserire nel nostro documento finale.
\end{itemize}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Vantaggi e svantaggi}
Vantaggi:
\begin{itemize}
\item se i contenuti delle figure vegono cambiati \`e sufficiente sostituire i file e ricompilare. Il nuovo documento generato avr\`a tutte le figure aggiornate
\item la procedura \`e molto stabile e non crea brutte sorprese
\end{itemize}
Svantaggi:
\begin{itemize}
\item serve un minimo di esperienza per una piena padronanza del meccanismo
\item richiede l'uso di programmi in grado di lavorare in modo sinergico con \LaTeX
\end{itemize}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Estensioni supportate}
Esistono due principali tipi di figure:\\
\bigskip
Vettoriali (generalmente indicate per i grafici)
\begin{itemize}
\item \Lopt{.pdf} (portable document file)
\item \Lopt{.eps} (encapsulated postcript)
\item \Lopt{.ps} (postcript)
\end{itemize}
\bigskip
Bitmap (generalmente indicate per immagini)
\begin{itemize}
\item \Lopt{.png} (portable network graphics)
\item \Lopt{.jpeg} o \Lopt{.jpg} (joint photographic experts group)
\item \Lopt{.tiff} o \Lopt{.tif} (tagged image file format)
\end{itemize}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Estensioni supportate}
pdf\LaTeX\ supporta direttamente file con le seguenti estensioni:
\begin{itemize}
\item \Lopt{.pdf} (portable document file)
\item \Lopt{.png} (portable network graphics)
\item \Lopt{.jpeg} (encapsulated postcript)
\item \Lopt{.tiff} (tagged image file format)
\end{itemize}
\medskip
Gli altri formati (\LCmd[]{.eps}, \LCmd[]{.ps}) andranno convertiti in \LCmd[]{.pdf} se non si vorr\`a usare un differente compilatore.
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\subsection{Il pacchetto graphicx}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{L'oggetto del nostro gioco}
\begin{center}
\includegraphics[]{lion}\\
\texttt{lion.png}
\end{center}
\onslide<2->
\begin{block}{Attenzione!}
\`E necessario caricare il pacchetto \Lsty{graphicx} (con l'opzione \LCmd[]{pdftex} nel caso in cui si usi pdf\LaTeX\ come compilatore)
\end{block}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Il pachetto \texttt{graphicx}}
\begin{LaTeXcode}
\\includegraphics\{lion\}
\end{LaTeXcode}
\begin{center}
\includegraphics[]{lion}
\end{center}
\onslide<2->
\begin{block}{Il bello di \LaTeX}
\`E consigliabile non specificare l'estensione del file
\end{block}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Il pachetto \texttt{graphicx}}
\`E possibile indicare nel preambolo una specifica cartella dove sono contenute tutte le figure utilizzate all'interno del documento
\begin{LaTeXcode}
\alert{\\graphicspath\{\{}<path>\alert{\}\}}
\end{LaTeXcode}
Alternativamente \`e possibile specificarlo singolarmente all'interno di ogni singolo \LCmd{includegraphics}
\begin{LaTeXcode}
\\includegraphics\{\alert{<path>}lion\}
\end{LaTeXcode}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Un esempio vale pi\`u di mille figure}
\begin{center}
\alert{\texttt{esempio\_4\_1.tex}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Il pachetto \texttt{graphicx}}
\begin{LaTeXcode}
\alert{\\fbox\{}\\includegraphics\{lion\}\alert{\}}
\end{LaTeXcode}
\begin{center}
\fbox{\includegraphics[]{lion}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Il pachetto \texttt{graphicx}}
\begin{LaTeXcode}
\\includegraphics\alert{[scale=0.5]}\{lion\}
\end{LaTeXcode}
\begin{center}
\includegraphics[scale=0.5]{lion}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Il pachetto \texttt{graphicx}}
\begin{LaTeXcode}
\\includegraphics\alert{[scale=1.5]}\{lion\}
\end{LaTeXcode}
\begin{center}
\includegraphics[scale=1.5]{lion}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Il pachetto \texttt{graphicx}}
\begin{LaTeXcode}
\\includegraphics\alert{[width=20mm]}\{lion\}
\end{LaTeXcode}
\begin{center}
\includegraphics[width=20mm]{lion}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Il pachetto \texttt{graphicx}}
\begin{LaTeXcode}
\\includegraphics\alert{[width=20mm, height=40mm]}\{lion\}
\end{LaTeXcode}
\begin{center}
\includegraphics[width=20mm, height=40mm]{lion}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Il pachetto \texttt{graphicx}}
\begin{LaTeXcode}
\\includegraphics\alert{[width=20mm, height=40mm,}\n
\alert{keepaspectratio]}\{lion\}
\end{LaTeXcode}
\begin{center}
\includegraphics[width=20mm, height=40mm, keepaspectratio]{lion}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Il pachetto \texttt{graphicx}}
\begin{LaTeXcode}
\\includegraphics\alert{[angle=-45]}\{lion\}
\end{LaTeXcode}
\begin{center}
\includegraphics[angle=-45]{lion}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Il pachetto \texttt{graphicx}}
\begin{LaTeXcode}
\\includegraphics\alert{[angle=-45, width=40mm]}\{lion\}
\end{LaTeXcode}
\begin{center}
\includegraphics[angle=-45, width=40mm]{lion}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Il pachetto \texttt{graphicx}}
\begin{LaTeXcode}
\alert{\\fbox\{}\\includegraphics[angle=-45, width=40mm]\{lion\}\alert{\}}
\end{LaTeXcode}
\begin{center}
\fbox{\includegraphics[angle=-45, width=40mm]{lion}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Il pachetto \texttt{graphicx}}
\begin{LaTeXcode}
\\includegraphics\alert{[angle=-60, totalheight=40mm, width=30mm]}\{lion\}
\end{LaTeXcode}
\begin{center}
\includegraphics[angle=-60, totalheight=40mm, width=30mm]{lion}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Il pachetto \texttt{graphicx}}
\begin{LaTeXcode}
\alert{\\fbox\{}\\includegraphics[angle=-60, totalheight=40mm, width=30mm]\{lion\}\alert{\}}
\end{LaTeXcode}
\begin{center}
\fbox{\includegraphics[angle=-60, totalheight=40mm, width=30mm]{lion}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Il pachetto \texttt{graphicx}}
\begin{LaTeXcode}
\\includegraphics\alert{[draft]}\{lion\}
\end{LaTeXcode}
\begin{center}
\includegraphics[draft]{lion}
\end{center}
\end{frame}
%-----------------------------------------------------------
%---------------------------------------------- SUBSECTION -
\subsection{Boundingbox}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{A che punto siamo}
\tableofcontents[currentsection,currentsubsection]
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{\textit{Boundingbox}}
I \textit{boundingbox} permettono di ritagliare o modificare a nostra discrezioni i margini di un'immagine.\\
\medskip
Se la figura \`e fatta bene (scritta bene da programma che la produce) non \`e necessario specificarli nel file \LaTeX
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{\textit{Boundingbox}}
\begin{center}% I commenti alla fine della riga sono importanti!
\includegraphics<1>[width=.9\textwidth]{boundingbox_1}%
\includegraphics<2>[width=.9\textwidth]{boundingbox_2}%
\includegraphics<3>[width=.9\textwidth]{boundingbox_3}%
\includegraphics<4>[width=.9\textwidth]{boundingbox_4}%
\includegraphics<5>[width=.9\textwidth]{boundingbox_5}%
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{\textit{Boundingbox}}
I \textit{boundingbox} sono specificati all'interno del campo delle opzioni
\begin{LaTeXcode}
\\includegraphics[\alert{bb= LLX LLY URX URY}]\{lion\}
\end{LaTeXcode}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{\textit{Boundingbox}}
\begin{center}
\includegraphics[width=.6\textwidth]{boundingbox_6}
\end{center}
\begin{LaTeXcode}
\\includegraphics[bb= \alert{LLX LLY} URX URY]\{lion\}
\end{LaTeXcode}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{\textit{Boundingbox}}
\begin{center}
\includegraphics[width=.6\textwidth]{boundingbox_7}
\end{center}
\begin{LaTeXcode}
\\includegraphics[bb= LLX LLY \alert{URX URY}]\{lion\}
\end{LaTeXcode}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{\textit{Boundingbox}}
\begin{LaTeXcode}
\\fbox\{\\includegraphics\alert{[bb= 0 0 100 120]}\{lion\}\}
\end{LaTeXcode}
\begin{center}
\fbox{\includegraphics[bb= 0 0 100 120]{lion}}
\end{center}
In questa immagine i boundingbox corrispondono con le sue dimensioni (in punti)
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{\textsl{Boundingbox}}
\begin{LaTeXcode}
\\includegraphics[bb= 0 0 100 \alert{200}]\{lion\}
\end{LaTeXcode}
\begin{center}
\includegraphics[bb= 0 0 100 200]{lion}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{\textsl{Boundingbox}}
\begin{LaTeXcode}
\alert{\\fbox\{}\\includegraphics[bb= 0 0 100 \alert{200}]\{lion\}\alert{\}}
\end{LaTeXcode}
\begin{center}
\fbox{\includegraphics[bb= 0 0 100 200]{lion}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{\textsl{Boundingbox}}
\begin{LaTeXcode}
\\fbox\{\\includegraphics[bb= 0 0 100 \alert{50}]\{lion\}\}
\end{LaTeXcode}
\begin{center}
\fbox{\includegraphics[bb= 0 0 100 50]{lion}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{\textsl{Boundingbox}}
\begin{LaTeXcode}
\\fbox\{\\includegraphics[bb= 0 0 100 50, \alert{clip}]\{lion\}\}
\end{LaTeXcode}
\begin{center}
\fbox{\includegraphics[bb= 0 0 100 50,clip]{lion}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{\textit{Boundingbox} negativi}
\begin{LaTeXcode}
\\fbox\{\\includegraphics\alert{[bb= -50 -50 100 120]}\{lion\}\}
\end{LaTeXcode}
\begin{center}
\fbox{\includegraphics[bb= -50 -50 100 120]{lion}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{\textit{Boundingbox}}
\begin{LaTeXcode}
\\fbox\{\\includegraphics\alert{[bb= 0 0 100 120, scale=.5]}\n
\{lion\}\}
\end{LaTeXcode}
\begin{center}
\fbox{\includegraphics[bb= 0 0 100 120, scale=.5]{lion}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Un esempio vale pi\`u di mille figure}
\begin{center}
\alert{\texttt{esempio\_4\_2.tex}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%---------------------------------------------- SUBSECTION -
\subsection{Ambiente figure}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{A che punto siamo}
\tableofcontents[currentsection,currentsubsection]
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{L'ambiente \texttt{figure}}
\begin{LaTeXcode}
\alert{\\begin\{figure\}[htb]}\n
\hspace*{5ex}\\centering\n
\hspace*{5ex}\\includegraphics[scale=.5]\{lion\}\n
\hspace*{5ex}\\caption\{La mascotte di \TeX\}\\label\{lion\}\n
\alert{\\end\{figure\}}
\end{LaTeXcode}
\begin{figure}[h]
\centering
\includegraphics[scale=.5]{lion}
\caption{La mascotte di \TeX}\label{lion}
\end{figure}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Un esempio vale pi\`u di mille figure}
\begin{center}
\alert{\texttt{esempio\_4\_3.tex}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Uso di \texttt{scalebox}}
\begin{LaTeXcode}
\\scalebox\{\alert{3}\}\{\\TeX\\ \ non \`e Tex!\}
\end{LaTeXcode}
\begin{block}{}
\rmfamily
\scalebox{3}{\TeX\ non \`e Tex!}
\end{block}
\bigskip
\begin{block}{Il bello di \LaTeX}<2->
Ma non dimentichiamoci che ai matematici (Knuth) piace molto giocare coi numeri
\end{block}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Uso di \texttt{scalebox}}
\begin{LaTeXcode}
\\scalebox\{\alert{-3}\}\{\\TeX\\ \ non \`e Tex!\}
\end{LaTeXcode}
\begin{LaTeXoutput}
\scalebox{-3}{\TeX\ non \`e Tex!}
\end{LaTeXoutput}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Uso di \texttt{scalebox}}
\begin{LaTeXcode}
\\scalebox\{-3\}\alert{[1.5]}\{\\TeX\\ \ non \`e Tex!\}
\end{LaTeXcode}
\begin{LaTeXoutput}
\scalebox{-3}[1.5]{\TeX\ non \`e Tex!}
\end{LaTeXoutput}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Uso di \texttt{reflectbox}}
\begin{LaTeXcode}
\\reflectbox\{\\TeX\\ \ non \`e Tex!\}
\end{LaTeXcode}
\begin{LaTeXoutput}
\reflectbox{\TeX\ non \`e Tex!}
\end{LaTeXoutput}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Usandoli entrambi\dots}
\begin{LaTeXcode}
\\reflectbox\{\\scalebox\{-3\}\{\\TeX\\ \ non \`e Tex!\}\}
\end{LaTeXcode}
\begin{LaTeXoutput}
\reflectbox{\scalebox{-3}{\TeX\ non \`e Tex!}}
\end{LaTeXoutput}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Uso di \texttt{rotating}}
\wheel{fatelo con Word!}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Uso di \texttt{scalebox}}
\begin{LaTeXcode}
\\scalebox\{-1\}\{\\includegraphics\{lion\}\}
\end{LaTeXcode}
\begin{center}
\scalebox{-1}{\includegraphics{lion}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Uso di \texttt{reflectbox}}
\begin{LaTeXcode}
\\reflectbox\{\\includegraphics\{lion\}\}
\end{LaTeXcode}
\begin{center}
\reflectbox{\includegraphics{lion}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%---------------------------------------------- SUBSECTION -
\subsection{Ambiente picture}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{A che punto siamo}
\tableofcontents[currentsection,currentsubsection]
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Produrre grafici con \LaTeX}
\LaTeX\ prevede la possibilit\`a di disegnare grafici di eccellente qualit\`a. Questa procedura tuttavia non \`e di immediata esecuzione e richiede un approfondimento che trascende gli obiettivi del corso.\newline
\medskip
Segue esempio delle potenzialit\`a offerte dalla metodica
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Produrre grafici con \LaTeX}
\begin{LaTeXcode}
\small
\\setlength\{\\unitlength\}\{0.15mm\}\n
\\begin\{picture\}(220,140)(-25,0)\n
\hspace*{5ex}\\put(0,0)\{\\thicklines \\framebox(100,100)\{\}\}\n
\hspace*{5ex}\\put(-1.5,105)\{\\line(0,1)\{16\}\}\n
\hspace*{5ex}\\put(101.2,105)\{\\line(0,1)\{16\}\}\n
\hspace*{5ex}\\put(105,101.2)\{\\line(1,0)\{16\}\}\n
\hspace*{5ex}\\put(105,-1.5)\{\\line(1,0)\{16\}\}\n
\hspace*{5ex}\\put(50,113)\{\\vector(1,0)\{50\}\}\n
\hspace*{5ex}\\put(50,113)\{\\vector(-1,0)\{50\}\}\n
\hspace*{5ex}\\put(113,50)\{\\vector(0,1)\{50\}\}\n
\hspace*{5ex}\\put(113,50)\{\\vector(0,-1)\{50\}\}\n
\hspace*{5ex}\\put(50,126)\{\\scriptsize \\makebox(0,0)\{\$x\$\}\}\n
\hspace*{5ex}\\put(126,50)\{\\scriptsize \\makebox(0,0)\{\$x\$\}\}\n
\hspace*{5ex}\\put(190,50)\{\\small \$\\textrm\{Area\}= x\textasciitilde2\$\}\n
\\end\{picture\}
\end{LaTeXcode}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Produrre grafici con \LaTeX}
\begin{LaTeXoutput}
\centering
\setlength{\unitlength}{0.15mm}
\begin{picture}(220,140)(-25,0)
\put(0,0){\thicklines \framebox(100,100){}}
\put(-1.5,105){\line(0,1){16}}
\put(101.2,105){\line(0,1){16}}
\put(105,101.2){\line(1,0){16}}
\put(105,-1.5){\line(1,0){16}}
\put(50,113){\vector(1,0){50}}
\put(50,113){\vector(-1,0){50}}
\put(113,50){\vector(0,1){50}}
\put(113,50){\vector(0,-1){50}}
\put(50,126){\scriptsize \makebox(0,0){$x$}}
\put(126,50){\scriptsize \makebox(0,0){$x$}}
\put(190,50){\small $\textrm{Area}= x^2$}
\end{picture}
\end{LaTeXoutput}
\onslide<2->
\begin{block}{Il bello di \LaTeX}
L'uso di programmi come Gnuplot o Xfig riducono drasticamente i tempi di esecuzione, permettendo di ottenere un output scritto direttamente in codice \LaTeX.
\end{block}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Produrre grafici con \texttt{Sketch}}
\centering
\includegraphics[height=.8\textheight]{tikz}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Un esempio vale pi\`u di mille figure}
\begin{center}
\alert{\texttt{esempio\_4\_4.tex}}\\
\alert{\texttt{figura\_1.fig}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%------------------------------------------------- SECTION -
\section{Videoproiezioni}
%-----------------------------------------------------------
%---------------------------------------------- SUBSECTION -
\subsection[Linee guida]{Linee guida per le videoproiezioni}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{A che punto siamo}
\tableofcontents[currentsection,currentsubsection]
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Videoproiezioni}
\LaTeX\ prevede la possibilit\`a di creare delle presentazioni a video (\textit{slides}) con eccellenti caratteristiche di funzionalit\`a e gradevolezza\\
\bigskip
Le Classi di \LaTeX\ per videoproiezioni sono:
\begin{itemize}
\item Beamer (argomento di questa lezione)
\item Pdfscreen
\item \TeX Power
\item Prosper
\item HA-Prosper
\item Seminar
\end{itemize}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Linee guida per le videoproiezioni}
Alcune regole per realizzare videoproiezioni:\\
\begin{itemize}
\item evitare di presentare pi\`u di una slide a minuto
\item inserire solo quello che sar\`a adeguatamente commentato
\item non preparare pi\`u slide di quanto il tempo a disposizione non permetta
\end{itemize}
\onslide<2->
\begin{block}{Attenzione!}
Le videoproiezioni \emph{non} sono documenti
\onslide<3->
\newline
e questo vale sia per la comunicazione che per la didattica
\end{block}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Linee guida per le videoproiezioni}
Inoltre\dots
\begin{itemize}
\item organizzare la presentazione in sezioni e sottosezioni (mai meno di due e mai pi\`u di quattro)
\item usare le animazioni solo se strettamente necessario
\item usare solo frasi brevi
\item usare sempre stesso layout per testo e figure
\item usare dei colori testo/sfondo complementari
\item evitare caratteri piccoli (``\textit{cos\`i entra pi\`u testo}'')
\item preferire font sans-serif al \textrm{serif}
\item evitare il rientro all'inizio della frase
\item sopratutto: \textit{keep it simple!}
\end{itemize}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Come \textbf{non} presentare}
\begin{center}
\alert{\texttt{esempio\_4\_5\_a.ppt}}\\
\alert{\texttt{esempio\_4\_5\_b.ppt}}\\
\alert{\texttt{esempio\_4\_5\_c.ppt}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%---------------------------------------------- SUBSECTION -
\subsection{Sintassi di base}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{A che punto siamo}
\tableofcontents[currentsection,currentsubsection]
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Il modello di un documento}
\begin{LaTeXcode}
\\documentclass\{\alert{beamer}\}\n
\onslide<2->
\\usetheme\{\alert{<nome-tema>}\}\n
\onslide<3>
\\usepackage[<argomenti-opz>]\{<nome-package>\}\n
\onslide<4->
\smallskip
\\begin\{document\}\n
\onslide<5->
\hspace*{5ex}\\begin\{\alert{frame}\}\n
\onslide<6->
\hspace*{10ex}\\frametitle\{\alert{<titolo-slide>}\}\n
\hspace*{15ex}\alert{<testo della slide>}\n
\onslide<5->
\hspace*{5ex}\\end\{\alert{frame}\}\n
\onslide<7->
\hspace*{10ex}\vdots\n
\onslide<4->
\smallskip
\\end\{document\}
\end{LaTeXcode}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
% \begin{frame}
% \frametitle{Le opzioni di }
% \begin{LaTeXcode}
% \\documentclass[\alert{<argomenti-opz>}]\{beamer\}
% \end{LaTeXcode}
% \begin{itemize}
% \item \Lopt{draft}, compila solo una bozza
% \item \Lopt{pdftex},
% \item \dots
% \end{itemize}
% \end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{La pagina del titolo}
Nel preambolo:
\begin{LaTeXcode}
\\title\{\alert{<titolo-esteso>}\}\n
% \\subtitle\{\alert{<sottotitolo>}\}\n
\\author\{\alert{<nome-autore>}\}\n
% \\institute\{\alert{<nome-universit\`a>}\}\n
\\date\{\alert{<data>}\}
\end{LaTeXcode}
\onslide<2->
Come prima slide:
\begin{LaTeXcode}
\\begin\{frame\}\n
\hspace*{5ex}\alert{\\maketitle}\n
\\end\{frame\}
\end{LaTeXcode}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Un esempio vale pi\`u di mille slide}
\begin{center}
\alert{\texttt{esempio\_4\_6.tex}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{I temi di Beamer}
\`E possibile modificare il layout della presentazione semplicemente specificando nel preambolo:
\begin{LaTeXcode}
\\usetheme\{\alert{<nome-tema>}\}
\end{LaTeXcode}
I temi hanno prevalentemente nomi di citt\`a:
\begin{itemize}
\item \Lopt{Madrid}
\item \Lopt{Berkeley}
\item \Lopt{Goettingen}
\item \Lopt{Marburg}
\item \dots
\end{itemize}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{I temi interni di Beamer}
Beamer prevede anche la possibilit\`a di personalizzare l'aspetto degli elenchi puntati e numerati. Nel preambolo va inserito:
\begin{LaTeXcode}
\\useinnertheme\{\alert{<nome-tema>}\}
\end{LaTeXcode}
Gli schemi di colori hanno prevalentemente nomi delle corrispettive forme geometriche o soluzioni di visualizzazione:
\begin{itemize}
\item \Lopt{circles}
\item \Lopt{rectangles}
\item \Lopt{rounded}
\item \Lopt{inmargin}
\item \dots
\end{itemize}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Schemi di colori}
\`E possibile scegliere tra diversi schemi di colore
\begin{LaTeXcode}
\\usecolortheme\{\alert{<nome-tema>}\}
\end{LaTeXcode}
Gli schemi di colori hanno prevalentemente nomi di animali:
\begin{itemize}
\item \Lopt{albatross}
\item \Lopt{crane}
\item \Lopt{seagull}
\item \Lopt{whale}
\item \dots
\end{itemize}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Un esempio vale pi\`u di mille slide}
\begin{center}
\alert{\texttt{esempio\_4\_7.tex}}
\end{center}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{La pagina dell'indice}
Analogamente con qualsiasi altro documento l'indice si richiama con il comando \LCmd{tableofcontents}
\begin{LaTeXcode}
\\begin\{frame\}\n
\\frametitle\{Piano della presentazione\}\n
\hspace*{5ex}\alert{\\tableofcontents}\n
\\end\{frame\}
\end{LaTeXcode}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{La bibliografia}
La realizzazione della bibliografia segue schemi gi\`a sperimentati per la realizzazione di un qualunque altro documento
\begin{LaTeXcode}
\\begin\{frame\}\n
\\frametitle\{Bibliografia\}\n
\hspace*{5ex}\alert{\\begin\{thebibliography\}\{\}}\n
\hspace*{15ex} \vdots\n
\hspace*{5ex}\alert{\\end\{thebibliography\}}\n
\\end\{frame\}
\end{LaTeXcode}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Elenchi numerati}
Con Beamer \`e possibile far scorrere in successione tutti i punti di una lista
\begin{LaTeXcode}
\\begin\{itemize\}\n
\hspace*{5ex}\\item\alert{<1->} Giovannona Coscialunga\n
\hspace*{5ex}\\item\alert{<2->} L'Esorciccio\n
\hspace*{5ex}\\item\alert{<3->} La Polizia s'incazza\n
\\end\{itemize\}
\end{LaTeXcode}
\onslide<2->
\begin{block}{}
\begin{itemize}
\item<3-> Giovannona Coscialunga%
\item<4-> L'Esorciccio%
\item<5-> La Polizia s'incazza%
\end{itemize}
\end{block}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Elenchi numerati}
Un metodo alternativo \`e il seguente:
\begin{LaTeXcode}
\\begin\{itemize\}\alert{<+->}\n
\hspace*{5ex}\\item Giovannona Coscialunga\n
\hspace*{5ex}\\item L'Esorciccio\n
\hspace*{5ex}\\item La Polizia s'incazza\n
\\end\{itemize\}
\end{LaTeXcode}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Elenchi numerati evidenziati}
Con l'opzione \LCmd[]{<+-| alert@+>} il punto attivo appare evidenziato
\begin{LaTeXcode}
\\begin\{itemize\}\alert{[<+-| alert@+>]}\n
\hspace*{5ex}\\item Giovannona Coscialunga\n
\hspace*{5ex}\\item L'Esorciccio\n
\hspace*{5ex}\\item La Polizia s'incazza\n
\\end\{itemize\}
\end{LaTeXcode}
\onslide<2->
\begin{block}{}
\begin{itemize}[<+-| alert@+>]
\item Giovannona Coscalunga
\item L'Esorciccio
\item La Polizia s'incazza
\end{itemize}
\end{block}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Grafici}
Per realizzare una sequenza di grafici useremo l'opzione \Lopt{<n>}
\begin{LaTeXcode}
\\includegraphics\alert{<1>}\{lion\_1.png\}\n
\\includegraphics\alert{<2>}\{lion\_2.png\}\n
\\includegraphics\alert{<3>}\{lion\_3.png\}
\end{LaTeXcode}
\begin{LaTeXoutput}
\includegraphics<1>{lion_1.png}%
\includegraphics<2>{lion_2.png}%
\includegraphics<3>{lion_3.png}%
\end{LaTeXoutput}
\end{frame}
%-----------------------------------------------------------
%--------------------------------------------------- SLIDE -
\begin{frame}
\frametitle{Grafici}
Per realizzare una successione di grafici useremo l'opzione \Lopt{<n->}
\begin{LaTeXcode}