emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* fold paragraphs, export only contents of a node, hiding the 'node heading text'
@ 2013-09-01 21:17 . .
  2013-09-01 23:51 ` John Hendy
  0 siblings, 1 reply; 8+ messages in thread
From: . . @ 2013-09-01 21:17 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

Hello:

Is there a way to export to Latex the text under a heading but not-exporting/printing to the .tex file the heading/TODO (node line) itself?

The idea is to be able to fold paragraphs (via node creation for the paragraphs under it).
But if I set the node to noexport (to hide the unnecessary heading/TODO text which was only there to allow folding the text under it) then the paragraph can't be exported either!

This would be great to permit folding with great granularity and use the heading to describe the paragraph without showing it (like a comment only it folds!).


Thanks,
Best regards,
Mark

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

* Re: fold paragraphs, export only contents of a node, hiding the 'node heading text'
  2013-09-01 21:17 fold paragraphs, export only contents of a node, hiding the 'node heading text' . .
@ 2013-09-01 23:51 ` John Hendy
  2013-09-02 16:00   ` . .
  0 siblings, 1 reply; 8+ messages in thread
From: John Hendy @ 2013-09-01 23:51 UTC (permalink / raw)
  To: . .; +Cc: emacs-orgmode@gnu.org

On Sun, Sep 1, 2013 at 4:17 PM, . . <mapcdi@me.com> wrote:
> Hello:
>
> Is there a way to export to Latex the text under a heading but not-exporting/printing to the .tex file the heading/TODO (node line) itself?
>
> The idea is to be able to fold paragraphs (via node creation for the paragraphs under it).
> But if I set the node to noexport (to hide the unnecessary heading/TODO text which was only there to allow folding the text under it) then the paragraph can't be exported either!
>
> This would be great to permit folding with great granularity and use the heading to describe the paragraph without showing it (like a comment only it folds!).
>

I never did dig into this as it still was a bit above my head, but it
seems like this could do what you want:
- https://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg01329.html

In other words, you'd define a custom function like this:

(defun mapcdi-org-latex-headline-function (todo todo-type priority text tags)
  "The docstring of my function."
  (concat
   (and todo (format "{\\bfseries\\sffamily %s} " todo))
   (and priority (format "\\framebox{\\#%c} " priority))
   text
   (and tags
        (format "\\hfill{}\\textsc{%s}" (mapconcat 'identity tags ":")))))


I think you'd just omit that "text" bit, and probably remove the other stuff to.

ETA: I just went ahead and gave it a whirl. It looks like this, or
something close, should let you do whatever you want with headlines
(go ahead and use priorities, tags, todo keywords, and the like and
still just get a blank headline:

(defun mapcdi-org-latex-headline-function (todo todo-type priority text tags)
  "The docstring of my function."
  (concat
   (and todo (format "{}" todo))
   (and priority (format "{} " ))

   (and tags
        (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))

There most likely is a blank line where the headline *would* go. I
played around with trying to \vspace a negative line space like so,
and I think it's doing the right thing, or is at least close (there's
less space between the contents line and the paragraph text):

(defun mapcdi-org-latex-headline-function (todo todo-type priority text tags)
  "The docstring of my function."
  (concat
   (and todo (format "{}" todo))
   (and priority (format "{} " ))
   (and text (format "{\\vspace{-\\baselineskip}}" ))
   (and tags
        (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))

The only thing I noticed is that within a section, paragraphs by
default have no space and are indented (well, the first isn't, but
following paragraphs are). With this method, paragraphs within
sections are going to have the typical post-section spacing compared
to being treated like truly consecutive paragraphs. If you're okay
with that, then this will work. If not, you'll have to make a custom
latex template somehow so that the whole document is treated like one
long section. I'm not sure if that's possible given org's headline ->
section internals. You might be able to fiddle with something like the
above \vspace{} trick, though? You'd also have to have every paragraph
indented so that they weren't treated like the first paragraph in a
section (un-indented).

Anyway, hopefully this gets you on the right path!

#+begin_src test-file

#+bind: org-latex-format-headline-function mapcdi-org-latex-headline-function
#+options: num:nil

* todo headline 1       :test:

blah blah blah.

* headline 2

blah blah blah

* headline 3

A couple of separate paragraphs to see how far apart two paragraphs would be
normally. We'll add enough to line break just to make it interesting.

A couple of separate paragraphs to see how far apart two paragraphs would be
normally. We'll add enough to line break just to make it interesting.

#+end_src



Best regards,
John



>
> Thanks,
> Best regards,
> Mark

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

* Re: fold paragraphs, export only contents of a node, hiding the 'node heading text'
  2013-09-01 23:51 ` John Hendy
@ 2013-09-02 16:00   ` . .
       [not found]     ` <CA+M2ft8GPHzEierLmMpJQxtRv=iLQ=dfXXFaqguZmOXi4ykk6A@mail.gmail.com>
  0 siblings, 1 reply; 8+ messages in thread
From: . . @ 2013-09-02 16:00 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode@gnu.org

Thanks for your reply.

Sorry, I don't know where you should put that code to create the custom function!
I put it inside .emacs, restarted Emacs, but after latex export the headlines where visible in the resulting .tex/PDF.

I did add the bind etc. to the test-file.org like you did.


Regards,
Mark

El 02/09/2013, a las 01:51, John Hendy <jw.hendy@gmail.com> escribió:

> On Sun, Sep 1, 2013 at 4:17 PM, . . <mapcdi@me.com> wrote:
>> Hello:
>> 
>> Is there a way to export to Latex the text under a heading but not-exporting/printing to the .tex file the heading/TODO (node line) itself?
>> 
>> The idea is to be able to fold paragraphs (via node creation for the paragraphs under it).
>> But if I set the node to noexport (to hide the unnecessary heading/TODO text which was only there to allow folding the text under it) then the paragraph can't be exported either!
>> 
>> This would be great to permit folding with great granularity and use the heading to describe the paragraph without showing it (like a comment only it folds!).
> 
> I never did dig into this as it still was a bit above my head, but it
> seems like this could do what you want:
> - https://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg01329.html
> 
> In other words, you'd define a custom function like this:
> 
> (defun mapcdi-org-latex-headline-function (todo todo-type priority text tags)
> "The docstring of my function."
> (concat
>  (and todo (format "{\\bfseries\\sffamily %s} " todo))
>  (and priority (format "\\framebox{\\#%c} " priority))
>  text
>  (and tags
>       (format "\\hfill{}\\textsc{%s}" (mapconcat 'identity tags ":")))))
> 
> 
> I think you'd just omit that "text" bit, and probably remove the other stuff to.
> 
> ETA: I just went ahead and gave it a whirl. It looks like this, or
> something close, should let you do whatever you want with headlines
> (go ahead and use priorities, tags, todo keywords, and the like and
> still just get a blank headline:
> 
> (defun mapcdi-org-latex-headline-function (todo todo-type priority text tags)
> "The docstring of my function."
> (concat
>  (and todo (format "{}" todo))
>  (and priority (format "{} " ))
> 
>  (and tags
>       (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))
> 
> There most likely is a blank line where the headline *would* go. I
> played around with trying to \vspace a negative line space like so,
> and I think it's doing the right thing, or is at least close (there's
> less space between the contents line and the paragraph text):
> 
> (defun mapcdi-org-latex-headline-function (todo todo-type priority text tags)
> "The docstring of my function."
> (concat
>  (and todo (format "{}" todo))
>  (and priority (format "{} " ))
>  (and text (format "{\\vspace{-\\baselineskip}}" ))
>  (and tags
>       (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))
> 
> The only thing I noticed is that within a section, paragraphs by
> default have no space and are indented (well, the first isn't, but
> following paragraphs are). With this method, paragraphs within
> sections are going to have the typical post-section spacing compared
> to being treated like truly consecutive paragraphs. If you're okay
> with that, then this will work. If not, you'll have to make a custom
> latex template somehow so that the whole document is treated like one
> long section. I'm not sure if that's possible given org's headline ->
> section internals. You might be able to fiddle with something like the
> above \vspace{} trick, though? You'd also have to have every paragraph
> indented so that they weren't treated like the first paragraph in a
> section (un-indented).
> 
> Anyway, hopefully this gets you on the right path!
> 
> #+begin_src test-file
> 
> #+bind: org-latex-format-headline-function mapcdi-org-latex-headline-function
> #+options: num:nil
> 
> * todo headline 1       :test:
> 
> blah blah blah.
> 
> * headline 2
> 
> blah blah blah
> 
> * headline 3
> 
> A couple of separate paragraphs to see how far apart two paragraphs would be
> normally. We'll add enough to line break just to make it interesting.
> 
> A couple of separate paragraphs to see how far apart two paragraphs would be
> normally. We'll add enough to line break just to make it interesting.
> 
> #+end_src
> 
> 
> 
> Best regards,
> John
> 
> 
> 
>> 
>> Thanks,
>> Best regards,
>> Mark

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

* Re: fold paragraphs, export only contents of a node, hiding the 'node heading text'
       [not found]       ` <C7F63B6F-D5C7-49D5-A7EE-4F0082882901@me.com>
@ 2013-09-03  1:32         ` John Hendy
       [not found]           ` <4702F1A4-113B-4171-B949-2B9EE14EEAA9@me.com>
  0 siblings, 1 reply; 8+ messages in thread
From: John Hendy @ 2013-09-03  1:32 UTC (permalink / raw)
  To: . ., emacs-orgmode


[-- Attachment #1.1.1: Type: text/plain, Size: 5786 bytes --]

On Mon, Sep 2, 2013 at 4:53 PM, <mapcdi@me.com> wrote:

>
>
>
> After I compile:  C-c    C-e    d (… to open PDF file).
> It asks:
> 'Allow BIND values in this buffer? (yes or no) '
> I answer 'yes' and the PDF is opened. I have attached the resulting PDF
> screen capture.
> Thanks.
>
>
What is your orgmode version (paste the output of `M-x org-version`)? I
decided to just give a whirl with a minimal config and I don't think that
Org 8+ asks for allowing bind keywords anymore, or at least it isn't asking
me with 8.0.7. From my tinkering, it looks like it ignores them or you need
to explictly allow them:

M-x customize-variable RET org-export-allow-bind-keywords RET

Hide Org Export Allow Bind Keywords: Toggle  on (non-nil)
    State : CHANGED outside Customize.
   Non-nil means BIND keywords can define local variable values. Hide
   This is a potential security risk, which is why the default value
   is nil.  You can also allow them through local buffer variables.

I could be wrong, but the "toggle" button (vs. stating possible values)
implies that it's either on or off.

Actually, in just searching now, it seems that this is, indeed, the case
since 8.0.3:

http://orgmode.org/Changes.html#sec-1-5-1

In any case, I am now using this for my minimal config and it works
successfully:

#+begin_src

;; change path to point to your org/lisp directory
(add-to-list 'load-path "~/.elisp/org.git/lisp/")

(setq org-export-allow-bind-keywords t)

(defun mapcdi-org-latex-headline-function (todo todo-type priority text
tags)
 "The docstring of my function."
 (concat
  (and todo (format "{}" todo))
  (and priority (format "{} " ))
  (and text (format "{\\vspace{-\\baselineskip}}" ))
  (and tags
       (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))

#+end_src

And this is the file I'm using (I removed anything non-essential to
eliminate other possible causes):

#+begin_src

#+options: num:nil
#+bind: org-latex-format-headline-function
mapcdi-org-latex-headline-function



* headline 1

blah blah blah.

* headline 2

blah blah blah

* headline 3

A couple of separate paragraphs to see how far apart two paragraphs would be
normally. We'll add enough to line break just to make it interesting.

A couple of separate paragraphs to see how far apart two paragraphs would be
normally. We'll add enough to line break just to make it interesting.

#+end_src


I attached a screenshot of the result!


Let me know if that helps,
John



> My test-file, OrgMode.org:
>
> #+TITLE:     My file is OrgMode.org
> #+AUTHOR:
> #+EMAIL:
> #+DATE:
> #+DESCRIPTION:
> #+KEYWORDS:
> #+LANGUAGE:  en
> #+BIND: org-latex-format-headline-function
> mapcdi-org-latex-headline-function
> #+OPTIONS:   H:3 num:nil toc:t \n:nil @:t ::t |:t ^:t
> #+OPTIONS:   -:t f:t *:t <:t tasks:nil
> #+OPTIONS:   pri:nil tags:not-in-toc
> #+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t
> #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0
> path:http://orgmode.org/org-info.js
> #+EXPORT_SELECT_TAGS: export
> #+EXPORT_EXCLUDE_TAGS: noexport
> #+LINK_UP:
> #+LINK_HOME:
> #+XSLT:
>
> * TODO headline 1        :test:
>
> blah blah blah.
>
> * headline 2
>
> blah blah blah
>
> * headline 3
>
> A couple of separate paragraphs to see how far apart two paragraphs would
> be
> normally. We'll add enough to line break just to make it interesting.
>
> A couple of separate paragraphs to see how far apart two paragraphs would
> be
> normally. We'll add enough to line break just to make it interesting.
>
>
>
>
> ____________________________________________________________________
> My .emacs file
>
> (custom-set-variables
>  ;; custom-set-variables was added by Custom.
>  ;; If you edit it by hand, you could mess it up, so be careful.
>  ;; Your init file should contain only one such instance.
>  ;; If there is more than one, they won't work right.
>  '(adaptive-fill-mode nil)
>  '(blink-cursor-mode nil)
>  '(column-number-mode t)
>  '(current-language-environment "Spanish")
>  '(debug-on-error t)
>  '(debug-on-quit t)
>  '(display-battery-mode t)
>  '(display-time-mode t)
>  '(fill-column 56)
>  '(left-margin 0)
>  '(ns-alternate-modifier (quote meta))
>  '(ns-command-modifier (quote super))
>  '(ns-function-modifier (quote none))
>  '(ns-right-alternate-modifier (quote none))
>  '(ns-right-command-modifier (quote left))
>  '(org-agenda-files (quote ("~/Documents/OrgMode.org")))
>  '(save-place t nil (saveplace))
>  '(size-indication-mode t)
>  '(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify)))
>  '(truncate-lines t))
> (custom-set-faces
>  ;; custom-set-faces was added by Custom.
>  ;; If you edit it by hand, you could mess it up, so be careful.
>  ;; Your init file should contain only one such instance.
>  ;; If there is more than one, they won't work right.
>  '(default ((t (:inherit nil :stipple nil :background "White" :foreground
> "Black" :inverse-video nil :box nil :strike-through nil :overline nil
> :underline nil :slant normal :weight normal :height 180 :width normal
> :foundry "apple" :family "Monaco"))))
>  '(set-face-attribute (quote default) nil :height))
>
> (setenv "PATH" (concat (getenv "PATH") ":/usr/texbin"))
>     (setq exec-path (append exec-path '("/usr/texbin")))
>
> (defun mapcdi-org-latex-headline-function (todo todo-type priority text
> tags)
>  "The docstring of my function."
>  (concat
>   (and todo (format "{}" todo))
>   (and priority (format "{} " ))
>   (and text (format "{\\vspace{-\\baselineskip}}" ))
>   (and tags
>        (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))
>

[-- Attachment #1.1.2: Type: text/html, Size: 9001 bytes --]

[-- Attachment #1.2: OrgMode_LaTeX_output_PDF_ImageCapture.png --]
[-- Type: image/png, Size: 38069 bytes --]

[-- Attachment #2: 2013-09-02_203154.png --]
[-- Type: image/png, Size: 22783 bytes --]

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

* Re: fold paragraphs, export only contents of a node, hiding the 'node heading text'
       [not found]           ` <4702F1A4-113B-4171-B949-2B9EE14EEAA9@me.com>
@ 2013-09-03 14:48             ` mapcdi
  2013-09-03 19:17               ` John Hendy
  2013-09-03 19:10             ` John Hendy
  1 sibling, 1 reply; 8+ messages in thread
From: mapcdi @ 2013-09-03 14:48 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

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

So, now that I can hide all the headings I need a way to hide ONLY SOME headings, like those with a todo-like specific text: say UNFINISHEDPAR for unfinished paragraphs and FINISHEDPAR for the ones finished.


Is it possible given the current (.emacs/test-file.org) working setup, as a reminder:

>> ;; change path to point to your org/lisp directory
>> (add-to-list 'load-path "~/.elisp/org.git/lisp/")
>> 
>> (setq org-export-allow-bind-keywords t)
>> 
>> (defun mapcdi-org-latex-headline-function (todo todo-type priority text tags)
>>  "The docstring of my function."
>>  (concat
>>   (and todo (format "{}" todo))
>>   (and priority (format "{} " ))
>>   (and text (format "{\\vspace{-\\baselineskip}}" ))
>>   (and tags
>>        (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))




Thanks,

Mark




El 03/09/2013, a las 09:16, mapcdi@me.com escribió:

> <LaTeX_output_PDF_ImageCapture.png>
> 
> 
> It works all right! 
> I had org version 7.9 which seems the current 'bundled' version for Emacs, which I recently installed (being a newbie, as I am, for Emacs/Org-mode). I updated via
>  M-x package-install RET org
> as in http://orgmode.org/org.html#Installation
> 
> 
> and now I have 8.0.7. I compiled with your .emacs/.org example files, except I needed to add:
> 
> (setenv "PATH" (concat (getenv "PATH") ":/usr/texbin"))
>     (setq exec-path (append exec-path '("/usr/texbin")))
> 
> or it wouldn't compile the PDF,
> and there's the output: success!
> 
> 
> So, I will start tinkering myself with some settings like:
> http://tex.stackexchange.com/questions/39227/no-indent-in-the-first-paragraph-in-a-section
> 
> 
> By the way, do you know how I could eliminate my needed line,  in my .emacs:
> (setenv "PATH" (concat (getenv "PATH") ":/usr/texbin"))
>     (setq exec-path (append exec-path '("/usr/texbin")))
> by way of setting things to a default setting so I don't need to update my path every time via .emacs.
> 
> 
> Thanks!
> 
> Mark
> 
> 
> 
> El 03/09/2013, a las 03:32, John Hendy <jw.hendy@gmail.com> escribió:
> 
>> 
>> 
>> 
>> On Mon, Sep 2, 2013 at 4:53 PM, <mapcdi@me.com> wrote:
>> <OrgMode_LaTeX_output_PDF_ImageCapture.png>
>> 
>> 
>> 
>> After I compile:  C-c    C-e    d (… to open PDF file).
>> It asks:
>> 'Allow BIND values in this buffer? (yes or no) '
>> I answer 'yes' and the PDF is opened. I have attached the resulting PDF screen capture.
>> Thanks.
>> 
>> 
>> What is your orgmode version (paste the output of `M-x org-version`)? I decided to just give a whirl with a minimal config and I don't think that Org 8+ asks for allowing bind keywords anymore, or at least it isn't asking me with 8.0.7. From my tinkering, it looks like it ignores them or you need to explictly allow them:
>> 
>> M-x customize-variable RET org-export-allow-bind-keywords RET
>> 
>> Hide Org Export Allow Bind Keywords: Toggle  on (non-nil)
>>     State : CHANGED outside Customize.
>>    Non-nil means BIND keywords can define local variable values. Hide
>>    This is a potential security risk, which is why the default value
>>    is nil.  You can also allow them through local buffer variables.
>> 
>> I could be wrong, but the "toggle" button (vs. stating possible values) implies that it's either on or off.
>> 
>> Actually, in just searching now, it seems that this is, indeed, the case since 8.0.3:
>> 
>> http://orgmode.org/Changes.html#sec-1-5-1
>> 
>> In any case, I am now using this for my minimal config and it works successfully:
>> 
>> #+begin_src
>> 
>> ;; change path to point to your org/lisp directory
>> (add-to-list 'load-path "~/.elisp/org.git/lisp/")
>> 
>> (setq org-export-allow-bind-keywords t)
>> 
>> (defun mapcdi-org-latex-headline-function (todo todo-type priority text tags)
>>  "The docstring of my function."
>>  (concat
>>   (and todo (format "{}" todo))
>>   (and priority (format "{} " ))
>>   (and text (format "{\\vspace{-\\baselineskip}}" ))
>>   (and tags
>>        (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))
>> 
>> #+end_src
>>  
>> And this is the file I'm using (I removed anything non-essential to eliminate other possible causes):
>> 
>> #+begin_src
>> 
>> #+options: num:nil
>> #+bind: org-latex-format-headline-function mapcdi-org-latex-headline-function
>> 
>> 
>> 
>> * headline 1
>> 
>> blah blah blah.
>> 
>> * headline 2
>> 
>> blah blah blah
>> 
>> * headline 3
>> 
>> A couple of separate paragraphs to see how far apart two paragraphs would be
>> normally. We'll add enough to line break just to make it interesting.
>> 
>> A couple of separate paragraphs to see how far apart two paragraphs would be
>> normally. We'll add enough to line break just to make it interesting.
>> 
>> #+end_src
>> 
>> 
>> I attached a screenshot of the result!
>> 
>> 
>> Let me know if that helps,
>> John
>> 
>> 
>> 
>> My test-file, OrgMode.org:
>> 
>> #+TITLE:     My file is OrgMode.org
>> #+AUTHOR:    
>> #+EMAIL:     
>> #+DATE:      
>> #+DESCRIPTION:
>> #+KEYWORDS:
>> #+LANGUAGE:  en
>> #+BIND: org-latex-format-headline-function mapcdi-org-latex-headline-function
>> #+OPTIONS:   H:3 num:nil toc:t \n:nil @:t ::t |:t ^:t 
>> #+OPTIONS:   -:t f:t *:t <:t tasks:nil
>> #+OPTIONS:   pri:nil tags:not-in-toc
>> #+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t 
>> #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
>> #+EXPORT_SELECT_TAGS: export
>> #+EXPORT_EXCLUDE_TAGS: noexport
>> #+LINK_UP:   
>> #+LINK_HOME: 
>> #+XSLT:
>> 
>> * TODO headline 1 						       :test:
>> 
>> blah blah blah.
>> 
>> * headline 2
>> 
>> blah blah blah
>> 
>> * headline 3
>> 
>> A couple of separate paragraphs to see how far apart two paragraphs would be
>> normally. We'll add enough to line break just to make it interesting.
>> 
>> A couple of separate paragraphs to see how far apart two paragraphs would be
>> normally. We'll add enough to line break just to make it interesting.
>> 
>> 
>> 
>> 
>> ____________________________________________________________________
>> My .emacs file
>> 
>> (custom-set-variables
>>  ;; custom-set-variables was added by Custom.
>>  ;; If you edit it by hand, you could mess it up, so be careful.
>>  ;; Your init file should contain only one such instance.
>>  ;; If there is more than one, they won't work right.
>>  '(adaptive-fill-mode nil)
>>  '(blink-cursor-mode nil)
>>  '(column-number-mode t)
>>  '(current-language-environment "Spanish")
>>  '(debug-on-error t)
>>  '(debug-on-quit t)
>>  '(display-battery-mode t)
>>  '(display-time-mode t)
>>  '(fill-column 56)
>>  '(left-margin 0)
>>  '(ns-alternate-modifier (quote meta))
>>  '(ns-command-modifier (quote super))
>>  '(ns-function-modifier (quote none))
>>  '(ns-right-alternate-modifier (quote none))
>>  '(ns-right-command-modifier (quote left))
>>  '(org-agenda-files (quote ("~/Documents/OrgMode.org")))
>>  '(save-place t nil (saveplace))
>>  '(size-indication-mode t)
>>  '(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify)))
>>  '(truncate-lines t))
>> (custom-set-faces
>>  ;; custom-set-faces was added by Custom.
>>  ;; If you edit it by hand, you could mess it up, so be careful.
>>  ;; Your init file should contain only one such instance.
>>  ;; If there is more than one, they won't work right.
>>  '(default ((t (:inherit nil :stipple nil :background "White" :foreground "Black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 180 :width normal :foundry "apple" :family "Monaco"))))
>>  '(set-face-attribute (quote default) nil :height))
>> 
>> (setenv "PATH" (concat (getenv "PATH") ":/usr/texbin"))
>>     (setq exec-path (append exec-path '("/usr/texbin")))
>> 
>> (defun mapcdi-org-latex-headline-function (todo todo-type priority text tags)
>>  "The docstring of my function."
>>  (concat
>>   (and todo (format "{}" todo))
>>   (and priority (format "{} " ))
>>   (and text (format "{\\vspace{-\\baselineskip}}" ))
>>   (and tags
>>        (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))
>> 
>> <2013-09-02_203154.png>
> 


[-- Attachment #2: Type: text/html, Size: 13109 bytes --]

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

* Re: fold paragraphs, export only contents of a node, hiding the 'node heading text'
       [not found]           ` <4702F1A4-113B-4171-B949-2B9EE14EEAA9@me.com>
  2013-09-03 14:48             ` mapcdi
@ 2013-09-03 19:10             ` John Hendy
  1 sibling, 0 replies; 8+ messages in thread
From: John Hendy @ 2013-09-03 19:10 UTC (permalink / raw)
  To: . ., emacs-orgmode


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

On Tue, Sep 3, 2013 at 2:16 AM, <mapcdi@me.com> wrote:

>
>
> It works all right!
> I had org version 7.9 which seems the current 'bundled' version for Emacs,
> which I recently installed (being a newbie, as I am, for Emacs/Org-mode). I
> updated via
>  M-x package-install RET org
> as in http://orgmode.org/org.html#Installation
>
>
> and now I have 8.0.7. I compiled with your .emacs/.org example files,
> except I needed to add:
>
> (setenv "PATH" (concat (getenv "PATH") ":/usr/texbin"))
>     (setq exec-path (append exec-path '("/usr/texbin")))
>
> or it wouldn't compile the PDF,
> and there's the output: success!
>
>
> So, I will start tinkering myself with some settings like:
>
> http://tex.stackexchange.com/questions/39227/no-indent-in-the-first-paragraph-in-a-section
>
>
> By the way, do you know how I could eliminate my needed line,  in my
> .emacs:
> (setenv "PATH" (concat (getenv "PATH") ":/usr/texbin"))
>     (setq exec-path (append exec-path '("/usr/texbin")))
> by way of setting things to a default setting so I don't need to update my
> path every time via .emacs.
>

What purpose are these for? Is this just pointing to your TeX/LaTeX
installation? It would help to know your install method for LaTeX. For
example, I use TexLive. It would seem that if you need to tell emacs
specifically where these live, then they aren't in your system path. Can
you compile a .tex file manually from the command line?

You should, for example, be able to export to LaTeX via Org-mode for the
test.org file above, then open a command line and do `pdflatex test.tex`
and get a .pdf. If you get an error about the command not being found, you
still don't have a properly setup LaTeX distribution on your system.


Glad it's getting you in the right direction!
John


>
>
> Thanks!
>
> Mark
>
>
>
> El 03/09/2013, a las 03:32, John Hendy <jw.hendy@gmail.com> escribió:
>
>
>
>
> On Mon, Sep 2, 2013 at 4:53 PM, <mapcdi@me.com> wrote:
>
>> <OrgMode_LaTeX_output_PDF_ImageCapture.png>
>>
>>
>>
>> After I compile:  C-c    C-e    d (… to open PDF file).
>> It asks:
>> 'Allow BIND values in this buffer? (yes or no) '
>> I answer 'yes' and the PDF is opened. I have attached the resulting PDF
>> screen capture.
>> Thanks.
>>
>>
> What is your orgmode version (paste the output of `M-x org-version`)? I
> decided to just give a whirl with a minimal config and I don't think that
> Org 8+ asks for allowing bind keywords anymore, or at least it isn't asking
> me with 8.0.7. From my tinkering, it looks like it ignores them or you need
> to explictly allow them:
>
> M-x customize-variable RET org-export-allow-bind-keywords RET
>
> Hide Org Export Allow Bind Keywords: Toggle  on (non-nil)
>     State : CHANGED outside Customize.
>    Non-nil means BIND keywords can define local variable values. Hide
>    This is a potential security risk, which is why the default value
>    is nil.  You can also allow them through local buffer variables.
>
> I could be wrong, but the "toggle" button (vs. stating possible values)
> implies that it's either on or off.
>
> Actually, in just searching now, it seems that this is, indeed, the case
> since 8.0.3:
>
> http://orgmode.org/Changes.html#sec-1-5-1
>
> In any case, I am now using this for my minimal config and it works
> successfully:
>
> #+begin_src
>
> ;; change path to point to your org/lisp directory
> (add-to-list 'load-path "~/.elisp/org.git/lisp/")
>
> (setq org-export-allow-bind-keywords t)
>
> (defun mapcdi-org-latex-headline-function (todo todo-type priority text
> tags)
>  "The docstring of my function."
>  (concat
>   (and todo (format "{}" todo))
>   (and priority (format "{} " ))
>   (and text (format "{\\vspace{-\\baselineskip}}" ))
>   (and tags
>        (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))
>
> #+end_src
>
> And this is the file I'm using (I removed anything non-essential to
> eliminate other possible causes):
>
> #+begin_src
>
> #+options: num:nil
> #+bind: org-latex-format-headline-function
> mapcdi-org-latex-headline-function
>
>
>
> * headline 1
>
> blah blah blah.
>
> * headline 2
>
> blah blah blah
>
> * headline 3
>
> A couple of separate paragraphs to see how far apart two paragraphs would
> be
> normally. We'll add enough to line break just to make it interesting.
>
> A couple of separate paragraphs to see how far apart two paragraphs would
> be
> normally. We'll add enough to line break just to make it interesting.
>
> #+end_src
>
>
> I attached a screenshot of the result!
>
>
> Let me know if that helps,
> John
>
>
>
>> My test-file, OrgMode.org <http://orgmode.org/>:
>>
>> #+TITLE:     My file is OrgMode.org <http://orgmode.org/>
>> #+AUTHOR:
>> #+EMAIL:
>> #+DATE:
>> #+DESCRIPTION:
>> #+KEYWORDS:
>> #+LANGUAGE:  en
>> #+BIND: org-latex-format-headline-function
>> mapcdi-org-latex-headline-function
>> #+OPTIONS:   H:3 num:nil toc:t \n:nil @:t ::t |:t ^:t
>> #+OPTIONS:   -:t f:t *:t <:t tasks:nil
>> #+OPTIONS:   pri:nil tags:not-in-toc
>> #+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t
>> #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0
>> path:http://orgmode.org/org-info.js
>> #+EXPORT_SELECT_TAGS: export
>> #+EXPORT_EXCLUDE_TAGS: noexport
>> #+LINK_UP:
>> #+LINK_HOME:
>> #+XSLT:
>>
>> * TODO headline 1        :test:
>>
>> blah blah blah.
>>
>> * headline 2
>>
>> blah blah blah
>>
>> * headline 3
>>
>> A couple of separate paragraphs to see how far apart two paragraphs would
>> be
>> normally. We'll add enough to line break just to make it interesting.
>>
>> A couple of separate paragraphs to see how far apart two paragraphs would
>> be
>> normally. We'll add enough to line break just to make it interesting.
>>
>>
>>
>>
>> ____________________________________________________________________
>> My .emacs file
>>
>> (custom-set-variables
>>  ;; custom-set-variables was added by Custom.
>>  ;; If you edit it by hand, you could mess it up, so be careful.
>>  ;; Your init file should contain only one such instance.
>>  ;; If there is more than one, they won't work right.
>>  '(adaptive-fill-mode nil)
>>  '(blink-cursor-mode nil)
>>  '(column-number-mode t)
>>  '(current-language-environment "Spanish")
>>  '(debug-on-error t)
>>  '(debug-on-quit t)
>>  '(display-battery-mode t)
>>  '(display-time-mode t)
>>  '(fill-column 56)
>>  '(left-margin 0)
>>  '(ns-alternate-modifier (quote meta))
>>  '(ns-command-modifier (quote super))
>>  '(ns-function-modifier (quote none))
>>  '(ns-right-alternate-modifier (quote none))
>>  '(ns-right-command-modifier (quote left))
>>  '(org-agenda-files (quote ("~/Documents/OrgMode.org<http://orgmode.org/>
>> ")))
>>  '(save-place t nil (saveplace))
>>  '(size-indication-mode t)
>>  '(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify)))
>>  '(truncate-lines t))
>> (custom-set-faces
>>  ;; custom-set-faces was added by Custom.
>>  ;; If you edit it by hand, you could mess it up, so be careful.
>>  ;; Your init file should contain only one such instance.
>>  ;; If there is more than one, they won't work right.
>>  '(default ((t (:inherit nil :stipple nil :background "White" :foreground
>> "Black" :inverse-video nil :box nil :strike-through nil :overline nil
>> :underline nil :slant normal :weight normal :height 180 :width normal
>> :foundry "apple" :family "Monaco"))))
>>  '(set-face-attribute (quote default) nil :height))
>>
>> (setenv "PATH" (concat (getenv "PATH") ":/usr/texbin"))
>>     (setq exec-path (append exec-path '("/usr/texbin")))
>>
>> (defun mapcdi-org-latex-headline-function (todo todo-type priority text
>> tags)
>>  "The docstring of my function."
>>  (concat
>>   (and todo (format "{}" todo))
>>   (and priority (format "{} " ))
>>   (and text (format "{\\vspace{-\\baselineskip}}" ))
>>   (and tags
>>        (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))
>>
>
> <2013-09-02_203154.png>
>
>
>

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

[-- Attachment #2: LaTeX_output_PDF_ImageCapture.png --]
[-- Type: image/png, Size: 33924 bytes --]

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

* Re: fold paragraphs, export only contents of a node, hiding the 'node heading text'
  2013-09-03 14:48             ` mapcdi
@ 2013-09-03 19:17               ` John Hendy
  2013-09-04  0:20                 ` mapcdi
  0 siblings, 1 reply; 8+ messages in thread
From: John Hendy @ 2013-09-03 19:17 UTC (permalink / raw)
  To: . .; +Cc: emacs-orgmode

On Tue, Sep 3, 2013 at 9:48 AM,  <mapcdi@me.com> wrote:
> So, now that I can hide all the headings I need a way to hide ONLY SOME
> headings, like those with a todo-like specific text: say UNFINISHEDPAR for
> unfinished paragraphs and FINISHEDPAR for the ones finished.
>

I haven't used them, but I believe filters might be the way to go for this:
- http://orgmode.org/worg/dev/org-export-reference.html#filter-system

That way, you could tag a headline with something and either apply the
mapcdi-org-latex-headline-function or the default one (which would
show the headline).

#+begin_src

* headline 1   :done:

This text would not show a headline since it's complete.

* headline 2 :inProgress:

This headline would appear since you're still working on it.

#+end_src

Something like that.
- Or doing the same via todo keywords.
- Or perhaps a per-subtree definition of the org headline format
function. If #+bind is allowed as a property at the headline level
(vs. for the whole file), that would be an easy way.

I think others like Nicolas who are more familiar with the inner
workings of the export engine could help you better than I. I'm sure
it's possible in some manner.


Good luck,
John

>
> Is it possible given the current (.emacs/test-file.org) working setup, as a
> reminder:
>
> ;; change path to point to your org/lisp directory
> (add-to-list 'load-path "~/.elisp/org.git/lisp/")
>
> (setq org-export-allow-bind-keywords t)
>
> (defun mapcdi-org-latex-headline-function (todo todo-type priority text
> tags)
>  "The docstring of my function."
>  (concat
>   (and todo (format "{}" todo))
>   (and priority (format "{} " ))
>   (and text (format "{\\vspace{-\\baselineskip}}" ))
>   (and tags
>        (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))
>
>
>
>
> Thanks,
>
> Mark
>
>
>
>
> El 03/09/2013, a las 09:16, mapcdi@me.com escribió:
>
> <LaTeX_output_PDF_ImageCapture.png>
>
>
> It works all right!
> I had org version 7.9 which seems the current 'bundled' version for Emacs,
> which I recently installed (being a newbie, as I am, for Emacs/Org-mode). I
> updated via
>  M-x package-install RET org
> as in http://orgmode.org/org.html#Installation
>
>
> and now I have 8.0.7. I compiled with your .emacs/.org example files, except
> I needed to add:
>
> (setenv "PATH" (concat (getenv "PATH") ":/usr/texbin"))
>     (setq exec-path (append exec-path '("/usr/texbin")))
>
> or it wouldn't compile the PDF,
> and there's the output: success!
>
>
> So, I will start tinkering myself with some settings like:
> http://tex.stackexchange.com/questions/39227/no-indent-in-the-first-paragraph-in-a-section
>
>
> By the way, do you know how I could eliminate my needed line,  in my .emacs:
> (setenv "PATH" (concat (getenv "PATH") ":/usr/texbin"))
>     (setq exec-path (append exec-path '("/usr/texbin")))
> by way of setting things to a default setting so I don't need to update my
> path every time via .emacs.
>
>
> Thanks!
>
> Mark
>
>
>
> El 03/09/2013, a las 03:32, John Hendy <jw.hendy@gmail.com> escribió:
>
>
>
>
> On Mon, Sep 2, 2013 at 4:53 PM, <mapcdi@me.com> wrote:
>>
>> <OrgMode_LaTeX_output_PDF_ImageCapture.png>
>>
>>
>>
>> After I compile:  C-c    C-e    d (… to open PDF file).
>> It asks:
>> 'Allow BIND values in this buffer? (yes or no) '
>> I answer 'yes' and the PDF is opened. I have attached the resulting PDF
>> screen capture.
>> Thanks.
>>
>
> What is your orgmode version (paste the output of `M-x org-version`)? I
> decided to just give a whirl with a minimal config and I don't think that
> Org 8+ asks for allowing bind keywords anymore, or at least it isn't asking
> me with 8.0.7. From my tinkering, it looks like it ignores them or you need
> to explictly allow them:
>
> M-x customize-variable RET org-export-allow-bind-keywords RET
>
> Hide Org Export Allow Bind Keywords: Toggle  on (non-nil)
>     State : CHANGED outside Customize.
>    Non-nil means BIND keywords can define local variable values. Hide
>    This is a potential security risk, which is why the default value
>    is nil.  You can also allow them through local buffer variables.
>
> I could be wrong, but the "toggle" button (vs. stating possible values)
> implies that it's either on or off.
>
> Actually, in just searching now, it seems that this is, indeed, the case
> since 8.0.3:
>
> http://orgmode.org/Changes.html#sec-1-5-1
>
> In any case, I am now using this for my minimal config and it works
> successfully:
>
> #+begin_src
>
> ;; change path to point to your org/lisp directory
> (add-to-list 'load-path "~/.elisp/org.git/lisp/")
>
> (setq org-export-allow-bind-keywords t)
>
> (defun mapcdi-org-latex-headline-function (todo todo-type priority text
> tags)
>  "The docstring of my function."
>  (concat
>   (and todo (format "{}" todo))
>   (and priority (format "{} " ))
>   (and text (format "{\\vspace{-\\baselineskip}}" ))
>   (and tags
>        (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))
>
> #+end_src
>
> And this is the file I'm using (I removed anything non-essential to
> eliminate other possible causes):
>
> #+begin_src
>
> #+options: num:nil
> #+bind: org-latex-format-headline-function
> mapcdi-org-latex-headline-function
>
>
>
> * headline 1
>
> blah blah blah.
>
> * headline 2
>
> blah blah blah
>
> * headline 3
>
> A couple of separate paragraphs to see how far apart two paragraphs would be
> normally. We'll add enough to line break just to make it interesting.
>
> A couple of separate paragraphs to see how far apart two paragraphs would be
> normally. We'll add enough to line break just to make it interesting.
>
> #+end_src
>
>
> I attached a screenshot of the result!
>
>
> Let me know if that helps,
> John
>
>
>>
>> My test-file, OrgMode.org:
>>
>> #+TITLE:     My file is OrgMode.org
>> #+AUTHOR:
>> #+EMAIL:
>> #+DATE:
>> #+DESCRIPTION:
>> #+KEYWORDS:
>> #+LANGUAGE:  en
>> #+BIND: org-latex-format-headline-function
>> mapcdi-org-latex-headline-function
>> #+OPTIONS:   H:3 num:nil toc:t \n:nil @:t ::t |:t ^:t
>> #+OPTIONS:   -:t f:t *:t <:t tasks:nil
>> #+OPTIONS:   pri:nil tags:not-in-toc
>> #+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t
>> #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0
>> path:http://orgmode.org/org-info.js
>> #+EXPORT_SELECT_TAGS: export
>> #+EXPORT_EXCLUDE_TAGS: noexport
>> #+LINK_UP:
>> #+LINK_HOME:
>> #+XSLT:
>>
>> * TODO headline 1       :test:
>>
>> blah blah blah.
>>
>> * headline 2
>>
>> blah blah blah
>>
>> * headline 3
>>
>> A couple of separate paragraphs to see how far apart two paragraphs would
>> be
>> normally. We'll add enough to line break just to make it interesting.
>>
>> A couple of separate paragraphs to see how far apart two paragraphs would
>> be
>> normally. We'll add enough to line break just to make it interesting.
>>
>>
>>
>>
>> ____________________________________________________________________
>> My .emacs file
>>
>> (custom-set-variables
>>  ;; custom-set-variables was added by Custom.
>>  ;; If you edit it by hand, you could mess it up, so be careful.
>>  ;; Your init file should contain only one such instance.
>>  ;; If there is more than one, they won't work right.
>>  '(adaptive-fill-mode nil)
>>  '(blink-cursor-mode nil)
>>  '(column-number-mode t)
>>  '(current-language-environment "Spanish")
>>  '(debug-on-error t)
>>  '(debug-on-quit t)
>>  '(display-battery-mode t)
>>  '(display-time-mode t)
>>  '(fill-column 56)
>>  '(left-margin 0)
>>  '(ns-alternate-modifier (quote meta))
>>  '(ns-command-modifier (quote super))
>>  '(ns-function-modifier (quote none))
>>  '(ns-right-alternate-modifier (quote none))
>>  '(ns-right-command-modifier (quote left))
>>  '(org-agenda-files (quote ("~/Documents/OrgMode.org")))
>>  '(save-place t nil (saveplace))
>>  '(size-indication-mode t)
>>  '(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify)))
>>  '(truncate-lines t))
>> (custom-set-faces
>>  ;; custom-set-faces was added by Custom.
>>  ;; If you edit it by hand, you could mess it up, so be careful.
>>  ;; Your init file should contain only one such instance.
>>  ;; If there is more than one, they won't work right.
>>  '(default ((t (:inherit nil :stipple nil :background "White" :foreground
>> "Black" :inverse-video nil :box nil :strike-through nil :overline nil
>> :underline nil :slant normal :weight normal :height 180 :width normal
>> :foundry "apple" :family "Monaco"))))
>>  '(set-face-attribute (quote default) nil :height))
>>
>> (setenv "PATH" (concat (getenv "PATH") ":/usr/texbin"))
>>     (setq exec-path (append exec-path '("/usr/texbin")))
>>
>> (defun mapcdi-org-latex-headline-function (todo todo-type priority text
>> tags)
>>  "The docstring of my function."
>>  (concat
>>   (and todo (format "{}" todo))
>>   (and priority (format "{} " ))
>>   (and text (format "{\\vspace{-\\baselineskip}}" ))
>>   (and tags
>>        (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))
>
>
> <2013-09-02_203154.png>
>
>
>

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

* Re: fold paragraphs, export only contents of a node, hiding the 'node heading text'
  2013-09-03 19:17               ` John Hendy
@ 2013-09-04  0:20                 ` mapcdi
  0 siblings, 0 replies; 8+ messages in thread
From: mapcdi @ 2013-09-04  0:20 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

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




It works for me now!
If now I could only know how to hide just the  DONE  keywords! I know it's:
#+OPTIONS: todo: toggle on/off DONE so the word is not exported, kind of  thing, but couldn't find it.


Here's my .emacs:

(require 'org-latex) ;; It works because my version is < 8.0
(unless (boundp 'org-export-latex-classes)
  (setq org-export-latex-classes nil))
(add-to-list 'org-export-latex-classes
             '("article"
               "\\documentclass{article}"
               ("\\section{%s}" . "\\section*{%s}")
               ("\\subsection{%s}" . "\\subsection*{%s}")
               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
               ("\\paragraph{%s}" . "\\paragraph*{%s}")
               ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))




And here's my doc.org:
________________________________________________________
#+TITLE:     Hiding the \texttt{paragraph} formatting works fine
#+AUTHOR:
#+DATE:
#+OPTIONS:   H:5 num:t toc:2 \n:nil @:t ::t |:t ^:nil -:t f:t *:t <:t
#+LATEX_HEADER:   \usepackage{titlesec}
#+LATEX_HEADER:   \titleformat{\subsubsection}[runin]{\normalfont\normalsize}{}{}{}[ \mbox{}]
#+LATEX_HEADER:   \titlespacing{\subsubsection}{10pt}{0ex plus 0ex minus 0ex}{0pt}
#+LATEX_HEADER:   \titleformat{\paragraph}[runin]{\normalfont\normalsize}{}{}{}[ \mbox{}]
#+LATEX_HEADER:   \titlespacing{\paragraph}{10pt}{0ex plus 0ex minus 0ex}{0pt}

* Section
** subsection
*** Subsubsection.
Although as demonstrated in this subsubsection, it can work for other headings.
**** It works out fine now for paragraphs.
As intended. I would normally not set the
\texttt{titlesec} 'trick' for headings other than
paragraphs.
**** This trick, I found it here:
http://latex-community.org/forum/viewtopic.php?f=5&t=20169.
So thanks. And also thanks to the great package by none other than Javier
Bezos. Great stuff!

* Section
** subsection
*** Subsubsection. See! Subsubections come out as paragraphs now!
**** My paragraph to start the story.
I would like to start by saying this much.
It was all about being able to \emph{do the folding}.
**** TODO I can even have a paragraph without much text.
**** DONE This next paragraph develops the story a little more.
I would like to continue saying what the story is all
about. Now is not the time to give up the mysterious
\emph{folding}. End of doc.org.
___________________________________________________




I'm posting my solution because I think some more people could find it interesting in this solution.
It could work wonders for structuring your ideas and shuffling them easily as paragraphs in your texts.
Since that's what org-mode is all about here's also my vote for such a feature request.

Thanks to John Hendy.


Best regards,
Mark



El 03/09/2013, a las 21:17, John Hendy <jw.hendy@gmail.com> escribió:

> On Tue, Sep 3, 2013 at 9:48 AM,  <mapcdi@me.com> wrote:
>> So, now that I can hide all the headings I need a way to hide ONLY SOME
>> headings, like those with a todo-like specific text: say UNFINISHEDPAR for
>> unfinished paragraphs and FINISHEDPAR for the ones finished.
>> 
> 
> I haven't used them, but I believe filters might be the way to go for this:
> - http://orgmode.org/worg/dev/org-export-reference.html#filter-system
> 
> That way, you could tag a headline with something and either apply the
> mapcdi-org-latex-headline-function or the default one (which would
> show the headline).
> 
> #+begin_src
> 
> * headline 1   :done:
> 
> This text would not show a headline since it's complete.
> 
> * headline 2 :inProgress:
> 
> This headline would appear since you're still working on it.
> 
> #+end_src
> 
> Something like that.
> - Or doing the same via todo keywords.
> - Or perhaps a per-subtree definition of the org headline format
> function. If #+bind is allowed as a property at the headline level
> (vs. for the whole file), that would be an easy way.
> 
> I think others like Nicolas who are more familiar with the inner
> workings of the export engine could help you better than I. I'm sure
> it's possible in some manner.
> 
> 
> Good luck,
> John
> 
>> 
>> Is it possible given the current (.emacs/test-file.org) working setup, as a
>> reminder:
>> 
>> ;; change path to point to your org/lisp directory
>> (add-to-list 'load-path "~/.elisp/org.git/lisp/")
>> 
>> (setq org-export-allow-bind-keywords t)
>> 
>> (defun mapcdi-org-latex-headline-function (todo todo-type priority text
>> tags)
>> "The docstring of my function."
>> (concat
>>  (and todo (format "{}" todo))
>>  (and priority (format "{} " ))
>>  (and text (format "{\\vspace{-\\baselineskip}}" ))
>>  (and tags
>>       (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))
>> 
>> 
>> 
>> 
>> Thanks,
>> 
>> Mark
>> 
>> 
>> 
>> 
>> El 03/09/2013, a las 09:16, mapcdi@me.com escribió:
>> 
>> <LaTeX_output_PDF_ImageCapture.png>
>> 
>> 
>> It works all right!
>> I had org version 7.9 which seems the current 'bundled' version for Emacs,
>> which I recently installed (being a newbie, as I am, for Emacs/Org-mode). I
>> updated via
>> M-x package-install RET org
>> as in http://orgmode.org/org.html#Installation
>> 
>> 
>> and now I have 8.0.7. I compiled with your .emacs/.org example files, except
>> I needed to add:
>> 
>> (setenv "PATH" (concat (getenv "PATH") ":/usr/texbin"))
>>    (setq exec-path (append exec-path '("/usr/texbin")))
>> 
>> or it wouldn't compile the PDF,
>> and there's the output: success!
>> 
>> 
>> So, I will start tinkering myself with some settings like:
>> http://tex.stackexchange.com/questions/39227/no-indent-in-the-first-paragraph-in-a-section
>> 
>> 
>> By the way, do you know how I could eliminate my needed line,  in my .emacs:
>> (setenv "PATH" (concat (getenv "PATH") ":/usr/texbin"))
>>    (setq exec-path (append exec-path '("/usr/texbin")))
>> by way of setting things to a default setting so I don't need to update my
>> path every time via .emacs.
>> 
>> 
>> Thanks!
>> 
>> Mark
>> 
>> 
>> 
>> El 03/09/2013, a las 03:32, John Hendy <jw.hendy@gmail.com> escribió:
>> 
>> 
>> 
>> 
>> On Mon, Sep 2, 2013 at 4:53 PM, <mapcdi@me.com> wrote:
>>> 
>>> <OrgMode_LaTeX_output_PDF_ImageCapture.png>
>>> 
>>> 
>>> 
>>> After I compile:  C-c    C-e    d (… to open PDF file).
>>> It asks:
>>> 'Allow BIND values in this buffer? (yes or no) '
>>> I answer 'yes' and the PDF is opened. I have attached the resulting PDF
>>> screen capture.
>>> Thanks.
>>> 
>> 
>> What is your orgmode version (paste the output of `M-x org-version`)? I
>> decided to just give a whirl with a minimal config and I don't think that
>> Org 8+ asks for allowing bind keywords anymore, or at least it isn't asking
>> me with 8.0.7. From my tinkering, it looks like it ignores them or you need
>> to explictly allow them:
>> 
>> M-x customize-variable RET org-export-allow-bind-keywords RET
>> 
>> Hide Org Export Allow Bind Keywords: Toggle  on (non-nil)
>>    State : CHANGED outside Customize.
>>   Non-nil means BIND keywords can define local variable values. Hide
>>   This is a potential security risk, which is why the default value
>>   is nil.  You can also allow them through local buffer variables.
>> 
>> I could be wrong, but the "toggle" button (vs. stating possible values)
>> implies that it's either on or off.
>> 
>> Actually, in just searching now, it seems that this is, indeed, the case
>> since 8.0.3:
>> 
>> http://orgmode.org/Changes.html#sec-1-5-1
>> 
>> In any case, I am now using this for my minimal config and it works
>> successfully:
>> 
>> #+begin_src
>> 
>> ;; change path to point to your org/lisp directory
>> (add-to-list 'load-path "~/.elisp/org.git/lisp/")
>> 
>> (setq org-export-allow-bind-keywords t)
>> 
>> (defun mapcdi-org-latex-headline-function (todo todo-type priority text
>> tags)
>> "The docstring of my function."
>> (concat
>>  (and todo (format "{}" todo))
>>  (and priority (format "{} " ))
>>  (and text (format "{\\vspace{-\\baselineskip}}" ))
>>  (and tags
>>       (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))
>> 
>> #+end_src
>> 
>> And this is the file I'm using (I removed anything non-essential to
>> eliminate other possible causes):
>> 
>> #+begin_src
>> 
>> #+options: num:nil
>> #+bind: org-latex-format-headline-function
>> mapcdi-org-latex-headline-function
>> 
>> 
>> 
>> * headline 1
>> 
>> blah blah blah.
>> 
>> * headline 2
>> 
>> blah blah blah
>> 
>> * headline 3
>> 
>> A couple of separate paragraphs to see how far apart two paragraphs would be
>> normally. We'll add enough to line break just to make it interesting.
>> 
>> A couple of separate paragraphs to see how far apart two paragraphs would be
>> normally. We'll add enough to line break just to make it interesting.
>> 
>> #+end_src
>> 
>> 
>> I attached a screenshot of the result!
>> 
>> 
>> Let me know if that helps,
>> John
>> 
>> 
>>> 
>>> My test-file, OrgMode.org:
>>> 
>>> #+TITLE:     My file is OrgMode.org
>>> #+AUTHOR:
>>> #+EMAIL:
>>> #+DATE:
>>> #+DESCRIPTION:
>>> #+KEYWORDS:
>>> #+LANGUAGE:  en
>>> #+BIND: org-latex-format-headline-function
>>> mapcdi-org-latex-headline-function
>>> #+OPTIONS:   H:3 num:nil toc:t \n:nil @:t ::t |:t ^:t
>>> #+OPTIONS:   -:t f:t *:t <:t tasks:nil
>>> #+OPTIONS:   pri:nil tags:not-in-toc
>>> #+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t
>>> #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0
>>> path:http://orgmode.org/org-info.js
>>> #+EXPORT_SELECT_TAGS: export
>>> #+EXPORT_EXCLUDE_TAGS: noexport
>>> #+LINK_UP:
>>> #+LINK_HOME:
>>> #+XSLT:
>>> 
>>> * TODO headline 1       :test:
>>> 
>>> blah blah blah.
>>> 
>>> * headline 2
>>> 
>>> blah blah blah
>>> 
>>> * headline 3
>>> 
>>> A couple of separate paragraphs to see how far apart two paragraphs would
>>> be
>>> normally. We'll add enough to line break just to make it interesting.
>>> 
>>> A couple of separate paragraphs to see how far apart two paragraphs would
>>> be
>>> normally. We'll add enough to line break just to make it interesting.
>>> 
>>> 
>>> 
>>> 
>>> ____________________________________________________________________
>>> My .emacs file
>>> 
>>> (custom-set-variables
>>> ;; custom-set-variables was added by Custom.
>>> ;; If you edit it by hand, you could mess it up, so be careful.
>>> ;; Your init file should contain only one such instance.
>>> ;; If there is more than one, they won't work right.
>>> '(adaptive-fill-mode nil)
>>> '(blink-cursor-mode nil)
>>> '(column-number-mode t)
>>> '(current-language-environment "Spanish")
>>> '(debug-on-error t)
>>> '(debug-on-quit t)
>>> '(display-battery-mode t)
>>> '(display-time-mode t)
>>> '(fill-column 56)
>>> '(left-margin 0)
>>> '(ns-alternate-modifier (quote meta))
>>> '(ns-command-modifier (quote super))
>>> '(ns-function-modifier (quote none))
>>> '(ns-right-alternate-modifier (quote none))
>>> '(ns-right-command-modifier (quote left))
>>> '(org-agenda-files (quote ("~/Documents/OrgMode.org")))
>>> '(save-place t nil (saveplace))
>>> '(size-indication-mode t)
>>> '(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify)))
>>> '(truncate-lines t))
>>> (custom-set-faces
>>> ;; custom-set-faces was added by Custom.
>>> ;; If you edit it by hand, you could mess it up, so be careful.
>>> ;; Your init file should contain only one such instance.
>>> ;; If there is more than one, they won't work right.
>>> '(default ((t (:inherit nil :stipple nil :background "White" :foreground
>>> "Black" :inverse-video nil :box nil :strike-through nil :overline nil
>>> :underline nil :slant normal :weight normal :height 180 :width normal
>>> :foundry "apple" :family "Monaco"))))
>>> '(set-face-attribute (quote default) nil :height))
>>> 
>>> (setenv "PATH" (concat (getenv "PATH") ":/usr/texbin"))
>>>    (setq exec-path (append exec-path '("/usr/texbin")))
>>> 
>>> (defun mapcdi-org-latex-headline-function (todo todo-type priority text
>>> tags)
>>> "The docstring of my function."
>>> (concat
>>>  (and todo (format "{}" todo))
>>>  (and priority (format "{} " ))
>>>  (and text (format "{\\vspace{-\\baselineskip}}" ))
>>>  (and tags
>>>       (format "\\hfill{}\\textit{}" (mapconcat 'identity tags ":")))))
>> 
>> 
>> <2013-09-02_203154.png>
>> 
>> 
>> 


[-- Attachment #2.1: Type: text/html, Size: 15376 bytes --]

[-- Attachment #2.2: PDF.png --]
[-- Type: image/png, Size: 49186 bytes --]

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

end of thread, other threads:[~2013-09-04  0:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-01 21:17 fold paragraphs, export only contents of a node, hiding the 'node heading text' . .
2013-09-01 23:51 ` John Hendy
2013-09-02 16:00   ` . .
     [not found]     ` <CA+M2ft8GPHzEierLmMpJQxtRv=iLQ=dfXXFaqguZmOXi4ykk6A@mail.gmail.com>
     [not found]       ` <C7F63B6F-D5C7-49D5-A7EE-4F0082882901@me.com>
2013-09-03  1:32         ` John Hendy
     [not found]           ` <4702F1A4-113B-4171-B949-2B9EE14EEAA9@me.com>
2013-09-03 14:48             ` mapcdi
2013-09-03 19:17               ` John Hendy
2013-09-04  0:20                 ` mapcdi
2013-09-03 19:10             ` John Hendy

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