From mboxrd@z Thu Jan 1 00:00:00 1970 From: flaviostz@gmail.com (=?utf-8?Q?Fl=C3=A1vio?= de Souza) Subject: Re: Latex export error in tables Date: Tue, 10 Feb 2009 19:39:46 -0200 Message-ID: <87wsbyeztp.fsf@gmail.com> References: <871vua3xzv.fsf@gmail.com> <87hc36ylr4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LX0Kk-0000ww-B6 for emacs-orgmode@gnu.org; Tue, 10 Feb 2009 16:39:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LX0Ki-0000w8-Hq for emacs-orgmode@gnu.org; Tue, 10 Feb 2009 16:39:57 -0500 Received: from [199.232.76.173] (port=34044 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LX0Kh-0000w3-PL for emacs-orgmode@gnu.org; Tue, 10 Feb 2009 16:39:55 -0500 Received: from nf-out-0910.google.com ([64.233.182.190]:56902) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LX0Kh-0005ZX-65 for emacs-orgmode@gnu.org; Tue, 10 Feb 2009 16:39:55 -0500 Received: by nf-out-0910.google.com with SMTP id d3so11770nfc.26 for ; Tue, 10 Feb 2009 13:39:53 -0800 (PST) In-Reply-To: (Manish's message of "Mon\, 9 Feb 2009 19\:52\:56 +0530") 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@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Manish Cc: emacs-orgmode@gnu.org Manish writes: > On Mon, Feb 9, 2009 at 6:10 PM, Fl=C3=A1vio wrote: > [snip (44 lines)] >> >> This is not a utf-8 encoding problem. When I generate a tex file with or= g, I >> change manually from \usepackage[utf8]{inputenc} to >> \usepackage[latin1]{inputenc}. All characters are recognized without any >> problems. I tested it both in Linux and Windows XP. This works fine. >> >> Now I will try to narrow down my problem and see if we can find a soluti= on. I >> really believe the problem is in tex code generated by org. I will show = you the >> reason I am pointing the problem to org. >> >> If I have an org table in my file like this one: >> >> #+BEGIN: columnview :hlines 1 :vlines t :id "09.0001-ESCH" :skip-empty-r= ows t >> | | ITEM | Quotation | Sold | Required | >> |---+----------------------+-----------+------+----------| >> | | * Escopo Horas | 230 | 1640 | | >> | | ** Ger=C3=AAncia | 10 | | | >> | | ** Defini=C3=A7=C3=A3o | 50 | | | >> | | ** Configura=C3=A7=C3=A3o | 100 | | | >> | | ** Comis. & Start up | 50 | | | >> | | ** Documenta=C3=A7=C3=A3o | 20 | | | >> | / | <> | <> | <> | <> | >> #+END: >> >> Then I select the option to generate latex "[L] export as LaTeX to tempo= rary >> buffer" ( I only want the tex code, I am not going to do any further >> transformation on it ). The raw code for that specific part of the file = is: >> >> >> \begin{tabular}{l|l|r|l} >> ITEM & Quotation & Sold & Required \\ >> \hline >> * Escopo Horas & 230 & 1640 & \\ >> \textbf{* Ger=C3=AAncia & 10 & & \\ >> *} Defini=C3=A7=C3=A3o & 50 & & \\ >> \textbf{* Configura=C3=A7=C3=A3o & 100 & & \\ >> *} Comis. & Start up & 50 & & \\ >> ** Documenta=C3=A7=C3=A3o & 20 & & \\ >> \end{tabular} >> >> The problems I can point to in this code are: >> >> 1) The code "\textbf{* Ger=C3=AAncia" is wrong, it should be "\textbf{*}= Ger=C3=AAncia" >> 2) The code "*} Defini=C3=A7=C3=A3o" is wrong, it should be "\textbf{*} = Defini=C3=A7=C3=A3o". The >> same problem happens in other rows as you can see above. So all these op= en >> command lines will be the source for the errors. >> 3) One minor problem is that the character "&" at "Comis. & Start up" sh= ould be >> genrated as "\&". However this is a minor problem and I just dont use th= is >> character anymore. >> >> Now I will describe my solution (workaround) I found today for it. First= ly I >> changed my org table configuration to: >> >> #+BEGIN: columnview :hlines 2 :vlines t :id "09.0001-ESCH" :skip-empty-r= ows t >> | | ITEM | Quotation | Sold | Required | >> |---+----------------------+-----------+------+----------| >> | | * Escopo Horas | 230 | 1640 | | >> |---+----------------------+-----------+------+----------| >> | | ** Ger=C3=AAncia | 10 | | | >> |---+----------------------+-----------+------+----------| >> | | ** Defini=C3=A7=C3=A3o | 50 | | | >> |---+----------------------+-----------+------+----------| >> | | ** Configura=C3=A7=C3=A3o | 100 | | | >> |---+----------------------+-----------+------+----------| >> | | ** Comis.and Startup | 50 | | | >> |---+----------------------+-----------+------+----------| >> | | ** Documenta=C3=A7=C3=A3o | 20 | | | >> | / | <> | <> | <> | <> | >> #+END: >> >> With the option :hlines 2 my table has horizontal lines in every row. Wh= en I >> generate tex, it will look like this: >> >> \begin{tabular}{l|l|r|l} >> ITEM & Quotation & Sold & Required \\ >> \hline >> * Escopo Horas & 230 & 1640 & \\ >> \hline >> ** Ger=C3=AAncia & 10 & & \\ >> \hline >> ** Defini=C3=A7=C3=A3o & 50 & & \\ >> \hline >> ** Configura=C3=A7=C3=A3o & 100 & & \\ >> \hline >> ** Comis.and Start up & 50 & & \\ >> \hline >> ** Documenta=C3=A7=C3=A3o & 20 & & \\ >> \end{tabular} >> >> The above code is a perfect tex table and I get no errors, because now t= he code >> is generated with \hline. I needed to "deviate" org tex generation code = from >> using \textbuf.... :) > > That was quite detailed analysis so I tried to replicate it. > > This is the input file (I only added a first blank line and a dummy headi= ng): > > --8<---------------cut here---------------start------------->8--- > # > * test table > #+BEGIN: columnview :hlines 1 :vlines t :id "09.0001-ESCH" :skip-empty-r= ows t > | | ITEM | Quotation | Sold | Required | > |---+----------------------+-----------+------+----------| > | | * Escopo Horas | 230 | 1640 | | > | | ** Ger=EF=BF=BDncia | 10 | | | > | | ** Defini=EF=BF=BD=EF=BF=BDo | 50 | | | > | | ** Configura=EF=BF=BD=EF=BF=BDo | 100 | | | > | | ** Comis. & Start up | 50 | | | > | | ** Documenta=EF=BF=BD=EF=BF=BDo | 20 | | | > | / | <> | <> | <> | <> | > #+END: > --8<---------------cut here---------------end--------------->8--- > > I did a C-c C-e L to export to tex and following is what I got: > > --8<---------------cut here---------------start------------->8--- > % Created 2009-02-09 Mon 19:35 > \documentclass[11pt,a4paper]{article} > \usepackage[utf8]{inputenc} > \usepackage[T1]{fontenc} > \usepackage{hyperref} > > > \title{flavio} > \author{Manish Sharma} > \date{09 February 2009} > > \begin{document} > > \maketitle > > \section{test table} > \label{sec-1} > > > \begin{center} > \begin{tabular}{l|l|r|l} > ITEM & Quotation & Sold & Required \\ > \hline > * Escopo Horas & 230 & 1640 & \\ > ** Ger=EF=BF=BDncia & 10 & & \\ > ** Defini=EF=BF=BD=EF=BF=BDo & 50 & & = \\ > ** Configura=EF=BF=BD=EF=BF=BDo & 100 & & = \\ > ** Comis. \& Start up & 50 & & \\ > ** Documenta=EF=BF=BD=EF=BF=BDo & 20 & & = \\ > \end{tabular} > \end{center} > > > > \end{document} > --8<---------------cut here---------------end--------------->8--- > > It does not exhibit any of the three issues you listed. I have no clue w= hy it > works for me so I checked my latex export related settings but there's no= thing > interesting there. Now I know none of this helps you but thought I would= add > a data point. May be someone else can try too? > > --=20 > Manish > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > Thanks for your effort. Maybe it really has to do with my enconding system. Since I found a workaround, I will stop searching for a solution now. --=20 Fl=C3=A1vio de Souza flaviostz@gmail.com