Differences between revisions 1 and 7 (spanning 6 versions)
Revision 1 as of 2006-09-18 00:35:14
Size: 682
Editor: yakko
Comment:
Revision 7 as of 2009-02-23 22:06:16
Size: 1882
Editor: Anderson-Camtasia
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
There are two ways to use LaTeX. Inline: {{{[[latex2(\LaTeX)]]}}} which produces: [[latex2(\LaTeX)]] There are two ways to use LaTeX. Inline: {{{<<latex(\LaTeX)>>}}} which produces: <<latex(\LaTeX)>>
Line 5: Line 5:
{{{#!latex2 {{{#!latex
Line 14: Line 14:
= using psfrag off site = = Using LaTeX Tips and Tricks =

Looking for a template: LatexTemplate
Line 19: Line 21:

== Algorithm Template ==

Don't forget that
   * \= sets a tab
   * \> uses it
   * \\ ends a line (every line!)

{{{#!latex
\noindent
\begin{minipage}{4.4in}
\tt
\noindent
\hrulefill
\begin{tabbing}
{\bf Sat(M,n)} \\
{\bf input:} Matrix $M$ representing a gap-graph over $n+1$ vertices.\\
{\bf output:} True or False depending on whether $M$ is satisfiable. \\
\\ m := 0 \\
{\bf repeat} \= \\
          \> m := m + 1 \\
          \> {\bf for} \= i := 0 to n {\bf do} \\
          \> \> {\bf for} \= j := 0 to n {\bf do} \\
          \> \> \> {\bf for} \= k := 0 to n {\bf do} \\
          \> \> \> \> $M[i,j] := max(M[i,j],M[i,k]+M[k,j])$ \\
          \> \> \> {\bf end-for} \\
          \> \> {\bf end-for} \\
          \> {\bf end-for} \\
{\bf until} $m = \log(n+1)$ \\
\\
Flag := True \\
\\
{\bf for} \= i := 0 to n {\bf do} \\
          \> {\bf if} \= $M[i,i] > 0$ {\bf then} \\
          \> \> Flag := False \\
{\bf end-for} \\
\\
{\bf return}(Flag)
\end{tabbing}
\hrulefill\\
\rm
\end{minipage}
}}}

Using LaTeX on this site

There are two ways to use LaTeX. Inline: <<latex(\LaTeX)>> which produces: <<latex(\LaTeX)>>

Or for extended paragraphs see the code that produced this \LaTeX 
\begin{equation}
    e=mc^2
\end{equation}

For more examples see LatexPreamble and LatexArticle

Using LaTeX Tips and Tricks

Looking for a template: LatexTemplate

I use wmf2eps which is an excellent program. Here are a few issues to keep in mind:

  1. When using \psfrag, always make sure your excel, visio, ... files use ONE letter substitutions. If you use more than one letter, MS products put them in as individual letters instead of strings (which is what psfrag is looking for).

Algorithm Template

Don't forget that

  • \= sets a tab
  • \> uses it

  • \\ ends a line (every line!)

\noindent
\begin{minipage}{4.4in}
\tt
\noindent
\hrulefill
\begin{tabbing}
{\bf  Sat(M,n)} \\
{\bf input:} Matrix $M$ representing a gap-graph over $n+1$ vertices.\\ 
{\bf output:} True or False depending on whether $M$ is satisfiable. \\ 
\\ m := 0 \\ 
{\bf repeat} \= \\
          \> m := m + 1 \\
          \> {\bf for} \= i := 0 to n {\bf do} \\
          \>           \> {\bf for} \= j := 0 to n {\bf do} \\
          \>           \>           \> {\bf for} \= k := 0 to n {\bf do} \\
          \>           \>           \>           \> $M[i,j] := max(M[i,j],M[i,k]+M[k,j])$ \\
          \>           \>           \> {\bf end-for} \\
          \>           \> {\bf end-for} \\
          \> {\bf end-for} \\
{\bf until}  $m = \log(n+1)$ \\
\\
Flag := True \\
\\
{\bf for} \= i := 0 to n {\bf do} \\
          \> {\bf if} \= $M[i,i] > 0$ {\bf then} \\
          \>          \> Flag := False \\
{\bf end-for} \\
\\
{\bf return}(Flag)
\end{tabbing}
\hrulefill\\
\rm
\end{minipage}

WritingTechnicalPapersInLaTeX (last edited 2024-02-22 14:31:07 by scot)