0

\mathsf{} creates a black square in SIAM's latex template see code below. (replace contents of ex_article.tex file with text below leave other SIAM files alone) I've narrowed it down to this only happens if the \mathsf is preceded and followed by open and close parentheses in math mode and a period in non-math mode and only if the expression hugs the end of a line.

It's not caused by the lack of sections, the abstract etc I've omitted those merely to make the example shorter.

    \documentclass[review,onefignum,onetabnum]{siamart190516}
\usepackage{algorithmic}
\usepackage{amssymb}
\usepackage{adpwrapfig}
\usepackage{caption}
%%\usepackage{amsthm}

\headers{An Example Article}{D. Doe, P. T. Frank, and J. E. Smith}

\begin{document}

adfsadf asdfs asffaf adsf as sad fd f asdf vad adf adsf afsad ds fasfd saf d $(1) \mathsf{abc}(1,2) $.

adfsadf asdfs adsf as sad fd f asdf vad adf adsf afsad ds fasfd saf d $(1) \mathsf{abc}(1,2) $.

\end{document}
2
  • 1
    The link you gave goes to a document class siamart171218 not siamart190516; also I don't know what the adwrapfig package is; I don't think it's standard. Makes it hard to test your code. (Though I did and will post an answer in a second.)
    – frabjous
    Apr 9, 2022 at 1:51
  • @frabjous ah that might be a line I added to the template and forgot about but it's not relevant.
    – Hao S
    Apr 9, 2022 at 4:19

1 Answer 1

4

This has nothing to do with \mathsf in particular; you just happened to stumble on just the right combination to produce what's called an overfull "bad box", i.e., something that doesn't quite fit where it is supposed to be but can't be moved without creating another problem.

The square you're seeing is a mark indicating the bad box; it is actually put there intentionally so that publishers can easily spot bad boxes and fix them with manual interventions before final publication. See here, for example.

They only show up in draft mode, not final mode.

You can get another one just by intentionally creating a bad box. Put in \mbox{...} with a really long sentence that doesn't fit on the line and you'll get another of those squares.

You can get rid of them by setting the final option to the document class.

\documentclass[review,onefignum,onetabnum,final]{siamart171218}

(Unless you are fussy about typography yourself and want to see them so you can fix them yourself.)

Edit: I just noticed this is actually explained in the guide document that comes with the template, docsiamart.pdf.

3
  • 1
    Good analysis. Publishers hate these problems; much better if the author takes care of deciding where long lines should break. And kudos to the author of the user guide for mentioning the problem. Apr 9, 2022 at 3:24
  • out of curiosity what is the "proper" way to fix this kind of error?
    – Hao S
    Apr 9, 2022 at 4:27
  • 1
    The black square isn't itself an error. Do you mean how to fix the overfull box itself? To my knowledge, there isn't really one "right" way, but from my experience as an author, usually a publisher facing this kind of problem will just ask me to do a small rewording or rearranging of my sentence. As you noticed, the tiniest little change like moving a period or parenthesis can eliminate it. But I wouldn't worry about it at all unless this is the final version of your document, and it's going to be publicly published this way.
    – frabjous
    Apr 9, 2022 at 4:45

You must log in to answer this question.

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