all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Start Appendix in LaTeX - better way than \appendix?
@ 2015-08-26  9:47 Rainer M Krug
  2015-08-26 10:23 ` Eric S Fraga
  2015-08-26 11:28 ` Rasmus
  0 siblings, 2 replies; 4+ messages in thread
From: Rainer M Krug @ 2015-08-26  9:47 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi

I am working on a document with appendix and at the moment the org file
looks effectively like this:

,----
| ...
| * Acknowledgments
| 
| \appendix
| 
| * ##### From Here is Appendix ####     :noexport:
| * Parameter
| * Code
| ...
`----

So the appendix separator for LaTeX is in the section
*Acknowledgements* with the visual separator following.

This works, but is kind of strange, as #/appendix# is not actually part
of *Acknowledgements*.

Is there a better / more org way of doing this, or do I have to live
with this?

Thanks,

Rainer

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

PGP: 0x0F52F982

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 480 bytes --]

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

* Re: Start Appendix in LaTeX - better way than \appendix?
  2015-08-26  9:47 Start Appendix in LaTeX - better way than \appendix? Rainer M Krug
@ 2015-08-26 10:23 ` Eric S Fraga
  2015-08-26 11:05   ` Rainer M Krug
  2015-08-26 11:28 ` Rasmus
  1 sibling, 1 reply; 4+ messages in thread
From: Eric S Fraga @ 2015-08-26 10:23 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: emacs-orgmode

On Wednesday, 26 Aug 2015 at 11:47, Rainer M Krug wrote:

[...]

> Is there a better / more org way of doing this, or do I have to live
> with this?

I tend to do something like this:

#+begin_src org
  ,* (new page)                               :ignoreheading:
  ,#+latex: \newpage
#+end_src

in conjunction with this export hook:

#+begin_src emacs-lisp
  (defun esf/remove-lines-with-ignore-heading-tag (backend)
    (message "Deleting lines with ignore heading tag")
    (while (search-forward-regexp "^\\*+.*[ \t]+[a-ZA-Z0-9:]*:ignoreheading:[a-ZA-Z0-9:]*$" (point-max) t)
      (cond
       ((eq backend 'latex) (replace-match "#+latex: % \\&" ))
       ((eq backend 'html) (replace-match "#+html: <!-- \\& -->" ))
       (t (replace-match "")))))
  (add-hook 'org-export-before-processing-hook 'esf/remove-lines-with-ignore-heading-tag)
#+end_src

I use the ignoreheading kludge a lot for structuring documents that will be exported.

Obviously change "newpage" for "appendix" in the above example...

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-176-g45abec

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

* Re: Start Appendix in LaTeX - better way than \appendix?
  2015-08-26 10:23 ` Eric S Fraga
@ 2015-08-26 11:05   ` Rainer M Krug
  0 siblings, 0 replies; 4+ messages in thread
From: Rainer M Krug @ 2015-08-26 11:05 UTC (permalink / raw)
  To: emacs-orgmode

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

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Wednesday, 26 Aug 2015 at 11:47, Rainer M Krug wrote:
>
> [...]
>
>> Is there a better / more org way of doing this, or do I have to live
>> with this?
>
> I tend to do something like this:
>
> #+begin_src org
>   ,* (new page)                               :ignoreheading:
>   ,#+latex: \newpage
> #+end_src
>
> in conjunction with this export hook:
>
> #+begin_src emacs-lisp
>   (defun esf/remove-lines-with-ignore-heading-tag (backend)
>     (message "Deleting lines with ignore heading tag")
>     (while (search-forward-regexp "^\\*+.*[ \t]+[a-ZA-Z0-9:]*:ignoreheading:[a-ZA-Z0-9:]*$" (point-max) t)
>       (cond
>        ((eq backend 'latex) (replace-match "#+latex: % \\&" ))
>        ((eq backend 'html) (replace-match "#+html: <!-- \\& -->" ))
>        (t (replace-match "")))))
>   (add-hook 'org-export-before-processing-hook 'esf/remove-lines-with-ignore-heading-tag)
> #+end_src
>
> I use the ignoreheading kludge a lot for structuring documents that will be exported.
>
> Obviously change "newpage" for "appendix" in the above example...

This is brilliant - thanks.

I think this should be included directly i org as may questions were
related to exactly this - entries without headings.

Thanks,

Rainer

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

PGP: 0x0F52F982

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 480 bytes --]

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

* Re: Start Appendix in LaTeX - better way than \appendix?
  2015-08-26  9:47 Start Appendix in LaTeX - better way than \appendix? Rainer M Krug
  2015-08-26 10:23 ` Eric S Fraga
@ 2015-08-26 11:28 ` Rasmus
  1 sibling, 0 replies; 4+ messages in thread
From: Rasmus @ 2015-08-26 11:28 UTC (permalink / raw)
  To: emacs-orgmode

Rainer M Krug <Rainer@krugs.de> writes:

> Is there a better / more org way of doing this, or do I have to live
> with this?

Use a filter that inserts "\appendix" when it sees a particular property
or tag in a headline.

It would be nice to introduce a general property for arbitrary code just
before a headline.

Rasmus

-- 
Dung makes an excellent fertilizer

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

end of thread, other threads:[~2015-08-26 11:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-26  9:47 Start Appendix in LaTeX - better way than \appendix? Rainer M Krug
2015-08-26 10:23 ` Eric S Fraga
2015-08-26 11:05   ` Rainer M Krug
2015-08-26 11:28 ` Rasmus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.