emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [babel] latex code in final pdf
@ 2009-11-17 11:05 andrea Crotti
  2009-11-17 15:04 ` Eric Schulte
  0 siblings, 1 reply; 3+ messages in thread
From: andrea Crotti @ 2009-11-17 11:05 UTC (permalink / raw)
  To: emacs-orgmode

I'm not so sure it's related to babel since it's in
#+BEGIN_SRC haskell

tags.

Anyway in short I see latex code in the final source
code block exported.
I updated from git org-mode.

This is the code that gives program:

  sumListCond :: Int -> Int -> [Int] -> Int
  sumListCond l n xs
      | foldl (+) 0 (take l xs) <= n = sumListCond (l + 1) n xs
      | otherwise = foldl (+) 0 (take (l - 1) xs)


I get this strange thing

sumListCond :: Int -> Int -> [Int] -> Int
sumListCond l n xs
\begin{center} \begin{tabular}{l}
foldl(+)0(takelxs)<=n=sumListCond(l+1)nxs \\
otherwise = foldl (+) 0 (take (l - 1) xs)	\\ \end{tabular} \end{center}


Who tell it to create a tabular in the center?
It's inside the source code block so it shoudn't evaluate "|" right?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [babel] latex code in final pdf
  2009-11-17 11:05 [babel] latex code in final pdf andrea Crotti
@ 2009-11-17 15:04 ` Eric Schulte
  2009-11-17 21:41   ` andrea Crotti
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Schulte @ 2009-11-17 15:04 UTC (permalink / raw)
  To: andrea Crotti; +Cc: emacs-orgmode

Hi Andrea,

It looks as thought the "|"s in your Haskell code are being interpreted
as tables by org-mode.  This was a problem a couple of months ago but
has since been fixed.  For example when I export

#+begin_src haskell
  sumListCond :: Int -> Int -> [Int] -> Int
  sumListCond l n xs
      | foldl (+) 0 (take l xs) <= n = sumListCond (l + 1) n xs
      | otherwise = foldl (+) 0 (take (l - 1) xs)
#+end_src

to latex I get

\begin{verbatim}
sumListCond :: Int -> Int -> [Int] -> Int
sumListCond l n xs
    | foldl (+) 0 (take l xs) <= n = sumListCond (l + 1) n xs
    | otherwise = foldl (+) 0 (take (l - 1) xs)
\end{verbatim}

as expected.  Maybe it is possible that even though you have the latest
org-mode on your computer your Emacs is still loading an older version?
If that is not the case then it could be something specific to your
configuration, which you can determine by starting Emacs with the -Q
option and then loading up org-mode manually and trying to re-create the
problem.

Best of luck -- Eric

andrea Crotti <andrea.crotti.0@gmail.com> writes:

> I'm not so sure it's related to babel since it's in
> #+BEGIN_SRC haskell
>
> tags.
>
> Anyway in short I see latex code in the final source
> code block exported.
> I updated from git org-mode.
>
> This is the code that gives program:
>
>   sumListCond :: Int -> Int -> [Int] -> Int
>   sumListCond l n xs
>       | foldl (+) 0 (take l xs) <= n = sumListCond (l + 1) n xs
>       | otherwise = foldl (+) 0 (take (l - 1) xs)
>
>
> I get this strange thing
>
> sumListCond :: Int -> Int -> [Int] -> Int
> sumListCond l n xs
> \begin{center} \begin{tabular}{l}
> foldl(+)0(takelxs)<=n=sumListCond(l+1)nxs \\
> otherwise = foldl (+) 0 (take (l - 1) xs)	\\ \end{tabular} \end{center}
>
>
> Who tell it to create a tabular in the center?
> It's inside the source code block so it shoudn't evaluate "|" right?
>
>
>
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [babel] latex code in final pdf
  2009-11-17 15:04 ` Eric Schulte
@ 2009-11-17 21:41   ` andrea Crotti
  0 siblings, 0 replies; 3+ messages in thread
From: andrea Crotti @ 2009-11-17 21:41 UTC (permalink / raw)
  To: emacs-orgmode

Eric Schulte <schulte.eric <at> gmail.com> writes:
> as expected.  Maybe it is possible that even though you have the latest
> org-mode on your computer your Emacs is still loading an older version?
> If that is not the case then it could be something specific to your
> configuration, which you can determine by starting Emacs with the -Q
> option and then loading up org-mode manually and trying to re-create the
> problem.
> 
> Best of luck -- Eric
> 

Me idiot I was using version in /Applications/Emacs.d because I changed a
 directory folder name, now it works very well, thanks!
Now I deleted the old one to make sure

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-11-17 21:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-17 11:05 [babel] latex code in final pdf andrea Crotti
2009-11-17 15:04 ` Eric Schulte
2009-11-17 21:41   ` andrea Crotti

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).