# Tag Info

2

i don't know any reason not to use align* for this; requires amsmath. \documentclass[twocolumn]{article} \usepackage{algorithm2e} \usepackage{amsmath} \begin{document} \noindent Some text preceding. \begin{algorithm} \DontPrintSemicolon \caption{Computing Levenshtein edit distance } \abovedisplayskip=0pt \begin{align*} D(i,j) = \min\bigl\{& D(...

2

Don't use the [H]ere specifier, since it's not allowed in twocolumn mode by-design. Also, I've used some \phantoms to provide the appropriate layout of the function across three lines. Note that \State is used by algorithmicx's algpseudocde package, not algorithm2e. Instead, algorithm2e uses an end-of-line \; without a \State. In order to make the math ...

0


0

The algorithmicx package lets defined its own commands. In your case you could put in the preamble: \algblockdefx[Foreach]{Foreach}{EndForeach}[1]{\textbf{foreach} #1 \textbf{do}}{\textbf{end foreach}} which can then be used as a For loop: \Foreach{$i \in I$} \State bar \State foo \EndForeach

4

\autoref does only work completely with a corresponding \....autorefname macro, i.e. \sectionautorefname etc. hyperref extracts the reference information from its specific label information, where the relevant counter name is stored as well. This means, if the counter is named foo, \fooautorefname must exist -- otherwise it's ignored (and a warning ...

1

Your notation for \If is incorrect. You're using \If(..){...} while you should be using \If{..}{...}: \documentclass{article} \usepackage{algorithm2e} \begin{document} \begin{algorithm}[H] \SetAlgoLined \KwData{x} \KwResult{y} \ForEach{Subject in Subjects}{% \If{G(Subject, rdf:type, d ) $\notin$ T}{% violation = true\; BREAK\; }...

Top 50 recent answers are included