[Top][All Lists]

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

[Orgmode] Re: LaTeX export bugs?

From: Sébastien Vauban
Subject: [Orgmode] Re: LaTeX export bugs?
Date: Fri, 03 Jul 2009 10:18:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux)

Hi Carsten,

Carsten Dominik wrote:
> Sébastien Vauban wrote:
>>  - If you have a level 3 item under a level 1 item, the level 3 doesn't get
>>    exported to LaTeX. I know this is not a normal situation, but it happens
>>    when restructuring some text, and you loose it in the exported view...
> Yes, the parser currently requires the structure to be consistent and does
> not fail gracefully if not.....


>>    - Table with formulas and environment /framed/ :
>>      The following table will be framed, but TBL formulas do not work
>>      anymore.
>>        #+ATTR_LaTeX: align=lrrr
>>        #+LaTeX: \begin{framed}
>>        | Code      | \euro{} |  \% | \euro{} |
>>        |-----------+---------+-----+---------|
>>        | GSM       |         |     |    0.00 |
>>        | Internet  |  168.45 | 100 |  168.45 |
>>        | Matériel  |  295.99 | 100 |  295.99 |
>>        | Publicité |  214.25 |  33 |   70.70 |
>>        | Autres    |         |     |    0.00 |
>>        |-----------+---------+-----+---------|
>>        | Total     |         |     |  535.14 |
>>        #+LaTeX: \end{framed}
>>        #+TBLFM: $4=$2*$3/100;%.2f::@7$4=vsum(@address@hidden)
>>      Swapping these two last lines gives LaTeX errors... What's the
>>      solution for having both: an environment around the table and formulas
>>      that work?
> This is a hard problem.  It is on my list, but will not be fixed soon.

I had not seen this reply yet, when re-sending my question yesterday night.
I've got the solution from Chris to test...

>>      Why do I have to escape the sign symbol as soon as I put LaTeX
>>      commands (and not BEGIN..END_LaTeX) near it?
> I do not understand what you mean here.

I don't understand the details of the export process. For me, if I have such a

| Item     |  % |
| Sample 1 | 20 |

and I want it framed, adding `#+LaTeX: \begin{framed}' and `#+LaTeX:
\end{framed}' should be transparent for the Org -> LaTeX conversion process.

It is not: as soon as I do such a thing, I need to escape the `%' sign:

| Item     | \% |
| Sample 1 | 20 |

For me, the `%' should be escaped independently of whether I add or not such a
LaTeX tag.

>>    - Hyperlink to other sections: see [[To be referenced]]. Looking in the
>>      produced LaTeX code, it always link to the current section instead!
> Have not yet looked into this. Use IDs or custom IDs to links to sections,
> that is much better.


>>    - Quotes are sometimes exported in a weird /fashion/ : see "Industriels,
>>      et commerçants". And compare with the quotes in the next sample
>>      ("Industriels et commerçants").
> Fixed.

Thanks that *you* fixed it ;-)

>>      See as well that /fashion/ is not in italic above.
> It is for me

I guess you talk to someone else? ;-)

>>      Apparently because of the special non-breaking space following the
>>      second slash...
> Looks like the non-breaking space did not make it through
> the mailing process.  What exactly are you using?

Here is one non-breaking space: ` ', and here is what Emacs tells me about it
(when `C-u C-x ='):

--8<---------------cut here---------------start------------->8---
        character:   (160, #o240, #xa0)
preferred charset: unicode (Unicode (ISO10646))
       code point: 0xA0
           syntax: .    which means: punctuation
         category: .:Base, b:Arabic, j:Japanese, l:Latin
      buffer code: #xC2 #xA0
        file code: #xC2 #xA0 (encoded by coding system utf-8-emacs-unix)
          display: by display table entry [?øŽ€‚·] (see below)

The display table entry is displayed by these fonts (glyph codes):
øŽ€‚·: -- no font --
 face: `bold'

Character code properties: customize what to show
  general-category: Zs (Separator, Space)
  decomposition: (noBreak 32) (noBreak ' ')

There are text properties here:
  fontified            t
--8<---------------cut here---------------end--------------->8---

I insert them when I have a colon (for example) preceded by a space: that
space is automagically converted to non-breaking one, thanks to the following
code in my `.emacs' file:

--8<---------------cut here---------------start------------->8---
(defun my-insert-colon ()
  (if (eq (char-before) ?\ ) ; normal space
        (backward-delete-char 1)
        (if (equal mode-name "PDFLaTeX")
            (insert "~:") ; for LaTeX-only
          (insert " :"))) ; non-breaking space
    (insert ":")))

(defun my-double-keys ()
  "Specific keys."
  (local-set-key ":" 'my-insert-colon))

(add-hook 'text-mode-hook 'my-double-keys)
(add-hook 'message-mode-hook 'my-double-keys)
--8<---------------cut here---------------end--------------->8---

>>      BTW, a possibility would be to translate the "non-breaking space" to
>>      its LaTeX equivalent syntax (the "tilde" sign).

If you don't mind, this is on my wishlist of Org-mode features... You see my
Emacs code handles it when I write LaTeX myself, something I wanna avoid like
pest now that I'm more than delighted with the powerful possibilities and nice
reading presentation environment of Org.

Best regards... and thank you very much once again!

Sébastien Vauban

reply via email to

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