Truncation file renaming

Hi! Is there a way to truncate according to number of words and not character count in the renaming field? Or to delete the word that "truncate" cuts in half? I found nothing in the documentation...
All the best!
  • tnajdek Zotero Team
    edited today at 2:24pm
    Word-boundary truncation isn't supported natively, but you can approximate it with replaceFrom:

    {{ title replaceFrom="^(.{1,80})\s.*$" replaceTo="$1" }}


    This captures up to 80 characters and stops at the last whitespace before the limit, so you never get a half-cut word. Adjust the number to your preferred length. Titles shorter than that pass through unchanged.
Sign In or Register to comment.