Skip to content

Add the wide algorithm* environment and make its caption style consistent with kaobook#257

Draft
pi8027 wants to merge 1 commit intofmarotta:masterfrom
pi8027:algorithm2e
Draft

Add the wide algorithm* environment and make its caption style consistent with kaobook#257
pi8027 wants to merge 1 commit intofmarotta:masterfrom
pi8027:algorithm2e

Conversation

@pi8027
Copy link
Copy Markdown
Contributor

@pi8027 pi8027 commented Oct 1, 2022

This PR depends on #225. I will provide an example if needed.

@pi8027 pi8027 marked this pull request as draft October 1, 2022 09:13
alxvth added a commit to alxvth/kaobook that referenced this pull request May 4, 2024
fmarotta#257 (Add the wide algorithm* environment and make its caption style consistent with kaobook)
fmarotta#225 (Fix issues related to listings)
fmarotta#223 (Fixing figure caption)
@taqtiqa-mark
Copy link
Copy Markdown

I ran into the need to have wide algorithm, then I iterated to this workaround:

\begin{table*}[h!]
    \begin{tabular}{ c }
        \begin{algorithm}[H]
        ....
                \caption{Example code}
        \end{algorithm}\\
    \end{tabular}
\caption{Meta-Coal Algorithm}
\end{table*}

This displays as:

image

Is this not sufficient?

@pi8027
Copy link
Copy Markdown
Contributor Author

pi8027 commented May 13, 2024

@taqtiqa-mark Having both "Table 2.1" and "Algorithm 1" seems weird to me. (This shouldn't be the case with my patch, but this PR is from two years ago, so I don't remember what I did.)

@taqtiqa-mark
Copy link
Copy Markdown

Having both "Table 2.1" and "Algorithm 1" seems weird to me.

Agreed. But that should be configurable without too much difficulty. I left it in for the use case where you have multiple algorithms you want to display - possibly with a different label, say "Set Algorithms", etc.

Any way I'll leave this here for anyone who needs this without patching in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants