From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?b?RmzDoXZpbw==?= Subject: Re: Latex export error in tables Date: Mon, 9 Feb 2009 12:40:29 +0000 (UTC) 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: 8bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWVRL-0007Sj-85 for emacs-orgmode@gnu.org; Mon, 09 Feb 2009 07:40:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWVRK-0007Rd-5i for emacs-orgmode@gnu.org; Mon, 09 Feb 2009 07:40:42 -0500 Received: from [199.232.76.173] (port=34424 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWVRJ-0007RS-Ui for emacs-orgmode@gnu.org; Mon, 09 Feb 2009 07:40:42 -0500 Received: from main.gmane.org ([80.91.229.2]:40516 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LWVRJ-0008Na-0W for emacs-orgmode@gnu.org; Mon, 09 Feb 2009 07:40:41 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LWVRH-0001Um-E1 for emacs-orgmode@gnu.org; Mon, 09 Feb 2009 12:40:40 +0000 Received: from 200-225-219-138.static.ctbctelecom.com.br ([200.225.219.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 09 Feb 2009 12:40:39 +0000 Received: from flaviostz by 200-225-219-138.static.ctbctelecom.com.br with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 09 Feb 2009 12:40:39 +0000 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: emacs-orgmode@gnu.org Manish gmail.com> writes: > > 2009/2/8 Flávio de Souza > [...] > > > > I tried with smaller files (only one dynamic block) but the problem > > seems to disappear. I made some other attempts, but all useless. So I > > think is something related with all those blocks I am using in this > > particular org file. > > Did those other files contain utf-8 characters? > > > > > > > Problem happens 100% time when using my complete, that's the reason I > > sent the whole file. > > > [snip: pdflatex compile log] > > (/usr/share/texmf-texlive/tex/generic/babel/babel.def))) (./projeto.aux) > > Runaway argument? > > {\contentsline {subsection}{\numberline {4.1}Por qu\GenericError {(in\ETC. > > ! File ended while scanning use of \@writefile. > > > > \par > > l.14 \begin{document} > > > > (/usr/share/texmf/tex/context/base/supp-pdf.tex > > [Loading MPS to PDF converter (version 2006.09.02).] > > ) (/usr/share/texmf-texlive/tex/latex/hyperref/nameref.sty > > (/usr/share/texmf-texlive/tex/latex/oberdiek/refcount.sty)) (./projeto.out) > > (./projeto.out) > > > > ! Package inputenc Error: Unicode char \u8:ávi not set up for use with LaTeX. > > I think this is an issue at a more fundamental level than with export to Latex > from Org. Are you able to compile *any* utf-8 encoded tex file to PDF in your > setup at all (whether generated by Org or something else?) I am no unicode > expert. May be you would like to pursue this issue in parallel in some > tex|latex|pdflatex group as well? > Manish, 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 solution. 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-rows t | | ITEM | Quotation | Sold | Required | |---+----------------------+-----------+------+----------| | | * Escopo Horas | 230 | 1640 | | | | ** Gerência | 10 | | | | | ** Definição | 50 | | | | | ** Configuração | 100 | | | | | ** Comis. & Start up | 50 | | | | | ** Documentação | 20 | | | | / | <> | <> | <> | <> | #+END: Then I select the option to generate latex "[L] export as LaTeX to temporary 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ência & 10 & & \\ *} Definição & 50 & & \\ \textbf{* Configuração & 100 & & \\ *} Comis. & Start up & 50 & & \\ ** Documentação & 20 & & \\ \end{tabular} The problems I can point to in this code are: 1) The code "\textbf{* Gerência" is wrong, it should be "\textbf{*} Gerência" 2) The code "*} Definição" is wrong, it should be "\textbf{*} Definição". The same problem happens in other rows as you can see above. So all these open command lines will be the source for the errors. 3) One minor problem is that the character "&" at "Comis. & Start up" should be genrated as "\&". However this is a minor problem and I just dont use this character anymore. Now I will describe my solution (workaround) I found today for it. Firstly I changed my org table configuration to: #+BEGIN: columnview :hlines 2 :vlines t :id "09.0001-ESCH" :skip-empty-rows t | | ITEM | Quotation | Sold | Required | |---+----------------------+-----------+------+----------| | | * Escopo Horas | 230 | 1640 | | |---+----------------------+-----------+------+----------| | | ** Gerência | 10 | | | |---+----------------------+-----------+------+----------| | | ** Definição | 50 | | | |---+----------------------+-----------+------+----------| | | ** Configuração | 100 | | | |---+----------------------+-----------+------+----------| | | ** Comis.and Startup | 50 | | | |---+----------------------+-----------+------+----------| | | ** Documentação | 20 | | | | / | <> | <> | <> | <> | #+END: With the option :hlines 2 my table has horizontal lines in every row. When 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ência & 10 & & \\ \hline ** Definição & 50 & & \\ \hline ** Configuração & 100 & & \\ \hline ** Comis.and Start up & 50 & & \\ \hline ** Documentação & 20 & & \\ \end{tabular} The above code is a perfect tex table and I get no errors, because now the code is generated with \hline. I needed to "deviate" org tex generation code from using \textbuf.... :) I am not a specialist in Tex, I dont even know what \textbf means :) ... ... and I am still learning org, but in my opinion the problem is when org generates the tex code. Maybe Carsten can give his opinion too. Thanks Flávio.