Commenti:Suggerimenti per utilizzare LaTeX

Da GeoGebra Manual.

GeoGebra utilizza JLaTeXMath, un'interfaccia LaTeX per la visualizzazione delle formule matematiche (testo e simboli). La prima cosa da sapere, è che LaTeX funziona in due modalità diverse: testo e matematica, che si riferiscono alla tipologia di scrittura da inserire.

Per impostazione predefinita, la selezione della casella "Formula LaTeX" abilita la modalità matematica (caratteri in corsivo). Per inserire del testo (carattere Roman) è necessario passare in modalità testo digitando:\text{inserire il testo qui} oppure \mbox{inserire il testo qui}

Caratteri

Dimensione dei caratteri

I seguenti comandi modificano le dimensioni globali dei caratteri:

\tiny \scriptsize \footnotesize \small \normalsize
\large \Large \LARGE \huge \Huge

Il comando \normalsize riporta il carattere alle dimensioni predefinite. Per combinare caratteri aventi dimensioni diverse è necessario digitare i relativi comandi racchiusi tra parentesi graffe {...}.

Ecco un esempio di combinazione di dimensioni nella modalità matematica:

Esempio: {\scriptsize A}{\footnotesize B}{\small C}{\normalsize D}{\large E}{\Large F}{\LARGE G}{\huge H}{\Huge I} LTX1.PNG

Ecco un esempio di combinazione di dimensioni, tramite l'utilizzo del comando \oldstylenums{ ...} (solo modalità matematica):

Esempio: \text{{\Huge GeoGebra}, the most powerful, {\small since}}\oldstylenums{ 2001-2012} LTX2.PNG

È inoltre possibile utilizzare il comando in modalità testo/matematica:\scalebox{h_scale}[v_scale]{...} dove {h_scale} è un numero positivo (negativo) da specificare necessariamente e [v_scale] è un numero positivo opzionale. I numeri possono anche essere rappresentati da slider.

Esempio: \scalebox{2}{\text{{\Huge GeoGebra}, the most powerful, {\small since }}\oldstylenums{ 2001-2012}}LTX3.PNG

Famiglie di caratteri

In modalità testo sono disponibili le seguenti famiglie di caratteri, da utilizzare globalmente o in parentesi graffe {...}: \rm oppure {\rm } \sf oppure {\sf } \tt oppure {\tt } Ecco un esempio:

Esempio: \text{{\rm GeoGebra}{\sf ,the most powerful}, {\tt since }}\oldstylenums{ 2001-2012} LTX4.PNG

In modalità matematica sono disponibili le seguenti famiglie di caratteri (carattere predefinito: mathrm):

\mathcal{ABC} \mathrm{abc} \mathbf{abc} \mathsf{abc} \mathit{abc}
\mathtt{abc} \mathfrak{abc} \mathbb{ABC} \mathscr{ABC}
Esempio: \mathbb{G}\mathfrak{e}\mathbf{o}\mathsf{G}\mathscr{E}\mathtt{b}\mathit{r}\mathrm{a}
LTX5.PNG

Serie di caratteri

In modalità testo utilizzare \bf oppure {\bf ...} e in modalità matematica utilizzare \mathbf{...},

Esempio: \text{\bf GeoGebra }\mathbf{\sqrt{2012^{2}}}
LTX6.PNG

Formato caratteri

Per utilizzare il maiuscoletto in modalità testo utilizzare :\text{{\sc GeoGebra} oppure \textsc{GeoGebra}

Virgolette

Le virgolette "..." sono un carattere speciale in GeoGebra, e non possono essere utilizzate direttamente in LaTeX. Per indicare una vigoletta singola in modalità testo utilizzare: \text{'Simple'} e per una virgoletta doppia utilizzare:\text{''Doble''}

Per ulteriori informazioni vedere http://www.geogebra.org/forum/viewtopic.php?f=8&t=20512&p=77283&hilit=quotes#p77283

Spaziatura orizzontale

Per ottenere una spaziatura singola in modalità testo premere la Barra spaziatrice della tastiera. Per ottenere spaziature di tipo diverso utilizzare i comandi:\quad \qquad \hspace{...}

Il comando \hspace{...} (e i comandi \quad, \qquad disponibili anche nella modalità matematica) supportano le seguenti unità di misura (positive e negative) :

pt punto (1 pollice = 72.27 pt) pc pica (1 pc = 12 pt)
in pollice (1 pollice = 25.4 mm) bp punto grande bp (1 in = 72 bp)
cm centimetri (1 cm = 10 mm) mm millimetri
dd punto Didot dd (1157 dd = 1238 pt) sp punto scalato sp (65536 sp = 1 pt)

In modalità matematica sono disponibili i seguenti comandi:

\, spazio piccolo \: spazio medio \; spazio grande \! spazio negativo (avvicina verso sinistra quanto segue)

Riquadri e colori (in entrambe le modalità)

Testo e matematica a colori

I colori supportati direttamente da JLaTeXMath sono elencati qui: http://en.wikibooks.org/wiki/LaTeX/Colors#The_68_standard_colors_known_to_dvips e possono essere inseriti utilizzando il comando:\textcolor{color}{...}

Esempio: \text{\textcolor{WildStrawberry}{Geo}\textcolor{blue}{G}\textcolor{red}{ebra}}\,\textcolor{green}{\oldstylenums{4.2}
LTX7.PNG


Aggiungere nuovi colori

Per creare un nuovo colore, utilizzare il comando: \definecolor{mycolour}{rgb}{a,b,c} in cui i numeri a, b e c devono essere compresi tra 0 e 1, e possono anche essere slider. Ad esempio:

Esempio:
\definecolor{a}{rgb}{0.63,0.39,0.17}
\definecolor{b}{rgb}{0.63,0.17,0.39}
\definecolor{c}{rgb}{0.39,0.63,0.17}
\definecolor{d}{rgb}{0.39,0.17,0.63}
\definecolor{e}{rgb}{0.17,0.63,0.39}
\definecolor{f}{rgb}{0.17,0.39,0.63}
\text{\textcolor{a}C\textcolor{b}O\textcolor{c}L\textcolor{d}O\textcolor{e}U\textcolor{f}R}
LTEX7a.PNG

Riquadri

Per ottenere un riquadro semplice (senza colori) utilizzare il comando :\boxed{2012\text{ is now!} or\fbox{2012\text{ is now!}

Riquadri colorati

A. Per ottenere un riquadro avente sfondo e bordo dello stesso colore utilizzare:\colorbox{red}{2012\text{ is now!}

B. Per ottenere un riquadro avente sfondo e bordo di colori diversi utilizzare:\fcolorbox{blue}{red}{2012\text{ is now!}

Riquadri ruotati

Per ruotare un riquadro, o qualsiasi altro oggetto LaTex, utilizzare:\rotatebox{angle}{...}

Esempio: \rotatebox{45}{\fcolorbox{blue}{red}{2012\text{ is now!}}
LTX8.PNG

Riquadri simmetrici

Per "riflettere" simmetricamente un riquadro o un qualsiasi oggetto LaTex utilizzare:\reflectbox{...}

Esempio: \reflectbox{\fcolorbox{blue}{red}{2012\text{ is now!}}
LTX9.PNG

Riquadri invisibili

A vote è necessario creare riquadri non visibili, ad esempio per inserire sistemi, o controllare l'altezza dei caratteri, l'allineamento all'interno di una formula, etc.

Sono disponibili tre comandi:

\phantom{XXX} spaziatura larga e alta come tre X
\hphantom{XXX} spaziatura larga come tre X, altezza 0
\vphantom{X} spaziatura di larghezza 0, altezza come tre X
Esempio: \sqrt{b}+\sqrt{\vphantom{b}a}
LTXa.PNG


JLaTeXMath supporta vari ambienti matematici: per ulteriorininformazioni consultare ftp://ftp.ams.org/ams/doc/amsmath/short-math-guide.pdf


LATEX environment

JLaTeXMath provides a number of different environments work. Each environment begins and ends in the same manner. \begin{environment}[options]<br/> ...<br/> \end{environment} The following environments are supported:

• tabular • array • matrix (and variants) • eqnarray
• align • cases • split • multline

Tabular and Array

The tabular and array environment found in similar way, can be used to typeset material with optional horizontal and vertical lines. The options are:

l left-justified column c centered column r right-justified column
| vertical line || double vertical line & column separator
\\ start new row \hline|| horizontal line


Esempio:
\begin{tabular}{| l |c ||r |}
\hline
1 & 2 & 3 \\ \hline
4 & 5 & 6 \\ \hline
7 & 8 & 9 \\
\hline
\end{tabular}
LTEX1.PNG


Other example , using \multicolumn and array:

Esempio:
\begin{array}{|c|c|}
\hline
\multicolumn{2}{|c|}{\text{Title}} \\
\hline
x & y\\ \hline
a & b\\
c & c\\
d & e\\ \hline
\end{array}
LTEX2.PNG


If you need add column separator (dot for example) and space (1cm), use @{.\hspace{1cm}:

Esempio:
\begin{tabular}{r{.\hspace{1cm}}l}
1 & 23 \\
45 & 678\\
910& 1112\\
\end{tabular}
LTEX3.PNG

Matrix

A basic matrix may be created using the matrix environment, the structures is similar to table-array , entries are specified by row, with columns separated using & and a new rows separated with \\. Matrices are usually enclosed in delimiters (default none) of some kind, and while it is possible to use the \left and \right commands. The predefined environments which automatically include delimiters:

pmatrix ( ) bmatrix [ ] Bmatrix { }
vmatrix | | Vmatrix || ||
Esempio:
$\mathsf{A}_{m,n} =
\begin{Vmatrix}
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{Vmatrix}$
LTEX4.PNG


Small Matrix

Sometimes you need to write a matrix within text, for this environment have smallmatrix, this works the same way the matrix environment, for example:

Esempio:
\mathsf{M} =
\left\{ \begin{smallmatrix}
a&b\\ c&d
\end{smallmatrix} \right\}
LTEX5.PNG


Eqnarray

This environment is designed to write multiline equations or equations that exceed the width of line, it behaves like an array of three columns where the Vrst aligned right, center second and third left. The equations we want to present in this way must be enclosed between \begin{eqnarray} and \end{eqnarray}, an example:

Esempio:
\begin{eqnarray}
y &=& (x+1)^2 \\
&=& x^2+2x+1
\end{eqnarray}
LTEX6.PNG

Align

Like eqnarray, but more powerful, you can insert text between lines with the command \intertext{...}, for example:

Esempio:
\begin{align}
x+y-z &= 1\\
x-y+z &= 1\\
\intertext{text}
2x\hphantom{-y}+z &= 1
\end{align}
LTEX7.PNG

Cases

For piece wise function or definitions use cases environment:

Esempio:
\left\vert x\right\vert =
\begin{cases}
\hphantom{-}x &,\, \text{if }x\geq 0 ,\\
-x&,\, \text{if }x<0
\end{cases}
LTEX8.PNG

Split

For split long math block

Esempio:
\begin{split}
a& =b+c-d\\
& \quad +e-f\\
& =g+h\\
& =i
\end{split}
LTEX9.PNG

Multline

For multiple lines of math

Esempio:
\begin{multline}
\left(a+b+c+d+e\right)^2=a^2+b^2+c^2+d^2+e^2\\
+2ab+2ac+2ad+2ae+2bc+2bd+2be+2cd+2ce+2de
\end{multline}
LTEXa.PNG

es:Sobre LaTeX -medidas de fuentes - cajas de color y matemática - en:LaTeX-tips_font_size_color_box_and_math

© 2024 International GeoGebra Institute