From 1a87c5313d37ffa01037b4443d81d636319cb834 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Sun, 16 Jun 2024 11:41:46 -0400 Subject: [PATCH] Adapt to deprecation of \DeclareCollectionInstance Change LaTeX output of smallLetterFrac. For more information, see: https://tex.stackexchange.com/questions/720579/do-i-need-to-replace-declarecollectioninstance-after-recent-package-change/ This fixes 44 failing tests from 074-76-letterlike-numberforms-arrows.lyx that started failing after a tlmgr update around 2024-06-04. --- src/LaTeXFeatures.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index e68f850d0a..74941459e6 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -471,19 +471,11 @@ static docstring const textschwa_def = from_ascii( static docstring const xfrac_def = from_ascii( "\\usepackage{xfrac}\n"); +// https://tex.stackexchange.com/questions/720579/do-i-need-to-replace-declarecollectioninstance-after-recent-package-change/ static docstring const smallLetterFrac_def = from_ascii( - "\\DeclareCollectionInstance{smallLetterFrac}{xfrac}{default}{text}\n" + "\\EditTemplateDefaults{xfrac}{text}\n" " {phantom=c, scale-factor=1.0, slash-left-kern=-.05em}\n" - "\\DeclareCollectionInstance{smallLetterFrac}{xfrac}{lmr}{text}\n" - " {slash-symbol-font=ptm, phantom=c, scale-factor=1, slash-left-kern=-.05em}\n" - "\\DeclareCollectionInstance{smallLetterFrac}{xfrac}{lmss}{text}\n" - " {slash-symbol-font=ptm, phantom=c, scale-factor=1, slash-left-kern=-.05em}\n" - "\\DeclareCollectionInstance{smallLetterFrac}{xfrac}{cmr}{text}\n" - " {slash-symbol-font=ptm, phantom=c, scale-factor=1, slash-left-kern=-.05em}\n" - "\\DeclareCollectionInstance{smallLetterFrac}{xfrac}{cmss}{text}\n" - " {slash-symbol-font=ptm, phantom=c, scale-factor=1, slash-left-kern=-.05em}\n" - "\\newcommand{\\smallLetterFrac}[2]{%\n" - " {\\UseCollection{xfrac}{smallLetterFrac}\\sfrac{#1}{#2}}}\n"); + "\\NewCommandCopy\\smallLetterFrac\\sfrac\n"); static docstring const lyxref_def = from_ascii( "\\RS@ifundefined{subsecref}\n"