Quote:
Originally Posted by DiapDealer
As to your second image-related question: are you talking about Word/docx styles applied to images? I was unaware you could apply text styles to images (with Word/LibreOffice). If you're talking about adding generic style classes to the resulting img tag that could be later styled, that might be easily doable. But the parsing of images within the plugin to generate "smart" CSS class attributes is probably not in the cards. All styles come from the docx text styles and are mapped to css classes by the user provided map.
|
I am writing about Styles for Images. But not Paragraph (Text) Styles. Obviously if an image is
in <p style="stuff"> <img style="otherstuff"> etc </p> the outer text CSS applies, such as center.
LO Writer "Styles and Formatting" navigator un-docked has styles for:
- Paragraph
- Character
- Frame
- Page
- List
- Table
These are six icons that would be more logically tabs.
Frame (3) includes Graphics / Images styles as well as Formula and other stuff.
If you click on an Image two additional toolbars appear (note I only have the the main menu on the editor window, so all tool bars/windows are floating.
Right Click on an Image you get Image Properties via context menu. Under "Type" you can set the Size and Anchor (there are 10 option tabs). For docs, ebooks and PDFs I always anchor As character.
I usually have each image in a separate paragraph that's Caption style (Center). An actual caption would be a new paragraph.
If it's a selection of small images, then they are in the same paragraph and I'd make them the same height. On import to Calibre as Docx to epub, really annoyingly I only get the H & V pixels in the CSS. Setting a percent of paragraph or such doesn't work.
The default Graphics Style in the main Style browser (when 3rd icon Frame is selected or an image is selected) obviously ought to be where each Style of image is configured via a New Style when it needs one.
I have to say it's complicated and I may be doing it wrong. However the style/properties are exported, I checked with Word XP, Word 2003 (WINE others are on VMs) and Word 2007. Naturally reading in a docx saved by LO Writer messes up styles as it's a conversion. Also obviously the pixel size and anchor mode is correctly turned into HTML and CSS by Calibre.
I'm a bit ferverish right now, but when better I'll try figuring how to set up the CSS maps for your plug in. Maybe I can copy CSS and HTML stuff from epubs made from LO Writer odts Saved As docx. Most documents for epub use the same template & styles. The docs to be exported as PDFs have loads of page styles, headers, footers, different margins and fonts for the same content. Also footnotes / references are done differently for epub and PDF.