* [new exporter] Problems with entities
@ 2012-08-27 9:08 Thomas Holst
2012-08-27 9:33 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Holst @ 2012-08-27 9:08 UTC (permalink / raw)
To: org-mode mailing list
Hello,
first I want to thank you all for org-mode 7.9! The list of changes is
incredible!
While testing the new exporter we encountered problems with entities. We
tried to make ligations work. In LaTeX you write '\/' for a ligation
e.g. 'f\/ifteen'. To achieve that we set `org-entities-user':
#+BEGIN_SRC emacs-lisp
(setq org-entities-user
'("Ligatur" "\\/" nil "" "" "" ""))
#+END_SRC
The following text is used to show the problem:
Dies ist eine Ligatur: f\/ifteen \alpha ab\-cd.
With the old exporter the translation to LaTeX is:
Dies ist eine Ligatur: f\/ifteen $\alpha$ ab\-cd.
Which is the expected result. With the new exporter we get:
Dies ist eine Ligatur: f$\backslash$/ifteen $\alpha$
ab$\backslash$-cd.
As you can see the shy hyphen is also wrong. But \alpha is exported
correctly. So I don't know what is happening here.
--
Bis neulich ...
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [new exporter] Problems with entities
2012-08-27 9:08 [new exporter] Problems with entities Thomas Holst
@ 2012-08-27 9:33 ` Nicolas Goaziou
2012-08-27 10:02 ` Thomas Holst
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2012-08-27 9:33 UTC (permalink / raw)
To: Thomas Holst; +Cc: org-mode mailing list
Hello,
Thomas Holst <thomas.holst@de.bosch.com> writes:
> While testing the new exporter we encountered problems with entities. We
> tried to make ligations work. In LaTeX you write '\/' for a ligation
> e.g. 'f\/ifteen'. To achieve that we set `org-entities-user':
>
> #+BEGIN_SRC emacs-lisp
> (setq org-entities-user
> '("Ligatur" "\\/" nil "" "" "" ""))
> #+END_SRC
>
> The following text is used to show the problem:
>
> Dies ist eine Ligatur: f\/ifteen \alpha ab\-cd.
>
> With the old exporter the translation to LaTeX is:
>
> Dies ist eine Ligatur: f\/ifteen $\alpha$ ab\-cd.
>
> Which is the expected result. With the new exporter we get:
>
> Dies ist eine Ligatur: f$\backslash$/ifteen $\alpha$
> ab$\backslash$-cd.
>
> As you can see the shy hyphen is also wrong. But \alpha is exported
> correctly. So I don't know what is happening here.
You have defined an entity named "Ligatur". If you want to apply it
during export, you have to write either \Ligatur or \Ligatur{}. For
example, \alpha is correctly exported since there is:
("alpha" "\\alpha" t "α" "alpha" "alpha" "α")
in `org-entities'.
Note that old exporter doesn't apply your entity either (entities usage
doesn't change between both exporters). It just gives up each time he
sees a backslash which isn't followed by a known entity name, assuming
this will be handled by LaTeX.
HTH,
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [new exporter] Problems with entities
2012-08-27 9:33 ` Nicolas Goaziou
@ 2012-08-27 10:02 ` Thomas Holst
2012-08-27 13:41 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Holst @ 2012-08-27 10:02 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: org-mode mailing list
Hi Nicolas,
· Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Hello,
>
> Thomas Holst <thomas.holst@de.bosch.com> writes:
>
>> While testing the new exporter we encountered problems with entities. We
>> tried to make ligations work. In LaTeX you write '\/' for a ligation
>> e.g. 'f\/ifteen'. To achieve that we set `org-entities-user':
>>
>> #+BEGIN_SRC emacs-lisp
>> (setq org-entities-user
>> '("Ligatur" "\\/" nil "" "" "" ""))
>> #+END_SRC
>>
[ ... ]
>
> You have defined an entity named "Ligatur". If you want to apply it
> during export, you have to write either \Ligatur or \Ligatur{}. For
> example, \alpha is correctly exported since there is:
>
> ("alpha" "\\alpha" t "α" "alpha" "alpha" "α")
>
> in `org-entities'.
>
> Note that old exporter doesn't apply your entity either (entities usage
> doesn't change between both exporters). It just gives up each time he
> sees a backslash which isn't followed by a known entity name, assuming
> this will be handled by LaTeX.
thanks for explaining. I now have:
#+BEGIN_SRC emacs-lisp
(setq org-entities-user
'(("lig" "\\/" nil "" "" "" "")))
#+END_SRC
Now it works as expected and explained by you. There was an error in my
initial version. It was only a list not a list containing lists.
Thanks again.
--
Bis neulich ...
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [new exporter] Problems with entities
2012-08-27 10:02 ` Thomas Holst
@ 2012-08-27 13:41 ` Nicolas Goaziou
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2012-08-27 13:41 UTC (permalink / raw)
To: Thomas Holst; +Cc: org-mode mailing list
Hello,
Thomas Holst <thomas.holst@de.bosch.com> writes:
> Now it works as expected and explained by you. There was an error in my
> initial version. It was only a list not a list containing lists.
Actually, I overlooked the second part of your example:
Dies ist eine Ligatur: f\/ifteen \alpha ab\-cd.
ab\-cd should be exported as-as, not as ab$\backslash$-cd, since "\-" is
considered as a special string (see `org-export-with-special-strings').
I fixed that mistake in the new exporter.
Thanks again.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-08-27 13:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-27 9:08 [new exporter] Problems with entities Thomas Holst
2012-08-27 9:33 ` Nicolas Goaziou
2012-08-27 10:02 ` Thomas Holst
2012-08-27 13:41 ` Nicolas Goaziou
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).