emacs-humanities
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emacs-humanities] electric-pair and non-breakable spaces


From: Juan Manuel Macías
Subject: Re: [emacs-humanities] electric-pair and non-breakable spaces
Date: Sun, 28 May 2023 09:57:52 +0000

l@tlo writes:

>>> Right in the middle of finishing my MA thesis in org-mode, I'm trying
>>> to fix the electric-pair mode default that inserts «» without the
>>> required non-breakable spaces that we have in French.
>> 
>> I understand that you put the french guillemets and spaces directly in
>> your Org document, right? I think it is best practice not to use
>> 'typographical quotes' in Org. That is, use inside Org the expected
>> quotes for plain text ("..."), and let the typographical conventions of
>> each language be resolved in the export.
>
> That's a very English centered option/process and I don't think that
> should be considered the proper way for people to write a French
> document in org-mode (or any text based format for that matter).

I understand your point of view, and I understand that you want to
consistently apply French orthotypography in all your documents written
in French. In Spanish, the correct first level quotation marks are also
«», as in French, but without spaces. Each language has its
orthotypographic rules. But, on the other hand, Org (like LaTeX) is a
plain text based system. IMHO, Org language is also a
'typographic-agnostic' format, and that makes it more efficient against
wysiwyg ways of working. Org is "what you see is what you mean".
Although we work in utf-8, I think it is usually more efficient to focus
on ASCII for a series of characters, and let the substitution (that is,
the correct character according to the rules of each language) be done
at the glyph level, in the typographical output, but not in the source
document. For that reason we often use '---' instead of the character EM
DASH U+2014, or '--' instead of EN DASH U+2013. Quotes would also fall
into this group of replaceable characters. I think it's more convenient
to do it like this than to explicitly add «...» with spaces.

However, if you want to still see french guillemets in your org document
(but keep the ascii quotes), you could add a layer of embellishment, for
example via org-entities...

>> In org you can use the
>> org-export-with-smart-quotes option (':t). A basic setup can be:
>
> That option does not take into account the « and » that are in the text and 
> thus does not produce the expected output.

org-export-with-smart-quotes only works if you use ascii quotes.

> It does not properly output secondary quotation marks either.

hmm, you're right. I think there is a bug in org-smart-quotes-alist. The
french inner quotes should be “...”, I think without spaces. However,
the current value is:

 ("fr"
  (primary-opening :utf-8 "« " :html "« " :latex "\\og " :texinfo 
"@guillemetleft{}@tie{}")
  (primary-closing :utf-8 " »" :html " »" :latex "\\fg{}" :texinfo 
"@tie{}@guillemetright{}")
  (secondary-opening :utf-8 "« " :html "« " :latex "\\og " :texinfo 
"@guillemetleft{}@tie{}")
  (secondary-closing :utf-8 " »" :html " »" :latex "\\fg{}" :texinfo 
"@tie{}@guillemetright{}")
  (apostrophe :utf-8 "’" :html "’"))

> Also, if I set the document to Japanese, the export won't convert the "..." 
> to the expected 「」.

org-smart-quotes-alist does not cover all languages. But patches can be
sent to add support for more cases, like Japanese. As you can see from
what I have put above, the syntax is pretty simple.

Best regards,

Juan Manuel 

-- 
--
------------------------------------------------------
Juan Manuel Macías 

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]