I have defined a custom float using the newfloat command from the float package. My custom float uses the ruled style, defined in the same package. This is a minimal example of what I'm doing:





public void foo(int bar) {
\caption{An example of a foobar program}


What I don't like, is the vertical space that lies between the last line of the contents and the bottom rule of the float. Is there a way to reduce that space?


You can redefine the internal \fs@ruled macro to add a negative vertical skip before the bottom rule; add the following lines to the preamble of your document (change -0.7\baselineskip according to your needs):

  \def\@fs@pre{\hrule height.8pt depth0pt \kern2pt}%

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.