emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* latex figure scaling question, backward compatibility and outdated manual
@ 2013-03-19 13:10 Thomas Alexander Gerds
  2013-03-20 12:04 ` Thomas Alexander Gerds
  2013-03-21 21:11 ` Nicolas Goaziou
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Alexander Gerds @ 2013-03-19 13:10 UTC (permalink / raw)
  To: emacs-orgmode


the following page from the official manual 

http://orgmode.org/manual/Images-in-LaTeX-export.html

says 

#+ATTR_LaTeX: width=5cm,angle=90

however, the new exporter does not recognize this syntax. instead the
following works:

#+ATTR_LaTeX: :width 5cm

I was learning about this by guessing around for some time ... it is
surprisingly hard to edebug the export process (any hints?).

next, the following educated guess does not work:

#+ATTR_LaTeX: :width 5cm :angle 90

instead one needs to say

#+ATTR_LaTeX: :width 5cm,angle 90

I am not sure whether these changes are very intuitive, or more
intuitive than the old style. but, the changes interfere with the aim to
have reproducible documents.

now, I am ready to convert all my old documents to the new syntax. Would
someone share a (elisp/sed/perl/other) macro that reliably goes through
old org-mode files and converts the part of the syntax which is not
compatible with the new exporter? [it is easy to convert (width=) to
(:width) in lines that start with #+ATTR_LaTeX: but this is not the full
story.

Such a macro could then be applied to update the manual ...

cheers
Thomas

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

* Re: latex figure scaling question, backward compatibility and outdated manual
  2013-03-19 13:10 latex figure scaling question, backward compatibility and outdated manual Thomas Alexander Gerds
@ 2013-03-20 12:04 ` Thomas Alexander Gerds
  2013-03-21 21:11 ` Nicolas Goaziou
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Alexander Gerds @ 2013-03-20 12:04 UTC (permalink / raw)
  To: emacs-orgmode


sorry for this post. I should have read the mailing list more
carefully. looks as if a) the issue is already under discussion and b)
that the manual is for latest release whereas I had problems with the
pre-release.



Thomas Alexander Gerds <tag@biostat.ku.dk> writes:

> the following page from the official manual
>
> http://orgmode.org/manual/Images-in-LaTeX-export.html
>
> says
>
> #+ATTR_LaTeX: width=5cm,angle=90
>
> however, the new exporter does not recognize this syntax. instead the
> following works:
>
> #+ATTR_LaTeX: :width 5cm
>
> I was learning about this by guessing around for some time ... it is
> surprisingly hard to edebug the export process (any hints?).
>
> next, the following educated guess does not work:
>
> #+ATTR_LaTeX: :width 5cm :angle 90
>
> instead one needs to say
>
> #+ATTR_LaTeX: :width 5cm,angle 90
>
> I am not sure whether these changes are very intuitive, or more
> intuitive than the old style. but, the changes interfere with the aim
> to have reproducible documents.
>
> now, I am ready to convert all my old documents to the new
> syntax. Would someone share a (elisp/sed/perl/other) macro that
> reliably goes through old org-mode files and converts the part of the
> syntax which is not compatible with the new exporter? [it is easy to
> convert (width=) to (:width) in lines that start with #+ATTR_LaTeX:
> but this is not the full story.
>
> Such a macro could then be applied to update the manual ...
>
> cheers Thomas
--
Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen, Denmark
Office: CSS-15.2.07 (Gamle Kommunehospital)
tel: 35327914 (sec: 35327901) 

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

* Re: latex figure scaling question, backward compatibility and outdated manual
  2013-03-19 13:10 latex figure scaling question, backward compatibility and outdated manual Thomas Alexander Gerds
  2013-03-20 12:04 ` Thomas Alexander Gerds
@ 2013-03-21 21:11 ` Nicolas Goaziou
  2013-03-22  7:47   ` Thomas Alexander Gerds
  1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2013-03-21 21:11 UTC (permalink / raw)
  To: Thomas Alexander Gerds; +Cc: emacs-orgmode

Hello,

Thomas Alexander Gerds <tag@biostat.ku.dk> writes:

> I was learning about this by guessing around for some time ... it is
> surprisingly hard to edebug the export process (any hints?).

This is a bit vague.

> next, the following educated guess does not work:
>
> #+ATTR_LaTeX: :width 5cm :angle 90

This is because :angle is not recognized as a special keyword. Unless it
is implemented in `org-latex--inline-image', it should go in the
miscellaneous :options keyword, e.g.

  #+attr_latex: :width 5cm :options angle=90

> instead one needs to say
>
> #+ATTR_LaTeX: :width 5cm,angle 90

Well, that works but only as a side-effect.


Regards,

-- 
Nicolas Goaziou

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

* Re: latex figure scaling question, backward compatibility and outdated manual
  2013-03-21 21:11 ` Nicolas Goaziou
@ 2013-03-22  7:47   ` Thomas Alexander Gerds
  2013-03-22 15:02     ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Alexander Gerds @ 2013-03-22  7:47 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode


thanks for the reply!

when edebugging the function org-export-read-attribute it is unclear to
me which function generates (the text properties of) element.

do you have a script which translates from old syntax to new?

thanks. 

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

> Hello,
>
> Thomas Alexander Gerds <tag@biostat.ku.dk> writes:
>
>> I was learning about this by guessing around for some time ... it is
>> surprisingly hard to edebug the export process (any hints?).
>
> This is a bit vague.
>
>> next, the following educated guess does not work:
>> #+ATTR_LaTeX: :width 5cm :angle 90
>
> This is because :angle is not recognized as a special keyword. Unless
> it is implemented in `org-latex--inline-image', it should go in the
> miscellaneous :options keyword, e.g.
>
>   #+attr_latex: :width 5cm :options angle=90
>
>> instead one needs to say
>> #+ATTR_LaTeX: :width 5cm,angle 90
>
> Well, that works but only as a side-effect.
>
> Regards,
--
Thomas A. Gerds -- Assoc. Prof. Department of Biostatistics
University of Copenhagen, Øster Farimagsgade 5, 1014 Copenhagen, Denmark
Office: CSS-15.2.07 (Gamle Kommunehospital)
tel: 35327914 (sec: 35327901) 

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

* Re: latex figure scaling question, backward compatibility and outdated manual
  2013-03-22  7:47   ` Thomas Alexander Gerds
@ 2013-03-22 15:02     ` Nicolas Goaziou
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2013-03-22 15:02 UTC (permalink / raw)
  To: Thomas Alexander Gerds; +Cc: emacs-orgmode

Hello,

Thomas Alexander Gerds <tag@biostat.ku.dk> writes:

> when edebugging the function org-export-read-attribute it is unclear to
> me which function generates (the text properties of) element.

You can have a look at `org-element--collect-affiliated-keywords'.

> do you have a script which translates from old syntax to new?

No, I don't.


Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2013-03-22 15:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-19 13:10 latex figure scaling question, backward compatibility and outdated manual Thomas Alexander Gerds
2013-03-20 12:04 ` Thomas Alexander Gerds
2013-03-21 21:11 ` Nicolas Goaziou
2013-03-22  7:47   ` Thomas Alexander Gerds
2013-03-22 15:02     ` Nicolas Goaziou

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