emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-export-region-as-latex exports more than region
@ 2008-01-28 19:41 Scott Otterson
  2008-02-03  8:22 ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Scott Otterson @ 2008-01-28 19:41 UTC (permalink / raw)
  To: emacs-orgmode

Tables are one of the handiest org mode features, especially since I can 
export them into latex.  But there's a small bug:  If I select a single 
table in an org file, and then type:

    M-x org-export-region-as-latex

org mode exports all tables in that file, plus some miscellaneous headlines.

Scott

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

* org-export-region-as-latex exports more than region
@ 2008-01-28 19:41 Scott Otterson
  0 siblings, 0 replies; 8+ messages in thread
From: Scott Otterson @ 2008-01-28 19:41 UTC (permalink / raw)
  To: emacs-orgmode

Tables are one of the handiest org mode features, especially since I can 
export them into latex.  But there's a small bug:  If I select a single 
table in an org file, and then type:

    M-x org-export-region-as-latex

org mode exports all tables in that file, plus some miscellaneous headlines.

Scott

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

* Re: org-export-region-as-latex exports more than region
  2008-01-28 19:41 org-export-region-as-latex exports more than region Scott Otterson
@ 2008-02-03  8:22 ` Carsten Dominik
  2008-02-06 19:38   ` Scott Otterson
  2008-02-07  0:08   ` Nick Dokos
  0 siblings, 2 replies; 8+ messages in thread
From: Carsten Dominik @ 2008-02-03  8:22 UTC (permalink / raw)
  To: Scott Otterson; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 986 bytes --]


On Jan 28, 2008, at 8:41 PM, Scott Otterson wrote:

> Tables are one of the handiest org mode features, especially since I  
> can export them into latex.  But there's a small bug:  If I select a  
> single table in an org file, and then type:
>
>   M-x org-export-region-as-latex

This command creates a temporary buffer with the LaTeX code but does  
not write it
to a file.  You are supposed to copy the code from the temporary buffer.

If you select a table and then export to latex normally, you should  
get a
file with just the table and some document setup around it.

So maybe this is a misunderstanding, or I cannot reproduce what you  
describe.

- Carsten

>
>
> org mode exports all tables in that file, plus some miscellaneous  
> headlines.
>
> Scott
>
>
> _______________________________________________
> 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


[-- Attachment #1.2: Type: text/html, Size: 1566 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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] 8+ messages in thread

* Re: org-export-region-as-latex exports more than region
  2008-02-03  8:22 ` Carsten Dominik
@ 2008-02-06 19:38   ` Scott Otterson
  2008-02-08 18:07     ` Scott Otterson
  2008-02-07  0:08   ` Nick Dokos
  1 sibling, 1 reply; 8+ messages in thread
From: Scott Otterson @ 2008-02-06 19:38 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 940 bytes --]

Carsten Dominik wrote:
> This command creates a temporary buffer with the LaTeX code but does 
> not write it
> to a file.  You are supposed to copy the code from the temporary buffer.
Yes, that was my eventual understanding too --  it might be a good idea 
to rename the function to something like "org-export-as-latex-buffer" or 
something like that.
>
> If you select a table and then export to latex normally, you should get a
> file with just the table and some document setup around it.
>
> So maybe this is a misunderstanding, or I cannot reproduce what you 
> describe.
Huh, for me, both 'org-export-region-as-latex' and 'org-export-as-latex' 
export all the tables, regardless of whether or not only one of them is 
highlighted.  I've attached an example org file.  If I select last table 
in the file, all tables are exported.  I wonder if this might have 
something to do with this particular document or maybe my .emacs?

Scott

[-- Attachment #2: tmp.tex --]
[-- Type: text/x-tex, Size: 2435 bytes --]

% Created 2008-02-06 Wed 11:32
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}


\title{* RUNS}
\author{Scott Otterson}
\date{06 February 2008}

\begin{document}

\maketitle

\textbf{*} Updated to Xavi's latest cvs on cluster and BeamformIt on 10/2/06

\begin{tabular}{llrl}
 corpus  &  data set  &  run  &  comment  \\
\hline
 rt04s   &  del4xs    &  63+  &           \\
\end{tabular}


    \underline{Runs below with new code: [[CVS tag of my code w/ new PCA][CVS tag of my code w/ new PCA]]} 
\begin{tabular}{llrl}
 corpus  &  data set     &    run  &  comment                           \\
\hline
 rt05se  &  xc5          &  1598+  &  1416, no NR                       \\
 rt04s   &  NRall.xc1.0  &  1655+  &  1.0s XC, 0.5s ER, new PCA all NR  \\
 rt05se  &  NRall.xc1.0  &  1677+  &  1.0s XC, 0.5s ER, new PCA all NR  \\
\end{tabular}

    \underline{below, removed feat3/4 merge stream feats so that remStuckFrms.m will get called}
\begin{tabular}{lrl}
 devDD  &  broken speech tools 7226  &  XC1ref, *, NR on, in case this matters for low dim pca input (dfw=1)  \\
 tstDD  &               broken 7262  &  XC1ref, *, NR on, in case this matters for low dim pca input (dfw=1)  \\
\hline
 dtDD   &                      6474  &  dimPick, ent1G, entNLG                                                \\
 dtDD   &                      6535  &  dimPick, many new methods                                             \\
\end{tabular}


\begin{tabular}{rrrrlrrrrl}
         &         &        &         &     &         &         &        &          &                    \\
\hline
    dev  &         &        &    dev  &     &    tst  &         &        &          &  dev               \\
 runNum  &  worst  &  best  &    tot  &     &    tot  &  worst  &  best  &  runNum  &  note              \\
\hline
  04677  &  49.26  &  2.75  &  18.04  &     &  17.29  &  46.08  &  2.96  &   04680  &  baseline, dfw==0  \\
  05739  &  44.36  &   3.3  &  16.01  &     &  15.03  &  40.15  &  1.96  &   05746  &  baseline, dfw==1  \\
  05386  &  36.36  &  2.58  &  15.17  &     &  13.03  &   24.3  &  3.65  &   05373  &  XC-PCA            \\
  05454  &   44.2  &  6.29  &  19.73  &     &  20.26  &  42.99  &  5.88  &   05455  &  ER/XC             \\
  05716  &  36.39  &  2.36  &  15.22  &     &  13.42  &  30.47  &  2.34  &   05733  &  XCfCCA.dMI.3      \\
\end{tabular}


\end{document}

[-- Attachment #3: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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] 8+ messages in thread

* Re: org-export-region-as-latex exports more than region
  2008-02-03  8:22 ` Carsten Dominik
  2008-02-06 19:38   ` Scott Otterson
@ 2008-02-07  0:08   ` Nick Dokos
  2008-02-07  9:41     ` Carsten Dominik
  2008-02-08 15:13     ` Bastien Guerry
  1 sibling, 2 replies; 8+ messages in thread
From: Nick Dokos @ 2008-02-07  0:08 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Carsten Dominik <dominik@science.uva.nl> wrote:

> 
> On Jan 28, 2008, at 8:41 PM, Scott Otterson wrote:
> 
>     Tables are one of the handiest org mode features, especially since I can export them into latex.  But there's a small bug:  If I
>     select a single table in an org file, and then type:
>    
>       M-x org-export-region-as-latex
>     org mode exports all tables in that file, plus some miscellaneous headlines.

> If you select a table and then export to latex normally, you should get a
> file with just the table and some document setup around it.
> 
> So maybe this is a misunderstanding, or I cannot reproduce what you describe.
> 

GNU Emacs 22.1.50.2 (i686-pc-linux-gnu, GTK+ Version 2.10.11) of 2007-11-23
Org-mode version 5.19a

I tried to do this with a file that contains a headline, a little text
and two copies of the same table (I shortened the second one so I could
tell which one is which). If there is nothing before the headline:

------------------------------cut--------------------------------------------
* Headline

text text text

| first table elided
#+TBLFM: $2=2*$1+1::$3=$2 % 8::$4=$2^2::$5=$4 - 1::$6=($2*$2 - 1) / 8::$7=$6 % 2

| second table elided
#+TBLFM: $2=2*$1+1::$3=$2 % 8::$4=$2^2::$5=$4 - 1::$6=($2*$2 - 1) / 8::$7=$6 % 2
------------------------------cut--------------------------------------------

and I select everything from the beginning to the empty line separating
the two tables, then I get a very "interesting" buffer when I run
org-export-region-as-latex. It contains:

 - The standard latex preamble.

 - The headline in an \itemize environment.

 - The text.

 - One \tabular environment containing the first table concatenated with
   the second table.

 - We then repeat items 2 and 3.

 - One \tabular environment containing the first table.

 - Then a \section with the headline.

 - Then the text.

 - Then another \tabular containing the first table.


If I add an empty line before the headline and select from the beginning
(i.e. including the empty line just added) to the empty line between the
two tables, everything works as expected. If I omit the initial empty
line from the region (i.e. select from the headline on), I get crazy
output but not quite as crazy as before: the fourth and fifth items
above are not there, but everything else is.

I did a little tracing and it looks to me that the function
org-export-latex-first-lines returns much more than it should in the two
strange cases above.

HTH,
Nick

PS. Here is a suggestion so that org-version behaves like emacs-version -
makes it easier to insert version strings in mail messages and bug reports:

(defun org-version (&optional here)
  (interactive "P")
  (let ((version (format "Org-mode version %s" org-version)))
    (message version)
    (if here
        (insert version))))

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

* Re: org-export-region-as-latex exports more than region
  2008-02-07  0:08   ` Nick Dokos
@ 2008-02-07  9:41     ` Carsten Dominik
  2008-02-08 15:13     ` Bastien Guerry
  1 sibling, 0 replies; 8+ messages in thread
From: Carsten Dominik @ 2008-02-07  9:41 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode


On Feb 7, 2008, at 1:08 AM, Nick Dokos wrote:
> PS. Here is a suggestion so that org-version behaves like emacs- 
> version -
> makes it easier to insert version strings in mail messages and bug  
> reports:
>
> (defun org-version (&optional here)
>  (interactive "P")
>  (let ((version (format "Org-mode version %s" org-version)))
>    (message version)
>    (if here
>        (insert version))))


Good suggestion, I will use this.  Thanks.

- Carsten

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

* Re: org-export-region-as-latex exports more than region
  2008-02-07  0:08   ` Nick Dokos
  2008-02-07  9:41     ` Carsten Dominik
@ 2008-02-08 15:13     ` Bastien Guerry
  1 sibling, 0 replies; 8+ messages in thread
From: Bastien Guerry @ 2008-02-08 15:13 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode

Nick Dokos <nicholas.dokos@hp.com> writes:

> I did a little tracing and it looks to me that the function
> org-export-latex-first-lines returns much more than it should in the
> two strange cases above.

I fixed this in the git repo.

Thanks for the detailed report and sorry for the delay.

-- 
Bastien

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

* Re: org-export-region-as-latex exports more than region
  2008-02-06 19:38   ` Scott Otterson
@ 2008-02-08 18:07     ` Scott Otterson
  0 siblings, 0 replies; 8+ messages in thread
From: Scott Otterson @ 2008-02-08 18:07 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 577 bytes --]

Oops, I forgot to attach my .org file.  It's attached now. 

However, this bug may be fixed after the work of Nick and Bastien.  I'll 
check it out on the next release.

Scott

Scott Otterson wrote:
> Huh, for me, both 'org-export-region-as-latex' and 
> 'org-export-as-latex' export all the tables, regardless of whether or 
> not only one of them is highlighted.  I've attached an example org 
> file.  If I select last table in the file, all tables are exported.  I 
> wonder if this might have something to do with this particular 
> document or maybe my .emacs?
>
> Scott

[-- Attachment #2: tmp.org --]
[-- Type: text/plain, Size: 3489 bytes --]

* RUNS
*** Updated to Xavi's latest cvs on cluster and BeamformIt on 10/2/06

    | corpus | data set |   run | comment                                                          |
    |--------+----------+-------+------------------------------------------------------------------|
    | rt04s  | del4xs   |   63+ |                                                                  |

    _Runs below with new code: [[CVS tag of my code w/ new PCA]]_ 
    | corpus | data set    |   run | comment                                                     |
    |--------+-------------+-------+-------------------------------------------------------------|
    | rt05se | xc5         | 1598+ | 1416, no NR                                                 |
    | rt04s  | NRall.xc1.0 | 1655+ | 1.0s XC, 0.5s ER, new PCA all NR                            |
    | rt05se | NRall.xc1.0 | 1677+ | 1.0s XC, 0.5s ER, new PCA all NR                            |
    _below, removed feat3/4 merge stream feats so that remStuckFrms.m will get called_
    | devDD | broken speech tools 7226 | XC1ref, *, NR on, in case this matters for low dim pca input (dfw=1)              |
    | tstDD |              broken 7262 | XC1ref, *, NR on, in case this matters for low dim pca input (dfw=1)              |
    |-------+--------------------------+-----------------------------------------------------------------------------------|
    | dtDD  |                     6474 | dimPick, ent1G, entNLG                                                            |
    | dtDD  |                     6535 | dimPick, many new methods                                                         |

* Reoptimize
*** TODO correlation manifold kernel support vectors from combinations of diariation speaker location models
*** Split CCA w/ do_feat_weights==1				    :conclusion:
    
    _Conclusions:_ 
    1.) best perf is 13.42%, 
    2.) beats baseline, 
    3.) doesn't beat PCA-only dim reduction 
    4.) but no gain over CCA-ER or XC dim reduction

      Total Diariz Error vs. Run [merged 5720, dev_DD, merged 5737, test_DD]

|      x |   feat |                 |       |      | dev,5720 |   | tst,5737 |       |      |      x |
| runNum | 3_nmix | feat3_pairFeats | worst | best |      tot |   |      tot | worst | best | runNum |
|--------+--------+-----------------+-------+------+----------+---+----------+-------+------+--------|
|  05703 |      1 | XCfCCA.CC.1     | 40.84 | 3.04 |    18.21 |   |     15.5 | 40.58 | 5.42 |  05720 |
      
*** Summary Table

|        |       |      |       |   |       |       |      |        |                         |
|--------+-------+------+-------+---+-------+-------+------+--------+-------------------------|
|    dev |       |      |   dev |   |   tst |       |      |        | dev                     |
| runNum | worst | best |   tot |   |   tot | worst | best | runNum | note                    |
|--------+-------+------+-------+---+-------+-------+------+--------+-------------------------|
|  04677 | 49.26 | 2.75 | 18.04 |   | 17.29 | 46.08 | 2.96 |  04680 | baseline, dfw==0        |
|  05739 | 44.36 |  3.3 | 16.01 |   | 15.03 | 40.15 | 1.96 |  05746 | baseline, dfw==1        |
|  05386 | 36.36 | 2.58 | 15.17 |   | 13.03 |  24.3 | 3.65 |  05373 | XC-PCA                  |
|  05454 |  44.2 | 6.29 | 19.73 |   | 20.26 | 42.99 | 5.88 |  05455 | ER/XC                   |
|  05716 | 36.39 | 2.36 | 15.22 |   | 13.42 | 30.47 | 2.34 |  05733 | XCfCCA.dMI.3            |

[-- Attachment #3: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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] 8+ messages in thread

end of thread, other threads:[~2008-02-08 18:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-28 19:41 org-export-region-as-latex exports more than region Scott Otterson
2008-02-03  8:22 ` Carsten Dominik
2008-02-06 19:38   ` Scott Otterson
2008-02-08 18:07     ` Scott Otterson
2008-02-07  0:08   ` Nick Dokos
2008-02-07  9:41     ` Carsten Dominik
2008-02-08 15:13     ` Bastien Guerry
  -- strict thread matches above, loose matches on Subject: below --
2008-01-28 19:41 Scott Otterson

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