Re: [Orgmode] Re: LaTeX export of images

2009-10-20 Thread Carsten Dominik


On Oct 13, 2009, at 12:03 PM, Francesco Pizzolante wrote:


Hi Carsten,

Sorry for my late reply on this subject.


OK, I have now modified image placement in LaTeX.

1. Image in text

  [[./img/x.png]]

2. Floating image with caption and modified size and placement

  #+CAPTION: My caption
  #+ATTR_LATEX: placement=[H] width=0.6\textwidth
  [[./img/x.png]]

3. Wrapping text around the image

  #+ATTR_LaTeX: wrap
  #+ATTR_HTML: align=left
  [[./img/x.png]]

4. Wrapping text around the image with modified size and wrapfigure  
placement


  #+ATTR_LaTeX: wrap width=0.38\textwidth placement={r}{0.4\textwidth
  #+ATTR_HTML: align=right width=250
  [[./img/x.png]]

Even if there is a caption, wrap will work and force the
image to be non-floating with text wrapped around.

Comments?


I did not test the wrap option yet, but the rest is perfect (images  
in text,

placements, width, captions, labels).

I still miss one single option: float in order to force the  
centered figure

environment if if no caption/label is present.

I would add something like

#+ATTR_LATEX: float



Have you actually tried?  The following works for me.


#+ATTR_LaTeX: float
[[./blue_1.png]]
This is text

- Carsten



or

#+ATTR_LATEX: float=t

Is this feasible?

Thanks a lot!

Francesco


- Carsten





___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export of images

2009-10-13 Thread Francesco Pizzolante
Hi Carsten,

Sorry for my late reply on this subject.

 OK, I have now modified image placement in LaTeX.

 1. Image in text

[[./img/x.png]]

 2. Floating image with caption and modified size and placement

#+CAPTION: My caption
#+ATTR_LATEX: placement=[H] width=0.6\textwidth
[[./img/x.png]]

 3. Wrapping text around the image

#+ATTR_LaTeX: wrap
#+ATTR_HTML: align=left
[[./img/x.png]]

 4. Wrapping text around the image with modified size and wrapfigure placement

#+ATTR_LaTeX: wrap width=0.38\textwidth placement={r}{0.4\textwidth
#+ATTR_HTML: align=right width=250
[[./img/x.png]]

 Even if there is a caption, wrap will work and force the
 image to be non-floating with text wrapped around.

 Comments?

I did not test the wrap option yet, but the rest is perfect (images in text,
placements, width, captions, labels).

I still miss one single option: float in order to force the centered figure
environment if if no caption/label is present.

I would add something like

#+ATTR_LATEX: float

or

#+ATTR_LATEX: float=t

Is this feasible?

Thanks a lot!

Francesco


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export of images

2009-10-05 Thread Darlan Cavalcante Moreira
At Sat, 3 Oct 2009 09:05:38 +0200,
Carsten Dominik wrote:
 
 
 On Oct 2, 2009, at 5:23 PM, Nick Dokos wrote:
 
  Darlan Cavalcante Moreira darc...@gmail.com wrote:
 
  At Fri, 2 Oct 2009 08:55:22 +0200,
  Carsten Dominik wrote:
  Do we need to implement a way so that text can be made to flow  
  around
  a figure, just as it is possible in HTML export?  What would be the
  right LaTeX package to use for this purpose?
 
  The Latex wikibook
  http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Wrapping_text_around_figures
  suggests the wrapfigure package, but it also warns that some manual  
  adjustments
  is often required. Therefore, if this is implemented in the latex  
  exporter it is
  probably a good idea to provide options to include latex commands  
  that will be
  put before and after the \includegraphics command. See the example  
  in the
  section Tip for figures with too much white space of the wikibook  
  where some
  \vspace were used to adjust white space around the figure.
 
 
  ... and the TeX FAQ seems to agree that wrapfig is probably the best  
  option:
 
 http://www.tex.ac.uk/cgi-bin/texfaq2html?label=textflow
 
  It also mentions some additional limitations.
 
  Nick
 
 
 
 OK, I have now modified image placement in LaTeX.
 
 1. Image in text
 
 [[./img/x.png]]
 
 2. Floating image with caption and modified size and placement
 
 #+CAPTION: My caption
 #+ATTR_LATEX: placement=[H] width=0.6\textwidth
 [[./img/x.png]]
 
 3. Wrapping text around the image
 
 #+ATTR_LaTeX: wrap
 #+ATTR_HTML: align=left
 [[./img/x.png]]
 
 4. Wrapping text around the image with modified size and wrapfigure  
 placement
 
 #+ATTR_LaTeX: wrap width=0.38\textwidth placement={r}{0.4\textwidth
 #+ATTR_HTML: align=right width=250
 [[./img/x.png]]
 
 Even if there is a caption, wrap will work and force the
 image to be non-floating with text wrapped around.
 
 Comments?
 
 - Carsten
 
 P.S. if you have customized org-export-latex-classes, you might have  
 to undo, then redo this customization, or add the float and wrapfigure  
 environments by hand
 to all classes you want to use.
 
 

I haven't tested it yet, but this seems to the best way to do it.
Thanks Carsten.

-- 
Darlan Cavalcante Moreira
darc...@gmail.com


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export of images

2009-10-03 Thread Carsten Dominik


On Oct 2, 2009, at 5:23 PM, Nick Dokos wrote:


Darlan Cavalcante Moreira darc...@gmail.com wrote:


At Fri, 2 Oct 2009 08:55:22 +0200,
Carsten Dominik wrote:
Do we need to implement a way so that text can be made to flow  
around

a figure, just as it is possible in HTML export?  What would be the
right LaTeX package to use for this purpose?


The Latex wikibook
http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Wrapping_text_around_figures
suggests the wrapfigure package, but it also warns that some manual  
adjustments
is often required. Therefore, if this is implemented in the latex  
exporter it is
probably a good idea to provide options to include latex commands  
that will be
put before and after the \includegraphics command. See the example  
in the
section Tip for figures with too much white space of the wikibook  
where some

\vspace were used to adjust white space around the figure.



... and the TeX FAQ seems to agree that wrapfig is probably the best  
option:


   http://www.tex.ac.uk/cgi-bin/texfaq2html?label=textflow

It also mentions some additional limitations.

Nick




OK, I have now modified image placement in LaTeX.

1. Image in text

   [[./img/x.png]]

2. Floating image with caption and modified size and placement

   #+CAPTION: My caption
   #+ATTR_LATEX: placement=[H] width=0.6\textwidth
   [[./img/x.png]]

3. Wrapping text around the image

   #+ATTR_LaTeX: wrap
   #+ATTR_HTML: align=left
   [[./img/x.png]]

4. Wrapping text around the image with modified size and wrapfigure  
placement


   #+ATTR_LaTeX: wrap width=0.38\textwidth placement={r}{0.4\textwidth
   #+ATTR_HTML: align=right width=250
   [[./img/x.png]]

Even if there is a caption, wrap will work and force the
image to be non-floating with text wrapped around.

Comments?

- Carsten

P.S. if you have customized org-export-latex-classes, you might have  
to undo, then redo this customization, or add the float and wrapfigure  
environments by hand

to all classes you want to use.




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export of images

2009-10-02 Thread Carsten Dominik


On Sep 23, 2009, at 11:09 PM, Sébastien Vauban wrote:


Jeff Kowalczyk wrote:

Sébastien Vauban wxhgmqzgw...@... writes:

Francesco Pizzolante wrote:
In this case, we should just generate \includegraphics{myimage}  
without

the centerline command.


Given the output of the `\centerline' command, I guess that the  
inlining of
an image inside a line of text is not supported as is by Org. I  
can second

such a choice.


+1 for default to inline graphics. When using Org for How-To and  
project
documentation delivered as PDF, floating screenshot-size images  
typically

situate far from the descriptive text.


My point was mainly that, IMHO, floating or not should not be tied  
to the

presence or absence of caption/label.


I don't understand why not.  Can you try to explain again?

Thanks.

- Carsten




Your problem with screenshots far away should be solved by putting  
the H

specifier to the float environment and loading the `float' package.


Maybe we need a way to specify the figure placement argument in # 
+LaTeX_ATTR:


Do we need to implement a way so that text can be made to flow around  
a figure, just as it is possible in HTML export?  What would be the  
right LaTeX package to use for this purpose?


Thanks.

- Carsten





I would prefer inline images by default (or option), and a file/ 
subtree

level option to use LaTeX floating layout.


That'd be a great way to be able to specify which type of inlining  
we want.

On a per file basis seems sufficient for me.

Best regards,
Seb

--
Sébastien Vauban



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export of images

2009-10-02 Thread Darlan Cavalcante Moreira
At Fri, 2 Oct 2009 08:55:22 +0200,
Carsten Dominik wrote:
 
 
 On Sep 23, 2009, at 11:09 PM, Sébastien Vauban wrote:
 
  Jeff Kowalczyk wrote:
  Sébastien Vauban wxhgmqzgw...@... writes:
  Francesco Pizzolante wrote:
  In this case, we should just generate \includegraphics{myimage}  
  without
  the centerline command.
 
  Given the output of the `\centerline' command, I guess that the  
  inlining of
  an image inside a line of text is not supported as is by Org. I  
  can second
  such a choice.
 
  +1 for default to inline graphics. When using Org for How-To and  
  project
  documentation delivered as PDF, floating screenshot-size images  
  typically
  situate far from the descriptive text.
 
  My point was mainly that, IMHO, floating or not should not be tied  
  to the
  presence or absence of caption/label.
 
 I don't understand why not.  Can you try to explain again?
 
 Thanks.
 
 - Carsten
 
 
 
  Your problem with screenshots far away should be solved by putting  
  the H
  specifier to the float environment and loading the `float' package.
 
 Maybe we need a way to specify the figure placement argument in # 
 +LaTeX_ATTR:
 
 Do we need to implement a way so that text can be made to flow around  
 a figure, just as it is possible in HTML export?  What would be the  
 right LaTeX package to use for this purpose?
 
 Thanks.
 
 - Carsten
 
 
 
 
  I would prefer inline images by default (or option), and a file/ 
  subtree
  level option to use LaTeX floating layout.
 
  That'd be a great way to be able to specify which type of inlining  
  we want.
  On a per file basis seems sufficient for me.
 
  Best regards,
  Seb
 
  -- 
  Sébastien Vauban
 
 
 
  ___
  Emacs-orgmode mailing list
  Remember: use `Reply All' to send replies to the list.
  Emacs-orgmode@gnu.org
  http://lists.gnu.org/mailman/listinfo/emacs-orgmode
 
 
 
 ___
 Emacs-orgmode mailing list
 Remember: use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode

The Latex wikibook
http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Wrapping_text_around_figures
suggests the wrapfigure package, but it also warns that some manual adjustments
is often required. Therefore, if this is implemented in the latex exporter it is
probably a good idea to provide options to include latex commands that will be
put before and after the \includegraphics command. See the example in the
section Tip for figures with too much white space of the wikibook where some
\vspace were used to adjust white space around the figure.

-- 
Darlan Cavalcante Moreira
darc...@gmail.com


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: LaTeX export of images

2009-10-02 Thread Nick Dokos
Darlan Cavalcante Moreira darc...@gmail.com wrote:

 At Fri, 2 Oct 2009 08:55:22 +0200,
 Carsten Dominik wrote:
  Do we need to implement a way so that text can be made to flow around  
  a figure, just as it is possible in HTML export?  What would be the  
  right LaTeX package to use for this purpose?
  
 The Latex wikibook
 http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Wrapping_text_around_figures
 suggests the wrapfigure package, but it also warns that some manual 
 adjustments
 is often required. Therefore, if this is implemented in the latex exporter it 
 is
 probably a good idea to provide options to include latex commands that will be
 put before and after the \includegraphics command. See the example in the
 section Tip for figures with too much white space of the wikibook where some
 \vspace were used to adjust white space around the figure.
 

... and the TeX FAQ seems to agree that wrapfig is probably the best option:

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=textflow

It also mentions some additional limitations.

Nick



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode