Tag : Sort
SmartSort 1.21 for InDesign CC/CS6/CS5/CS4
December 04, 2024 | SmartSort | en | fr
SmartSort is a free InDesign script that sorts paragraphs or cells. It produces a lexicographic order consistent with the language considered. Version 1.21 fixes an issue related to case discrimination in various ‘tailored’ languages. It also deals with the letter ⟨ё⟩ in Russian.
SmartSort 1.17 for InDesign CC/CS6/CS5/CS4
April 06, 2022 | SmartSort | en | fr
Fast, free, and feliz, SmartSort is an InDesign script that alphabetizes word lists (paragraphs or cells) with respect to the language used in your text. It's as easy as Right Click ▸ SmartSort… ▸ Sort! This new version essentially provides stability fixes. Download/update right now, and enjoy ;-)
Page Range Formatter [UPDATE]
August 17, 2021 | Tips | en
Given an unordered set of page numbers—e.g. {13, 9, 25, 12, 11, 8}
—we often have to compute and output a range specification in the form "8-9; 11-13; 25"
. While this topic has been already discussed in the InDesign scripting forum, I'd like to explore today a slightly different approach…
SmartSort 1.05 | New Design, New Options
August 13, 2020 | SmartSort | en
Many thanks to Peter Kahrel for his valuable suggestions and samples regarding word-by-word and letter-by-letter systems. SmartSort 1.05 is out in a fresh skin with more detailed—and relevant—options. (To upgrade from the beta release, quit InDesign, replace the old SmartSort.jsx
file and restart the application.)
Reconsidering Array.sort( ) in ExtendScript/JavaScript — Part 2
May 20, 2015 | Tips | en
In my previous post I introduced some key concepts and tools for benchmarking Array.sort()
and took you through the “standard model” of optimizing the callback function. We also emphasized that, of course, it is impossible to go faster than the native method. If these clues made you sit up and take notice, it's time to go one step further…
Reconsidering Array.sort( ) in ExtendScript/JavaScript — Part 1
May 13, 2015 | Tips | en
The pattern array.sort(compareFunc)
is widely used by JavaScript programmers when elements being sorted are not supposed to represent basic strings in the sense of UTF16 ordered character sequences. In particular, sorting numbers forces you to provide that stupid custom compareNumbers
routine which, in most cases, just looks like function(x,y){return x-y}
. And even when you have to sort actual strings, there are countless situations where the default Unicode code point order is inappropriate. But a question arises: what is the performance cost of using a non-native comparison routine?
IndexMatic² | Public Release and User's Guide
July 02, 2011 | IndexMatic² | en | fr
IndexMatic² is a powerful and highly configurable word-indexing tool for InDesign CS3, CS4, and CS5+ (Mac and Win). The present release (v. 2.02) offers completely new features: ‘sub-topic’ processing, XML export, InDesign snippet generation, and much more! “This script is a truly wonderful achievement. It's versatile, clever, and lightning fast, and the options are sensible.”—Peter Kahrel, June 2011.
Alphabetical Sort in JavaScript (and InDesign)
October 26, 2010 | Tips | en | fr
Surprisingly, JavaScript offers no easy way to alphabetize words in relevant order. Although the Array.sort() method is known to perform, by default, a lexicographical sort, you will find very quickly that the result is wrong in most real-life situations. Actually, the internal mechanism of JS sorting is confined to compare Unicode characters by their code points, so 'Z' (U+005A) comes before 'e' (U+0065), which itself comes before 'ç' (U+00E7), etc. Also, you have all noted with vexation that InDesign does not offer any alphabetical sort feature! Here is an experimental tool to help restore order in Latin alphabets.