Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-27-2022, 01:44 PM   #16
LostOnTheLine
Enthusiast
LostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheese
 
Posts: 31
Karma: 1158
Join Date: Jun 2021
Device: Kindle Paperwhite (PW1 & PW3)
Quote:
Originally Posted by KevinH View Post
You might want to actually try it before complaining about it. Using Filter Replacements is actually easier and faster than selecting and deleting files in BookBrowser, but to each their own. Just tried to help. If you don't want the help fine.
I actually did try it... It gives results with a snippet of code, If I did it a bunch I'd probably be more confident with what to ignore, but what I see is spaces where there are what appear to be a blank line, I assume those are blank pages, but I have no way to be sure, no way to check before choosing to delete or not. But the reason it is 1 step forward & 3 steps back is because I cannot do that as an automation. as it stands now I have an automation that I click for 3 different sets, unfortunately there doesn't seem to be a way to add more.

I have an automation button that I can now press & it will "RunSavedSearchReplaceAll" 16 common dumb translation mistakes like "eat a cake and have ourselves a cake" to "have ourselves a cake &amp; eat it too" & "in and out of itself" to "in &amp; of itself" as well as my preferred " and " to " &amp; ", it then finds all "<br/><br/></p>
<h1
" & replaces them with "</p><hr class="sigil_split_marker" /><h1", I'm still working to get the image part right but that'll be there too when I do, it then does the "SplitOnSGFSectionMarkers" command.

All that is done with a single click. Having to, afterwards, find a few pages & delete them manually is less work, by far, than doing the steps manually, which would be required to use the filter results. I do see the benefit of the Filter Results & am glad I was introduced to it as I'm sure I will have use of it in the future.

My whole intent is make this a quick process I can do without much thought as it will be the same for a bunch. With only 3 automations I need to find a way that be most uniform instead of what I have now with the "<br/><br/></p>
<h1
" which works only for the few book in a certain set, right now it's one that is most needed to me because I'm using it to read a book that I have pre-ordered from a certain publisher that gives a way to read it as it's being translated & there's a tool used to turn that into an ePub, which I can then convert to put on my kindle to read enjoyably instead of having to read it on the website. & the book is auto assembled as an ePub so it is a mess. So I have to redo it every week as the next part comes out. But this automation will most likely not work for others as I'm sure 2 line breaks, a Carriage Return, & 6 spaces is not going to be a common chapter split, especially not a Windows-style CR-LF one, but right now that's the only one I need it for. Right now I'm only working on a couple, but I'd like to have it so that I can quickly go through the 200+ Fan Translations that I have & fix the common problems. It'd also be nice to go through all the real books I have, but as it stands I have already set Calibre to replace "and" with "&" when converting to KFX & I manually unzip & flip/rescale images. Unfortunately I don't think an automation will do anything for me to make that quicker.

The same applies to the SVG Wrapper, It's not that the system isn't good, I just don't see a way to automate it, meaning it's a lot of extra steps that cannot be automated.

Quote:
Originally Posted by Tex2002ans View Post
Do you use Sigil's inserted covers?
  • Tools > Add Cover

Then you're already using SVG Wrappers. It's the same exact code.

Is the EPUB reader exploding?
I haven't actually used Sigil's Inserted covers. The few times I have wanted to replace a cover I actually just replaced the image for a better one & named it the same thing. & It's not about the Reader exploding, it's about it taking more processing, & therefore battery, to display them. Fonts are very simple vector graphics, & ones that have a standard that, when used, has a hardware rendering component that's been around since like 2000 or before & is, I'm sure, used by all eBook Readers, meaning the font rendering is a lot less & even specially handled.

The comment you are replying to was about SVG Images not about the wrapper.

Quote:
Originally Posted by Tex2002ans View Post
And, as a complete sidenote, one of the bugs/quirks of SVG (Wrappers)+Amazon-conversion is giving you exactly what you were wanting... page-breaks before and after all your images! LOL.
But I don't see the reason for them for that purpose. A lot of the professional books don't use them & have none of the problems you guys keep saying they solve. If it works without it there's no reason for me to manually go in & manually add a bunch of extra code around a bunch of images, if it does nothing to benefit them. Again, my goal is automation, Unless you have a way to automate the SVG Wrapper that can be added to my automation it serves me no purpose & only adds extra steps.

Quote:
Originally Posted by Tex2002ans View Post
SVG wrappers are perfect for exactly the use-case you want. An image filling up the screen.
I can see the benefit of them in expanding the image to fill the screen if it's smaller, but that's not a problem I have. To be sure I have found a few books here & there where they did have images that were too small & only filled half of an empty page, but if they are that small they won't look much better zoomed in. But the use-case I want is to separate the images on their own page, this alone gives me what I want & should be able to be automated, I'm just working out the kinks to get it to work the way I want.

Quote:
Originally Posted by Tex2002ans View Post
Raw HTML + CSS scaling, like in your example, will fail for the reasons given in my SVG Wrappers thread.

The second you:
  • rotate your device
  • have an odd dimension (skinny/tall, short/fat image)

the "cutoff" image or "oompa loompa" effect more easily happens.
But that's exactly why I keep mentioning the Professionally made ePubs, they DON'T do any of that. The ONLY time I've ever seen that happen was with some of the Amateur-made Fanfiction that I've read.
& I'm specifically trying to find a way to have the automation identify & only work on images that are intended to be on their own page. I don't need them to be zoomed in if they are too small, I don't need them to be for every image, some of the ones I have dealt with have a small image at the top of each chapter, I don't want them to be on their own page & I may use the SVG Wrapper when I get to ones like that, but the tings I'm currently dealing with are all intended to, as is the other reason I shared the Professional ones, be seen on a page alone, then the text continue on the next page.

Quote:
Originally Posted by Tex2002ans View Post
Yes, in some books, the single-file-per-image-method might work—like photographs between (or at the end of) each chapter—but in all the ebooks I've worked on, only a handful would even fall into that category.

(I've professionally converted 650+ books, mostly Non-Fiction.)
That's where we're different, almost all of the books I'm working with are works of fiction. With few exceptions, as mentioned above, they have images intended to be their own page. In their printed versions they are their own page.

Quote:
Originally Posted by Tex2002ans View Post
Most publishers release garbage code in their ebooks.

Everyone here has given you multiple solutions:
  • <hr class="sigil_split_marker" />
    • Inserted using Find & Replace, Regex, or Filter Replacements.
  • + Edit > Split at Markers (F6)

is the best way.

But you trying to split the files before/after every image is a poor idea.

Better to use good, clean HTML+CSS and rely on page-break-before + page-break-after.
That's what I'm using. When I created this thread I didn't know about the Sigil marker that can then be used to split a new page. That was great. Just knowing that gave me a place to start, now I'm trying to optimize & better automate it.

As I've said many times, I'm not trying to split before every image, just before the ones intended to be their own page. That's why I identified that the images tend to have the word "Insert" in their name if they are intended to be their own page & I'm trying to have that work.

Quote:
Originally Posted by Turtle91 View Post
LostOnTheLine: It appears you think there is some significance to be gained by emphasizing 'Professional Publishers'...

...assuming what you see in 'professional publisher's' books is the 'right/best way' to do things... well following 'that path leads to the Dark Side', 'Here There Be Dragons', 'Danger Will Robinson!'
My intent on emphasizing that they are professionally published isn't to say that that makes them better, I have no illusions that professional works are always better.
Just like TOR is a professional book publishing company with millions of books & most of their books are crap & poorly edited. I often joke that I believe TOR would publish a book if you sent them a manuscript that was literally typed by a room full of keyboards with a few dozen cats to make 500 pages, gave it a title & a description, & sent it to them.

My intention was to indicate that it doesn't seem to be a problem to have the image on a single page like that, it doesn't have any of the problems that I keep being told will happen if I don't use an SVG Wrapper, & to indicate that the intent of the publishers for these images is to have them shown on their own page, not inline.

I've very grateful for the help I've received, I greatly appreciate it, I asked why people were being so insistent on SVG Wrappers, got an answer, & decided it was not for me. But people keep insisting it's better, so I point out reasons it has problems that support my decision not to use them. Nobody has even tried to address the glaring issue of the fact that you need to have exact dimension of the image so any image scaling will cause it to break. But I'm in no way dismissing what people are telling me, they are insisting that my decision not to use them is bad or wrong & I'm giving them reasons to support my decision, that's all. Nobody has made a compelling argument to make me reconsider.

Quote:
Originally Posted by Turtle91 View Post
your examples didn't have the CSS associated with them, so I'm not sure if you have some magical method of fixing the image problem that people have been fighting for many years...it would be interesting to see that. My bet is that it would take me about 3 seconds to 'break' that image display...and 2.5 of those seconds would be loading the book and flipping to that page.
Honestly I don't know the CSS associated with it, I just know that that's a professional book, distributed to lots of people, & they read fine on the Kindle Paperwhite 7th Gen, converted to KFX, Kindle Paperwhite 5th Gen, converted to AZW3, iPhone, Android phones & tablets, though I'm not sure what software they are being read on on iOS & Android, & with the Calibre ePub viewer, & with Calibre Web, & with Audiobookshelf (It actually supports ePubs for some reason which is nice). I don't know how they work on other devices, but all the devices that I & my family use seem to have no issue, & since it's how many books from multiple publishers are distributed to thousands of people it, logically, shouldn't have a huge problem like that, even if the other way, though much more work & with lots of potential issues, may be "better".
LostOnTheLine is offline   Reply With Quote
Old 11-27-2022, 02:15 PM   #17
LostOnTheLine
Enthusiast
LostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheese
 
Posts: 31
Karma: 1158
Join Date: Jun 2021
Device: Kindle Paperwhite (PW1 & PW3)
Quote:
Originally Posted by Turtle91 View Post
Code:
find: <img(.*?)insert(.*?)/>
replace: <hr class="sigil_split_marker" /><img\1\2/><hr class="sigil_split_marker" />
Then (as BeckyEbook said):
click Edit/Split at Markers (F6)
I finally got this to work. I couldn't see the forest for the trees. The problem I was having was because the replace was missing the search term. I feel kinda stupid for not realizing it until I did a side-by-side comparison.

For any future searchers looking for this the working Find&Replace is:

Step 1: Set [Mode] to Regex (Took me a few tries before I realized I needed to, it's obvious but easily overlooked)
Step 2: Find & Replace
Code:
Find: <img(.*?)insert(.*?)/>
Replace: <hr class="sigil_split_marker" /><img\1insert\2/><hr class="sigil_split_marker" />
The replace needs to include the word "insert", with no spaces or anything else, after "\1" & before "\2"
Step 3: Edit > Split at Markers ( or press F6)
Step 4: Profit

Obviously it can be altered however, but the initial one was just missing that

Last edited by LostOnTheLine; 11-27-2022 at 02:20 PM. Reason: Formatting
LostOnTheLine is offline   Reply With Quote
Old 11-27-2022, 07:16 PM   #18
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 2,686
Karma: 16000001
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2 & Air/Surface Pro/Kindle PW
Quote:
Originally Posted by LostOnTheLine View Post

…. Nobody has even tried to address the glaring issue of the fact that you need to have exact dimension of the image so any image scaling will cause it to break.
That is not correct - at all. You need to re read what was said. You enter the image dimensions so that the svg wrapper will properly display the image - with the correct aspect ratio - without clipping, squishing, or stretching the image - regardless of the resolution or orientation of the display. The technique you think does that perfectly actually fails miserably in this regard… which is what we have been trying to tell you.


Quote:
Originally Posted by LostOnTheLine View Post

Honestly I don't know the CSS associated with it, I just know that that's a professional book,…..
And this is exactly what I mean when I say you are blindly following what you consider ‘professional books’.

I apologize for my assumption. Your earlier posts made it sound like you were familiar with the nuances of CSS. Trying to explain why the technique you consider ‘perfect’ doesn’t actually work is very difficult when you don’t understand the CSS and your understanding is that ‘they use this technique in this book I have.’

Cheers,
Turtle91 is online now   Reply With Quote
Old 11-27-2022, 07:21 PM   #19
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 2,686
Karma: 16000001
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2 & Air/Surface Pro/Kindle PW
Quote:
Originally Posted by LostOnTheLine View Post
I finally got this to work. I couldn't see the forest for the trees. The problem I was having was because the replace was missing the search term. I feel kinda stupid for not realizing it until I did a side-by-side comparison.

For any future searchers looking for this the working Find&Replace is:

Step 1: Set [Mode] to Regex (Took me a few tries before I realized I needed to, it's obvious but easily overlooked)
Step 2: Find & Replace
Code:
Find: <img(.*?)insert(.*?)/>
Replace: <hr class="sigil_split_marker" /><img\1insert\2/><hr class="sigil_split_marker" />
The replace needs to include the word "insert", with no spaces or anything else, after "\1" & before "\2"
Step 3: Edit > Split at Markers ( or press F6)
Step 4: Profit

Obviously it can be altered however, but the initial one was just missing that
Yes…again my assumption was that you were familiar with find/replace/regex operations and had added the ‘insert’ as a flag and that you did not want to keep the flag after the replace (see my first example).

I’m glad you got it to work!
Turtle91 is online now   Reply With Quote
Old 11-27-2022, 09:01 PM   #20
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 23,481
Karma: 105248689
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by LostOnTheLine View Post
But that's exactly why I keep mentioning the Professionally made ePubs, they DON'T do any of that. The ONLY time I've ever seen that happen was with some of the Amateur-made Fanfiction that I've read.
And you don't seem to realize that some of people offering the advice that you don't want to take are professionals in the ebook field.

My opinion as someone who has read and formatted quite a few ebooks over the years is that most professional ebooks are not well formatted. One friend of mine was of the opinion that most of the "professionals" were hired not for their knowledge but for how cheaply they could be hired

That situation has improved over the last decade but, in my not so humble opinion, many ebooks produced by the Big Five and most other publishers are not great teaching tools for anyone wanting to learn CSS. Considering the number that I've seen that still use the CSS reset code and that include everything that should be inherited from the parent in the child which does nothing but increase the size of the CSS file—perhaps they are unaware of what cascading style sheet means? Not to mention the number of publishers that seem to use calibre for conversion which had made me wonder if any of them are paying Kovid Goyal for commercial use of his work.
DNSB is offline   Reply With Quote
Old 11-28-2022, 05:10 AM   #21
LostOnTheLine
Enthusiast
LostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheeseLostOnTheLine can extract oil from cheese
 
Posts: 31
Karma: 1158
Join Date: Jun 2021
Device: Kindle Paperwhite (PW1 & PW3)
Quote:
Originally Posted by Turtle91 View Post
That is not correct - at all. You need to re read what was said. You enter the image dimensions so that the svg wrapper will properly display the image - with the correct aspect ratio - without clipping, squishing, or stretching the image - regardless of the resolution or orientation of the display.
Again, I've heard that, over & over & over, but I'm talking about a completely Different type of scaling, as I've made clear many times. I've read what all of you have said, but you seem to be not reading what I say at all.
Let me try to explain it with an example.

Say I formatted the eBook with the SVG Wrapper.
Now say, at a later date I decide I want to make a version with smaller images because it's for a device that has a smaller screen.
So I unzip the ePub & shrink all the images, or worse, I rotate an image. Then I rezip the ePub & load it onto the device.
The SVG Wrapper now looks for the image insert1.jpg, it finds it.
Now it goes to display the 1034x1450 image but finds an 800x1122 image instead.
What happens?
Now say it goes to display the 2067x1450 image, but that image is now 1450x2067...
Is it not going to show the image at all?
Will the image be shown half-sized because it's trying to make the end edge sit at pixel 1034 when there are only 800 pixels in the image?
Will the flipped image be squished to fit the inverted dimensions?
That's what I was saying nobody has addressed.

I batch convert images from 20 books all at once, it takes about 5 minutes to set up & I walk away, when I come back I just rezip the books & they're done.
If every image was SVG I'd instead HAVE to edit each book individually, edit each image within the Sigil editor or do a batch convert & then fix the Wrapper on each image manually.

You keep talking about this as though the method used, in just about every eBook I've bought, has nothing but problems & this method has no problems & solves everything. But this thread is not even about what the best way is, it's about how to AUTOMATE it. Which is the biggest problem with the SVG Wrapper, it can't really be automated in any way.

Quote:
Originally Posted by Turtle91 View Post
Trying to explain why the technique you consider ‘perfect’ doesn’t actually work is very difficult when you don’t understand the CSS
When did I ever say they were perfect?...
Hint: I didn't... Ever... Nothing even close to that...

I'm not blindly following anything. The technique used works. I listed the devices I use those books on & they all work WITHOUT the issues you are saying they have.

To me you are telling me that the lets say "Jake On The Cube" hamburger I am currently eating, that I have eaten hundreds of times before & thousands of other people also eat regularly without issues, tastes like soap & will be guaranteed to make me sick if I eat it...
But I'm currently eating it & am not sick & it doesn't taste like soap...
Sure there have been people who have gotten sick after eating them & maybe somewhere there have been ones that have tasted like soap, but those are not because they are from Jake On The Cube, it's because the particular store that made them did something wrong or perhaps the user who got sick ate the burger without washing their hands or set it down on a dirty counter.
The fact is that Jake On The Cube is an international franchise that sells Burgers to millions of people every day.
If they had the problems that you are insisting every burger they make has, people would not be buying them, & as someone who eats them I have never gotten sick from eating them & never had one taste like soap.
You are expecting me to believe your words & the words of a few other people I don't really know over my own experiences.
Are Jake's Burgers the best burgers that could ever be made?
No, of course not, but they are reasonably good, they are quick, & cheap, & that's all I'm looking for.
If you had a suggestion for another fast food place that had a similar price & was a similar distance away, & was better I'd most likely go there instead.
But instead you're suggesting that instead I make that hamburger myself, grill it on a good quality grill, using the choice cuts of meat. Or that I go to a special restaurant that is half an hour drive away.
Both those things are potentially good ideas, but they don't replace the fast food I can grab on my way to work & again on a lunch break if I feel like it, & if I'm driving across country & am hungry I can find wherever I go. What I'm looking for, specifically, is something that can be done in an automation. Unless you are sharing a way to automate an SVG image replacement it will never be something I can even consider. Plain & simple.

Quote:
Originally Posted by Turtle91 View Post
Yes…again my assumption was that you were familiar with find/replace/regex operations and had added the ‘insert’ as a flag and that you did not want to keep the flag after the replace (see my first example).
How in the world would that work? if I'm searching for an image with the word "insert" in the name why would I want to remove the word "insert" from the filename? I thought it was just an oversite, but if it was intentional I'm even more confused. The point was to add the splits before & after the image that contains the word "insert" removing part of the name of the image will only make the page call a file that doesn't exist.

Quote:
Originally Posted by DNSB View Post
And you don't seem to realize that some of people offering the advice that you don't want to take are professionals in the ebook field.

My opinion as someone who has read and formatted quite a few ebooks over the years is that most professional ebooks are not well formatted.
I'm not looking to make the best formatted eBook of all time. & I do realize that anyone who comments has more knowledge & experience than I do. But you keep focusing on the wrong things. I simply asked for ways that I could automate a process that I will be repeating many times. The only people who will be reading these are myself, my family members & maybe a roommate at some point, or a friend. I don't have any intention of selling them or entering them in the State Fair "best eBook" competition. I simply want a simple, automatable way to remove some problems & not have to spend a lot of time editing the books. I mean, the whole thread is about how to save time & automate it. If I wanted to spend the time on it that doing the SVG Wrapper takes I never would have made the post to begin with, because I could just manually add the page breaks quicker than taking the time to Wrap everything in a CVS Reciept, I mean SVG Wrapper.
LostOnTheLine is offline   Reply With Quote
Old 11-28-2022, 07:24 AM   #22
repilo
Enthusiast
repilo began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Apr 2021
Location: Spain
Device: Kobo Libra 2
SVG has another drawback for me that I, in my ignorance, have not been able to solve. Imagine you have an image that is wider than high, and you want to display it alone on a page. The best method might be the SVG wrapper, because I think it's the only way to automatically centre the image vertically, as well as ensuring that the aspect ratio is respected.
But if the image has a caption, I have not been able to display it below and close to the picture.
This is what I do:
Code:
  <figure>
    <svg xmlns="http://www.w3.org/2000/svg" 
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" 
width="100%" height="100%" viewBox="0 0 506 259" 
preserveAspectRatio="xMidYMid meet">
<image width="506" height="259" xlink:href="../Images/17.jpeg"/></svg>

    <figcaption><b>Fig. 17:</b> Paragraph with several lines of text.</figcaption>
  </figure>
If anyone knows how to solve it I would be very grateful.
repilo is offline   Reply With Quote
Old 11-28-2022, 09:16 AM   #23
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 2,686
Karma: 16000001
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2 & Air/Surface Pro/Kindle PW
Quote:
Originally Posted by LostOnTheLine View Post
Now say, at a later date I decide I want to make a version with smaller images because it's for a device that has a smaller screen.
So I unzip the ePub & shrink all the images, or worse, I rotate an image. Then I rezip the ePub & load it onto the device.
And there is the problem. Why on earth would you go back and redo everything just because it is on a different sized screen?!?!?

You can't control whether the user rotates their device as they are reading, can you? You can't control what device/app the user reads on.

The SVG wrapper technique makes all of that automatic...as you say you want. You set the image page once...and then regardless of the device dimensions, resolution, orientation, rotation....the SVG wrapper automatically puts the image in the proper configuration...no fuss, no muss....automatically....which cuts down on all this work you are making for yourself by resizing and re orienting your images over and over.

Also, if you ever rename an image (font file or stylesheet), Sigil automatically updates the name throughout the book.

Quote:
Originally Posted by LostOnTheLine View Post
When did I ever say they were perfect?...
Hint: I didn't... Ever... Nothing even close to that...
You mentioned that it does exactly what you think it does with no problems...

Quote:
Originally Posted by LostOnTheLine View Post
I'm not blindly following anything. The technique used works. I listed the devices I use those books on & they all work WITHOUT the issues you are saying they have.
I'm not making a derogatory statement here when I say you are blindly following something...it simply means you are using this technique without understanding how/why it works, and so can't understand how/why/when it doesn't work...just because it is in a book you have.

Tex put a link to a thread discussing all these problems, with pictures illustrating the problems you say don't exist.

Quote:
Originally Posted by LostOnTheLine View Post
If they had the problems that you are insisting every burger they make has, people would not be buying them...
Ummmm... you would be surprised at how much people simply assume is the way it has to be just because that is what they see in a professionally made book they have!

Quote:
Originally Posted by LostOnTheLine View Post
You are expecting me to believe your words & the words of a few other people I don't really know over my own experiences.
Hmmm...why would you come here and ask for advice if you aren't willing to listen to others that are obviously MUCH more experienced in this field?

You see... I could really care less about what you do with the advice....take it or don't.

Most of us here, however, are trying to improve the ebook experience for everyone. If someone comes on here and makes incorrect statements, then we try and help them to understand the error. If they are unwilling to listen then we are making the corrections for posterity and any others who come to read the answers.

Quote:
Originally Posted by LostOnTheLine View Post
What I'm looking for, specifically, is something that can be done in an automation. Unless you are sharing a way to automate an SVG image replacement it will never be something I can even consider. Plain & simple.
I did mention a couple automated ways of svg image wrapper in post #4 of this thread: The first was how to setup a template for Sigil's "Add cover" command. The second was CalibUser's Sigil plugin: InsertImageSVG

IIRC you are familiar with Sigil's automation feature, at least I thought you mentioned using it earlier...that might be something you could use... if you were willing to listen to advice from people you don't know.

However, since your goal is simply to use an automation without understanding what it is you are accomplishing, or desire to listen to the advice we give because you don't know us, then I'm afraid you won't get much help.

Sorry.

Last edited by Turtle91; 11-28-2022 at 09:20 AM.
Turtle91 is online now   Reply With Quote
Old 11-28-2022, 09:18 AM   #24
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 2,686
Karma: 16000001
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2 & Air/Surface Pro/Kindle PW
Quote:
Originally Posted by repilo View Post
SVG has another drawback for me that I, in my ignorance, have not been able to solve. Imagine you have an image that is wider than high, and you want to display it alone on a page. The best method might be the SVG wrapper, because I think it's the only way to automatically centre the image vertically, as well as ensuring that the aspect ratio is respected.
But if the image has a caption, I have not been able to display it below and close to the picture.
This is what I do:
Code:
  <figure>
    <svg xmlns="http://www.w3.org/2000/svg" 
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" 
width="100%" height="100%" viewBox="0 0 506 259" 
preserveAspectRatio="xMidYMid meet">
<image width="506" height="259" xlink:href="../Images/17.jpeg"/></svg>

    <figcaption><b>Fig. 17:</b> Paragraph with several lines of text.</figcaption>
  </figure>
If anyone knows how to solve it I would be very grateful.
I would recommend putting this question in it's own thread - it will get much more visibility that way. Also, there have been a few threads discussing this. Have you tried searching the forums??
Turtle91 is online now   Reply With Quote
Old 11-28-2022, 01:55 PM   #25
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,197
Karma: 11695105
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by repilo View Post
When I want a single image on a page I use the following styles.
To centre the image vertically, depending on its height I use a class that has the appropriate top margin (alone00 for none, alone10 por 10%, etc).

[... <figcaption> code ...]
I just described all this a few days ago in:

I warn about using too much of HTML5-specific markup + go over all the details.

Also see:

where all this image+caption stuff was described in extreme detail. (With links to TONS of other threads on the topic.)

Quote:
Originally Posted by DNSB View Post
[...] some of people offering the advice that you don't want to take are professionals in the ebook field.

My opinion as someone who has read and formatted quite a few ebooks over the years is that most professional ebooks are not well formatted. One friend of mine was of the opinion that most of the "professionals" were hired not for their knowledge but for how cheaply they could be hired

[...] many ebooks produced by the Big Five and most other publishers are not great teaching tools for anyone wanting to learn CSS. [...]
Yep, yep, yep.

As always, I point back to my:

especially the absolutely fantastic talk given by an editor from Houghton-Mifflin:

Guess who gets hired to clean up the trash in the backlog?

Guess who teaches lessons on how not to let crap get into your ebooks in the first place?

Guess who's seen with and dealt with a lot of the junk code + had to correct it?

But that's okay, don't listen to any lessons from the true experts who clean up the mess in those "professional" ebooks!

Quote:
Originally Posted by LostOnTheLine View Post
I simply want a simple, automatable way to remove some problems & not have to spend a lot of time editing the books. I mean, the whole thread is about how to save time[...].
Sigil's "Saved Searches" are fantastic:
  • Tools > Saved Searches

You have common crap across all 20 of your ebooks? Great, come up with some helpful list of search/replaces to help you spot+remove the junk.

For an easy explanation, see the little posts I wrote a few months ago:

There will never be a fully automatable, one-button press solution, because every ebook is going to have completely different innards. The best you can do is automate some of these cleanup steps, but it'll still require a close look + elbow grease.

Last edited by Tex2002ans; 11-28-2022 at 02:02 PM.
Tex2002ans is offline   Reply With Quote
Reply

Tags
automation, find and replace, sigil file splitting, split-header, split-image

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search and replace sometimes doesn't work across all files GregTheGrate Editor 15 11-10-2021 02:49 AM
Calibre2OPDS split tags just doesn't work DavidTC Related Tools 16 11-04-2014 10:58 AM
Regex Help: Find page number & Replace+Remove 2x Line Breaks in Sigil Contre-jour Sigil 9 02-01-2013 11:47 AM
Search & Replace doesn't work for quotes habanr Conversion 11 04-22-2011 12:50 PM
Find, replace, split chapter? laelaps Sigil 8 01-20-2011 05:01 PM


All times are GMT -4. The time now is 11:08 AM.


MobileRead.com is a privately owned, operated and funded community.