Sort text (paragraphs) in QuarkXPress 2018
You have text in a text box in QuarkXPress that needs to be sorted?
A list that needs to be in alphabetical order?
In QuarkXPress 2018 it is easy to sort text (paragraphs), using a sample JavaScript:
Sort text in QuarkXPress using a simple JavaScript
- Open the JavaScript palette in QuarkXPress 2018 and navigate to “Samples > Typography”
- Select the text box that you need sorted
- Run the JavaScript “Sort Paragraphs.js”
- Enter whether you want the data to be sorted Ascending or Descending
- Enter whether you sort text or numbers
Done.
Of course this is undoable.
Remember that this is a script that you can edit and change yourself, should you want to make changes. E.g. you could make a script that doesn’t prompt you about ascending/descending or text/numbers and just runs.
Restrictions
- As QXML (the text formatting accessible by JavaScript) does not support every construct in text, you will loose features which are not yet supported by QXML such as Callouts, Footnotes, Endnotes, Cross References, Anchors etc. from the selected box.
- The Script sorts the entire content of the selected text box, not just a selection.
Quick video showing this example
More sample JavaScripts for QuarkXPress on github
Quark has created a page on github to share more sample scripts and to encourage users to share their scripts:
Both an engineer and a layout artist, Matthias bridges the gap between technology and people. Before joining Quark in 1997, Matthias pioneered print, Web, and multimedia products for multiple German publishing companies. He is an active participant in design and publishing communities and represented Quark in the Ghent PDF Workgroup.
From 1997 until 2019 Matthias played a central role in shaping Quark’s desktop, mobile and enterprise software. From February 2014 until January 2019 he headed Quark’s Desktop Publishing business unit; and was therefore responsible for QuarkXPress.
Matthias does not work for Quark anymore. If you want to connect with him, please visit his LinkedIn profile on https://www.linkedin.com/in/mguenther/