2

Is it possible to make the hyphen bold without making a virtual font? I have spent about an hour now trying to figure out how to get my linebreak hyphens bold.

I understand that we cannot replace a hyphen with a symbol: Replace hyphenation character by a backwards arrow.

The hyphen takes a number as the code for the glyph in the font \hyphenchar\font=<number>.

I have read How to create a virtual font? but want to know if I do not have to go through this to make all my hyphens bold.

MWE

\documentclass{article}
\usepackage{lipsum}
\begin{document}
\section{Introduction}
\lipsum[1]
\end{document}
  • 1
    Welcome! Why on Earth do you want to do this? – cfr Jul 6 '16 at 1:41
  • Well in actuality I like to typeset my documents similar to journal articles. I notice that Elsevier's proprietary font "Gulliver" uses all bold hyphens. When they are bold they are less likely to fade when scanned. – John Klein Jul 6 '16 at 13:34
1

Note that I assume here that you are using TeX or pdfTeX as your engine (e.g. pdflatex or latex) rather than XeTeX or LuaTeX (e.g. lualatex or xelatex) as the framework you are using presumes a traditional font scenario (TeX fonts, virtual fonts etc.). Hyphenation and fonts in general are a different matter with the newer engines.


This cannot be done for the same reason that you cannot replace the hyphen with a symbol: in both cases, you need to take a character from a different font. Bold needs a different TeX font just as much as a fancy arrow does.

So you would have to use one of the tricks to fake this effect in this case just as you would to replace the hyphen with an arrow. Unless you indeed create a virtual font.

Now the tricks will not, I think, work for your MWE because it uses a macro to produce dummy text. So, in that case, probably the virtual font is the way to go.

It would probably help to have some idea why you want this, however, since your actual use probably doesn't use lipsum and there may be a suitably convenient trick for that case.

  • Is there a fix with LuaTeX or XeLaTeX? I use ShareLaTeX and these are options for compiling. – John Klein Jul 6 '16 at 13:36

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.