Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
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 4 '13 at 13:08

1 Answer 1

\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

share|improve this answer
    
It's better! But the 'e' of module are 'cutted' with this code. –  gastopaul Apr 4 '13 at 13:24
    
That is the color of the space which overlaps, you could add a small amount of space (\,) after the e. –  Ulrike Fischer Apr 4 '13 at 13:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.