From: "Vincent Belaïche" <vincent.b.1@hotmail.fr>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: "Juan Manuel Macías" <maciaschain@posteo.net>,
orgmode <emacs-orgmode@gnu.org>
Subject: RE: [RFC] Creole-style / Support for **emphasis**__within__**a word**
Date: Tue, 25 Jan 2022 17:18:31 +0000 [thread overview]
Message-ID: <PAXPR06MB80934E235AC7E2922105557E845F9@PAXPR06MB8093.eurprd06.prod.outlook.com> (raw)
In-Reply-To: <87ee4waxud.fsf@nicolasgoaziou.fr>
[-- Attachment #1: Type: text/plain, Size: 3431 bytes --]
Hello,
Actually the source was in UTF-8, but it was using only characters that exist in latin-9, and it is exported to LaTeX for inclusion in a LaTeX document that is in latin-9.
So I used an Emacs lisp snippet to make the export, and in this snippet after calling something like (org-export-to-buffer 'latex out-buffer nil nil nil t), I was doing some insertion like
(goto-char (point-max))
(insert "
% Local Variables:
% coding: latin-9
% End:
")
(save-buffer)
(kill-buffer)
so that the exported buffer is converted to latin-9 before being saved.
OK, when I inserted the zero width space this barked because of no zwsp (aka U+200B) in latin-9.
Then I tried something else, I rewrote the code with some some LaTeX snippet @@latex:\kern-0.5em\relax@@ in it, like this:
~--my-option=~ @@latex:\kern-0.5em\relax@@ /option value/
that was OK, but this really makes the OrgMode ugly (maybe a custom entity would be better), and also this works only for the LaTeX export.
Then, I tried something else, I passed « utf8,latin9 » options, to LaTeX inputenc package, instead of just « latin9 », and I kept my org mode document in UTF-8, just before exporting I did something like this in the input buffer:
(goto-char (point-max))
(insert "\n\n#+begin_export latex\n\\inputencoding{latin9}\n#+end_export\n")
(goto-char (point-min))
(insert "\n\n#+begin_export latex\n\\inputencoding{utf8}\n#+end_export\n")
this way the LaTeX processor is switching dynamically from latin9 to utf8 at the beginning of the doc, and back to latin9 at the end of it. But there are two pitfalls:
the first one is that zwsp are not defined in the inputenc utf8.def definition file, so having a zwsp character in the LaTeX code, even though utf8 is declared as input encoding make a LaTeX compilation error.
the second (but this is less serious I think …) is that my document ends with an enumerate list, and the orgmode exporter make the second begin_export go into the enumerate list, not after it. I mean I get in the output this:
\inputencoding{latin9}
\end{enumerate}
instead of this:
\end{enumerate}
\inputencoding{latin9}
My conlcusion is that for what I am after, an evolution of org-mode would be preferable, maybe I contribute something someday, so that writing one of the following would make it:
~--my-option=~\relax{}/option value/
~--my-option=~@@:@@/option value/
\left~--my-option=\right~/option value/
\left~--my-option=\right~\left/option value\right/
~--my-option=~\left/option value\right/
________________________________
De : Nicolas Goaziou <mail@nicolasgoaziou.fr>
Envoyé : mardi 25 janvier 2022 11:55
À : Vincent Belaïche <vincent.b.1@hotmail.fr>
Cc : Juan Manuel Macías <maciaschain@posteo.net>; orgmode <emacs-orgmode@gnu.org>
Objet : Re: [RFC] Creole-style / Support for **emphasis**__within__**a word**
Hello,
Vincent Belaïche <vincent.b.1@hotmail.fr> writes:
> Thank-you both for the reply, I should have mentioned that I am aware of
> this trick but it works only for document encodings which have the
> zero-width space, like UTF-8, I was after a fix for documents in
> ISO-8859-15, aka latin-9.
You mean the source itself is not UTF-8?
I don't think there's a solution for you then, unless you convert it to
UTF-8, of course.
Regards,
--
Nicolas Goaziou
[-- Attachment #2: Type: text/html, Size: 12293 bytes --]
next prev parent reply other threads:[~2022-01-25 17:41 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 13:11 [RFC] Creole-style / Support for **emphasis**__within__**a word** Jambunathan K
2014-03-04 14:55 ` Jambunathan K
2014-03-22 14:05 ` Nicolas Goaziou
2014-03-22 14:21 ` Bastien
2014-03-22 14:54 ` Andreas Leha
2014-03-22 15:22 ` Bastien
2014-03-22 15:30 ` Nicolas Goaziou
2014-03-22 15:37 ` Bastien
2014-03-23 0:53 ` Samuel Wales
2014-03-23 0:06 ` Marcin Borkowski
2014-03-23 11:32 ` Suvayu Ali
2014-03-23 11:39 ` Marcin Borkowski
2014-03-23 2:59 ` Jambunathan K
2022-01-24 10:50 ` [O] " Vincent Belaïche
2022-01-24 11:54 ` Nicolas Goaziou
2022-01-24 12:09 ` [O] " Juan Manuel Macías
2022-01-24 12:32 ` Vincent Belaïche
2022-01-25 10:55 ` Nicolas Goaziou
2022-01-25 17:18 ` Vincent Belaïche [this message]
2022-01-25 17:30 ` Juan Manuel Macías
2022-01-25 18:45 ` Vincent Belaïche
2022-01-25 17:52 ` Nicolas Goaziou
2022-01-25 18:20 ` Vincent Belaïche
2022-01-25 16:27 ` Max Nikulin
-- strict thread matches above, loose matches on Subject: below --
2014-03-04 13:00 Jambunathan K
2014-03-04 12:56 Jambunathan K
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PAXPR06MB80934E235AC7E2922105557E845F9@PAXPR06MB8093.eurprd06.prod.outlook.com \
--to=vincent.b.1@hotmail.fr \
--cc=emacs-orgmode@gnu.org \
--cc=maciaschain@posteo.net \
--cc=mail@nicolasgoaziou.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).