On Mon, Sep 15, 2014 at 1:01 PM, Christophe Bal <
proj...@gmail.com> wrote:
> Hello William.
>
> I would like to use the package algorithm2e but the following testing code
> fails.
Hi, Just type
latex.extra_preamble(r"\usepackage{algorithm2e}")
first, and you're good to go. In general, with %latex, you can do the
above to add all kinds of packages. Type latex.[tab] to see other
similar interesting things you can do, e.g., adding custom macros.
NOTE: I'm going to update SageMathCloud later today with some bugfixes
related to %auto, so that you can type
%auto
latex.extra_preamble(r"\usepackage{algorithm2e}")
in a cell, so that the above pre-amble gets set any time that
worksheet starts. The %auto functionality doesn't isn't 100% at the
moment.
>
> -----------------------------------------
> %latex
>
> \begin{algorithm}[H]
> \KwData{this text}
> \KwResult{write algorithm with \LaTeX2e}
> initialization\;
> \While{not at end of this document}{
> read current\;
> \eIf{understand}{
> go to next section\;
> current section becomes this one\;
> }{
> go back to the beginning of current section\;
> }
> }
> \caption{How to write algorithms}
> \end{algorithm}
>
> -----------------------------------------
>
> Displaying algorithm is useful when teaching.
>
> Best regards.
> Christophe BAL
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/sage-cloud/CAAb4jGmF20Z2AfQ9GxPx27BqJrHoGgt15LVjbJwi5pD7t98Lnw%40mail.gmail.com.
> For more options, visit
https://groups.google.com/d/optout.
--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org
wst...@uw.edu