emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Export visible part of tree to latex
@ 2011-12-29 21:02 John MacCallum
  2011-12-30 19:23 ` John MacCallum
  0 siblings, 1 reply; 4+ messages in thread
From: John MacCallum @ 2011-12-29 21:02 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

I have an org file with this structure:

* head                                                                                                             
** topic 1                                                           :topic:                                       
*** foo                                                                                                            
**** some foo                                                           :foo:                                      
*** bar                                                                                                            
**** some bar                                                           :bar:                                      
** topic 2                                                                                                         
*** foo                                                                                                            
**** some other foo                                                     :foo:                                      
*** bar                                                                                                            
**** some other bar                                                     :bar:

and I would like to collect all entries with the tag foo and export them to a latex file.  I have the variable org-show-hierarchy-above set to nil, so f I run C-c \ "foo", I get this:

* head...                                                                                                          
**** some foo                                                           :foo:...                                   
**** some other foo                                                     :foo:...  

which is exactly what I would like to export.  But when I go to export using C-c C-e v l, the resulting latex file doesn't contain any of the entries below the top ("head") level:

% Created 2011-12-29 Thu 12:47                                                                                     
\documentclass{article}                                                                                            
\usepackage[utf8]{inputenc}                                                                                        
\usepackage[T1]{fontenc}                                                                                           
\usepackage{fixltx2e}                                                                                              
\usepackage{graphicx}                                                                                              
\usepackage{longtable}                                                                                             
\usepackage{float}                                                                                                 
\usepackage{wrapfig}                                                                                               
\usepackage{soul}                                                                                                  
\usepackage{textcomp}                                                                                              
\usepackage{marvosym}                                                                                              
\usepackage{wasysym}                                                                                               
\usepackage{latexsym}                                                                                              
\usepackage{amssymb}                                                                                               
\usepackage{hyperref}                                                                                              
\tolerance=1000                                                                                                    
\usepackage{fullpage}                                                                                              
\providecommand{\alert}[1]{\textbf{#1}}                                                                            
                                                                                                                   
\title{org}                                                                                                        
\author{John MacCallum}                                                                                            
\date{\today}                                                                                                      
\hypersetup{                                                                                                       
  pdfkeywords={},                                                                                                  
  pdfsubject={},                                                                                                   
  pdfcreator={Emacs Org-mode version 7.8.02}}                                                                      
                                                                                                                   
\begin{document}                                                                                                   
                                                                                                                   
\maketitle                                                                                                         
                                                                                                                   
\setcounter{tocdepth}{3}                                                                                           
\tableofcontents                                                                                                   
\vspace*{1cm}                                                                                                      
\section{head}                                                                                                     
\label{sec-1}                                                                                                      
                                                                                                                   
\end{document}                                                                                                     
                                                                                                                   
The html export does work as expected, however, and produces a nice bulleted list of entries tagged "foo".  Also, the latex export works fine if I use it to export the entire file instead of just the visible portion.

As an alternative, I tried creating a project by setting the org-publish-project-alist variable like this:

(setq org-publish-project-alist                                                                                    
        '(("foo"                                                                                                   
                :base-directory "~/toys/org"                                                                       
                :base-extension "org"                                                                              
                :publishing-directory "~/toys/org"                                                                 
                :publishing-function org-publish-org-to-pdf                                                        
                :section-numbers nil                                                                               
                :select-tags ("foo")                                                                               
                :include ("org.org")))) 

and exported using C-c C-e X "foo", which works ok, but the value of the variable org-show-hierarchy-above is not respected, so I end up with a latex file that has the entire hierarchy above the foo-tagged entries, which is not what I want.

If someone could point me in the right direction, I'd really appreciate it.

Also, I'm using GNU Emacs 24.50.1 from the git repository built a few weeks ago, and the latest org-mode from git built yesterday.

Thanks in advance,
JM

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

* Re: Export visible part of tree to latex
  2011-12-29 21:02 Export visible part of tree to latex John MacCallum
@ 2011-12-30 19:23 ` John MacCallum
  2011-12-30 21:02   ` Nick Dokos
  0 siblings, 1 reply; 4+ messages in thread
From: John MacCallum @ 2011-12-30 19:23 UTC (permalink / raw)
  To: emacs-orgmode

Hi everyone,

I just wanted to make sure my original questions / problems were clearly stated since no one responded to my original email.  

1.  I think there is a bug when exporting the visible part of the outline tree to a latex file (C-c C-e v l).  Html export of the visible part works fine, but the behavior of the latex export is not the same (please see my original message below).

2.  Is there a way to publish a project (C-c C-e X <project>) and have it respect the value of org-show-hierarchy-above?

Thanks,
JM
 
On Dec 29, 2011, at 1:02 PM, John MacCallum wrote:

> Hi all,
> 
> I have an org file with this structure:
> 
> * head                                                                                                             
> ** topic 1                                                           :topic:                                       
> *** foo                                                                                                            
> **** some foo                                                           :foo:                                      
> *** bar                                                                                                            
> **** some bar                                                           :bar:                                      
> ** topic 2                                                                                                         
> *** foo                                                                                                            
> **** some other foo                                                     :foo:                                      
> *** bar                                                                                                            
> **** some other bar                                                     :bar:
> 
> and I would like to collect all entries with the tag foo and export them to a latex file.  I have the variable org-show-hierarchy-above set to nil, so f I run C-c \ "foo", I get this:
> 
> * head...                                                                                                          
> **** some foo                                                           :foo:...                                   
> **** some other foo                                                     :foo:...  
> 
> which is exactly what I would like to export.  But when I go to export using C-c C-e v l, the resulting latex file doesn't contain any of the entries below the top ("head") level:
> 
> % Created 2011-12-29 Thu 12:47                                                                                     
> \documentclass{article}                                                                                            
> \usepackage[utf8]{inputenc}                                                                                        
> \usepackage[T1]{fontenc}                                                                                           
> \usepackage{fixltx2e}                                                                                              
> \usepackage{graphicx}                                                                                              
> \usepackage{longtable}                                                                                             
> \usepackage{float}                                                                                                 
> \usepackage{wrapfig}                                                                                               
> \usepackage{soul}                                                                                                  
> \usepackage{textcomp}                                                                                              
> \usepackage{marvosym}                                                                                              
> \usepackage{wasysym}                                                                                               
> \usepackage{latexsym}                                                                                              
> \usepackage{amssymb}                                                                                               
> \usepackage{hyperref}                                                                                              
> \tolerance=1000                                                                                                    
> \usepackage{fullpage}                                                                                              
> \providecommand{\alert}[1]{\textbf{#1}}                                                                            
> 
> \title{org}                                                                                                        
> \author{John MacCallum}                                                                                            
> \date{\today}                                                                                                      
> \hypersetup{                                                                                                       
>  pdfkeywords={},                                                                                                  
>  pdfsubject={},                                                                                                   
>  pdfcreator={Emacs Org-mode version 7.8.02}}                                                                      
> 
> \begin{document}                                                                                                   
> 
> \maketitle                                                                                                         
> 
> \setcounter{tocdepth}{3}                                                                                           
> \tableofcontents                                                                                                   
> \vspace*{1cm}                                                                                                      
> \section{head}                                                                                                     
> \label{sec-1}                                                                                                      
> 
> \end{document}                                                                                                     
> 
> The html export does work as expected, however, and produces a nice bulleted list of entries tagged "foo".  Also, the latex export works fine if I use it to export the entire file instead of just the visible portion.
> 
> As an alternative, I tried creating a project by setting the org-publish-project-alist variable like this:
> 
> (setq org-publish-project-alist                                                                                    
>        '(("foo"                                                                                                   
>                :base-directory "~/toys/org"                                                                       
>                :base-extension "org"                                                                              
>                :publishing-directory "~/toys/org"                                                                 
>                :publishing-function org-publish-org-to-pdf                                                        
>                :section-numbers nil                                                                               
>                :select-tags ("foo")                                                                               
>                :include ("org.org")))) 
> 
> and exported using C-c C-e X "foo", which works ok, but the value of the variable org-show-hierarchy-above is not respected, so I end up with a latex file that has the entire hierarchy above the foo-tagged entries, which is not what I want.
> 
> If someone could point me in the right direction, I'd really appreciate it.
> 
> Also, I'm using GNU Emacs 24.50.1 from the git repository built a few weeks ago, and the latest org-mode from git built yesterday.
> 
> Thanks in advance,
> JM
> 
> 

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

* Re: Export visible part of tree to latex
  2011-12-30 19:23 ` John MacCallum
@ 2011-12-30 21:02   ` Nick Dokos
  2011-12-30 22:51     ` John MacCallum
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2011-12-30 21:02 UTC (permalink / raw)
  To: John MacCallum; +Cc: nicholas.dokos, emacs-orgmode

John MacCallum <john.m@ccallum.com> wrote:

> Hi everyone,
> 
> I just wanted to make sure my original questions / problems were
> clearly stated since no one responded to my original email.
> 
> 1.  I think there is a bug when exporting the visible part of the
> outline tree to a latex file (C-c C-e v l).  Html export of the
> visible part works fine, but the behavior of the latex export is not
> the same (please see my original message below).
> 
> ...
> > \section{head}
> > \label{sec-1}
> > 
> > \end{document}

I can't reproduce it (Org-mode version 7.8.02 (release_7.8.02.57.g5cd52)).
With your input file:

--8<---------------cut here---------------start------------->8---
* head
** topic 1		:topic:
*** foo
**** some foo		:foo:
*** bar
**** some bar		:bar:
** topic 2
*** foo
**** some other foo	:foo:
*** bar
**** some other bar	:bar:
--8<---------------cut here---------------end--------------->8---

after C-c \ foo RET and C-c C-e v l, I get this in the .tex file:

,----
| ...
| \section{head}
| \label{sec-1}
| \subsection{topic 1 \textbf{:topic:}}
| \label{sec-1-1}
| \subsubsection{foo}
| \label{sec-1-1-1}
| \begin{itemize}
| 
| \item some foo \textbf{:foo:}\\
| \label{sec-1-1-1-1}%
| \end{itemize} % ends low level
| \subsection{topic 2}
| \label{sec-1-2}
| \subsubsection{foo}
| \label{sec-1-2-1}
| \begin{itemize}
| 
| \item some other foo \textbf{:foo:}\\
| \label{sec-1-2-1-1}%
| \end{itemize} % ends low level
| ...
`----

Nick

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

* Re: Export visible part of tree to latex
  2011-12-30 21:02   ` Nick Dokos
@ 2011-12-30 22:51     ` John MacCallum
  0 siblings, 0 replies; 4+ messages in thread
From: John MacCallum @ 2011-12-30 22:51 UTC (permalink / raw)
  To: emacs-orgmode

Thanks for the response, Nick.

It looks like you have the variable org-show-hierarchy-above set to 't'---if I set it to 't' on my machine, I get output that looks like yours.  Would you mind setting it to 'nil' and trying again?

Thanks,
JM


On Dec 30, 2011, at 1:02 PM, Nick Dokos wrote:

> John MacCallum <john.m@ccallum.com> wrote:
> 
>> Hi everyone,
>> 
>> I just wanted to make sure my original questions / problems were
>> clearly stated since no one responded to my original email.
>> 
>> 1.  I think there is a bug when exporting the visible part of the
>> outline tree to a latex file (C-c C-e v l).  Html export of the
>> visible part works fine, but the behavior of the latex export is not
>> the same (please see my original message below).
>> 
>> ...
>>> \section{head}
>>> \label{sec-1}
>>> 
>>> \end{document}
> 
> I can't reproduce it (Org-mode version 7.8.02 (release_7.8.02.57.g5cd52)).
> With your input file:
> 
> --8<---------------cut here---------------start------------->8---
> * head
> ** topic 1		:topic:
> *** foo
> **** some foo		:foo:
> *** bar
> **** some bar		:bar:
> ** topic 2
> *** foo
> **** some other foo	:foo:
> *** bar
> **** some other bar	:bar:
> --8<---------------cut here---------------end--------------->8---
> 
> after C-c \ foo RET and C-c C-e v l, I get this in the .tex file:
> 
> ,----
> | ...
> | \section{head}
> | \label{sec-1}
> | \subsection{topic 1 \textbf{:topic:}}
> | \label{sec-1-1}
> | \subsubsection{foo}
> | \label{sec-1-1-1}
> | \begin{itemize}
> | 
> | \item some foo \textbf{:foo:}\\
> | \label{sec-1-1-1-1}%
> | \end{itemize} % ends low level
> | \subsection{topic 2}
> | \label{sec-1-2}
> | \subsubsection{foo}
> | \label{sec-1-2-1}
> | \begin{itemize}
> | 
> | \item some other foo \textbf{:foo:}\\
> | \label{sec-1-2-1-1}%
> | \end{itemize} % ends low level
> | ...
> `----
> 
> Nick

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

end of thread, other threads:[~2011-12-30 22:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-29 21:02 Export visible part of tree to latex John MacCallum
2011-12-30 19:23 ` John MacCallum
2011-12-30 21:02   ` Nick Dokos
2011-12-30 22:51     ` John MacCallum

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