emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* New exporter queries, captions
@ 2012-09-12 21:26 Thomas S. Dye
  2012-09-13 16:21 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas S. Dye @ 2012-09-12 21:26 UTC (permalink / raw)
  To: Org-mode

Aloha Nicolas,

Three queries about captions in the new exporter:

1) The old exporter allowed a structure like this #+CAPTION: [Short
caption]{Long caption.} to export \caption[Short caption]{Long caption.}
to LaTeX.  The new exporter gives something like this \caption{[Short
caption]{Long caption.}}  Can the former behavior be implemented in the
new exporter?

2) Caption text appears to require markup in the export target language,
rather than org markup.  So, for LaTeX export I need something like
#+CAPTION: Things: \textit{a}, some; \textit{b}, other.  
Rather than, #+CAPTION: /a/, some; /b/, other.  Shouldn't caption text
honor org markup so it can be exported correctly to different backends?
Is there a switch for this?

3) My captions are often long.  Is it possible to enter these so they
aren't all on one line?  Something like
#+CAPTION: Line one
#+CAPTION: Line two
would be great.

All the best,
Tom

-- 
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com

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

* Re: New exporter queries, captions
  2012-09-12 21:26 New exporter queries, captions Thomas S. Dye
@ 2012-09-13 16:21 ` Nicolas Goaziou
  2012-09-13 16:57   ` Thomas S. Dye
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2012-09-13 16:21 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: Org-mode

Hello,

tsd@tsdye.com (Thomas S. Dye) writes:

> Three queries about captions in the new exporter:
>
> 1) The old exporter allowed a structure like this #+CAPTION: [Short
> caption]{Long caption.} to export \caption[Short caption]{Long caption.}
> to LaTeX.  The new exporter gives something like this \caption{[Short
> caption]{Long caption.}}  Can the former behavior be implemented in the
> new exporter?

Correct syntax is:

  #+CAPTION[short]: long

much like:

  #+RESULTS[hash]: name

> 2) Caption text appears to require markup in the export target language,
> rather than org markup.  So, for LaTeX export I need something like
>
> #+CAPTION: Things: \textit{a}, some; \textit{b}, other.  
> Rather than, #+CAPTION: /a/, some; /b/, other.  Shouldn't caption text
>
> honor org markup so it can be exported correctly to different backends?
> Is there a switch for this?

That was a bug. Captions honor Org syntax again. Thanks.

> 3) My captions are often long.  Is it possible to enter these so they
> aren't all on one line?  Something like
>
> #+CAPTION: Line one
> #+CAPTION: Line two
>
> would be great.

It is now implemented.


Regards,

-- 
Nicolas Goaziou

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

* Re: New exporter queries, captions
  2012-09-13 16:21 ` Nicolas Goaziou
@ 2012-09-13 16:57   ` Thomas S. Dye
  2012-09-30 21:59     ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas S. Dye @ 2012-09-13 16:57 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org-mode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
> tsd@tsdye.com (Thomas S. Dye) writes:
>
>> Three queries about captions in the new exporter:
>>
>> 1) The old exporter allowed a structure like this #+CAPTION: [Short
>> caption]{Long caption.} to export \caption[Short caption]{Long caption.}
>> to LaTeX.  The new exporter gives something like this \caption{[Short
>> caption]{Long caption.}}  Can the former behavior be implemented in the
>> new exporter?
>
> Correct syntax is:
>
>   #+CAPTION[short]: long
>
> much like:
>
>   #+RESULTS[hash]: name
>
Got it.  Thanks.
>> 2) Caption text appears to require markup in the export target language,
>> rather than org markup.  So, for LaTeX export I need something like
>>
>> #+CAPTION: Things: \textit{a}, some; \textit{b}, other.  
>> Rather than, #+CAPTION: /a/, some; /b/, other.  Shouldn't caption text
>>
>> honor org markup so it can be exported correctly to different backends?
>> Is there a switch for this?
>
> That was a bug. Captions honor Org syntax again. Thanks.
>

Is it possible to expand links, too?  If I have
#+CAPTION: Data from [[textcite:ladefoged08:_variab_hawaii][;]].
I get
\caption{Data from [[textcite:ladefoged08:_variab_hawaii][;]].}

My textcite link type is here:

#+name: define-biblatex-textcite-link
#+begin_src emacs-lisp :results silent :exports none
  (org-add-link-type 
   "textcite" 'ebib
   (lambda (path desc format)
     (cond
      ((eq format 'html)
       (format "(<cite>%s</cite>)" path))
      ((eq format 'latex)
       (if (or (not desc) (equal 0 (search "textcite:" desc)))
           (format "\\textcite{%s}" path)
         (format "\\textcite[%s][%s]{%s}"
                 (cadr (split-string desc ";"))
                 (car (split-string desc ";"))  path))))))
#+end_src

>> 3) My captions are often long.  Is it possible to enter these so they
>> aren't all on one line?  Something like
>>
>> #+CAPTION: Line one
>> #+CAPTION: Line two
>>
>> would be great.
>
> It is now implemented.
>

Terrific.  Thanks!

All the best,
Tom

-- 
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com

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

* Re: New exporter queries, captions
  2012-09-13 16:57   ` Thomas S. Dye
@ 2012-09-30 21:59     ` Nicolas Goaziou
  2012-10-01  5:20       ` Thomas S. Dye
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2012-09-30 21:59 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: Org-mode

Hello,

tsd@tsdye.com (Thomas S. Dye) writes:

> Is it possible to expand links, too?  If I have
> #+CAPTION: Data from [[textcite:ladefoged08:_variab_hawaii][;]].
> I get
> \caption{Data from [[textcite:ladefoged08:_variab_hawaii][;]].}
>
> My textcite link type is here:
>
> #+name: define-biblatex-textcite-link
> #+begin_src emacs-lisp :results silent :exports none
>   (org-add-link-type 
>    "textcite" 'ebib
>    (lambda (path desc format)
>      (cond
>       ((eq format 'html)
>        (format "(<cite>%s</cite>)" path))
>       ((eq format 'latex)
>        (if (or (not desc) (equal 0 (search "textcite:" desc)))
>            (format "\\textcite{%s}" path)
>          (format "\\textcite[%s][%s]{%s}"
>                  (cadr (split-string desc ";"))
>                  (car (split-string desc ";"))  path))))))
> #+end_src

It is now possible to have links in captions.


Regards,

-- 
Nicolas Goaziou

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

* Re: New exporter queries, captions
  2012-09-30 21:59     ` Nicolas Goaziou
@ 2012-10-01  5:20       ` Thomas S. Dye
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas S. Dye @ 2012-10-01  5:20 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org-mode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
> tsd@tsdye.com (Thomas S. Dye) writes:
>
>> Is it possible to expand links, too?  If I have
>> #+CAPTION: Data from [[textcite:ladefoged08:_variab_hawaii][;]].
>> I get
>> \caption{Data from [[textcite:ladefoged08:_variab_hawaii][;]].}
>>
>> My textcite link type is here:
>>
>> #+name: define-biblatex-textcite-link
>> #+begin_src emacs-lisp :results silent :exports none
>>   (org-add-link-type 
>>    "textcite" 'ebib
>>    (lambda (path desc format)
>>      (cond
>>       ((eq format 'html)
>>        (format "(<cite>%s</cite>)" path))
>>       ((eq format 'latex)
>>        (if (or (not desc) (equal 0 (search "textcite:" desc)))
>>            (format "\\textcite{%s}" path)
>>          (format "\\textcite[%s][%s]{%s}"
>>                  (cadr (split-string desc ";"))
>>                  (car (split-string desc ";"))  path))))))
>> #+end_src
>
> It is now possible to have links in captions.
>
>
> Regards,

Nicolas,

Very nice.  Works like a charm here.

Thanks for all your work.

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

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

end of thread, other threads:[~2012-10-01  5:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-12 21:26 New exporter queries, captions Thomas S. Dye
2012-09-13 16:21 ` Nicolas Goaziou
2012-09-13 16:57   ` Thomas S. Dye
2012-09-30 21:59     ` Nicolas Goaziou
2012-10-01  5:20       ` Thomas S. Dye

Code repositories for project(s) associated with this 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).