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-01-2026, 07:58 PM   #136
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: 51,201
Karma: 179232776
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
For what it may be worth, I tried a couple of the Emmet abbreviations from around the Internet and they expanded happily. For instance,

! expanded to
Code:
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<title>Document</title>
</head>
<body>
	
</body>
</html>
#page>div.logo+ul#navigation>li*5>a{Item $} expanded to:
Code:
<div id="page">
	<div class="logo"></div>
	<ul id="navigation">
		<li><a href="">Item 1</a></li>
		<li><a href="">Item 2</a></li>
		<li><a href="">Item 3</a></li>
		<li><a href="">Item 4</a></li>
		<li><a href="">Item 5</a></li>
	</ul>
</div>
<p>lorem expanded to:
Code:
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Optio, accusamus repellat unde neque eos maiores nam, enim rerum tempore? Et cupiditate, nulla, dolorem porro inventore architecto recusandae maxime facilis voluptatem.
Reminded me of the one of the web devs I used to work with who made heavy use of Emmet to save typing.
DNSB is offline   Reply With Quote
Old 04-01-2026, 09:44 PM   #137
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: 9,532
Karma: 6774048
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by DNSB View Post
For what it may be worth, I tried a couple of the Emmet abbreviations from around the Internet and they expanded happily. For instance,

! expanded to
Code:
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<title>Document</title>
</head>
<body>
	
</body>
</html>
#page>div.logo+ul#navigation>li*5>a{Item $} expanded to:
Code:
<div id="page">
	<div class="logo"></div>
	<ul id="navigation">
		<li><a href="">Item 1</a></li>
		<li><a href="">Item 2</a></li>
		<li><a href="">Item 3</a></li>
		<li><a href="">Item 4</a></li>
		<li><a href="">Item 5</a></li>
	</ul>
</div>
<p>lorem expanded to:
Code:
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Optio, accusamus repellat unde neque eos maiores nam, enim rerum tempore? Et cupiditate, nulla, dolorem porro inventore architecto recusandae maxime facilis voluptatem.
Reminded me of the one of the web devs I used to work with who made heavy use of Emmet to save typing.

Is it something epub devs might be interested in? Should we keep it?
KevinH is offline   Reply With Quote
Old 04-02-2026, 03:03 AM   #138
elibrarian
Imperfect Perfectionist
elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.elibrarian ought to be getting tired of karma fortunes by now.
 
elibrarian's Avatar
 
Posts: 855
Karma: 870414
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
Quote:
Originally Posted by KevinH View Post
Is it something epub devs might be interested in? Should we keep it?
Not me. As you said earlier, it might be interesting for people writing from scratch – but if I was writing, say, my ovn novel or such, I would be using a wordprocessor or some dedicated novel-writing software.

Just bloat, as I see it (but I'm old. I don't like markdown either )

Regards,

Kim
elibrarian is offline   Reply With Quote
Old 04-02-2026, 05:57 AM   #139
jugaor
Connoisseur
jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.jugaor for a long time would go to bed early.
 
jugaor's Avatar
 
Posts: 51
Karma: 17648
Join Date: Jun 2011
Location: Lima, Peru
Device: Kindle 10Gen / Kobo Aura HD / Nook STR
Agreed with elibrarian.
And, with all due respect, it seems to me that the whole Emmet thing violates at least two of the rules set by the developer himself.
Quote:
Originally Posted by KevinH View Post
The same caveats still exist:

- not something better done in a Sigil plugin

- only things that will help the majority of users

- no "super editor" features better handled with "Open With" and your favourite editor
jugaor is offline   Reply With Quote
Old 04-02-2026, 06:27 AM   #140
philja
Addict
philja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enough
 
Posts: 339
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
Quote:
Originally Posted by KevinH View Post
Is it something epub devs might be interested in? Should we keep it?
I looked at the emmet websites quoted by Becky, and I'm unlikely to find this of interest in my workflow. Too much to learn for very rare usage - most of which I can easily do with clips and existing tools in Sigil.
philja is offline   Reply With Quote
Old 04-02-2026, 08:27 AM   #141
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: 9,532
Karma: 6774048
Join Date: Nov 2009
Device: many
If nobody wants it, I am happy to never push those changes to Sigil master.

In my defense,

1. expanding abbreviations that use > and < can't be done in a plugin as feedback/expansion must be immediate or the file will end up non-well formed.

2. only things that help the majority of users - but that is what I am trying to gauge now!

3. Not really a super editor feature but it is built into most all web developer ides and vscode.


But if no one thinks it would be useful ...

Last edited by KevinH; 04-02-2026 at 09:09 AM.
KevinH is offline   Reply With Quote
Old 04-02-2026, 08:45 AM   #142
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 965
Karma: 3600000
Join Date: Jan 2017
Location: Poland
Device: Various
I didn't have much time, but I tested it for over an hour and I can live without Emmet.

By the way – when I assigned a keyboard shortcut to Emmet, it worked in XHTML files but not in CSS files* (only the context menu command worked).

* for example:
Code:
.first {mt10
BeckyEbook is offline   Reply With Quote
Old 04-02-2026, 08:50 AM   #143
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: 9,532
Karma: 6774048
Join Date: Nov 2009
Device: many
So Emmet support will not be added.

I have pushed what I have now (plus a fix to enable the shortcut to be used in css) to my personal repo just to keep the code around in case later on people change their mind.

I will revert my dev tree back to before emmet was added.

Thanks for everyone who took a look, tested it and fed back their thoughts.

Last edited by KevinH; 04-02-2026 at 09:03 AM.
KevinH is offline   Reply With Quote
Old 04-02-2026, 09:05 AM   #144
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: 9,532
Karma: 6774048
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by BeckyEbook View Post
I didn't have much time, but I tested it for over an hour and I can live without Emmet.

By the way – when I assigned a keyboard shortcut to Emmet, it worked in XHTML files but not in CSS files* (only the context menu command worked).

* for example:
Code:
.first {mt10
FYI - now fixed in my personal repo version.

I think I find the Emmet expansions more useful in writing css than I do html, but that may just be me.

If anyone builds their own and wants Emmet, please grab it from my personal repo to add to your own builds.
KevinH is offline   Reply With Quote
Old 04-02-2026, 02:24 PM   #145
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: 51,201
Karma: 179232776
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Since I've only created 1 ePub in Sigil, I did not find Emmet of much use. OTOH, it was fun to play with.

Link removed.

Last edited by DNSB; 04-04-2026 at 10:59 PM. Reason: Removed link as newer version in later message
DNSB is offline   Reply With Quote
Old 04-03-2026, 09:31 AM   #146
philja
Addict
philja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enough
 
Posts: 339
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
[QUOTE=BeckyEbook;4576072]2. The second issue concerns the possible adjustment of the active tab in Code View (and, incidentally, in other places).

I’ll share my suggestion, and if anyone finds the topic important, they can modify QSS to suit their preferences.

Here’s my suggestion (add to file qt_styles.qss):
Code:
QTabWidget::tab-bar:top {
    top: 1px;
}

QTabWidget::tab-bar:bottom {
    bottom: 1px;
}

QTabBar::tab:top {
    border-top: 1px solid #242424;
    border-left: 1px solid #242424;
    border-right: 1px solid #242424;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

QTabBar::tab:bottom {
    border-bottom: 1px solid #242424;
    border-left: 1px solid #242424;
    border-right: 1px solid #242424;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

QTabBar::tab:selected {
    background: #242424;
}

QTabBar::tab:!selected {
    background: #353535;
}

QTabBar::tab:!selected:hover {
    background: #242424;
}

QTabBar::tab:top:!selected {
    margin-top: 3px;
}

QTabBar::tab:bottom:!selected {
    margin-bottom: 3px;
}

QTabBar::tab:top, QTabBar::tab:bottom {
    min-width: 8ex;
    margin-right: -1px;
    padding: 5px 10px 5px 10px;
}

QTabBar::tab:top:selected {
    border-top: 3px solid #308CC6;
    border-bottom-color: none; 
}

QTabBar::tab:bottom:selected {
    border-bottom: 3px solid #308CC6;
    border-top-color:  none;
}

QTabBar::tab:top:last, QTabBar::tab:bottom:last,
QTabBar::tab:top:only-one, QTabBar::tab:bottom:only-one {
    margin-right: 0;
}
Thanks for the example code, Becky.

I've been tampering with it to adjust tab colors to my liking in light mode (I never use dark mode - I've a horror of that). And it works fine.

It looks as though there is a little typo in the code:

QTabBar::tab:top, QTabBar::tab:bottom {
min-width: 8ex;
margin-right: -1px;
padding: 5px 10px 5px 10px;
}

Shouldn't min-width be 8px rather than 8ex ?
philja is offline   Reply With Quote
Old 04-03-2026, 05:21 PM   #147
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 965
Karma: 3600000
Join Date: Jan 2017
Location: Poland
Device: Various
Yes, rather 80px or remove this line.
BeckyEbook is offline   Reply With Quote
Old 04-04-2026, 04:05 PM   #148
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: 9,532
Karma: 6774048
Join Date: Nov 2009
Device: many
Okay, I have taken a shot at giving the user more control over the output generated by Mend and Prettify.

This takes the form of some simple settings such as indent string per level, doublespace in body after key content, and sets of tag names.

These sets control how a tag is indented and if a return is injected, etc.

You now have control over all of this in your Sigil Prefs in an auto created file called prettyprint.xml.

So those who hated Sigil's prettyprinting of tables, should now be able to move td, and tr out of the "structural" set and into the "inline" set to change how they are treated by pretty print.

Here is the default prettyprint.xml:

Code:
<?xml version="1.0" encoding="utf-8"?>
<prettyprint>
 
  <!-- actual string added in front to indent one level, typically 2 or 4 blanks, quotes needed -->
  <indent_string>"  "</indent_string>

  <doublespace>true</doublespace>
 
  <!-- set membership of tags determine when and where whitespace is compressed, and newlines added -->
 
  <!-- Structural tags open and close on their own lines with contents properly indented -->
  <structural_tags>
      annotation, annotation-xml, article, aside, blockquote,
      body, canvas, colgroup, div, dl, figure, footer, head, header,
      hr, html, maction, math, menclose, mfrac, mmultiscripts, mover,
      mpadded, mphantom, mroot, mrow, msqrt, mstyle, mtable, mtd, mtr,
      munder, munderover, nav, ol, section, semantics, table, tbody,
      tfoot, thead, td, th, tr, ul
  </structural_tags>
 
  <!-- Inline tags have no added space nor newlines -->
  <inline_tags>
      a, abbr, acronym, b, bdo, big, br, button, cite, code, del, dfn, em,
      font, i, image, img, input, ins, kbd, label, map, mark, mbp:nu, mi,
      mn, mo, ms, mspace, mtext, msub, msup, msubsup, nobr, object, q,
      ruby, rp, rt, s, samp, select, small, span, strike, strong, sub,
      sup, textarea, tt, u, var, wbr
  </inline_tags>
 
  <!-- Void tags are tags that can not have contents and therefore must self-close -->
  <void_tags>
      area, base, basefont, bgsound, br, col, command, embed, event-source,
      frame, hr, img, input, keygen, link, maligngroup, malignmark,
      mbp:pagebreak, meta, mglyph, mprescripts, msline, mspace, none,
      param, source, spacer, track, wbr
  </void_tags>
 
  <!-- Preserve Space tags are tags whose content's whitespace can not be changed or compressed -->
  <preservespace_tags>
      code, cs, pre, textarea, script, style
  </preservespace_tags>
 
  <!-- No Entity Substituion tags are those whose contents should not have any entities expanded -->
  <noentitysub_tags>
      script, style
  </noentitysub_tags>
 
  <!-- Text holder tags are tags that typically have text content -->
  <textholder_tags>
      address, caption, dd, div, dt, figcaption, h1, h2, h3, h4, h5, h6,
      legend, li, option, p, td, th, title
  </textholder_tags>
 
</prettyprint>

I have pushed the code to master that implements all of this for people to play with, test, tryout and feedback your ideas.

So if you build your own, please try pulling from master and playing around with the prettyprint.xml that is created inside Sigil's Preferences. Note, changes to this file require Sigil to be restarted to take effect.

All thoughts and comments welcome. I know it is a bit complicated but once set it should be very very flexible to match your preferred prettyprint style then it can be forgotten about.

Last edited by KevinH; 04-04-2026 at 04:17 PM.
KevinH is offline   Reply With Quote
Old 04-04-2026, 10:58 PM   #149
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: 51,201
Karma: 179232776
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Here's a link to my compile of the latest code from Sigil's Github repository: Sigil-2.7.6-Windows-x64-Setup.exe.

Last edited by DNSB; 04-08-2026 at 06:06 PM. Reason: updated link again
DNSB is offline   Reply With Quote
Old 04-05-2026, 04:14 PM   #150
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: 9,532
Karma: 6774048
Join Date: Nov 2009
Device: many
Okay, I think I finally understand the syntax of the css like structure used in the gitee sigil-modified repo used to do their pretty print.

So I am going to create a version of their approach for us as well. The advantage is their's walks the xhtml using my much simpler TagLister code and is not a serialization approach that needs gumbo the way we currently do. Both approaches have their plusses and minuses so I will generate code for both (modified to be more readable) so you have options to choose from.

I will let you know when a second approach is available in master to play with.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggestions for Sigil Improvements or New Features KevinH Sigil 241 03-02-2026 01:09 PM
Suggestions for Sigil Improvements or New Features KevinH Sigil 168 11-18-2025 12:23 PM
Ideas for New Improvements or Features KevinH Sigil 97 04-09-2025 09:45 AM
What Features or Tools does Sigil Still Need Yet? KevinH Sigil 175 03-06-2021 09:11 PM
Improvements/bugs/features dontcrash KOReader 10 10-23-2019 10:05 AM


All times are GMT -4. The time now is 06:45 PM.


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