3

When I combine \textsl \textbf and \hl from the soulutf8 package, the result is ugly. Some letters are degraded. By zooming or printing you can see that with the following code:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{color}
\usepackage{soulutf8}

\begin{document}

\large

\textsl{\textbf{{application module morphisme}}}     % Correct

\textsl{\textbf{\hl{application module morphisme}}}  % Ugly!
%                    —  — —       —  —   —

\end{document}

I'm very disappointed with this. Could you help me please?

enter image description here

closer look:

enter image description here

oops.

David Carlisle
  • 757,742
gastopaul
  • 261
  • Welcome to tex.sx You can indent code blocks by four spaces (or use the {} button) and similarly use backticks for inline code. – David Carlisle Apr 04 '13 at 13:08

1 Answers1

3

\hl colors the bounding box of the chars one syllable by one. These boxes are rectangles, and so the box of a following char can overlap the precedent char. You can avoid it by using \mbox:

\textsl{\textbf{\hl{\mbox{application} \mbox{module} \mbox{morphisme}}}}

-- at the cost that no hyphenation is possible.

You could also try to use tikz as in the answer here Cool Text Highlighting in LaTeX

Ulrike Fischer
  • 327,261