I would like to present an algorithm in my work and I used the package algorithm2e
. I wonder if there is a way to control hrule
thickness with ruled
option, so one can use thicker line pre-caption or post of it.
Any help is much appreciated.
I would like to present an algorithm in my work and I used the package algorithm2e
. I wonder if there is a way to control hrule
thickness with ruled
option, so one can use thicker line pre-caption or post of it.
Any help is much appreciated.
It's undocumented, but doable: these should be equivalent to the default setting
\setlength{\algoheightrule}{0.8pt} % thickness of the rules above and below
\setlength{\algotitleheightrule}{0.8pt} % thicknes of the rule below the title
Change as you wish.
From algorithm2e.sty
:
% - november 17 2009 - revision 4.00 -
[...]
% * ADD/FIX: rules of ruled, algoruled, tworuled styles used rules of different sizes! This
% is now fixed. Moreover size of the rules is now controlled by a length and so
% can be customized by the user.
% \algoheightrule is the height of the rules and can be changed via \setlength
% \algoheightruledefault is the default height of he rules (0.8pt)
% \algotitleheightrule is the height of the rule that comes just after the
% caption in ruled and algoruled style; it can be changed via \setlength
% \algotitleheightruledefault is the default height of this rules (0.8pt)
.sty
file, where it's said that the parameters can be customized by the user. Thanks for the remark: I agree that relying on undocumented features can be very dangerous.