From 1a78e9787eb9fb17b26d6eb9d7e0fa969e8a9e67 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sun, 3 Dec 2017 11:57:11 +0100 Subject: [PATCH] nomenclWidest(): take (proper) formatting into account. --- src/insets/InsetNomencl.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/insets/InsetNomencl.cpp b/src/insets/InsetNomencl.cpp index 05a5dea8cd..07c2bed973 100644 --- a/src/insets/InsetNomencl.cpp +++ b/src/insets/InsetNomencl.cpp @@ -365,7 +365,8 @@ docstring nomenclWidest(Buffer const & buffer, OutputParams const & runparams) continue; nomencl = static_cast(inset); docstring const symbol = - nomencl->getParam("symbol"); + nomencl->params().prepareCommand(runparams, nomencl->getParam("symbol"), + nomencl->findInfo(string())["symbol"].handling()); // This is only an approximation, // but the best we can get. int const wx = use_gui ? @@ -378,17 +379,7 @@ docstring nomenclWidest(Buffer const & buffer, OutputParams const & runparams) } } // return the widest (or an empty) string - if (symb.empty()) - return symb; - - // we have to encode the string properly - pair latex_symb = - runparams.encoding->latexString(symb, runparams.dryrun); - if (!latex_symb.second.empty()) - LYXERR0("Omitting uncodable characters '" - << latex_symb.second - << "' in nomencl widest string!"); - return latex_symb.first; + return symb; } } // namespace