* [org-e-latex] Coding System
@ 2012-11-19 7:28 Achim Gratz
2012-11-19 13:33 ` Suvayu Ali
2012-11-19 17:46 ` Achim Gratz
0 siblings, 2 replies; 9+ messages in thread
From: Achim Gratz @ 2012-11-19 7:28 UTC (permalink / raw)
To: emacs-orgmode
When the new exporter produces a TeX file that contains unicode characters,
Emacs tries to save this file with coding systems `undecided-unix´ and
`iso-latin1-unix´, both of which don't work of course (and the latter would
likely be wrong for some characters). While it should be possible to change the
default coding systems to use, it would certainly be better if the exporter took
note of the
\usepackage[utf8]{inputenc}
and alter the coding system for saving the TeX file accordingly.
Regards,
Achim.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [org-e-latex] Coding System
2012-11-19 7:28 [org-e-latex] Coding System Achim Gratz
@ 2012-11-19 13:33 ` Suvayu Ali
2012-11-19 17:22 ` Achim Gratz
2012-11-19 17:46 ` Achim Gratz
1 sibling, 1 reply; 9+ messages in thread
From: Suvayu Ali @ 2012-11-19 13:33 UTC (permalink / raw)
To: emacs-orgmode
On Mon, Nov 19, 2012 at 07:28:30AM +0000, Achim Gratz wrote:
> When the new exporter produces a TeX file that contains unicode characters,
> Emacs tries to save this file with coding systems `undecided-unix´ and
> `iso-latin1-unix´, both of which don't work of course (and the latter would
> likely be wrong for some characters). While it should be possible to change the
> default coding systems to use, it would certainly be better if the exporter took
> note of the
>
> \usepackage[utf8]{inputenc}
>
> and alter the coding system for saving the TeX file accordingly.
>
This is not an answer to the issue above; but if you are using utf-8,
should you not already be having something like this in your init file?
(prefer-coding-system 'utf-8)
This should circumvent the problem.
Cheers,
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [org-e-latex] Coding System
2012-11-19 13:33 ` Suvayu Ali
@ 2012-11-19 17:22 ` Achim Gratz
0 siblings, 0 replies; 9+ messages in thread
From: Achim Gratz @ 2012-11-19 17:22 UTC (permalink / raw)
To: emacs-orgmode
Suvayu Ali writes:
> On Mon, Nov 19, 2012 at 07:28:30AM +0000, Achim Gratz wrote:
> This is not an answer to the issue above; but if you are using utf-8,
> should you not already be having something like this in your init file?
>
> (prefer-coding-system 'utf-8)
>
> This should circumvent the problem.
That's what I was saying, however I may not prefer the UTF-8 encoding
generally for other reasons. The exporter however should save the TeX
file with utf-8 coding regardless of any user preference because
otherwise TeX doesn't get the input encoding it's been told to expect.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [org-e-latex] Coding System
2012-11-19 7:28 [org-e-latex] Coding System Achim Gratz
2012-11-19 13:33 ` Suvayu Ali
@ 2012-11-19 17:46 ` Achim Gratz
2012-11-22 13:49 ` Nicolas Goaziou
1 sibling, 1 reply; 9+ messages in thread
From: Achim Gratz @ 2012-11-19 17:46 UTC (permalink / raw)
To: emacs-orgmode
I looked at the code/documentation and it seems the intention is to do
the reverse lookup, that is look at the buffer encoding and decide what
to give inputenc as argument (when it is specified as "AUTO" in the
header template). I maintain that the other way around (looking at the
header template and deciding the coding system) is probably easier to
understand and it is also what's already been used by Emacs: see
latexenc-find-file-coding-system and latex-inputenc-coding-alist.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
DIY Stuff:
http://Synth.Stromeko.net/DIY.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [org-e-latex] Coding System
2012-11-19 17:46 ` Achim Gratz
@ 2012-11-22 13:49 ` Nicolas Goaziou
2012-11-22 18:03 ` Achim Gratz
0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2012-11-22 13:49 UTC (permalink / raw)
To: Achim Gratz; +Cc: emacs-orgmode
Hello,
Achim Gratz <Stromeko@nexgo.de> writes:
> I looked at the code/documentation and it seems the intention is to do
> the reverse lookup, that is look at the buffer encoding and decide what
> to give inputenc as argument (when it is specified as "AUTO" in the
> header template). I maintain that the other way around (looking at the
> header template and deciding the coding system) is probably easier to
> understand and it is also what's already been used by Emacs: see
> latexenc-find-file-coding-system and latex-inputenc-coding-alist.
Emacs also provides `latexenc-coding-system-to-inputenc', so it doesn't
look like one way is more legitimate than the other.
Note that we can have both ways: with AUTO, let coding-system decide and
without AUTO, let inputenc decide. Also, it isn't necessary to change
the global coding system to change the coding system used to write the
file: see `org-export-coding-system'.
Anyway, if you think it's useful to provide a patch, I suggest to
dynamically bind `org-export-coding-system' in
`org-e-latex-export-to-latex' before `org-export-to-file' is called.
You'll have to open "outfile" in order to apply
`latexenc-find-file-coding-system'.
Do you want to provide such patch?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [org-e-latex] Coding System
2012-11-22 13:49 ` Nicolas Goaziou
@ 2012-11-22 18:03 ` Achim Gratz
2012-11-22 20:18 ` Thomas S. Dye
0 siblings, 1 reply; 9+ messages in thread
From: Achim Gratz @ 2012-11-22 18:03 UTC (permalink / raw)
To: emacs-orgmode
Nicolas Goaziou writes:
> Anyway, if you think it's useful to provide a patch, I suggest to
> dynamically bind `org-export-coding-system' in
> `org-e-latex-export-to-latex' before `org-export-to-file' is called.
> You'll have to open "outfile" in order to apply
> `latexenc-find-file-coding-system'.
Thanks for the pointers.
> Do you want to provide such patch?
I'll keep it on my watchlist. Can't make any promises right now, sorry.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [org-e-latex] Coding System
2012-11-22 18:03 ` Achim Gratz
@ 2012-11-22 20:18 ` Thomas S. Dye
2012-11-23 6:34 ` Achim Gratz
0 siblings, 1 reply; 9+ messages in thread
From: Thomas S. Dye @ 2012-11-22 20:18 UTC (permalink / raw)
To: Achim Gratz; +Cc: emacs-orgmode
Aloha Achim,
Achim Gratz <Stromeko@nexgo.de> writes:
> Nicolas Goaziou writes:
>> Anyway, if you think it's useful to provide a patch, I suggest to
>> dynamically bind `org-export-coding-system' in
>> `org-e-latex-export-to-latex' before `org-export-to-file' is called.
>> You'll have to open "outfile" in order to apply
>> `latexenc-find-file-coding-system'.
>
> Thanks for the pointers.
>
>> Do you want to provide such patch?
>
> I'll keep it on my watchlist. Can't make any promises right now, sorry.
I don't follow the details of this discussion, but I wonder how
important AUTO really is? It seems to me that a sweet setup uses
utf-8 in the buffer but exports latin-1 to LaTeX through use of entities
and filters (with the new exporter). This can yield a buffer display
that isn't complicated by all the LaTeX machinery, and export something
that is maximally compatible in the LaTeX world. It is nice on the eyes
and avoids encoding incompatibilities on the back-end.
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [org-e-latex] Coding System
2012-11-22 20:18 ` Thomas S. Dye
@ 2012-11-23 6:34 ` Achim Gratz
2012-11-23 7:36 ` Thomas S. Dye
0 siblings, 1 reply; 9+ messages in thread
From: Achim Gratz @ 2012-11-23 6:34 UTC (permalink / raw)
To: emacs-orgmode
Thomas S. Dye writes:
> I don't follow the details of this discussion, but I wonder how
> important AUTO really is?
I'm afraid I can't follow you…
AFAIK, specifying "AUTO" in the LaTeX header is supposed to be replaced
by whatever the coding system of the LaTeX buffer happens to be when it
gets saved. (I've never used it, so it might work differently.)
> It seems to me that a sweet setup uses utf-8 in the buffer but exports
> latin-1 to LaTeX through use of entities and filters (with the new
> exporter). This can yield a buffer display that isn't complicated by
> all the LaTeX machinery, and export something that is maximally
> compatible in the LaTeX world. It is nice on the eyes and avoids
> encoding incompatibilities on the back-end.
That is not what I was talking about, however useful it might be. I
have already defined the input encoding "utf8" in my LaTeX header and
want to ensure that the buffer gets saved in that format. As an
extension, if I specify any other encoding for LaTeX, the buffer should
be saved in a matching encoding, independently of the encoding that the
org buffer had. If that's a "downgrade", i.e. not all characters are
encodable in that new system, then what you describe above might become
necessary.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [org-e-latex] Coding System
2012-11-23 6:34 ` Achim Gratz
@ 2012-11-23 7:36 ` Thomas S. Dye
0 siblings, 0 replies; 9+ messages in thread
From: Thomas S. Dye @ 2012-11-23 7:36 UTC (permalink / raw)
To: Achim Gratz; +Cc: emacs-orgmode
Achim Gratz <Stromeko@nexgo.de> writes:
> Thomas S. Dye writes:
>> I don't follow the details of this discussion, but I wonder how
>> important AUTO really is?
>
> I'm afraid I can't follow you…
>
> AFAIK, specifying "AUTO" in the LaTeX header is supposed to be replaced
> by whatever the coding system of the LaTeX buffer happens to be when it
> gets saved. (I've never used it, so it might work differently.)
Yes, I believe the encoding is picked up from the Org buffer, but I
might be wrong.
>
>> It seems to me that a sweet setup uses utf-8 in the buffer but exports
>> latin-1 to LaTeX through use of entities and filters (with the new
>> exporter). This can yield a buffer display that isn't complicated by
>> all the LaTeX machinery, and export something that is maximally
>> compatible in the LaTeX world. It is nice on the eyes and avoids
>> encoding incompatibilities on the back-end.
>
> That is not what I was talking about, however useful it might be. I
> have already defined the input encoding "utf8" in my LaTeX header and
> want to ensure that the buffer gets saved in that format. As an
> extension, if I specify any other encoding for LaTeX, the buffer should
> be saved in a matching encoding, independently of the encoding that the
> org buffer had. If that's a "downgrade", i.e. not all characters are
> encodable in that new system, then what you describe above might become
> necessary.
Yes, that sounds useful. Thanks for the clarification.
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-11-23 7:37 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-19 7:28 [org-e-latex] Coding System Achim Gratz
2012-11-19 13:33 ` Suvayu Ali
2012-11-19 17:22 ` Achim Gratz
2012-11-19 17:46 ` Achim Gratz
2012-11-22 13:49 ` Nicolas Goaziou
2012-11-22 18:03 ` Achim Gratz
2012-11-22 20:18 ` Thomas S. Dye
2012-11-23 6:34 ` Achim Gratz
2012-11-23 7:36 ` Thomas S. Dye
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.