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.

I was wondering if there is a way to make the hyphen and en dash in a compound word appear at the same "height." For instance the style guide I'm following suggests using en dash to reduce the ambiguity in post-apocalyptic-–science fiction movies. It's only a small difference but I was curious if there is a proper way to handle this.

Here is a screenshot of what they suggest it should look like: screenshot from style guide

And here is what it looks like in my final pdf doc, notice how the hyphen is at one height and the en dash is at another:screenshot from my pdf

Here is an MWE:

\documentclass[]{book}

\begin{document}
post-apocalyptic--science fiction movies
\end{document}
share|improve this question
    
You could adjust the position with \raisebox{-0.1ex}{--}. Adjust the value -0.1ex to suit. –  Peter Grill Jul 9 '12 at 20:31
1  
This issue looks very much font dependent to me; and any fix you apply will be font-dependent as well (e.g. Adobe Garamond has a slightly tilted hyphen that would not allow a fix such as egreg's). Unless you really, really have to use an interword en-dash here, you might be better off changing the font altogether or forgetting about the dash (which is not an extremely widespread typographic practice). –  ienissei Jul 10 '12 at 17:52
add comment

2 Answers 2

You can define a "double hyphen" (if you really have to use it)

\documentclass{article}
\newcommand\dblhyphen{\mbox{-\kern-.1em-}\discretionary{}{}{}}
\begin{document}
post-apocalyptic\dblhyphen science fiction movies
\end{document}

enter image description here

share|improve this answer
add comment

use another font, e.g. Libertine as

\usepackage{libertine}% for pdflatex
\usepackage{libertineotf}% for xelatex/lualatex

Here the example for xelatex

\documentclass[]{book}
\usepackage{libertineotf}
\begin{document}
post-apocalyptic--science fiction movies
\end{document}

enter image description here

share|improve this answer
add comment

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.