From 42715a37f029239e09d8142d6ec147bda325f459 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Fri, 22 May 2009 23:23:09 +0000 Subject: [PATCH] InsetNomencl.cpp: remove hardcoded symbol width git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29797 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetNomencl.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/insets/InsetNomencl.cpp b/src/insets/InsetNomencl.cpp index d73b701f29..8cb01e8b46 100644 --- a/src/insets/InsetNomencl.cpp +++ b/src/insets/InsetNomencl.cpp @@ -261,21 +261,21 @@ int InsetPrintNomencl::latex(odocstream & os, OutputParams const &) const int lines = 0; if (getParam("set_width") == "auto") { docstring widest = nomenclWidest(buffer()); - // set the label width via nomencl's command - // \nomlabelwidth. This must be output before the command + // Set the label width via nomencl's command \nomlabelwidth. + // This must be output before the command // \printnomenclature if (!widest.empty()) { // assure that the width is never below the - // predefined value of 1 cm - // FIXME: Why this? - os << "\\settowidth{\\nomlabelwidth}{" + // value predefined in nomencl.cfg + os << "\\newlength{\\symbwidth}\n"; + os << "\\settowidth{\\symbwidth}{" << widest << "}\n"; os << "\\ifthenelse{%\n"; - os << "\\lengthtest{\\nomlabelwidth < 1cm}}\n"; - os << " {\\setlength{\\nomlabelwidth}{1cm}}\n"; + os << "\\lengthtest{\\symbwidth < \\nomlabelwidth}}\n"; + os << " {\\setlength{\\symbwidth}{\\nomlabelwidth}}\n"; os << " {}\n"; - lines += 5; + lines += 6; } } else if (getParam("set_width") == "custom") { // custom length as optional arg of \printnomenclature -- 2.39.2