Fonts & Character Sets ⇒ Space before/after ---
Space before/after ---
I am typing a document in French and I need to automatically get a fine space (unbreakable) after opening emdash and before closing dash.
How can I do that.
Best,
Fred
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Space before/after ---
babel helps you with punctuation in french. I am not sure,though, what you mean by opening em-dash. Can you elaborate a bit on that?
Code: Select all
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{csquotes}
\begin{document}
French is nice; Isn't it?
Yes! See:
\enquote{This is supposed to be a french quote}
thinking about it--this is not worth to be thought about.
\end{document}
Space before/after ---
I have typed
blahblah ---quotehere--- blahblah
And I would like tex to understand
blahblah ---\,{}quotehere\,{}--- blahblah
-Fred
Space before/after ---
blahblah
(from the example in the crosspost) semantically is supposed to mean I'd define a new macro or environmentCode: Select all
\newcommand\thought[1]{---\,#1\,---}
\thought{blahblah}
in the document.Regards
Re: Space before/after ---
No automatic trick? I mean a package option that would do the job?
Space before/after ---
---
is just a ligature and not a macro. But even if it were: it wouldn't be easy to make it know when a thought starts and when it ends. Using a macro like I suggested is a much simpler solution. Regards