Tag Info

New answers tagged

0

In the end I needed a different solution since I didn't have access to \newtheorem definitions. \newcounter{common} % Create counter "common" \makeatletter \let\c@theorem\relax % drop existing counter "theorem" (you might not need this) \makeatother \usepackage{aliascnt} \newaliascnt{theorem}{common} % let "theorem" be an alias for "common" ...


4

Algorithm2e is the package to use: \documentclass{amsart} \usepackage[ruled]{algorithm2e} \usepackage{mathpazo} \SetAlgoInsideSkip{medskip} \begin{document} \begin{algorithm} %\BlankLine \DontPrintSemicolon \For{i in 1 to n}{ draw $X\sim\psi$\; \For{j in 1 to t}{ draw $X\sim p(X,dy)$ } set $X^i_t=X$\; } ...


3

You can use the algorithm2e package. The documentation is available from CTAN. Here is a quick workup of the algorithm, but note that there are many options you can tweak to get the appearance just as you want it. \documentclass{article} \usepackage{algorithm2e, bbold} \begin{document} \begin{algorithm} \For{i in 1 to n} { draw $X ...


1

In twocolumn-mode each column is treated as a page of its own. The algorithm in this case is placed on a float page, and we have to follow what is said in How to place a float at the top of a floats-only page? To rename the name of algorithms, we can use the optional argument when loading the package, thanks egreg. Here the complete example. ...


0

All you have to do is to redefine the command \thealgorithm which controls the representation for the algorithm counter. For example, to number them using alphabetic lower-case characters and to prepend the section number you would do \renewcommand\thealgorithm{\thesection\alph{algorithm}} Assuming that you want the counter to reset at every section, you ...


0

You could use the minted package for code, which also provides syntax highligthing. Alternative you can create custom spaces with \quad or \qquad or \hspace{2mm} or ~, among some other ways.



Top 50 recent answers are included