Feature discussion: content variables

Previous topic - Next topic

BN_Dev

Hi all,

Quote from: BN_Dev on September 23, 2024, 02:07:24 AM^^ With regards to this post ^^

An essential feature we need is something analogous to Content Variables in QuarkXPress.  See QuarkXPress 2024 User Guide: Content Variables.

I am aware that the Marks feature exists and is experimental.  It is very promising and we are excited that it could offer better functionality than Content Variables.  We have been playing with this feature and found a few bugs (which I have started reporting via Mantis; see 0017269: Ascent not computed with variable text).

We would like to contribute work in this area for the following goals:

  • To ensure that variable text is treated identically to text entered in to a text frame and has all the correct formatting and behavior of non-variable text
  • A view toggle option to highlight Mark objects with a different background color
  • To support a type of dynamic variable text whose contents can be updated based on a template or light code solution, such as:
    • Set by the contents of an external file path
    • Set by a simple Excel-like macro; =DATE('MMM YYYY')
    • Access properties of the document or program, such as last save datetime/current file path/etc.
    • Extracting "running headers" or other conditional input from the page/section/document, such as current chapter or section name
    • An idea to set the content as the output of a Python script that is automatically invoked when fields are updated
  • To allow certain variable text Marks to reference others and be embedded/nested
  • With an updated UI editor to allow easy access to choosing functionality for the content the user desires
  • A new Mark type to allow dynamic picture frame URI
  • Using a Mark text to allow dynamic generation/updating of a barcode based on it
  • Relevant/associated API interfaces for Scripts to also access/modify these things in a document

Referencing the post at the top, whilst we recognize that a lot of this is possible by directly manipulating the XML file with external tools and with the use of plugins (I have seen an example of a mail-merge type system that does this), having something built-in that's analogous to Content Variables makes time-saving smarter layout features available to everyone without having rely on anything external and is document-portable.

A few example of our actual use case in a newsprint production include:

  • Having the issue date as a content variable in the master template that is updated once but referenced in the headers and masthead so no issue ever has the previous incorrect date
  • Generating the EAN 13+2 sales barcode for each edition+issue (ISSN+week number)
  • Running header for current section name (also potential to use for ToC index)

Many thanks,
Paul
Developer in the print industry with Quark+macOS expertise. Linux+KDE fan. Code in Qt/C/C++/Java/PHP/JS/more. FOSS advocate.