# Tag Info

1

You can't mix the use of the algorithms bundle (which provides an algorithm environment/float) with algorithm2e. Use either the one, or the other. \documentclass{article} \usepackage[ruled]{algorithm2e} \begin{document} \begin{algorithm}[H] \SetKwInput{Initialization}{Initialisation} \LinesNumbered \Initialization{} \For{}{} \end{algorithm} ...

2

I am not sure what programming language you are using but you could look at the listings package. This will allow you to typeset programming code. So you can do something that looks like: \documentclass{standalone} \usepackage{listings} \begin{document} \lstset{language=C++} % Set your language (you can change the language for each code-block ...

3

Use \displaystyle to force content to be set similar to display math: \documentclass{article} \usepackage{algpseudocode,amsmath} \DeclareMathOperator*{\argmax}{arg\,max}% http://tex.stackexchange.com/q/5223/5764 \begin{document} \begin{algorithmic}[1] \State $\displaystyle E_i = \argmax_{E \in \mathcal{E}} F(E)$ \State \$E_i = \argmax_{E \in ...

1

You can use algorithm and algorithmic to generate the protocol. more info here and here. To do the Protocols "preamble" (Party, input and so on) I would use a simple tabular. The final outcome would be something like this: \documentclass[a4paper,11pt]{article} \usepackage{algorithm} \usepackage{algorithmic} %need these for the protocol ...

2

Apparently \l@algorithm gets lost and is undefined. A slight redefinition of \listofalgorithms cures this. \documentclass[a4paper,twoside,justified,marginals=raggedright,nofonts,nobib]{tufte-book} \usepackage[noend]{algpseudocode} \usepackage[]{algorithm} \makeatletter \renewcommand{\listofalgorithms}{% \let\l@algorithm\l@figure ...

2

I copied this part from tufte-common.def and it seems to work \makeatletter \renewcommand\listofalgorithms{% \ifthenelse{\equal{\@tufte@class}{book}}% {\chapter*{\listalgorithmname}}% {\section*{\listalgorithmname}}% % \begin{fullwidth}% \@starttoc{loa}% % \end{fullwidth}% } \let\l@algorithm\l@figure \makeatother

2

the ams document classes treat lists of "whatever" differently from the definitions in the basic document classes, and thus with some of the additional packages (like those for algorithms) that follow the method of the book class. if you add these definitions to your preamble, the form of the list of algorithms should be compatible with the amsbook way of ...

2

It's done automatically: \documentclass[12pt,a4paper,twoside]{book} \usepackage{graphicx} \usepackage{algorithm} \usepackage{algpseudocode} \begin{document} \begin{algorithm*}[t!] \caption{caption} \begin{algorithmic}[1] \Require{require} \State {test tttt tttt tttt tttt tttt tttt tttt tttt tttt tttt tttt tttt tttt tttt tttt tttt tttt tttt tttt ...

Top 50 recent answers are included