From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: Bugs when converting to LaTeX Date: Fri, 06 Nov 2009 12:34:50 +0100 Message-ID: <87ws2328f9.fsf@mundaneum.com> References: <87vdi26tv4.fsf@mundaneum.com> <2772DE22-D2EC-48F7-9703-FE1FFA68C91E@gmail.com> <87r5spp6ip.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Carsten, Carsten Dominik wrote: > On Oct 27, 2009, at 9:47 AM, S=C3=A9bastien Vauban wrote: >>> >>> Unfortunately, this is a weakness of the list parser in the LaTeX >>> exporter. It cannot handle this kind of post-subitem text in an item li= st. >>> This really must be fixed, and it is on my list, but it is hard. >> >> Hopefully, this will be fixed soon, because this is quite scary. Though, >> that does not imply it is easy to do... > > Be my guest to give it a try. I'd be glad my level for debugging Emacs Lisp was that high. Unfortunately, not sure it is... How do you do in such a case? Adding edebug calls in some functions? Other way? >> Here a couple of other conversion bugs that I found: >> >> --8<---------------cut here---------------start------------->8--- >> - /S'il faut remod=C3=A9liser ce qui est dans le code COBOL, comment fa= ire ? >> Discussions avec le business, relire le COBOL ? Chez nous, la >> tarification n'est pas mod=C3=A9lis=C3=A9e. Pourtant, c'est l=C3=A0 q= u'il faut aller >> vite vis-=C3=A0-vis du march=C3=A9./ > > You need to configure `org-emphasis-regexp-components' and increase the n= umber > of newlines allowed in these expressions. > >> >> The above "question" (in a FAQ) should be in italics. But, to do so, = we >> have to split it in multiple chunks in italics: >> >> - /S'il faut remod=C3=A9liser ce qui est dans le code COBOL, comment fa= ire ?/ >> /Discussions avec le business, relire le COBOL ?/ /Chez nous, la >> tarification n'est pas mod=C3=A9lis=C3=A9e./ /Pourtant, c'est l=C3=A0= qu'il faut aller >> vite vis-=C3=A0-vis du march=C3=A9./ >> >> - Le /challenge/ : efficacit=C3=A9 et rapidit=C3=A9... >> >> Here, the word challenge is not in italics because the following >> character is an unbreakable space (*not* a normal space). > > Maybe you can fix this by adding your unbreakable space in org- > emphasis-regexp-components to the end of the second string of characters, > these are the characters allowed after an emphasis string. Done it: --8<---------------cut here---------------start------------->8--- ;; Add the unbreakable space as allowed character after an emphasis ;; string, and modify the maximum number of newlines allowed in an ;; emphasis (setq org-emphasis-regexp-components '(" ('\"{" "- .,=C2=A0:!?;'\")}\\" " =0D\n,\"'" "." 4)) --8<---------------cut here---------------end--------------->8--- None of the above 2 mentionned problem seems to disappear, though, on this ECM: --8<---------------cut here---------------start------------->8--- - /S'il faut remod=C3=A9liser ce qui est dans le code COBOL, comment fair= e ? Discussions avec le business, relire le COBOL ? Chez nous, la vite vis-=C3=A0-vis du march=C3=A9./ The above "question" (in a FAQ) should be in italics. But, to do so, we have to split it in multiple chunks in italics: - /S'il faut remod=C3=A9liser ce qui est dans le code COBOL, comment fair= e ?/ /Discussions avec le business, relire le COBOL ?/ /Chez nous, la tarification n'est pas mod=C3=A9lis=C3=A9e./ /Pourtant, c'est l=C3=A0 q= u'il faut aller vite vis-=C3=A0-vis du march=C3=A9./ - Le /challenge/=C2=A0: efficacit=C3=A9 et rapidit=C3=A9... Here, the word challenge is not in italics because the following charac= ter is an unbreakable space (*not* a normal space). Note -- I'm forced to use such characters in order to get my LaTeX = PDF correctly outputted. Anyway, under Emacs, the normal space is converted to an unbreakable one, each time it is before a ":" character, so that's easy to do, but the output is not correctly converted. --8<---------------cut here---------------end--------------->8--- >> Note -- I'm forced to use such characters in order to get my LaTeX >> PDF correctly outputted. > > I don't understand that. Could you please elaborate? Yes. I mean: would I write pure LaTeX from scratch, I would insert `~' here and there when I want an unbreakable space to be produced (resulting in a n= ice PDF output). Here, as I write pure Org that gets converted, I need to insert a real unbreakable space in my Org source. That's the source of some problems, such as the second above mentionned (emphasis not correct after word "challenge"= ). Note -- Currently, that character is not converted to a tilde when exporting to LaTeX. That could be a good option, though. Best regards, Seb --=20 S=C3=A9bastien Vauban _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode-mXXj517/zsQ@public.gmane.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode