Tag Info

New answers tagged

6

Here is one attempt: \documentclass[11pt,twocolumn]{article} \usepackage[margin=1cm]{geometry} \usepackage{algpseudocode} \usepackage{algorithm} \usepackage{amsmath} \begin{document} \begin{algorithm}[h] \caption{title} \begin{algorithmic}[1] \setlength{\lineskip}{3pt} \For {all } \State{ $ \begin{bmatrix} a \\ ...


0

algorithm2e provides its own "do not float" [H] float specifier, setting the contents in a minipage if used this way. So one would have to use \begin{algorithm}[H] % <your algorithm here> \end{algorithm} under those conditions. A large amount of leg-work is done by the package at the start of the algorithm environment in order to set things up since ...


0

Something like this. Wrap each phase with different/independent alogrithmic environment. Update: To add a blank line without being numbered between two phases, add \item[] at the end of the phase 1 environment. Code \documentclass[10pt,a4paper]{IEEEtran} \usepackage{algorithmic} \usepackage{algorithm} \begin{document} \begin{algorithm} ...


1

This is one possible solution via adjustwidth environment from changepage package. It takes two arguments. As to the par indention value, please check HERE \begin{adjustwidth}{left indent}{right indent} \begin{algorithmic}[1] content \end{algorithmic} \end{adjustwidth} Code \documentclass[12,a4paper]{article} ...


0

An addendum to @Werner's answer: For the numbering, it is enough to load the algorithm package with option chapter. On another hand, it accepts a number of commands from the caption package, in particular those pertaining to fonts and alignment — not skip. Here is an example with the boxed style and a left-aligned caption: ...


3

Yes, of course! The main idea is to restyle the algorithm float construction. Since algorithm loads the float package, you can easily define your own float construction, say newruled: \makeatletter \newcommand\fs@newruled{\def\@fs@cfont{\bfseries}\let\@fs@capt\floatc@plain% Caption style \def\@fs@pre{\hrule height.8pt depth0pt \kern2pt}% Line at top of ...


1

The MWE is useless, because it does not generate any of the errors. Ad 1) It seems, that the syntax in an environment algorithmic is not correct, probably an \ENDIF is missing. Ad 2) Environment algorithm cannot be used in floats like figure or table because it is already a float object. Ad 3) Usually \ALC@no is locally defined in the start code of ...


1

Easiest would be to let \chapter be equivalent to \section: \begingroup \let\chapter\section% Make \chapter equivalent to \section \listofalgorithms \endgroup The \chapter update is temporary until \listofalgorithms is complete.



Top 50 recent answers are included