Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

emdash stops word separation/hyphenation in spanish prose

25 views
Skip to first unread message

Alanarion

unread,
Jun 2, 2012, 5:51:28 AM6/2/12
to
Hey!

I've been typesetting a novel for a spanish friend of mine and in
spanish typography it's standard, to mark talk/speech/dialogue with an
emdash.

Something like this:

—Hello my friend.
—Hello! So good to see you— he said.

Now the problem is that if a word is connected to an emdash, be it
through textemdash, the unicode sign, the unicode char definition,
xetex seems to be unable to hyphenate the word correctly. I end up
with millions of overfull hboxes because spanish has quite a lot long
words.

Is there a way to tell xetex to treat the emdash in spanish just like
a ?!. and still allow hyphenation of the connected word?

Thanks a lot for any help!

Khaled Hosny

unread,
Jun 2, 2012, 6:08:27 AM6/2/12
to
\XeTeXdashbreakstate=1 ?

Should be default in the upcoming TeX Live 2012

Enrico Gregorio

unread,
Jun 2, 2012, 6:23:36 AM6/2/12
to
Can you give an example? Just a paragraph that shows the problem
with the necessary instructions from the preamble.

Ciao
Enrico

Alanarion

unread,
Jun 2, 2012, 6:48:04 AM6/2/12
to
This is enabled, but doesn't help with the problem. :(

Alanarion

unread,
Jun 2, 2012, 6:46:31 AM6/2/12
to
On 2 Jun., 12:23, Enrico Gregorio <Facile.da.trov...@in.rete.it>
wrote:
\documentclass[a5paper,11pt,twoside,openright,DIV=calc,
chapterprefix=true,
headings=normal,
BCOR3mm
]{scrbook}
\XeTeXdashbreakstate=1
\usepackage[babelshorthands]{polyglossia}
\setmainlanguage{spanish}
\usepackage{fontspec}
\usepackage{xltxtra}
\usepackage{xunicode}

%\newfontfamily\unicodefont{Linux Libertine O}
\setmainfont[Mapping=tex-text]{Linux Libertine O}
\setsansfont{Linux Biolinum O}

\usepackage[protrusion=true]{microtype}
\begin{document}
—Un momento, ¿no será el mismo Steinwall que creó la aplicación de
Sharefilia, que causó tanto revuelo entre las grandes multinacionales
por permitir la compartición de cualquier documento de forma gratuita
y masiva?— preguntó Eva.
\end{document}


This is just a slice of text, that causes the problem. I know I could
manually set \- separation marks in the masiva word, then xetex would
separate the word, but since this is quite a long novel, there are
many, many places that this happens and whenever I fix one, it happens
that I get another overfull hbbox somewhere else, so I thought that
there might be some global way to allow xetex to still separate those
words.

Cheers!

as

unread,
Jun 2, 2012, 7:10:37 AM6/2/12
to
Le Sat, 2 Jun 2012 03:46:31 -0700 (PDT),
Alanarion <der.wa...@gmail.com> a écrit :
and what about something like that in your preambule?

\catcode`\—=\active
\def—{\hskip0pt\textemdash\hskip0pt}

(by the way, your _editor of choice_ should be able to replace the
culprit misplaced emdash in the whole file...)

--
Arnaud



Alanarion

unread,
Jun 2, 2012, 7:34:34 AM6/2/12
to
On 2 Jun., 13:10, as <n...@m.invalid> wrote:
> Le Sat, 2 Jun 2012 03:46:31 -0700 (PDT),
> Alanarion <der.waldge...@gmail.com> a écrit :
Thanks so much! That did the trick. :D

Weirdly enough I tried every alternative too. I tried \textemdash, I
tried using the unicode character command, I tried making the old
LaTeX --- work (which it doesn't by default in XeTeX).

Now using this:

\catcode`\—=\active
\def—{\hskip0pt\textemdash}

The space after the emdash is important, because the space marks if
the next part of the text is a new line of speech, or just added
descriptive text for the speech.

—Hello my friend —Hello dude!

In spanish typography apparently you can do that. So if they want to
mark something is not speech, but descriptive, they do it like this:

—Hello my friend— he said with a smile.

Weird to typeset... that much I can say :D

Thanks again for the help! You saved me a LOT of handish \- mark
setting.

Jellby

unread,
Jun 2, 2012, 7:17:52 AM6/2/12
to
Alanarion wrote:

> Something like this:
>
> —Hello my friend.
> —Hello! So good to see you— he said.

Be careful, the correct way is:

—Hello! So good to see you —he said.

(see <http://buscon.rae.es/dpdI/SrvltGUIBusDPD?clave=raya>, particularly
2.4)

--
Ignacio __ Fernández Galván
/ /\
Linux user / / \
#289967 / / /\ \ PGP Pub Key
/ / /\ \ \ 0x01A95F99
/ /_/__\ \ \
/________\ \ \
jellby \___________\/ yahoo.com
Message has been deleted

Lee Rudolph

unread,
Jun 2, 2012, 8:46:56 PM6/2/12
to
Alanarion <der.wa...@gmail.com> writes:

>On 2 Jun., 13:17, Jellby <m...@privacy.net> wrote:
>> Alanarion wrote:
>> > Something like this:
>>
>> > =97Hello my friend.
>> > =97Hello! So good to see you=97 he said.
>>
>> Be careful, the correct way is:
>>
>> =97Hello! So good to see you =97he said.
>>
>> (see <http://buscon.rae.es/dpdI/SrvltGUIBusDPD?clave=3Draya>, particularl=
>y
>> 2.4)
>>
>> --
>> =A0 =A0 =A0Ignacio __ Fern=E1ndez Galv=E1n
>> =A0 =A0 =A0 =A0 =A0 =A0 / /\
>> Linux user / / =A0\
>> #289967 =A0 / / /\ \ PGP Pub Key
>> =A0 =A0 =A0 =A0 =A0/ / /\ \ \ 0x01A95F99
>> =A0 =A0 =A0 =A0 / /_/__\ \ \
>> =A0 =A0 =A0 =A0/________\ \ \
>> jellby \___________\/ yahoo.com
>
>According to this, it's not.
>
>http://spanish.about.com/od/writtenspanish/a/angularquotes.htm

Given my previous (few but unhappy) experiences with "about.com",
I would not trust its claims on this matter over those of even a
site entirely unknown to me (like buscon.rae.es), so long as its
domain was .es.

I do wonder, however, whether there may be *different* typographical
conventions (as there certainly are different vocabularies, different
pronunciations, and non-trivially different grammars) for the various
languages all nominally "Spanish" (to English-speakers). Presumably
stylebooks for major publishing houses in, say, Madrid and various
Latin American capitals, would be the best sources for determining
normatively correct answers to such questions (and some of these
stylebooks, or their equivalents, may even be available on-line).

Lee Rudolph

Alanarion

unread,
Jun 2, 2012, 8:56:33 PM6/2/12
to
On 3 Jun., 02:46, Lee Rudolph <lrudo...@panix.com> wrote:
Yeah I've searched quite a bit. The about stuff is what came up most
of the time. The culprit here being, that I don't speak spanish :D...
So i can't even just grab a book and just check for a majority example
or anything. Maybe I'll just bug a couple of spanish friends to raid
their book cases and see what is done in most publications.

Jellby

unread,
Jun 3, 2012, 7:12:45 AM6/3/12
to
Alanarion wrote:

>> >According to this, it's not.
>>
>> >http://spanish.about.com/od/writtenspanish/a/angularquotes.htm
>>
>> Given my previous (few but unhappy) experiences with "about.com",
>> I would not trust its claims on this matter over those of even a
>> site entirely unknown to me (like buscon.rae.es), so long as its
>> domain was .es.

I'm a Spaniard, and I have never seen that kind (about.com's) of dash
spacing in real printed material. The buscon.rae.es address is from the RAE
(the Royal Spanish Academy), and that's the most authoritative source you
can find. Although sometimes the RAE "rules" differ a bit from the de facto
usage, in this matter it does not, I've always seen the dashes used as it
says there.

> Yeah I've searched quite a bit. The about stuff is what came up most
> of the time. The culprit here being, that I don't speak spanish :D...
> So i can't even just grab a book and just check for a majority example
> or anything. Maybe I'll just bug a couple of spanish friends to raid
> their book cases and see what is done in most publications.

A very useful site to discuss things about languages in general and Spanish
in particular is the forums at wordreference.com. Many people from different
countries hang about there and can give you more first-hand insights.

--
Ignacio __ Fernández Galván
/ /\

Lee Rudolph

unread,
Jun 3, 2012, 8:41:01 AM6/3/12
to
Jellby <m...@privacy.net> writes:

>Alanarion wrote:
>
>>> >According to this, it's not.
>>>
>>> >http://spanish.about.com/od/writtenspanish/a/angularquotes.htm
>>>
>>> Given my previous (few but unhappy) experiences with "about.com",
>>> I would not trust its claims on this matter over those of even a
>>> site entirely unknown to me (like buscon.rae.es), so long as its
>>> domain was .es.
>
>I'm a Spaniard, and I have never seen that kind (about.com's) of dash
>spacing in real printed material. The buscon.rae.es address is from the RAE
>(the Royal Spanish Academy), and that's the most authoritative source you
>can find.

I certainly accept their authority over Castilian; and perhaps those
Latin American countries (I know that Colombia is one) that call their
idiom "Castellano" may also. But do, for instance, the Uruguayans,
Chileans, or Argentinians?

The only Spanish (_sensu lato_) texts that I have on my shelves,
which were neither published in Spain nor as textooks in the USA
in an era when USAn pedagogues would never have dared expose USAn
students to "non-standard", non-Spanish Spanish, are poetry (e.g.,
Borges) so I can't find any evidence on my own easily.

Thanks for the information.

Lee Rudolph

Jellby

unread,
Jun 3, 2012, 11:11:14 AM6/3/12
to
Lee Rudolph wrote:

>>I'm a Spaniard, and I have never seen that kind (about.com's) of dash
>>spacing in real printed material. The buscon.rae.es address is from the
>>RAE (the Royal Spanish Academy), and that's the most authoritative source
>>you can find.
>
> I certainly accept their authority over Castilian; and perhaps those
> Latin American countries (I know that Colombia is one) that call their
> idiom "Castellano" may also. But do, for instance, the Uruguayans,
> Chileans, or Argentinians?

The DPD (Panhispanic Dictionary of Doubts, <dpd.rae.es>) was created by the
Association of Academies of the Spanish language, so it's not specific for
Spain, and it can be searched from the sites of the Mexican and Argentinian
Academies too, for instance.

By the way, although in English the word "Castilian" may be used to mean
"the Spanish used in Spain", in Spanish "castellano" and "español" can be
mostly used interchangeably, although some people/institutions may prefer
one or the other. The use of either of these names shouldn't be taken as a
"proof" for anything.

Jeffrey Goldberg

unread,
Jun 3, 2012, 3:04:12 PM6/3/12
to
On 12-06-03 10:11 AM, Jellby wrote:

> By the way, although in English the word "Castilian" may be used to mean
> "the Spanish used in Spain", in Spanish "castellano" and "español" can be
> mostly used interchangeably,

Exactly. "Castellano" within the Spanish speaking world is used to
distinguish from things like "Catalán" or "Galiciano". "Castellano" is
*not* used to distinguish between American (New World) and Iberian Spanish.

Considering the degree to which typographic/punctuation conventions vary
in the English speaking world, there is every reason to suspect that the
same is true in Spanish publications.

Anyway, the \hskip0pt\emdash\hskip0pt solution is the kind of thing that
I've used before for similar problems. I also gave a tiny bit of
stretchability to those hskips with something like \hskip0pt plus 1pt.
This was all a very very long time ago, and I can't recall the exact
details.

--
Jeffrey Goldberg http://goldmark.org/jeff/
I rarely read HTML or poorly quoting posts
Reply-To address is valid

Luis Rivera

unread,
Jun 6, 2012, 7:32:12 PM6/6/12
to
On Jun 2, 6:17 am, Jellby <m...@privacy.net> wrote:
> Alanarion wrote:
> > Something like this:
>
> > —Hello my friend.
> > —Hello! So good to see you— he said.
>
> Be careful, the correct way is:
>
> —Hello! So good to see you —he said.
>

I think you're wrong in this one, Jellby. Here it seems as if two
people were talking, while the use mentioned by Alanarion is precisely
parenthetical. AFAICS.

And I see books using that conventions a lot: I am a native speaker.

Cheers,

Luis.

Jellby

unread,
Jun 7, 2012, 8:49:39 AM6/7/12
to
That would be a parenthetical usage —like this would be—, but in dialogues
the usage is different. In dialogues, dashes are used in two ways:

1. To mark every change of speaker, with no space after. Usually, this
happen at the start of each paragraph. There's no "closing" dash in this
case. When the dialogue ends the text resumes in a new paragraph, without a
dash.

2. To enclose the narrator's (not the character's) words. If these words are
in the middle of a line, there's an opening and closing dash (as in
parenthetical use), with no space inside, but space outside (unless there's
a punctuation sign, as with parentheses). If they happen at the end of a
line (i.e. paragraph), the closing dash is omitted, but the opening one is
still written with no space after and a space before.

I cannot confirm this is the norm in every country, but I do state it is in
mine (Spain), and it is what the Association of Academies says, and I
suspect it is also the norm in other countries. I don't have many books
printed in other countries, but those I have use the same convention.

This is a sample from a random book from my library (La Regenta):

—¿Y ustedes? —dijo Quintanar.
—Nosotros —respondió Paco— nos hemos quedado sin cama porque la señora
gobernadora le dio el capricho de tener miedo a los truenos y quedarse a
dormir...
—¿De modo?... —preguntó Ana risueña.
—Que dormiremos en un sofá.

And a sample from a book printed in Venezuela
(http://books.google.es/books?id=3rpfnP659wgC&dq=rayuela&source=gbs_navlinks_s):

—Por supuesto —dijo la Maga—. Son cosas que se visitan tomando el ómnibus
que va a Pocitos.
—¿Y la gente conoce bien a Lautréamont, en Montevideo?
—¿Lautréamont? —preguntó la Maga.

As you see, exactly the same pattern. I have only seen different typesetting
in old (19th century or earlier) books, where the dashes were usually
printed with no spaces on either side.

¿Can you show a sample of a printed book that uses a different convention?
Preferably something between 1930 and 2000, or at least from a well-
recognized publisher. Older books may have the older typesetting, newer
books may be automated conversions from Project Gutenberg or similar.

Luis Rivera

unread,
Jun 8, 2012, 3:49:07 PM6/8/12
to
On Jun 7, 7:49 am, Jellby <m...@privacy.net> wrote:
>
> That would be a parenthetical usage —like this would be—, but in dialogues
> the usage is different. In dialogues, dashes are used in two ways:
>
> 1. To mark every change of speaker, with no space after. Usually, this
> happen at the start of each paragraph. There's no "closing" dash in this
> case. When the dialogue ends the text resumes in a new paragraph, without a
> dash.
>
> 2. To enclose the narrator's (not the character's) words. If these words are
> in the middle of a line, there's an opening and closing dash (as in
> parenthetical use), with no space inside, but space outside (unless there's
> a punctuation sign, as with parentheses). If they happen at the end of a
> line (i.e. paragraph), the closing dash is omitted, but the opening one is
> still written with no space after and a space before.
>

... and that's exactly the norm! Alanarion was using it wrong in the
case of parentheticals that reach the end of the paragraph.

I stand corrected.

Luis.

Javier Bezos

unread,
Jun 10, 2012, 3:23:48 AM6/10/12
to
0 new messages