From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manish Subject: Re: Re: Latex export error in tables Date: Mon, 9 Feb 2009 19:52:56 +0530 Message-ID: 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 1LWX2M-0006qK-Ov for emacs-orgmode@gnu.org; Mon, 09 Feb 2009 09:23:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWX2L-0006ps-AV for emacs-orgmode@gnu.org; Mon, 09 Feb 2009 09:23:01 -0500 Received: from [199.232.76.173] (port=34440 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWX2K-0006pj-IC for emacs-orgmode@gnu.org; Mon, 09 Feb 2009 09:23:00 -0500 Received: from ti-out-0910.google.com ([209.85.142.191]:50514) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LWX2J-0001wt-PE for emacs-orgmode@gnu.org; Mon, 09 Feb 2009 09:23:00 -0500 Received: by ti-out-0910.google.com with SMTP id j3so1630939tid.10 for ; Mon, 09 Feb 2009 06:22:56 -0800 (PST) In-Reply-To: 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: =?ISO-8859-1?B?Rmzhdmlv?= Cc: emacs-orgmode@gnu.org 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 org= , 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 solutio= n. I > really believe the problem is in tex code generated by org. I will show y= ou 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-ro= ws 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 tempor= ary > 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 i= s: > > > \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{*} D= efini=C3=A7=C3=A3o". The > same problem happens in other rows as you can see above. So all these ope= n > command lines will be the source for the errors. > 3) One minor problem is that the character "&" at "Comis. & Start up" sho= uld be > genrated as "\&". However this is a minor problem and I just dont use thi= s > character anymore. > > Now I will describe my solution (workaround) I found today for it. Firstl= y I > changed my org table configuration to: > > #+BEGIN: columnview :hlines 2 :vlines t :id "09.0001-ESCH" :skip-empty-ro= ws 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. Whe= n 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 th= e code > is generated with \hline. I needed to "deviate" org tex generation code f= rom > 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 heading= ): --8<---------------cut here---------------start------------->8--- # * test table #+BEGIN: columnview :hlines 1 :vlines t :id "09.0001-ESCH" :skip-empty-row= s 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 why= it works for me so I checked my latex export related settings but there's noth= ing interesting there. Now I know none of this helps you but thought I would a= dd a data point. May be someone else can try too? --=20 Manish