Recent posts

#1
Scripts and Plugins / Re: Utility script for book ty...
Last post by Lynn - February 17, 2026, 10:59:51 PM
Oh, honestly, I hadn't imagined Scribus would implement any of this natively; at least certainly not any time soon. For one thing, typesetting norms vary by language/region/medium and I have no idea whether these rules are applicable outside english-language book typesetting. I don't get the impression many people use Scribus for books, though I think it can work very well for it.

Out of the list, the only one I think is likely universal is preventing the last word of a paragraph from being automatically hyphenated. Perhaps it'd be possible to have a "don't hyphenate within X lines of the end of a paragraph"? Both Affinity and InDesign have toggles for this in their hyphenation settings.

But I know there's certainly bigger Scribus priorities, hence writing a script to automate that task in my projects. (I would definitely rank these fiddly bits way below style-based running headers.)

The initial reason I wrote my script to work with the XML instead of within Scribus directly is that I didn't see a method in the API to edit text that isn't visible on a page in Scribus. When doing book projects, I add pages in chunks as I finalize the text and unlink the text chain at each chapter break. That prevents ever having a really long text chain visible on-screen, and reduces lag when doing 200+ page projects. If I could only edit visible pages, I would have to remember to run the script four or six times per project rather than all at once at the beginning.
#2
Scripts and Plugins / Re: Utility script for book ty...
Last post by a.l.e - February 17, 2026, 08:01:17 PM
Very interesting summary.

Personally, I have a hard time believing that Scribus will be able to add all or even any of the rules you mention.

The main hurdle I see: adding an algorithm that is somehow performant and that will manage to never produce a really bad result. In one pass.

... And this with the limited number of contributors currently active in Scribus...

But, what I think might be possible, is to get Scribus to give information about the possible and enhancing the scripter API to allow a more or less automatic enhancement of the text flow through Python scripts.
A bit like what you are doing with your script, but with interactions with the document's frames and not by tweaking the XML in the .sla.

What do you think about it?
#3
Scripts and Plugins / Utility script for book typese...
Last post by Lynn - February 15, 2026, 09:18:25 PM
There's been a few requests scattered throughout the forum from folks looking for ways to implement certain book typesetting norms:
  • The last word of a paragraph should never be hyphenated
  • According to some sources, the penultimate line of the paragraph shouldn't be hyphenated
  • If the last word of a paragraph breaks to its own line, it should be longer than a certain minimum length. Short last lines are called "stubs" or "runts"
  • Words that are already hyphenated, like "pell-mell" shouldn't be given additionally hyphenated by the software
  • Chapters generally begin after a frame break

I implemented all that in one script, plus an extra feature to apply a character style the first X characters/words or up to a delimiter at the beginning of a selected paragraph style (handy for when you want each chapter to start with a few words in small caps, though I suspect I'd probably end up manually adjusting them).

https://github.com/notwhelmedyet/ScribusTypesetting/blob/main/runtsAndStuff.py

Since there's no way to mark in a Scribus XML file (yet, waiting on Ale's patch to get accepted) that a word shouldn't be hyphenated, the script needs to be run after the whole document has hyphenation applied. It will selectively go through and remove the unwanted hyphens.

There's also no "frame break right" option in Scribus so the script only inserts one frame break. If you needed each chapter to start on the right, you'd still need to add an extra break as needed while cleaning up your file. The script assumes you've already applied the style for chapter titles because I always import my text with that pre-styled; if you have a different workflow you could just toggle that option off and do your frame breaks later.

It saves a copy of the file so there's no worries about it corrupting anything & has variant code so it works in 1.7.1+ and 1.5-1.6 versions of Scribus.

As is my typical style, the script opens a series of menus where you can pick the operations it will run; if you hate menus you could save a copy where you remove those dialogs and hard code the settings.
#4
User Interface / Re: Automatic Fraction Generat...
Last post by a.l.e - February 15, 2026, 08:23:59 PM
  • That type of fraction only works when the font does support it. You see it in the "Open Type Features" section of the content palette.
  • Concerning the palettes: the current implementation will be replaced "soon" by a different implementation
    https://bugs.scribus.net/view.php?id=17432
#5
User Interface / Automatic Fraction Generation ...
Last post by Portreve - February 15, 2026, 06:48:30 PM
Using: Scribus 1.7.2 Flatpak, openSUSE Tumbleweed / Gnome 49

Scribus has a capability for turning a pair of numbers into a superscript/subscript formatted fraction. For example, you can type in a 1, then a 2, click in between, and then insert the "Solidus" character (a solidus is basically a specific type of slash also known as a fraction bar).

What should happen is that the first number (using the example above, the "1") should be superscripted, and the second number should be subscripted, and one should have a proper-looking fraction.

What actually does happen is that you have to change fonts to something else after doing it, and some fonts don't do anything at all.

For example, if I switch to Tekton Pro, it will automatically make it a fraction. If I switch to Helvetica LT, nothing happens.

I don't believe this is a font feature issue because it doesn't replace the 1, the solidus, and the 2 with a single fraction character, though maybe it is and I'm wrong.

The other issue is when you start moving Pallets around, they become unwieldy. They will shift around, or they will completely undock, and sometimes when they undock they lose their title bar so suddenly they cannot be moved at all.

EDIT: One other thing, related to fractions, and this is something I've experienced across multiple versions of Scribus (1.4, 1.5, 1.6, and 1.7) is that when you set all your superscript and subscript settings, if you manually make a fraction, the numerator will not appear at the correct height, but if you take the document and export it (as a PDF, for example) it shows correctly there.
#6
Announcements and Forum Rules / Re: Scribus 1.7.2 released
Last post by Lynn - February 15, 2026, 03:22:25 PM
I did eventually figure out the answer to my question - the release information isn't kept in the bug tracker long-term; old release information is on the wiki at https://wiki.scribus.net/canvas/ChangeLog
#7
Text and Typography / Re: Prevent linebreaks and hyp...
Last post by a.l.e - February 15, 2026, 11:40:20 AM
No idea why the very simple patch I've proposed many moons ago has not been reviewed...
#8
Text and Typography / Re: Prevent linebreaks and hyp...
Last post by Lynn - February 14, 2026, 08:53:46 PM
I was just trying to figure out a script to prevent hyphenation of the last word in each paragraph of a document, which is currently one of my biggest clean-up tasks when typesetting in Scribus. My original thought was inserting soft hyphens before the last word of each paragraph.

I see that soft hyphens don't currently work to mark a word so it doesn't get hyphenated, definitely seconding that this would be a very useful feature.

I suppose an alternate route would be to hyphenate the whole text and then have my script remove the soft hyphens in positions where they aren't wanted by opening the XML file and doing regex replacements on the last word of each paragraph.
#9
Features / Re: Native Text Hyperlink Supp...
Last post by a.l.e - February 14, 2026, 05:11:34 PM
Would you mind, asking your AI to convert that pseudo code in a patch we can apply to Scribus?
#10
General Discussion / Re: A discussion about the typ...
Last post by Lynn - February 14, 2026, 03:48:48 PM
It's only light thread necromancy this time, so I feel like I'm in the clear. The reason I use Scribus is that it is the only desktop publishing program which is officially supported on Linux; I use it for typesetting novels for hobby bookbinding. For non-Linux hobbyists, the alternate choice is usually Affinity Studio now that it's available for free.

My needs overlap somewhat with professional book typesetters, but not completely (since it's a hobby, I'm willing to put a lot more time into any given project; since I am self-printing only a few books a year I make designs much more complex and image-rich than a typical paperback).

Two of the things discussed above would be enormously helpful to me: Contextual paragraph and character styles, additional hyphenation rules to prevent hyphenating the last word of a paragraph.

Most people in my bookbinding club use Affinity Publisher for typesetting. We were talking over the various features that Scribus and Affinity have and there are a few that Scribus has that are actually big plusses over Affinity for books.
  • The ability to unlink frames/cut text is great for splitting documents per chapter without needing to import chapters separately.
  • The ability to use fonts that aren't installed is amazing for testing designs.
  • User scripts are big for me - affinity still doesn't support macros.
  • And somehow it doesn't let the user provide a list of hyphenation exceptions for proper nouns!

A lot of the Affinity features I think are unecessary if you typeset "traditionally" (making a design first, editing your text before importing and then applying the design to the finalized text as the last step). But there's also some features that they have that sound really convenient:
  • "Next Paragraph" setting in the paragraph style definition allows you to set that the ChapterOpener will always follow the ChapterTitle
  • "First Characters" setting in the paragraph style applies a character style for a set number of characters, words or up till a delimiter - that allows you to set the first few words of a chapter in small caps. In typesetting plays, it would let you set the speaker in a custom style.
  • "Start Paragraph On" setting allows you to automatically insert a page break (or two, if you want all your chapters to start on the right) before chapter titles, which would be a big time-saver
  • Regex searching
  • And paragraph decorations (either fill behind a paragraph, next to it, an outline box etc) is actually used heavily for typesetting modern era stories that include a lot of text messages. Being able to make a rounded-corner box beneath a paragraph automatically makes that easy in Affinity.
  • (oh I forgot - automatic running headers based on styles. I have a script that makes these so I forgot Scribus doesn't do it natively)

Most of the features Affinity has would be a pain to implement, but I figured people might find the perspective from my hobby interesting. I attached some slides I made for a group presentation I was giving with pros for each