]> git.lyx.org Git - features.git/commitdiff
Fix thinkos for counter value type
authorRichard Kimberly Heck <rikiheck@lyx.org>
Fri, 1 May 2020 03:28:18 +0000 (23:28 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Fri, 1 May 2020 03:46:18 +0000 (23:46 -0400)
lib/doc/UserGuide.lyx
src/frontends/qt/GuiCounter.cpp
src/insets/InsetCounter.cpp
src/tex2lyx/test/xfigtest.pdf [new file with mode: 0644]
src/tex2lyx/test/xfigtest.pdftex_t [new file with mode: 0644]

index cc33d3d1fc7df0a7a50a694fb112af2e96712426..7da3737b49a0c9a5b4cd8455744cd45013c60c81 100644 (file)
@@ -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
index a4a5c4ac21fd4f413517fb50591851003b3fc1b1..7470e0d9e022a7f785007b81ac40e1396100b3e1 100644 (file)
@@ -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()));
index cdd5393c5f29c8d44a4e4531bcfcd040826694cf..07894a88542e7405f709eb27c089069037384c7c 100644 (file)
@@ -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 (file)
index 0000000..68ca972
--- /dev/null
@@ -0,0 +1,83 @@
+%PDF-1.7
+%Çì\8f¢
+5 0 obj
+<</Length 6 0 R/Filter /FlateDecode>>
+stream
+x\9c-É»\r\800\fEÑÞS¼ Lâø\13& N\18\ 1!*
+ `}\ 4B·8Å=\908#½ý.;\r=°]¤\1c¢b¸éûè\13\ 5×Q­ 8\87E\85\88\a»"[Iì\8e\99\1a\1a\11(endstream
+endobj
+6 0 obj
+82
+endobj
+4 0 obj
+<</Type/Page/MediaBox [0 0 229 155]
+/Parent 3 0 R
+/Resources<</ProcSet[/PDF]
+/ExtGState 8 0 R
+>>
+/Contents 5 0 R
+>>
+endobj
+3 0 obj
+<< /Type /Pages /Kids [
+4 0 R
+] /Count 1
+>>
+endobj
+1 0 obj
+<</Type /Catalog /Pages 3 0 R
+/Metadata 9 0 R
+>>
+endobj
+7 0 obj
+<</Type/ExtGState
+/OPM 1>>endobj
+8 0 obj
+<</R7
+7 0 R>>
+endobj
+9 0 obj
+<</Type/Metadata
+/Subtype/XML/Length 1393>>stream
+<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
+<?adobe-xap-filters esc="CRLF"?>
+<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'>
+<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'>
+<rdf:Description rdf:about='uuid:46a68b98-c377-11f5-0000-3e5079f8075c' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 9.27'/>
+<rdf:Description rdf:about='uuid:46a68b98-c377-11f5-0000-3e5079f8075c' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2020-04-30T23:20:37-04:00</xmp:ModifyDate>
+<xmp:CreateDate>2020-04-30T23:20:37-04:00</xmp:CreateDate>
+<xmp:CreatorTool>fig2dev Version 3.2.7b-dev</xmp:CreatorTool></rdf:Description>
+<rdf:Description rdf:about='uuid:46a68b98-c377-11f5-0000-3e5079f8075c' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='uuid:46a68b98-c377-11f5-0000-3e5079f8075c'/>
+<rdf:Description rdf:about='uuid:46a68b98-c377-11f5-0000-3e5079f8075c' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>4_cvs_lyx_lyx-devel_src_tex2lyx_test_xfigtest.fig</rdf:li></rdf:Alt></dc:title></rdf:Description>
+</rdf:RDF>
+</x:xmpmeta>
+                                                                        
+                                                                        
+<?xpacket end='w'?>
+endstream
+endobj
+2 0 obj
+<</Producer(GPL Ghostscript 9.27)
+/CreationDate(D:20200430232037-04'00')
+/ModDate(D:20200430232037-04'00')
+/Title(4_cvs_lyx_lyx-devel_src_tex2lyx_test_xfigtest.fig)
+/Creator(fig2dev Version 3.2.7b-dev)>>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 (file)
index 0000000..2e34662
--- /dev/null
@@ -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}%