emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: flaviostz@gmail.com (Flávio de Souza)
To: Manish <mailtomanish.sharma@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Latex export error in tables
Date: Tue, 10 Feb 2009 19:39:46 -0200	[thread overview]
Message-ID: <87wsbyeztp.fsf@gmail.com> (raw)
In-Reply-To: <e7cdbe30902090622l9bfe028ye4fc2c55b9b30f0c@mail.gmail.com> (Manish's message of "Mon\, 9 Feb 2009 19\:52\:56 +0530")

Manish <mailtomanish.sharma@gmail.com> writes:

> On Mon, Feb 9, 2009 at 6:10 PM, Flávio 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 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.... :)
>
> 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-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:
> --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�ncia            &         10  &        &            \\
>  ** Defini��o           &         50  &        &            \\
>  ** Configura��o        &        100  &        &            \\
>  ** Comis. \& Start up  &         50  &        &            \\
>  ** Documenta��o        &         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 nothing
> 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?
>
> -- 
> 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.

-- 
Flávio de Souza
flaviostz@gmail.com

      reply	other threads:[~2009-02-10 21:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-07 18:25 Latex export error in tables Flávio de Souza
2009-02-07 20:05 ` Manish
     [not found]   ` <87hc36ylr4.fsf@gmail.com>
2009-02-08 12:57     ` Manish
2009-02-09 12:40       ` Flávio
2009-02-09 12:51         ` R: " Giovanni Ridolfi
2009-02-09 14:22         ` Manish
2009-02-10 21:39           ` Flávio de Souza [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wsbyeztp.fsf@gmail.com \
    --to=flaviostz@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mailtomanish.sharma@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).