TeX - LaTeX Asked by QED on February 14, 2021
I have defined my own caption format for the algorithmic floats, which is working quite fine:
DeclareCaptionFormat{algor}{%
hrulefillparoffinterlineskipvskip1pt%
textbf{#1#2}#3offinterlineskiphrulefill}
DeclareCaptionStyle{algori}{singlelinecheck=off,format=algor,labelsep=space}
captionsetup[algorithm]{style=algori}
However, I want the figures in my document to have the default caption settings. Please suggest how I can make that happen.
I found out that you define your own caption style via:
DeclareCaptionFormat{<formatname>}{<code for format>}
and then use this format for a particular float environment as:
captionsetup[<float_environment>]{singlelinecheck=off, labelsep=colon,format=<formatname>}
Here labelsep is set as 'colon', which can also be altered to 'space' etc.
This caption formatting can be used in the following manner for the given problem
DeclareCaptionFormat{algor}{%
hrulefillparoffinterlineskipvskip1pt%
textbf{#1#2}#3offinterlineskiphrulefill}
DeclareCaptionStyle{algori}{singlelinecheck=off,format=algor,labelsep=space}
captionsetup[algorithm]{style=algori}
DeclareCaptionFormat{figur}{%
begin{center}
textbf{#1#2}#3
end{center}}
captionsetup[figure]{singlelinecheck=off,format=figur,labelsep=colon}
Correct answer by QED on February 14, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP