Differenze

Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.

Link a questa pagina di confronto

Entrambe le parti precedenti la revisione Revisione precedente
Prossima revisione
Revisione precedente
vlsi:resources:latex:syntax [05/11/2013 09:06]
panati
vlsi:resources:latex:syntax [06/11/2013 23:44] (versione attuale)
panati
Linea 3: Linea 3:
 [ __[[vlsi:​home|Home]]__ ] [ __[[vlsi:​home|Home]]__ ]
 [ __[[vlsi:​resources:​latex|Back]]__ ] [ __[[vlsi:​resources:​latex|Back]]__ ]
- 
- 
  
  
Linea 12: Linea 10:
 % this is a comment % this is a comment
 </​code>​ </​code>​
- 
- 
  
  
Linea 29: Linea 25:
 \end{document} \end{document}
 </​code>​ </​code>​
 +
 +====== How to obtain a well organized source code ======
 +
 +It is possible to recall external parts of code in order to obtain a simpler and more clear structure of your main source code by using of the ''​\input{}''​ command.
 +
 +<​code>​
 +% Preamble:
 +\documentclass[options]{class type}
 +\usepackage{...}
 +...
 +
 +% body of your document
 +\begin{document}
 +
 +\input{section_01.tex} ​
 +\input{section_02.tex}
 +\input{section_03.tex}
 +...
 +\input{section_n.tex}
 +
 +\end{document}
 +</​code>​
 +
 +:!: Please note that in each .tex document (//​section_01.tex//,​ //​section_02.tex//​ etc.) you have __not to put__ any line just like ''​\begin{document}''​ or ''​\end{document}'',​ or packages'​ declarations:​ these are just //pieces of code// recalled in your text!!!
 +
  
  
Linea 234: Linea 255:
  
 ====== Tables ====== ====== Tables ======
 +
 +Simple tables:
 +
 +<​code>​
 +\begin{tabular}{|l|c|r|} % '​l'​ is for '​left',​ '​c'​ is for '​center',​ '​r'​ is for '​right'​
 +\hline
 + first & second & third \\
 +\hline
 + 1 & 2 & 3 \\
 +\hline
 +\end{tabular}
 +</​code>​
 +
 +See also:
 +  * [[http://​mnnugm.altervista.org/​latex/​Tabelle.pdf|Tabelle con LaTeX [IT]]]
 +  * [[http://​wwwcdf.pd.infn.it/​AppuntiLinux/​a2550.htm|LaTeX:​ tabelle [IT]]]
 +  * [[http://​www.guit.sssup.it/​downloads/​fig_tut.pdf‎|Gestione di Figure e Tabelle con LATEX - GuIT [IT]]]
 +  * [[http://​www.lorenzopantieri.net/​LaTeX_files/​TabelleRipartite.pdf|L'​arte di ripartire una tabella su più pagine con LaTeX [IT]]]
 +  * [[http://​www.tug.org/​pracjourn/​2007-1/​mori/​mori.pdf‎|Tables in LaTeX: packages and methods [EN]]]
 +  * [[http://​en.wikibooks.org/​wiki/​LaTeX/​Tables|LaTeX/​Tables (WikiBooks) [EN]]]
  
 ====== Math formulas ====== ====== Math formulas ======
 +
 +If you want to obtain some mathematical text without using some special packages directly in your text:
 +
 +<​code>​
 +$ e^{i\pi}+1=0 $ 
 +</​code>​
 + 
 +<​code>​
 +\begin{math} \vec{F} = m \vec{a}\end{math}
 +</​code>​
 +
 +<​code>​
 +\S = \int{L \: dt} \)
 +</​code>​
 +
 +<​code>​
 +$ \lim_{x \rightarrow \infty} \frac{\sin{x}}{x} = 1 $
 +</​code>​
 +
 +... or in a different text block:
 +
 +<​code>​
 +\begin{displaymath}e^{i\pi}+1=0 \end{displaymath}
 +</​code>​
 +
 +<​code>​
 +\[\vec{F} = m \vec{a}\]
 +</​code>​
 +
 +<​code>​
 +$$S = \int{L \: dt} $$
 +</​code>​
 +
 +... or in a different block of text with the number of the equation flagged:
 +
 +<​code>​
 +\begin{equation}\lim_{x \rightarrow \infty} \frac{\sin{x}}{x} = 1 \end{equation}
 +</​code>​
 +
 +
 +
 +Some utilities:
 +  * [[http://​www.codecogs.com/​latex/​eqneditor.php|LaTeX Equation online generator]]
 +  * [[http://​www.texify.com/​|TeXify]]
 +
 +See also:
 +  * [[http://​kogler.wordpress.com/​2008/​03/​21/​latex-multiline-equations-systems-and-matrices/​|Multiline equations, matrices, etc. [EN]]]
 +  * [[http://​www.math.tamu.edu/​~harold.boas/​courses/​math696/​LaTeX-formatting-equations.html|Formatting equations in LaTeX [EN]]]
 +  * [[ftp://​ftp.ams.org/​ams/​doc/​amsmath/​short-math-guide.pdf|Short Math Guide for LaTeX [EN]]]
 +  * [[http://​www.guit.sssup.it/​arstexnica/​download_ars/​articoli_ars_08/​Simboli%20matematici%20in%20TEX%20e%20LATEX.pdf|Simboli matematici in TeX e LaTeX [IT]]]
 +  * [[http://​wwwcdf.pd.infn.it/​AppuntiLinux/​a2552.htm|LaTeX:​ ambienti matematici [IT]]]
  
 ====== Coding ====== ====== Coding ======
Linea 329: Linea 421:
 Other similar commands are ''​\listoftables''​ and ''​\listoffigures''​ which produce a list of tables (LOT) Other similar commands are ''​\listoftables''​ and ''​\listoffigures''​ which produce a list of tables (LOT)
 and a list of figures (LOF) respectively. and a list of figures (LOF) respectively.
 +
 +====== Supported Languages ======
 +
 +<​code>​
 +\usepackage[languages]{babel}
 +</​code>​
 +
 +<​code>​
 +\selectlanguage{choosenlanguage}
 +</​code>​
 +
 +i.e.
 +
 +<​code>​
 +\usepackage[italian,​ english]{babel}
 +</​code>​
 +
 +
 +<​code>​
 +\selectlanguage{english}
 +</​code>​
 +
 +
  
 ====== Numerical references ====== ====== Numerical references ======
Linea 415: Linea 530:
 ---- ----
  
-Last update: [[panati@to.infn.it|Serena Panati]] Nov 1st, 2013 //+Last update: [[panati@to.infn.it|Serena Panati]] Nov 6th, 2013 //
  
 ~~NOTOC~~ ~~NOTOC~~