Re: image crop

Guenter Milde <[email protected]>
Newsgroups gmane.text.docutils.user
Message-ID <[email protected]>
On 2015-08-05, JENNIFER ITO wrote:

> [-- Type: text/plain, Encoding: quoted-printable --]

> Thanks for the responses!

> Unfortunately, I'd like the changes also to occur in the generated pdf as
> well.  I don't think the css file modifications in html carry over, correct?

We have to think about 2 steps:

1. How to achieve image cropping in the various output formats.

   * Image cropping is supported in LaTeX with options to the 
     \includegraphics command.
     
   * There limited support for image cropping in HTML via CSS styling.
   
       The ``clip`` CSS property is obsolete and only applicable
       to absolutely positioned elements, that is elements with
       ``position:absolute`` or ``position:fixed``.
       https://developer.mozilla.org/en-US/docs/Web/CSS/clip
       (Thanks to Alan G Isaac for the link.)
  	  
       The ``clip-path`` CSS property is experimental with very limited
       browser support.
       https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path
     
     Alternatively, in HTML5 and XHTML, we could insert the image via an
     inline-SVG wrapper that loads the image and applies a crop-path.
     http://www.w3.org/TR/2010/WD-html5-20100624/the-map-element.html#svg-0
     
     This is standards-comliable and supported in most current browsers,
     http://www.w3schools.com/HTML/html5_svg.asp
          
   * Support in ODF is also desirable but I don't know the status.
     
2. How to design a common interface for rst.
   (I would opt for additional "image" directive options modelled after
   \includegraphics.)
   

This would make a nice little enhancement project.
   
Günter


------------------------------------------------------------------------------
_______________________________________________
Docutils-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.