Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-07-2022, 09:48 PM   #1
quocsan
Enthusiast
quocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it is
 
Posts: 32
Karma: 2204
Join Date: Jul 2009
Device: none
Customizing lines in Code view

Hello everyone!
I would like to customize lines in code view, e.g. changing line’s height and/or its margins.
How can I do this? Must I put something in qt_styles.qss file?
Thank you for your attention.
quocsan is offline   Reply With Quote
Old 04-07-2022, 10:38 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,760
Karma: 5706256
Join Date: Nov 2009
Device: many
In Sigil's Preferences, you can set font and font size and line height will adjust automatically.

Some OS system Accessibility setting are available as well as a Sigil's Zoom setting.

The margins are controlled by Sigil so that line numbers can be displayed.

What exactly are you trying to accomplish with CV's appearance and why?

And yes the qt_styles.qss can be used to impact CV's QPlainTextEdit.
KevinH is offline   Reply With Quote
Advert
Old 04-07-2022, 10:55 PM   #3
quocsan
Enthusiast
quocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it isquocsan knows what time it is
 
Posts: 32
Karma: 2204
Join Date: Jul 2009
Device: none
Quote:
Originally Posted by KevinH View Post
In Sigil's Preferences, you can set font and font size and line height will adjust automatically.
Some OS system Accessibility setting are available as well as a Sigil's Zoom setting.
The margins are controlled by Sigil so that line numbers can be displayed.
What exactly are you trying to accomplish with CV's appearance and why?
And yes the qt_styles.qss can be used to impact CV's QPlainTextEdit.
Thank you for your quick reply, KevinH.
As you can see in the attached file, I always edit ePub in Code View to check and join paragraphs that have lines breaked unexpectedly.
I think, if we could change line height, especially top/bottom margins, we would easily recognize two contiguous paragraphs.
Could you please help with this? :-)
Attached Thumbnails
Click image for larger version

Name:	cv-pb.jpg
Views:	131
Size:	271.4 KB
ID:	193165  

Last edited by quocsan; 04-08-2022 at 01:09 AM.
quocsan is offline   Reply With Quote
Old 04-08-2022, 12:04 AM   #4
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: 46,181
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Personally, I just use a search for "([a-z])</p> <p>([a-z])" to locate them and optionally change to "\1 \2" which catches the majority of those broken paragraphs. I prefer to replace/find or find to allow me to skip those paragraphs where that structure is intentional instead of replace all. If there are too many, I will use replace all.

The blank space between the </p> and <p> are any spaces and CR/LF pairs picked up by copy/paste while there is a single space between \1 and \2.
DNSB is online now   Reply With Quote
Old 04-08-2022, 08:30 AM   #5
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: 3,348
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by DNSB View Post
Personally, I just use a search for "([a-z])</p> <p>([a-z])" to locate them and optionally change to "\1 \2" which catches the majority of those broken paragraphs. I prefer to replace/find or find to allow me to skip those paragraphs where that structure is intentional instead of replace all. If there are too many, I will use replace all.

The blank space between the </p> and <p> are any spaces and CR/LF pairs picked up by copy/paste while there is a single space between \1 and \2.
Ditto.


find: ([a-z])\s*</p>\s*<p[^>]*>\s*([a-z])
replace: \1 \2

- \s* is the code for "any amount of space, or none"
- [^>]* will catch anything inside the leading <p> like class=, name=, id=, style= **cough cough ugh, puke...don't ever use inline styling... cough cough**
- there is a space between \1 \2

I find that if I don't keep the space between \1 \2 I create more problems than not, as Sigil's Prettify Code function will automatically condense any situations where an extra space is incorrectly added. Spell check will also catch almost all words where a single space incorrectly breaks a word.

You could certainly add symbols to the first collection group if you are finding them in your document a lot. eg. ([a-z;,-]) I would definitely step through them with a find, or replace/find, so you can check them.

FYI - the Sigil developer geniuses are actually improving the Find/Replace functionality a HUGE amount by allowing the user to create a "what if" table that shows the before/after regex that you can quickly browse before accepting the changes. That should be coming in an update in the near future. edit: Check this thread - starting at post #84

Last edited by Turtle91; 04-08-2022 at 08:43 AM.
Turtle91 is online now   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Customizing device column view BobMcP Calibre 9 05-05-2014 01:01 AM
Elipsis character displays in code view but not in book view magmanpi Sigil 19 03-03-2014 04:45 AM
replace in book view changes view to code view cybmole Sigil 4 10-28-2012 01:20 PM
Sigil highlight Book View No Longer Shows in Code View Themus Sigil 4 10-04-2012 07:54 PM
lock book view & code view windows into synch cybmole Sigil 5 01-19-2011 10:30 PM


All times are GMT -4. The time now is 06:38 AM.


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