Differences between revisions 3 and 4
Revision 3 as of 2006-09-19 00:18:04
Size: 1833
Editor: yakko
Comment:
Revision 4 as of 2006-09-19 00:19:11
Size: 1837
Editor: yakko
Comment:
Deletions are marked like this. Additions are marked like this.
Line 35: Line 35:
{\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} \= \\ {\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} \= \\
Line 39: Line 42:
          \> \> \> {\bf for} \= k := 0 to n {\bf do}
\\
          \> \> \> \> $M[i,j] :=
max(M[i,j],M[i,k]+M[k,j])$ \\
          \> \> \> {\bf for} \= k := 0 to n {\bf do} \\
          \> \> \> \> $M[i,j] := max(M[i,j],M[i,k]+M[k,j])$ \\

Using LaTeX on this site

There are two ways to use LaTeX. Inline: [[latex2(\LaTeX)]] which produces: latex2(\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

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)