![]() |
#1 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 32
Karma: 2204
Join Date: Jul 2009
Device: none
|
Quote:
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? :-) Last edited by quocsan; 04-08-2022 at 01:09 AM. |
|
![]() |
![]() |
![]() |
#4 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#5 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
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. |
|
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
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 |