Re: [O] behavior of org-image-actual-size with units in attr_* :width

2014-10-03 Thread Nicolas Goaziou
Hello,

John Kitchin jkitc...@andrew.cmu.edu writes:

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 is it the case that ATTR_HTML width attributes are only in pixels? 

No, but it's the only export back-end dedicated to on-screen display.
So, in-buffer width is probably only meaningful there.

 If so, that is certainly an easier modification to make, and would
 solve my problem (we almost exclusively use attr_latex for that
 export).

 Your comment inspired me to solve it this way:

 #+attr_latex: :width 4in :placement [H]
 #+attr_org: :width 400
 [[./images/batch-multiple.png]]


 For inline images, the attr_org is found first, but in latex export it
 is ignored and it gets the width there.

 Maybe no change is needed at all.

It works but is certainly hackish.


Regards,

-- 
Nicolas Goaziou



Re: [O] behavior of org-image-actual-size with units in attr_* :width

2014-10-01 Thread Nicolas Goaziou
Hello,

John Kitchin jkitc...@andrew.cmu.edu writes:

 I have set this in my init file

 (setq org-image-actual-width '(600))

 It works great, unless I use:
 #+attr_latex: :width 4in

 This makes my images 4 inches wide in LaTeX, but it sets my images to
 approximately 4 pixels wide!

 I feel like it is worth modifying the regexp that gets the width to
 catch these cases and fall back on the variable value when they
 exist. Any thoughts?

I wonder if this kludge makes any sense in the general case. As you
noticed, units given in a LaTeX attributes line will probably be
different from pixels.

What about limiting the regexp to ATTR_HTML lines only?


Regards,

-- 
Nicolas Goaziou



Re: [O] behavior of org-image-actual-size with units in attr_* :width

2014-10-01 Thread John Kitchin
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

is it the case that ATTR_HTML width attributes are only in pixels? If
so, that is certainly an easier modification to make, and would solve my
problem (we almost exclusively use attr_latex for that export).

Your comment inspired me to solve it this way:

#+attr_latex: :width 4in :placement [H]
#+attr_org: :width 400
[[./images/batch-multiple.png]]


For inline images, the attr_org is found first, but in latex export it
is ignored and it gets the width there.

Maybe no change is needed at all.


 Hello,

 John Kitchin jkitc...@andrew.cmu.edu writes:

 I have set this in my init file

 (setq org-image-actual-width '(600))

 It works great, unless I use:
 #+attr_latex: :width 4in

 This makes my images 4 inches wide in LaTeX, but it sets my images to
 approximately 4 pixels wide!

 I feel like it is worth modifying the regexp that gets the width to
 catch these cases and fall back on the variable value when they
 exist. Any thoughts?

 I wonder if this kludge makes any sense in the general case. As you
 noticed, units given in a LaTeX attributes line will probably be
 different from pixels.

 What about limiting the regexp to ATTR_HTML lines only?


 Regards,

-- 
---
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



[O] behavior of org-image-actual-size with units in attr_* :width

2014-09-30 Thread John Kitchin
I have set this in my init file

(setq org-image-actual-width '(600))

It works great, unless I use:
#+attr_latex: :width 4in

This makes my images 4 inches wide in LaTeX, but it sets my images to
approximately 4 pixels wide!

I feel like it is worth modifying the regexp that gets the width to
catch these cases and fall back on the variable value when they
exist. Any thoughts?


-- 
---
John Kitchin
http://kitchingroup.cheme.cmu.edu