emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Latex summary
@ 2017-02-12  0:16 Russell Adams
  2017-02-13 11:08 ` Eduardo Mercovich
  0 siblings, 1 reply; 9+ messages in thread
From: Russell Adams @ 2017-02-12  0:16 UTC (permalink / raw)
  To: emacs-orgmode

I frequently write documentation with recommendations nested in
different sections, typically one line per recommendation. I then
summarize a list of those recommendations at the end of my document.

Today I use babel to grep the document for my recommendation format,
but given I'm exporting to Latex can anyone suggest a better method?
Something like a reversed table of contents?

I'm not as familiar with Latex packages.

------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

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

* Re: Latex summary
       [not found] <ffdbc677680d4f86a436ce5c969b0289@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-02-12 16:30 ` Eric S Fraga
  2017-02-13 13:06   ` Russell Adams
       [not found]   ` <7ed2978596ff4adb8aceaae2fa7393bc@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  0 siblings, 2 replies; 9+ messages in thread
From: Eric S Fraga @ 2017-02-12 16:30 UTC (permalink / raw)
  To: emacs-orgmode

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

On Sunday, 12 Feb 2017 at 00:16, Russell Adams wrote:
> I frequently write documentation with recommendations nested in
> different sections, typically one line per recommendation. I then
> summarize a list of those recommendations at the end of my document.
>
> Today I use babel to grep the document for my recommendation format,
> but given I'm exporting to Latex can anyone suggest a better method?
> Something like a reversed table of contents?

Maybe use #index: ?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8

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

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

* Re: Latex summary
  2017-02-12  0:16 Russell Adams
@ 2017-02-13 11:08 ` Eduardo Mercovich
  0 siblings, 0 replies; 9+ messages in thread
From: Eduardo Mercovich @ 2017-02-13 11:08 UTC (permalink / raw)
  To: Russell Adams; +Cc: emacs-orgmode

Hi Russell.

> I frequently write documentation with recommendations nested in
> different sections, typically one line per recommendation. I then
> summarize a list of those recommendations at the end of my document.

> Today I use babel to grep the document for my recommendation format,
> but given I'm exporting to Latex can anyone suggest a better method?
> Something like a reversed table of contents?

A reversed ToC seems perfect, since it will give you also a link to the
original place where it is developed.

I do use LaTex from Org so I'm not any expert, but I believe that this "Add
an item in the table of contents" in StackExchange may be useful.
http://tex.stackexchange.com/questions/119719/add-an-item-in-the-table-of-contents

Best...

-- 
eduardo mercovich


Donde se cruzan tus talentos 
 con las necesidades del mundo, 
 ahí está tu vocación. 
 (Anónimo)

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

* Re: Latex summary
  2017-02-12 16:30 ` Latex summary Eric S Fraga
@ 2017-02-13 13:06   ` Russell Adams
       [not found]   ` <7ed2978596ff4adb8aceaae2fa7393bc@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  1 sibling, 0 replies; 9+ messages in thread
From: Russell Adams @ 2017-02-13 13:06 UTC (permalink / raw)
  To: emacs-orgmode

On Sun, Feb 12, 2017 at 04:30:48PM +0000, Eric S Fraga wrote:
> On Sunday, 12 Feb 2017 at 00:16, Russell Adams wrote:
> > I frequently write documentation with recommendations nested in
> > different sections, typically one line per recommendation. I then
> > summarize a list of those recommendations at the end of my document.
> >
> > Today I use babel to grep the document for my recommendation format,
> > but given I'm exporting to Latex can anyone suggest a better method?
> > Something like a reversed table of contents?
>
> Maybe use #index: ?

Sorry, but do you mean in Latex or Org?



------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

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

* Re: Latex summary
       [not found]   ` <7ed2978596ff4adb8aceaae2fa7393bc@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-02-13 15:14     ` Eric S Fraga
  2017-02-13 19:44       ` Russell Adams
       [not found]       ` <9de9f242d97c4a819fbcd2b168d9d8ae@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  2017-02-13 15:14     ` Eric S Fraga
  1 sibling, 2 replies; 9+ messages in thread
From: Eric S Fraga @ 2017-02-13 15:14 UTC (permalink / raw)
  To: emacs-orgmode


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

On Monday, 13 Feb 2017 at 13:06, Russell Adams wrote:
> On Sun, Feb 12, 2017 at 04:30:48PM +0000, Eric S Fraga wrote:

[...]

>> Maybe use #index: ?
>
> Sorry, but do you mean in Latex or Org?

Sorry.  Not clear in my response!  The #+index: is an org directly.

"#+index: keyword" directives are then translated to LaTeX
\index{keyword} when exporting to PDF (say) and which can then be used
to create an index of keywords and page numbers using the \printindex
directive in LaTeX and the makeindex command to process these.  You'll
have to modify org-latex-pdf-process to invoke makeindex or else do this
manually from the exported LaTeX file.

See attached for a minimal example (org and resulting PDF).

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: t.org --]
[-- Type: text/x-org, Size: 269 bytes --]

#+LaTeX_HEADER: \usepackage{makeidx} \makeindex

* Introduction
#+index: introduction
This is the start of the document.

\newpage
* Main contents
#+index: contents

Blah blah blah.
* Conclusions
#+index: conclusion
We conclude the document here.

\newpage
\printindex

[-- Attachment #1.3: t.pdf --]
[-- Type: application/pdf, Size: 50754 bytes --]

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

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

* Re: Latex summary
       [not found]   ` <7ed2978596ff4adb8aceaae2fa7393bc@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  2017-02-13 15:14     ` Eric S Fraga
@ 2017-02-13 15:14     ` Eric S Fraga
  1 sibling, 0 replies; 9+ messages in thread
From: Eric S Fraga @ 2017-02-13 15:14 UTC (permalink / raw)
  To: emacs-orgmode

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

"directive", not "directly"...

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8

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

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

* Re: Latex summary
  2017-02-13 15:14     ` Eric S Fraga
@ 2017-02-13 19:44       ` Russell Adams
  2017-02-13 19:59         ` John Hendy
       [not found]       ` <9de9f242d97c4a819fbcd2b168d9d8ae@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  1 sibling, 1 reply; 9+ messages in thread
From: Russell Adams @ 2017-02-13 19:44 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, Feb 13, 2017 at 03:14:31PM +0000, Eric S Fraga wrote:
> On Monday, 13 Feb 2017 at 13:06, Russell Adams wrote:
> > On Sun, Feb 12, 2017 at 04:30:48PM +0000, Eric S Fraga wrote:
>
> [...]
>
> >> Maybe use #index: ?
> >
> > Sorry, but do you mean in Latex or Org?
>
> Sorry.  Not clear in my response!  The #+index: is an org directly.
>
> "#+index: keyword" directives are then translated to LaTeX
> \index{keyword} when exporting to PDF (say) and which can then be used
> to create an index of keywords and page numbers using the \printindex
> directive in LaTeX and the makeindex command to process these.  You'll
> have to modify org-latex-pdf-process to invoke makeindex or else do this
> manually from the exported LaTeX file.
>
> See attached for a minimal example (org and resulting PDF).
>
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8

Eric, thanks for that really detailed input. I'll have to consider
it. I worry that the keywords aren't like the full sentences I'm
using.

Essentially what I'm doing is like this.

* Issue A

** Details

lorem ipsum.........

/Recommendation: I would recommend that you do X/

* Issue B

** Details

lorem ipsum.........

/Recommendation: Other customers are recommended to do Y/

* Conclusion

#babel to grep the file for recommendations#

 - I would recommend that you do X
 - Other customers are recommended to do Y



So essentially I'm putting a summary at the end, like a list of
conclusions. I'm not using single words. Linking back to the section
where the recommendation came from would be ideal.

I'm trying to figure out what this would be called, so I can check the
Latex libraries. I expect it's fairly common, but that I'm using a
poor choice of words to describe it.



------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3

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

* Re: Latex summary
       [not found]       ` <9de9f242d97c4a819fbcd2b168d9d8ae@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-02-13 19:55         ` Eric S Fraga
  0 siblings, 0 replies; 9+ messages in thread
From: Eric S Fraga @ 2017-02-13 19:55 UTC (permalink / raw)
  To: emacs-orgmode

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

On Monday, 13 Feb 2017 at 19:44, Russell Adams wrote:

[...]

> Eric, thanks for that really detailed input. I'll have to consider
> it. I worry that the keywords aren't like the full sentences I'm
> using.

Ah, okay.

Well, I'm not sure there is anything in LaTeX that does this as such but
you could play around with inline tasks.  You could use an inline task
to give the recommendation and then use

    org-latex-format-inlinetask-function

to specify your own function that would, for instance, output the
recommendation inline but also create an endnote (cf. endnotes LaTeX
package) for the summary at the end?

I do this for collecting TODO items when I'm writing a proposal or
paper.  My function looks like this:

#+begin_src emacs-lisp
  ;; define what to do with inline tasks: use endnote
  (defun esf/org-format-inlinetask-as-endnote (todo type priority name tags contents info)
    "Format an inline task element for LaTeX export."
    (let ((theinlinetask (concat " " name ": " contents)))
      (if (and todo (not (equal todo "NOTE")))
          (format "\\endnote{%s}\\marginpar{\\fbox{\\tiny E\\theendnote. %s}}" theinlinetask todo)
        (format "\\hl{%s}" contents))))

  (setq-local org-latex-format-inlinetask-function
              'esf/org-format-inlinetask-as-endnote)
#+end_src 

Although I don't put any text inline, you could easily do so.

HTH,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8

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

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

* Re: Latex summary
  2017-02-13 19:44       ` Russell Adams
@ 2017-02-13 19:59         ` John Hendy
  0 siblings, 0 replies; 9+ messages in thread
From: John Hendy @ 2017-02-13 19:59 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, Feb 13, 2017 at 1:44 PM, Russell Adams
<RLAdams@adamsinfoserv.com> wrote:
> On Mon, Feb 13, 2017 at 03:14:31PM +0000, Eric S Fraga wrote:
>> On Monday, 13 Feb 2017 at 13:06, Russell Adams wrote:
>> > On Sun, Feb 12, 2017 at 04:30:48PM +0000, Eric S Fraga wrote:
>>
>> [...]
>>
>> >> Maybe use #index: ?
>> >
>> > Sorry, but do you mean in Latex or Org?
>>
>> Sorry.  Not clear in my response!  The #+index: is an org directly.
>>
>> "#+index: keyword" directives are then translated to LaTeX
>> \index{keyword} when exporting to PDF (say) and which can then be used
>> to create an index of keywords and page numbers using the \printindex
>> directive in LaTeX and the makeindex command to process these.  You'll
>> have to modify org-latex-pdf-process to invoke makeindex or else do this
>> manually from the exported LaTeX file.
>>
>> See attached for a minimal example (org and resulting PDF).
>>
>> --
>> : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8
>
> Eric, thanks for that really detailed input. I'll have to consider
> it. I worry that the keywords aren't like the full sentences I'm
> using.
>
> Essentially what I'm doing is like this.
>
> * Issue A
>
> ** Details
>
> lorem ipsum.........
>
> /Recommendation: I would recommend that you do X/
>
> * Issue B
>
> ** Details
>
> lorem ipsum.........
>
> /Recommendation: Other customers are recommended to do Y/
>
> * Conclusion
>
> #babel to grep the file for recommendations#
>
>  - I would recommend that you do X
>  - Other customers are recommended to do Y
>

I'm dialing in super late, but seeing this format made me think of
using inline todos for this. Could that be possible? I haven't tried a
test case, but made me think:

- insert inline todos where you have your recommendations below
- maybe use special tag or todo keyword
- create agenda view via elisp src block that could spit out the
results in your conclusions section
- I'm sure someone here could get the ID/link inserted :)

Any interest in trying something like that?

Here was some discussion about inline todos and the comments package.
Looks like Eric was in on that discussion as well!
- https://lists.gnu.org/archive/html/emacs-orgmode/2011-04/msg00190.html


John

>
>
> So essentially I'm putting a summary at the end, like a list of
> conclusions. I'm not using single words. Linking back to the section
> where the recommendation came from would be ideal.
>
> I'm trying to figure out what this would be called, so I can check the
> Latex libraries. I expect it's fairly common, but that I'm using a
> poor choice of words to describe it.
>
>
>
> ------------------------------------------------------------------
> Russell Adams                            RLAdams@AdamsInfoServ.com
>
> PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/
>
> Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
>

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

end of thread, other threads:[~2017-02-13 21:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <ffdbc677680d4f86a436ce5c969b0289@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-02-12 16:30 ` Latex summary Eric S Fraga
2017-02-13 13:06   ` Russell Adams
     [not found]   ` <7ed2978596ff4adb8aceaae2fa7393bc@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-02-13 15:14     ` Eric S Fraga
2017-02-13 19:44       ` Russell Adams
2017-02-13 19:59         ` John Hendy
     [not found]       ` <9de9f242d97c4a819fbcd2b168d9d8ae@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-02-13 19:55         ` Eric S Fraga
2017-02-13 15:14     ` Eric S Fraga
2017-02-12  0:16 Russell Adams
2017-02-13 11:08 ` Eduardo Mercovich

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