Tagged Questions
7
votes
2answers
55 views
Indentation in the algorithm package after \Ensure, \Require
I have this piece of code:
\documentclass[11pt]{article}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{varwidth}
\begin{document}
\begin{algorithmic}
\Require ...
3
votes
1answer
100 views
Align pseudocode comments to the left
Writing comments in pseudocode, I wanted to insert comments which are not aligned to the right side of the line which is commented. This thread helped me a lot.
However, I want comments to stand ...
4
votes
2answers
225 views
Forced indentation in algorithmicx
I have an algorithm dealing with some very large parameter names, messing up the readability. What I've done so far is break the lines of the problematic statement (lines 4-5) manually into two ...
4
votes
1answer
459 views
algorithmicx package comments on a single line
Is it possible in algorithmicx package to have comments not aligned to the right side?
For example I have code like this -
\begin{algorithm}[!ht]
\caption{My Algo.}
\label{myalgo}
...
6
votes
1answer
371 views
Avoid putting statements on the same line with algorithmicx
I'm writing a simple pseudocode, but I have a problem with a repeat..until block.
Basically what happens is that the return statement that follows the end of this loop gets rendered on the same line ...
6
votes
1answer
380 views
Adjust the indentation whithin the algorithmicx-package when a line is broken
I have this code
\documentclass{article}
\usepackage{algorithm}
\usepackage{algpseudocode}
\begin{document}
\begin{algorithm}
\caption{Minimal Working Example for my Problem}
...
5
votes
1answer
333 views
How to fully left justify text in algorithmicx when not using line numbers
I'm using the algorithmicx package and would like to fully left justify the text when not using line numbers. Here's an example:
Notice how only the Require and Ensure clauses are fully pushed to ...
2
votes
2answers
430 views
algpseudocode without visible EndIf
I have the following chunk of code
\begin{algorithmic}
\State $\mathit{FlatMask}(c)=0$
\If{$\mathit{Inc1}(c)>0$}
\State $\mathit{FlatMask}(c)\;+\!\!=2(\mathit{Inc1}(c)-1)$
\EndIf
...
8
votes
1answer
930 views
Change Indentation Size in algorithmicx package
I'm using and enjoying the algorithmicx package, but would like to adjust the size of its indentations.
In the algorithms package, I could do this with \algsetup{indent=1em}, but that doesn't seem to ...