Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

pi8027
Copy link
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

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
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

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