* Bibtex export
@ 2012-12-17 15:41 mohamed
2012-12-18 11:52 ` Bastien
0 siblings, 1 reply; 10+ messages in thread
From: mohamed @ 2012-12-17 15:41 UTC (permalink / raw)
To: emacs-orgmode
Hi,
Is there any way to use something like :
* Section a
...
* Bibliography [with some specific tag]
\clearpage
\bibliographystyle{acm}
\bibliography{biblio.bib}
My point is to avoid deleting the bibliography lines when deleting the previous
section (section a).
Thanks,
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bibtex export
2012-12-17 15:41 Bibtex export mohamed
@ 2012-12-18 11:52 ` Bastien
2012-12-18 20:47 ` mohamed
0 siblings, 1 reply; 10+ messages in thread
From: Bastien @ 2012-12-18 11:52 UTC (permalink / raw)
To: mohamed; +Cc: emacs-orgmode
Hi Mohamed,
mohamed <mohamed.hibti@gmail.com> writes:
> Is there any way to use something like :
>
> * Section a
>
> ...
>
> * Bibliography [with some specific tag]
> \clearpage
> \bibliographystyle{acm}
> \bibliography{biblio.bib}
>
> My point is to avoid deleting the bibliography lines when deleting the previous
> section (section a).
I'm not sure I understand. In what condition does deleting
"* Section a" will delete * Bibliography" ?
--
Bastien
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bibtex export
2012-12-18 11:52 ` Bastien
@ 2012-12-18 20:47 ` mohamed
2012-12-19 12:40 ` Myles English
0 siblings, 1 reply; 10+ messages in thread
From: mohamed @ 2012-12-18 20:47 UTC (permalink / raw)
To: emacs-orgmode
Bastien <bzg <at> altern.org> writes:
> I'm not sure I understand. In what condition does deleting
> "* Section a" will delete * Bibliography" ?
>
Hi Bastien,
Thank you for answering.
Usually I write
---------------------------
* Section a
...
\clearpage
\bibliographystyle{acm}
\bibliography{biblio.bib}
---------------------------
However, sometimes I decide to delete the section "section a"
and then the lines including the bibliography specifications are also lost
in the overview mode.
Therefore, I need something to protect the bibliography lines and make them
accessible in a dedicated section.
Regards,
Mohamed
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bibtex export
2012-12-18 20:47 ` mohamed
@ 2012-12-19 12:40 ` Myles English
2012-12-20 10:08 ` mohamed
0 siblings, 1 reply; 10+ messages in thread
From: Myles English @ 2012-12-19 12:40 UTC (permalink / raw)
To: mohamed; +Cc: emacs-orgmode
Hi Mohamed,
mohamed writes:
> Usually I write
> ---------------------------
> * Section a
>
> ...
>
* Bibliograpy :noheading:
>
> \clearpage
> \bibliographystyle{acm}
> \bibliography{biblio.bib}
>
If you use this function then the Bibliography heading won't be
duplicated:
#+begin_src emacs-lisp
(defun my-export-delete-headlines-tagged-noheading (backend)
(dolist (hl (nreverse (org-element-map (org-element-parse-buffer 'headline)
'headline
'identity)))
(when (member "noheading" (org-element-property :tags hl))
(goto-char (org-element-property :begin hl))
(delete-region (point) (progn (forward-line) (point))))))
#+end_src
You need to be a bit careful because the Bibliography section will then
inherit any properties from the section above so if you then do:
* Section a :noexport:
then both that section and the Bibliography section would not be
exported.
Myles
> Regards,
> Mohamed
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bibtex export
2012-12-19 12:40 ` Myles English
@ 2012-12-20 10:08 ` mohamed
2012-12-20 14:31 ` Myles English
0 siblings, 1 reply; 10+ messages in thread
From: mohamed @ 2012-12-20 10:08 UTC (permalink / raw)
To: emacs-orgmode
Myles,
Thank you for this answer.
I tried it with
-------------------------------
(add-to-list 'org-export-preprocess-hook
'my-export-delete-headlines-tagged-noheading)
-------------------------------
But I got some errors when exporting
-----------------------------------------------------------------
Exporting to LaTeX... run-hooks: Wrong number of
arguments: (lambda (backend) (dolist (hl (nreverse (org-element-map
(org-element-parse-buffer (quote headline)) (quote headline) (quote identity))))
(when (member "noheading" (org-element-property :tags hl)) (goto-char
(org-element-property :begin hl)) (delete-region (point) (progn (forward-line)
(point)))))), 0 (my-export-delete-headlines-tagged-noheading)
-----------------------------------------------------------------
I guess I have to use it in another way. My knowledge of lisp programming is
very limited.
Regards,
Mohamed
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bibtex export
2012-12-20 10:08 ` mohamed
@ 2012-12-20 14:31 ` Myles English
2012-12-20 15:13 ` Mohamed HIBTI
0 siblings, 1 reply; 10+ messages in thread
From: Myles English @ 2012-12-20 14:31 UTC (permalink / raw)
To: mohamed; +Cc: emacs-orgmode
mohamed writes:
> Myles,
> Thank you for this answer.
> I tried it with
> -------------------------------
> (add-to-list 'org-export-preprocess-hook
> 'my-export-delete-headlines-tagged-noheading)
> -------------------------------
Sorry, I should have said: add it to org-export-before-processing-hook,
so you use it like this:
#+begin_src emacs-lisp
(defun my-export-delete-headlines-tagged-noheading (backend)
(dolist (hl (nreverse (org-element-map (org-element-parse-buffer 'headline)
'headline
'identity)))
(when (member "noheading" (org-element-property :tags hl))
(goto-char (org-element-property :begin hl))
(delete-region (point) (progn (forward-line) (point))))))
(add-to-list 'org-export-before-processing-hook
'my-export-delete-headlines-tagged-noheading)
#+end_src
Myles
>
>
> But I got some errors when exporting
>
> -----------------------------------------------------------------
> Exporting to LaTeX... run-hooks: Wrong number of
> arguments: (lambda (backend) (dolist (hl (nreverse (org-element-map
> (org-element-parse-buffer (quote headline)) (quote headline) (quote identity))))
> (when (member "noheading" (org-element-property :tags hl)) (goto-char
> (org-element-property :begin hl)) (delete-region (point) (progn (forward-line)
> (point)))))), 0 (my-export-delete-headlines-tagged-noheading)
> -----------------------------------------------------------------
>
>
> I guess I have to use it in another way. My knowledge of lisp programming is
> very limited.
>
> Regards,
> Mohamed
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bibtex export
2012-12-20 14:31 ` Myles English
@ 2012-12-20 15:13 ` Mohamed HIBTI
2012-12-20 16:41 ` Bastien
2012-12-20 16:54 ` Myles English
0 siblings, 2 replies; 10+ messages in thread
From: Mohamed HIBTI @ 2012-12-20 15:13 UTC (permalink / raw)
To: Myles English; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2000 bytes --]
Thanks Myles,
This is realy what I want. I have just to fix something (may be my
org-version).
The variable org-export-before-processing-hook seems missing.
I have org-version 7.8.10 (with emacs 24.2.1)
Regards,
Mohame
2012/12/20 Myles English <mylesenglish@gmail.com>
>
> mohamed writes:
>
> > Myles,
> > Thank you for this answer.
> > I tried it with
> > -------------------------------
> > (add-to-list 'org-export-preprocess-hook
> > 'my-export-delete-headlines-tagged-noheading)
> > -------------------------------
>
> Sorry, I should have said: add it to org-export-before-processing-hook,
> so you use it like this:
>
> #+begin_src emacs-lisp
> (defun my-export-delete-headlines-tagged-noheading (backend)
> (dolist (hl (nreverse (org-element-map (org-element-parse-buffer
> 'headline)
> 'headline
> 'identity)))
> (when (member "noheading" (org-element-property :tags hl))
> (goto-char (org-element-property :begin hl))
> (delete-region (point) (progn (forward-line) (point))))))
>
> (add-to-list 'org-export-before-processing-hook
> 'my-export-delete-headlines-tagged-noheading)
> #+end_src
>
> Myles
>
> >
> >
> > But I got some errors when exporting
> >
> > -----------------------------------------------------------------
> > Exporting to LaTeX... run-hooks: Wrong number of
> > arguments: (lambda (backend) (dolist (hl (nreverse (org-element-map
> > (org-element-parse-buffer (quote headline)) (quote headline) (quote
> identity))))
> > (when (member "noheading" (org-element-property :tags hl)) (goto-char
> > (org-element-property :begin hl)) (delete-region (point) (progn
> (forward-line)
> > (point)))))), 0 (my-export-delete-headlines-tagged-noheading)
> > -----------------------------------------------------------------
> >
> >
> > I guess I have to use it in another way. My knowledge of lisp
> programming is
> > very limited.
> >
> > Regards,
> > Mohamed
>
>
[-- Attachment #2: Type: text/html, Size: 2539 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bibtex export
2012-12-20 15:13 ` Mohamed HIBTI
@ 2012-12-20 16:41 ` Bastien
2012-12-20 16:54 ` Myles English
1 sibling, 0 replies; 10+ messages in thread
From: Bastien @ 2012-12-20 16:41 UTC (permalink / raw)
To: Mohamed HIBTI; +Cc: Myles English, emacs-orgmode
Hi Mohamed,
Mohamed HIBTI <mohamed.hibti@gmail.com> writes:
> The variable org-export-before-processing-hook seems missing.
> I have org-version 7.8.10 (with emacs 24.2.1)
This variable is available in the contrib/ directory of latest
"unstable" Org -- from the git master branch.
--
Bastien
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bibtex export
2012-12-20 15:13 ` Mohamed HIBTI
2012-12-20 16:41 ` Bastien
@ 2012-12-20 16:54 ` Myles English
2012-12-20 17:04 ` Mohamed HIBTI
1 sibling, 1 reply; 10+ messages in thread
From: Myles English @ 2012-12-20 16:54 UTC (permalink / raw)
To: Mohamed HIBTI; +Cc: emacs-orgmode
Mohamed HIBTI writes:
> Thanks Myles,
> This is realy what I want. I have just to fix something (may be my
> org-version).
> The variable org-export-before-processing-hook seems missing.
> I have org-version 7.8.10 (with emacs 24.2.1)
> Regards,
> Mohame
Sorry again, I should have said that I am using this with the git
version and the new exporter.
I don't know if there is anything that will work for you on version
7.8.10. I can recommend the git version though it is quite stable and
rarely causes problems, once set up it is very easy to update, see the
worg page for details.
Myles
> 2012/12/20 Myles English <mylesenglish@gmail.com>
>
>>
>> mohamed writes:
>>
>> > Myles,
>> > Thank you for this answer.
>> > I tried it with
>> > -------------------------------
>> > (add-to-list 'org-export-preprocess-hook
>> > 'my-export-delete-headlines-tagged-noheading)
>> > -------------------------------
>>
>> Sorry, I should have said: add it to org-export-before-processing-hook,
>> so you use it like this:
>>
>> #+begin_src emacs-lisp
>> (defun my-export-delete-headlines-tagged-noheading (backend)
>> (dolist (hl (nreverse (org-element-map (org-element-parse-buffer
>> 'headline)
>> 'headline
>> 'identity)))
>> (when (member "noheading" (org-element-property :tags hl))
>> (goto-char (org-element-property :begin hl))
>> (delete-region (point) (progn (forward-line) (point))))))
>>
>> (add-to-list 'org-export-before-processing-hook
>> 'my-export-delete-headlines-tagged-noheading)
>> #+end_src
>>
>> Myles
>>
>> >
>> >
>> > But I got some errors when exporting
>> >
>> > -----------------------------------------------------------------
>> > Exporting to LaTeX... run-hooks: Wrong number of
>> > arguments: (lambda (backend) (dolist (hl (nreverse (org-element-map
>> > (org-element-parse-buffer (quote headline)) (quote headline) (quote
>> identity))))
>> > (when (member "noheading" (org-element-property :tags hl)) (goto-char
>> > (org-element-property :begin hl)) (delete-region (point) (progn
>> (forward-line)
>> > (point)))))), 0 (my-export-delete-headlines-tagged-noheading)
>> > -----------------------------------------------------------------
>> >
>> >
>> > I guess I have to use it in another way. My knowledge of lisp
>> programming is
>> > very limited.
>> >
>> > Regards,
>> > Mohamed
>>
>>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bibtex export
2012-12-20 16:54 ` Myles English
@ 2012-12-20 17:04 ` Mohamed HIBTI
0 siblings, 0 replies; 10+ messages in thread
From: Mohamed HIBTI @ 2012-12-20 17:04 UTC (permalink / raw)
To: Myles English; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2665 bytes --]
I got it thank you guys !!
2012/12/20 Myles English <mylesenglish@gmail.com>
>
> Mohamed HIBTI writes:
>
> > Thanks Myles,
> > This is realy what I want. I have just to fix something (may be my
> > org-version).
> > The variable org-export-before-processing-hook seems missing.
> > I have org-version 7.8.10 (with emacs 24.2.1)
> > Regards,
> > Mohame
>
> Sorry again, I should have said that I am using this with the git
> version and the new exporter.
>
> I don't know if there is anything that will work for you on version
> 7.8.10. I can recommend the git version though it is quite stable and
> rarely causes problems, once set up it is very easy to update, see the
> worg page for details.
>
> Myles
>
> > 2012/12/20 Myles English <mylesenglish@gmail.com>
> >
> >>
> >> mohamed writes:
> >>
> >> > Myles,
> >> > Thank you for this answer.
> >> > I tried it with
> >> > -------------------------------
> >> > (add-to-list 'org-export-preprocess-hook
> >> > 'my-export-delete-headlines-tagged-noheading)
> >> > -------------------------------
> >>
> >> Sorry, I should have said: add it to org-export-before-processing-hook,
> >> so you use it like this:
> >>
> >> #+begin_src emacs-lisp
> >> (defun my-export-delete-headlines-tagged-noheading (backend)
> >> (dolist (hl (nreverse (org-element-map (org-element-parse-buffer
> >> 'headline)
> >> 'headline
> >> 'identity)))
> >> (when (member "noheading" (org-element-property :tags hl))
> >> (goto-char (org-element-property :begin hl))
> >> (delete-region (point) (progn (forward-line) (point))))))
> >>
> >> (add-to-list 'org-export-before-processing-hook
> >> 'my-export-delete-headlines-tagged-noheading)
> >> #+end_src
> >>
> >> Myles
> >>
> >> >
> >> >
> >> > But I got some errors when exporting
> >> >
> >> > -----------------------------------------------------------------
> >> > Exporting to LaTeX... run-hooks: Wrong number of
> >> > arguments: (lambda (backend) (dolist (hl (nreverse (org-element-map
> >> > (org-element-parse-buffer (quote headline)) (quote headline) (quote
> >> identity))))
> >> > (when (member "noheading" (org-element-property :tags hl)) (goto-char
> >> > (org-element-property :begin hl)) (delete-region (point) (progn
> >> (forward-line)
> >> > (point)))))), 0 (my-export-delete-headlines-tagged-noheading)
> >> > -----------------------------------------------------------------
> >> >
> >> >
> >> > I guess I have to use it in another way. My knowledge of lisp
> >> programming is
> >> > very limited.
> >> >
> >> > Regards,
> >> > Mohamed
> >>
> >>
>
>
[-- Attachment #2: Type: text/html, Size: 3689 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-12-20 17:04 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-17 15:41 Bibtex export mohamed
2012-12-18 11:52 ` Bastien
2012-12-18 20:47 ` mohamed
2012-12-19 12:40 ` Myles English
2012-12-20 10:08 ` mohamed
2012-12-20 14:31 ` Myles English
2012-12-20 15:13 ` Mohamed HIBTI
2012-12-20 16:41 ` Bastien
2012-12-20 16:54 ` Myles English
2012-12-20 17:04 ` Mohamed HIBTI
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).