Am Montag, dem 18.03.2024 um 18:26 -0400 schrieb Richard Kimberly Heck: > On 3/18/24 13:01, Jürgen Spitzmüller wrote: > > I am trying to set up a private external template for the inclusion > > of > > sound files to beamer slides. Could somebody please remind me what > > needs to be done to get those files (e.g., mp3's) copied to the tmp > > with their mangled file name? > > I think this is done in the validation routine, by calling > features.includeFile().
Thanks, this does not seem to be related to external material, AFAICS. However, what would help me is a new placeholder, $$OrigAbsName, that outputs the absolute path to the original filename (see attached). I know that documenting this for 2.4 is too late, but would you be OK if I submitted this as a hidden feature and document later? Jürgen
diff --git a/src/insets/ExternalSupport.cpp b/src/insets/ExternalSupport.cpp index 33c14d38be..5893a5d454 100644 --- a/src/insets/ExternalSupport.cpp +++ b/src/insets/ExternalSupport.cpp @@ -106,8 +106,10 @@ string const doSubstitution(InsetExternalParams const & params, params.filename.mangledFileName() : params.filename.outputFileName(parentpath); string const basename = changeExtension( - onlyFileName(filename), string()); + onlyFileName(filename), string()); string const absname = makeAbsPath(filename, parentpath).absFileName(); + string const origabsname = makeAbsPath(params.filename.outputFileName(parentpath), + parentpath).absFileName(); if (what != ALL_BUT_PATHS) { string const filepath = onlyPath(filename); @@ -136,6 +138,10 @@ string const doSubstitution(InsetExternalParams const & params, use_latex_path, PROTECT_EXTENSION, ESCAPE_DOTS); + result = subst_path(result, "$$OrigAbsName", origabsname, + use_latex_path, + PROTECT_EXTENSION, + ESCAPE_DOTS); result = subst_path(result, "$$RelPathMaster", relToMasterPath, use_latex_path, PROTECT_EXTENSION,
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel