From de40b09474dab68a49605e193050f41e05450bb5 Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Thu, 30 Apr 2020 23:28:18 -0400 Subject: [PATCH] Fix thinkos for counter value type --- lib/doc/UserGuide.lyx | 49 +++++++++++++++++- src/frontends/qt/GuiCounter.cpp | 2 +- src/insets/InsetCounter.cpp | 2 +- src/tex2lyx/test/xfigtest.pdf | 83 ++++++++++++++++++++++++++++++ src/tex2lyx/test/xfigtest.pdftex_t | 15 ++++++ 5 files changed, 147 insertions(+), 4 deletions(-) create mode 100644 src/tex2lyx/test/xfigtest.pdf create mode 100644 src/tex2lyx/test/xfigtest.pdftex_t diff --git a/lib/doc/UserGuide.lyx b/lib/doc/UserGuide.lyx index cc33d3d1fc..7da3737b49 100644 --- a/lib/doc/UserGuide.lyx +++ b/lib/doc/UserGuide.lyx @@ -1,5 +1,5 @@ #LyX 2.4 created this file. For more info see https://www.lyx.org/ -\lyxformat 592 +\lyxformat 594 \begin_document \begin_header \save_transient_properties true @@ -54,7 +54,7 @@ customHeadersFooters enumitem logicalmkup \end_modules -\maintain_unincluded_children false +\maintain_unincluded_children no \language english \language_package default \inputencoding utf8 @@ -156,6 +156,7 @@ logicalmkup \html_be_strict true \author -1402925745 "Günter Milde" \author -712698321 "Jürgen Spitzmüller" +\author -584632292 "Richard Kimberly Heck" \author -563046850 "Jean-Marc LASGOUTTES" \author 5863208 "ab" \author 1675569489 "Stephan Witt" @@ -29857,6 +29858,50 @@ to the field Additional options \family default in the PDF Properties dialog. +\change_inserted -584632292 1588303457 + +\end_layout + +\begin_layout Section + +\change_inserted -584632292 1588303474 +Counters +\begin_inset Index idx +status open + +\begin_layout Plain Layout +Counters +\end_layout + +\end_inset + + +\begin_inset CommandInset label +LatexCommand label +name "sec:Counters" + +\end_inset + + +\end_layout + +\begin_layout Standard + +\change_inserted -584632292 1588303631 +One powerful feature of \SpecialChar LaTeX + is its ability to manage counters, like the one + for this section ( +\begin_inset CommandInset counter +LatexCommand value +counter "subsection" +value "0" +vtype "arabic" +lyxonly "false" + +\end_inset + +), automatically. + \end_layout \begin_layout Section diff --git a/src/frontends/qt/GuiCounter.cpp b/src/frontends/qt/GuiCounter.cpp index a4a5c4ac21..7470e0d9e0 100644 --- a/src/frontends/qt/GuiCounter.cpp +++ b/src/frontends/qt/GuiCounter.cpp @@ -42,7 +42,7 @@ GuiCounter::GuiCounter(GuiView & lv, QWidget * parent) : this, SIGNAL(changed())); connect(valueSB, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); - connect(vtypeCB, SIGNAL(clicked()), + connect(vtypeCB, SIGNAL(currentIndexChanged(int)), this, SIGNAL(changed())); connect(lyxonlyXB, SIGNAL(clicked()), this, SIGNAL(changed())); diff --git a/src/insets/InsetCounter.cpp b/src/insets/InsetCounter.cpp index cdd5393c5f..07894a8854 100644 --- a/src/insets/InsetCounter.cpp +++ b/src/insets/InsetCounter.cpp @@ -113,7 +113,7 @@ void InsetCounter::latex(otexstream & os, OutputParams const &) const os << "\\setcounter{" << cntr << "{\\value{" << lyxSaveCounter() << "}}"; } else if (cmd == "value") { - os << "\\value{" << cntr << "}"; + os << "\\the" << cntr << "{}"; } } diff --git a/src/tex2lyx/test/xfigtest.pdf b/src/tex2lyx/test/xfigtest.pdf new file mode 100644 index 0000000000..68ca9724b7 --- /dev/null +++ b/src/tex2lyx/test/xfigtest.pdf @@ -0,0 +1,83 @@ +%PDF-1.7 +%쏢 +5 0 obj +<> +stream +x-ɻ 0 ES L&N!* +`}B8=8#.; =]bQ 8E"[Is=(endstream +endobj +6 0 obj +82 +endobj +4 0 obj +<> +/Contents 5 0 R +>> +endobj +3 0 obj +<< /Type /Pages /Kids [ +4 0 R +] /Count 1 +>> +endobj +1 0 obj +<> +endobj +7 0 obj +<>endobj +8 0 obj +<> +endobj +9 0 obj +<>stream + + + + + +2020-04-30T23:20:37-04:00 +2020-04-30T23:20:37-04:00 +fig2dev Version 3.2.7b-dev + +4_cvs_lyx_lyx-devel_src_tex2lyx_test_xfigtest.fig + + + + + +endstream +endobj +2 0 obj +<>endobj +xref +0 10 +0000000000 65535 f +0000000375 00000 n +0000001978 00000 n +0000000316 00000 n +0000000185 00000 n +0000000015 00000 n +0000000167 00000 n +0000000439 00000 n +0000000480 00000 n +0000000509 00000 n +trailer +<< /Size 10 /Root 1 0 R /Info 2 0 R +/ID [<6AAF8F28F1AA2B7D20DD0D2E3E7E99A0><6AAF8F28F1AA2B7D20DD0D2E3E7E99A0>] +>> +startxref +2196 +%%EOF diff --git a/src/tex2lyx/test/xfigtest.pdftex_t b/src/tex2lyx/test/xfigtest.pdftex_t new file mode 100644 index 0000000000..2e346623a9 --- /dev/null +++ b/src/tex2lyx/test/xfigtest.pdftex_t @@ -0,0 +1,15 @@ +\begin{picture}(0,0)% +\includegraphics{xfigtest}% +\end{picture}% +\setlength{\unitlength}{4144sp}% +% +\begingroup\makeatletter\ifx\SetFigFont\undefined% +\gdef\SetFigFont#1#2#3#4#5{% + \reset@font\fontsize{#1}{#2pt}% + \fontfamily{#3}\fontseries{#4}\fontshape{#5}% + \selectfont}% +\fi\endgroup% +\begin{picture}(3624,2454)(2059,-3448) +\put(2926,-3031){\makebox(0,0)[lb]{\smash{{\SetFigFont{12}{14.4}{\rmdefault}{\mddefault}{\updefault}{\color[rgb]{0,0,0}$\gamma$}% +}}}} +\end{picture}%