01-22-2016, 12:37 PM | #16 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
@KevinH,
I don't want to make them required as long as they are only used by plugins. Users of Arch Linux and derivatives are expected to read installation messages re: optional dependencies. I made it as clear as I can -- if you use plugins, you should really consider installing the optdepends. Arch is about informed user choice, after all. ... Any python modules utilized by the python code shipped with Sigil will be a hard dependency, though. I will keep an eye out for that (my job as an AUR maintainer). |
01-27-2016, 07:46 AM | #17 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Thanks for this one, it is an improvement. Two small requests though... You currently add something to the title tag, could you consider leaving it empty? I know it is not used by readers and that is also the reason I rather have it empty.
The other question is about the filename. The 'old' plugin SVGWrapper created an XHTML page with the same name as the image without the extension. I actually like that a lot. Could you consider this as an option or having a naming option in the main screen? |
Advert | |
|
01-27-2016, 07:53 AM | #18 |
Banned
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
Hi,
uhh title tag? Do you have an example? I'm using the cover template in sigil preference directory... But maybe i can delete it from there if present. Or do you meant the SVFWrap title in the default ttepmplate... Well i can use an empty title tag... Regarding the filename: the old schema would fail due to images named img.jpg img.png thats why i changed this to have a unique filename. |
01-27-2016, 09:08 AM | #19 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
That makes sense, although I would never recommend two identical names with only a difference in extension. |
|
01-29-2016, 02:58 AM | #20 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Hi
This plugin is so useful that I have a proposal. It's about allowing captions. When one adds images to one EPUB, many of them have captions. and it has always been tricky to find the right balance and be confident that the caption will be included with the image in the displayed page. The current situation is not a happy one: some trust the engine (height: auto, width:auto), some trust the CSS (max-width... or page-break-inside: avoid), some others make deep calculations (width:63.5%; ) other insert the image and its caption in a two cells frame, what is sure is that everybody is praying God. If a svg solution could be found, there would be a good chance that the bundle (image + caption) would stay together. That would be a big step for humanity. I tried to fiddle a little with the code. One should probably add something like that somewhere, maybe by tweaking the viewbox to add a kind of lower stripe. Code:
<text text-anchor="middle" x="50%" y="40" style="fill:black; font-size:25px; font-family:serif;font-style:italic;">Caption</text> Last edited by roger64; 01-29-2016 at 08:05 AM. Reason: stripe |
Advert | |
|
01-29-2016, 10:45 AM | #21 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
01-29-2016, 10:55 AM | #22 |
Banned
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
Can somene please move this to the epub fprum? Once it has been discussed there i can see how i can implement a solution
|
01-29-2016, 12:04 PM | #23 |
Banned
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
New Version in #1 with minor improvements:
If you are not satisfied with the xhtml filenames you can now change this. But currently there is no GUI element available. Start the plugin once. After finishing you will have a preference file in sigils plugins_prefs directory: Code:
{ "filename_template": "SVG_%f_%e", "lastDir": "..." } Code:
{ "filename_template": "%f", "lastDir": "..." } Last edited by rubeus; 01-29-2016 at 12:07 PM. |
01-29-2016, 07:39 PM | #24 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
|
01-30-2016, 10:34 PM | #25 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
A proposal with captions
Testing I asked for advice on this thread. I got nearly instantly quite concrete answers. Please find enclosed two EPUBs, each with two images of a very different file size with a caption which make use of this rich information. They are just examples and a base for discussion. All the mistakes here are mine. As you will see there are two slightly different techniques. While the code is basically the same, the first one makes use of a view box about the size of the image. The second one makes use of a standard 600x800 view box. For both, the images are untouched and the display looks good and reliable. Personally, I would go for the second solution (bacelar) because it looks more easy to implement for a batch treatment. You can easily define some fixed bundles according to the number of lines needed for the caption and/or the font-size. I gave an example with a one line and four lines caption for two images of a very different size. For the first solution however, things seem to be more complicated: the needed font-size varies according to the image definition, so you need to check it for each new image. For this reason too, you can obtain a uniform font-size for the captions through the book only if the images have strictly the same size. On the technical side, I can't say if there is a drawback to any of them. They both take care of azw3 conversion while being Epubcheck compliant. However, as Toxaris remarked, it is possible that some readers with old machines experience font-display problems (no centering?). An EPUB3 version will soon be needed (with a new Doctype and a properties="svg" attribute) but it does not seem it will require a lot of changes. Proposal While it's not possible to match the flexibility of CSS, a reasonable choice could be to offer five different bundles. One could imagine (dream?) a new menu with a matrix where the user would select a number for each image. He should also have the possibility to select a column (all images) as a whole as images in the same book tend to use the same kind of caption. - 1 without any txt (like now). Maybe this could be selected by default. - 2 and 3 with short caption (up to two text lines) with average (24?) and smaller (20?) font-sizes. - 4 and 5 with a longer caption (up to five text lines) with average and smaller font sizes. One could simplify this to three bundles: - 1 like today - 2 short caption - average font-size - 3 longer caption - smaller font-size - If one needs over five lines of text, he would have to split fastidiously the intended caption paragraph. Maybe this would not be the most practical method. - If one wishes a different font-weight or font-style, he can use a plain regex to change them. - If one wishes to add its own style-sheet link in the head, idem. An alternative idea would be to let the user select a font-size and number of text-lines but it would require probably more processing. Last edited by roger64; 01-30-2016 at 10:42 PM. |
02-07-2016, 04:48 AM | #26 |
Banned
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
Small improvement in #1 to version 032
If there are files selected in the book browser, the first book file is taken as default in the combobox to choose the position where the new file should be inserted. |
02-07-2016, 07:01 AM | #27 | |
Wizard
Posts: 1,528
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Both methods (bacelar and mine), are practically the same. You say "the needed font-size varies according to the image definition" and, indeed, that is so because otherwise, caption would be ugly. With a image of 200x300 you can't use the same font size as an image of 2000x3000. Do the try and you'll see why. A practicall rule would be to use a font size (in pixels) about 5% of the width of the image. Regards Rubén |
|
02-08-2016, 05:03 AM | #28 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Hi Rubén
Thanks for posting this info on this thread and informing us. The following rule: "5% size transformed in pixels" seems indeed to be easily computed. I had added this comment because we may encounter a book with a lot images + captions, and as worst cases happen, made of images with different file sizes but with only one expected font-size for captions. |
02-08-2016, 05:30 AM | #29 |
Banned
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
It will take some time until this will present, as i want to keep the plugin simple to use and don't want to bother users with captions, dialogs and questions and error messages who are not interested in captions. As i'm not so firm woth python i need to evaulate on how to create additional dialogs etc.
|
03-16-2016, 02:59 PM | #30 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
When I add a picture with the file button, it will always be placed at the end. Even if I specify beforehand that I want it at another location, it is still placed at the end. Is this by design?
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 27 | 01-16-2023 01:25 AM |
[GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 492 | 10-25-2022 08:13 AM |
Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 02:24 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |
New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 12:11 PM |