On 14/08/2016 23:33, Richard Heck wrote:
On 08/14/2016 07:43 AM, Kiuhnm wrote:
Hello,
I'd like to insert some pseudocode in my paper using my own style. For
instance, I don't like "endwhile", "endif", and similar.
Here's an example of what I'd like (use a monospaced font):
for $I_1$:
for $I_2$:
$X_{I_1}\leftarrow <some expression>
I usually use the enumerate environment (with the enumitem module) for
this but this time I got the error "nested too deep". And, frankly,
enumerate is not very convenient for algorighms because one needs to
change the spacing, hide the labels, etc...
Basically, I just need a way to indent lines the way I like and be
able to use math.
Doesn't the listings environment allow this?
Here's an easy solution:
\begin_body
\begin_layout Standard
\begin_inset FormulaMacro
\newcommand{\tab}{\-\ \-\ \-\ }
{<tab>}
\end_inset
\end_layout
\begin_layout Standard
pokpokpokp
\end_layout
\begin_layout Standard
\begin_inset Formula $\tab$
\end_inset
ijijijij
\end_layout
\begin_layout Standard
\begin_inset Formula $\tab\tab$
\end_inset
sdfsdfsdf
\end_layout
\begin_layout Standard
\begin_inset Formula $\tab\tab\tab$
\end_inset
dfdfgdfdg
\end_layout
\end_body