3

Q&As like Strikethrough text, provide guidance on how to strike through text with ulem's \sout{...} or soul's \st{...}. Is there a readymade alternative that behaves like \bfseries and affects all that follows, as opposed to only the provided argument?

In particular I'm looking for something that can be used in combination with this: Make first row of table all bold

Solutions working in XeTeX or pdfTeX are equally welcome.

3
  • 1
    If you have a font with a struck-through style, you could define a command along the lines of \bfseries to switch to that style. Otherwise, there is simply no comparison between what something like soul does to construct struck-through text and what font switching commands such as \bfseries do. soul reconstructs the argument passed to \st{} with strike-through. If it goes wrong, it tells you that reconstruction failed. If Xe/LuaTeX are options, maybe something is possible there, but I kind of doubt it is possible with (pdf)TeX. (You don't say which engine you use.)
    – cfr
    Aug 19, 2015 at 0:22
  • Ah, okay. I wasn't fully aware that \bfseries works through the font-style, while \textbf doens't. Thank you. XeTeX and pdfTeX are equally fine. Will add that.
    – sheß
    Aug 19, 2015 at 7:38
  • 1
    \textbf{} just applies \bfseries to its argument, so it still works through the font style. But \st{} has to do something completely different. If it were just applying e.g. \ststyle to its argument, then you could just use that. But it has to do something else because fonts do not (mostly, anyway) provide a struck-through version in the way that they (often) provide a bold variant.
    – cfr
    Aug 19, 2015 at 12:22

1 Answer 1

4

With lualatex and the new lua-ul package you can define commands that works as switches:

\documentclass{article}
\usepackage{lua-ul}

\newunderlinetype\beginStrikeThough{\leaders\hbox{%
   \normalfont\bfseries/}}

\usepackage{kantlipsum}
\begin{document}
\kant[1] {\beginStrikeThough \kant[1-5]}
\kant[1]
\end{document}

enter image description here

You must log in to answer this question.

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