4

Is there a way to remove the trailing period in the boxhandler package? It seems to occur with both the bxfigure and bxtable commands, but I have instances where I need no trailing periods.

Minimum Working Example:

enter image description here

\documentclass{article}
\usepackage{boxhandler}
\begin{document}
\bxfigure[ht]{Figure caption will automatically have a period placed at the end}{\rule{3in}{2in}}
\end{document}
1
  • The period is inserted manually in the code. There exists no switch to turn this functionality on/off. It could probably be done by defining a new \make@caption macro consisting of patches to the existing boxhandler macros.
    – Werner
    Commented Oct 31, 2014 at 20:37

1 Answer 1

3

This period is hard coded into boxhandler.sty. For me, this would be sufficient reason not to use this package. You coild edit that file and make changes to six of the internal caption commands:

\offset@caption 
\nooffset@caption
\shortleft@caption
\shortcenter@caption
\shortright@caption
\new@makecaption

Remove the period after #2 in each of their definitions.

Alternatively, the following will remove the period in many cases:

\def\gobble#1{}
\bxfigure[ht]{Figure caption will automatically have a period 
  placed at the end\protect\gobble}{\rule{3in}{2in}}

This should let \gobble take the period as its argument and replace it with nothing.

My preference would be to edit the boxhandler.sty. Caveats: I can't guarantee those six commands are the only ones that add a period and I definitely can't guarantee that the \gobble trick will always (or even usually) work.

2
  • 1
    +1 for the remark, "For me, [the hard-coded period] would be sufficient reason not to use this package."
    – Mico
    Commented Oct 31, 2014 at 22:19
  • Thanks. I do not have many figures/tables that require no periods, but it's definitely frustrating that it is hardcoded. I'm using the package because I do have many figures and tables, and I needed a consistent way of fitting the caption width to the width of the figure/table. I know rowfloat package can be used, but it interfered with my algorithms package. Thank you again for your help.
    – ionick
    Commented Nov 2, 2014 at 16:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .