]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/test/test-insets.lyx.lyx
tex2lyx/text.cpp: bring back a comment as discussed
[lyx.git] / src / tex2lyx / test / test-insets.lyx.lyx
index bfc85c3353f23b7d1539ae54e171e4ec011bc541..0cb836fe93506f91a3b837dbc99ebecdec5cf4cd 100644 (file)
@@ -1,10 +1,16 @@
-#LyX file created by tex2lyx 2.1.0dev
-\lyxformat 462
+#LyX file created by tex2lyx 2.2
+\lyxformat 479
 \begin_document
 \begin_header
 \textclass article
 \begin_preamble
 
+% Load refstyle before prettyref so that prettyref wins.
+% The real refstyle tests are in test-refstyle-theorems.tex.
+\usepackage{refstyle}
+\AtBeginDocument{\providecommand\secref[1]{\ref{sec:#1}}}
+
+
 \def\mycommand{\textquestiondown}
 
 
@@ -13,7 +19,7 @@
 \maintain_unincluded_children false
 \language english
 \language_package none
-\inputencoding latin9
+\inputencoding iso8859-15
 \fontencoding T1
 \font_roman default
 \font_sans default
@@ -33,7 +39,7 @@
 \paperfontsize 12
 \spacing onehalf
 \use_hyperref true
-\pdf_bookmarks 1
+\pdf_bookmarks 0
 \pdf_bookmarksnumbered 0
 \pdf_bookmarksopen 0
 \pdf_bookmarksopenlevel 1
 \pdf_pdfborder 0
 \pdf_colorlinks 0
 \pdf_backref section
-\pdf_pdfusetitle 1
+\pdf_pdfusetitle 0
 \papersize a4paper
 \use_geometry false
 \use_package amsmath 2
 \use_package amssymb 2
+\use_package cancel 0
 \use_package esint 1
 \use_package mathdots 0
 \use_package mathtools 0
 \shortcut idx
 \color #008000
 \end_index
+\index new
+\shortcut new
+\color #008000
+\end_index
+\index test
+\shortcut test
+\color #008000
+\end_index
 \secnumdepth 3
 \tocdepth 3
 \paragraph_separation indent
@@ -237,7 +252,61 @@ reference "lab:test"
 
 \end_inset
 
-.
+ as well as textual references like
+\begin_inset space ~
+
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand nameref
+reference "lab:test"
+
+\end_inset
+
+. The command 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+secref
+\end_layout
+
+\end_inset
+
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+{
+\end_layout
+
+\end_inset
+
+lab:test
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+}
+\end_layout
+
+\end_inset
+
+ will be parsed in ERT, since 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+LyX
+\end_layout
+
+\end_inset
+
+ does not support refstyle and prettyref natively at the same time.
 \end_layout
 
 \begin_layout Section
@@ -677,7 +746,7 @@ We can input files too, like this
 \begin_inset CommandInset include
 LatexCommand input
 preview false
-filename "DummyDocument.lyx"
+filename "DummyDocument.lyx.lyx"
 
 \end_inset
 
@@ -685,7 +754,7 @@ filename "DummyDocument.lyx"
 \begin_inset CommandInset include
 LatexCommand include
 preview false
-filename "Dummy Document.lyx"
+filename "Dummy Document.tex"
 
 \end_inset
 
@@ -693,7 +762,7 @@ filename "Dummy Document.lyx"
 \begin_inset CommandInset include
 LatexCommand include
 preview false
-filename "Dummy Document.lyx"
+filename "Dummy Document.tex"
 
 \end_inset
 
@@ -701,7 +770,7 @@ filename "Dummy Document.lyx"
 \begin_inset CommandInset include
 LatexCommand include
 preview false
-filename "Dummy~Document.lyx"
+filename "Dummy~Document.lyx.lyx"
 
 \end_inset
 
@@ -709,11 +778,11 @@ filename "Dummy~Document.lyx"
 \begin_inset CommandInset include
 LatexCommand include
 preview false
-filename "Dummy~Document.lyx"
+filename "Dummy~Document.lyx.lyx"
 
 \end_inset
 
- File names containg double quotes are not legal on windows, so no test file is provided. Nevertheless, they are legal on unix, so we test at least the paring. Since the file does not exist, the variant without extension would not work (tex2lyx can't deduce the correct extension of nonexisting files). 
+ File names containg double quotes are not legal on windows, so no test file is provided. Nevertheless, they are legal on unix, so we test at least the parsing. File names containing spaces can not be handled by automake (make dist would fail), so no test file is provided as well. Since the files do not exist, the variants without extension would not work (tex2lyx can't deduce the correct extension of nonexisting files). 
 \begin_inset CommandInset include
 LatexCommand include
 preview false
@@ -863,6 +932,20 @@ description "uniform resource locator"
 \end_inset
 
 
+\end_layout
+
+\begin_layout Standard
+An URL with strange characters: 
+\begin_inset Flex Flex:URL
+status collapsed
+
+\begin_layout Plain Layout
+http://www.lyx.org/percent%dollar$
+\end_layout
+
+\end_inset
+
+
 \end_layout
 
 \begin_layout Standard
@@ -1298,7 +1381,7 @@ clearpage}
 \begin_layout Standard
 
 \begin_inset Tabular 
-<lyxtabular version="3" rows="64" columns="2">
+<lyxtabular version="3" rows="66" columns="2">
 <features rotate="0" islongtable="true">
 <column alignment="none" valignment="top" special="@{*}r">
 <column alignment="none" valignment="top" special="|p{1in}@{*}">
@@ -1476,11 +1559,36 @@ Second
 
 \end_layout
 
+\end_inset
+</cell>
+</row>
+<row endfoot="true" caption="true">
+<cell multicolumn="1" alignment="none" valignment="top" topline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\begin_inset Caption LongTableNoNumber
+
+\begin_layout Standard
+standard foot
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="2" alignment="none" valignment="top" topline="true" usebox="none">
+\begin_inset Text
+
 \end_inset
 </cell>
 </row>
 <row endfoot="true">
-<cell alignment="none" valignment="top" topline="true" bottomline="true" usebox="none">
+<cell alignment="none" valignment="top" topline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Standard
@@ -1489,13 +1597,38 @@ This goes at the
 
 \end_inset
 </cell>
-<cell alignment="none" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="none" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Standard
 bottom.
 \end_layout
 
+\end_inset
+</cell>
+</row>
+<row endlastfoot="true" caption="true">
+<cell multicolumn="1" alignment="none" valignment="top" topline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\begin_inset Caption LongTableNoNumber
+
+\begin_layout Standard
+(last foot)
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="2" alignment="none" valignment="top" topline="true" usebox="none">
+\begin_inset Text
+
 \end_inset
 </cell>
 </row>
@@ -5691,209 +5824,598 @@ TIPA
 \begin_inset IPA
 
 \begin_layout Standard
-[@n Iɡ"zA:mpl]
+e̥ e̊ e̬ e̤ ḛ e̼ e̪ e̺ e̻ e
+\begin_inset script superscript
+
+\begin_layout Standard
+h
 \end_layout
 
 \end_inset
 
+ e̹ e̜ e̟ e̠ e̠ ë e̽ e̩ e̩ e̯ e˞e
+\begin_inset script superscript
 
+\begin_layout Standard
+w
 \end_layout
 
+\end_inset
+
+ e
+\begin_inset script superscript
+
 \begin_layout Standard
+j
+\end_layout
 
-\begin_inset IPA
+\end_inset
+
+ e
+\begin_inset script superscript
 
 \begin_layout Standard
-[@n Ig"zA
-\color red
-:m
-\color inherit
-pl]
 \end_layout
 
 \end_inset
 
+ e
+\begin_inset script superscript
 
+\begin_layout Standard
 \end_layout
 
-\begin_layout Subsection
-Line breaks
-\begin_inset Index breaks
-status collapsed
+\end_inset
 
-\begin_layout Plain Layout
-Line breaks
+ e̴ e̝ e̞ e̘ e̙ ẽ e
+\begin_inset script superscript
+
+\begin_layout Standard
+n
 \end_layout
 
 \end_inset
 
+ e
+\begin_inset script superscript
+
+\begin_layout Standard
+l
+\end_layout
+
+\end_inset
 
+ e˺ e̋
 \end_layout
 
 \begin_layout Standard
-They can also or be broken by a newline
-\begin_inset Newline newline
+è ē é ȅ ě ê e᷄ e᷅ e᷈ ĕ 
+\end_layout
+
 \end_inset
 
- or by a starred newline 
+
+\end_layout
+
+\begin_layout Standard
+
+\begin_inset IPA
+
+\begin_layout Standard
+pbtd
 \begin_inset ERT
 status collapsed
 
 \begin_layout Plain Layout
 
 \backslash
-
-\backslash
-*
+:
 \end_layout
 
 \end_inset
 
-or by a newline with space, comment and argument 
+t
 \begin_inset ERT
 status collapsed
 
 \begin_layout Plain Layout
 
 \backslash
-
-\backslash
-[3cm]
+:
 \end_layout
 
 \end_inset
 
- or by a newline command 
-\begin_inset Newline newline
-\end_inset
-
-or by a line break 
-\begin_inset Newline linebreak
-\end_inset
-
-or by a defined line break 
+dcɟkɡq
 \begin_inset ERT
 status collapsed
 
 \begin_layout Plain Layout
 
 \backslash
-linebreak[4]
+;
 \end_layout
 
 \end_inset
 
-
+G
 \end_layout
 
+\end_inset
+
+\begin_inset IPA
+
 \begin_layout Standard
-There are even newlines with weird arguments, but these are not handled by 
+PmMn
 \begin_inset ERT
 status collapsed
 
 \begin_layout Plain Layout
-LyX
+
+\backslash
+:
 \end_layout
 
 \end_inset
 
-
+nɲN
 \begin_inset ERT
 status collapsed
 
 \begin_layout Plain Layout
 
 \backslash
-
-\backslash
-*[1cm]
+;
 \end_layout
 
 \end_inset
 
- so we try to use ERT in this case.
-\end_layout
-
-\begin_layout Subsection
-Page breaks
-\begin_inset Index breaks
+N
+\begin_inset ERT
 status collapsed
 
 \begin_layout Plain Layout
-Page breaks
+
+\backslash
+;
 \end_layout
 
 \end_inset
 
+Br
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
 
+\backslash
+;
 \end_layout
 
-\begin_layout Standard
-They can also or be broken by a newpage 
-\begin_inset Newpage newpage
 \end_inset
 
-or by a page break 
-\begin_inset Newpage pagebreak
+RR
+\end_layout
+
 \end_inset
 
-or by a defined page break 
+\begin_inset IPA
+
+\begin_layout Standard
+
 \begin_inset ERT
 status collapsed
 
 \begin_layout Plain Layout
 
 \backslash
-pagebreak[4]
+:
 \end_layout
 
 \end_inset
 
-
-\end_layout
-
-\begin_layout Section
-Special characters
-\begin_inset Index idx
+rFBfvTDszSZ
+\begin_inset ERT
 status collapsed
 
 \begin_layout Plain Layout
-Special characters
+
+\backslash
+:
 \end_layout
 
 \end_inset
 
-
+s
 \end_layout
 
+\end_inset
+
+\begin_inset IPA
+
 \begin_layout Standard
-Then one has those macros with a long name for a short meaning, like ~, ^ or 
-\backslash
-, \SpecialChar \slash{}
-, \SpecialChar \nobreakdash-
- and the characters that 
+
 \begin_inset ERT
 status collapsed
 
 \begin_layout Plain Layout
-LaTeX
+
+\backslash
+:
 \end_layout
 
 \end_inset
 
- wants to espace because they are active, like _&#${}%.
+zçJxGXKħQhHɬ
 \end_layout
 
-\begin_layout Standard
-And what about special characters like hyphe\SpecialChar \-
-nation mark, ellipsis\SpecialChar \ldots{}
-, and end-of-sentence\SpecialChar \@.
+\end_inset
+
  
+\begin_inset IPA
+
+\begin_layout Standard
+ɮVɹ
 \begin_inset ERT
 status collapsed
 
 \begin_layout Plain Layout
-LyX
+
+\backslash
+:
+\end_layout
+
+\end_inset
+
+Rhɰl
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+:
+\end_layout
+
+\end_inset
+
+lL
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+;
+\end_layout
+
+\end_inset
+
+L
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\begin_inset IPA
+
+\begin_layout Standard
+ʘ|!ǂ||ɓɗʄɠʛe'
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\begin_inset IPA
+
+\begin_layout Standard
+iy1ʉW
+\color red
+uIY
+\color inherit
+Ueø987o@Eœ3ɞ2Oæ5aɶA6
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\begin_inset IPA
+
+\begin_layout Standard
+ʍw4
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+;
+\end_layout
+
+\end_inset
+
+HʢʡCʑɺɧ
+\begin_inset IPADeco toptiebar
+status open
+
+\begin_layout Standard
+ar
+\end_layout
+
+\end_inset
+
+
+\begin_inset IPADeco bottomtiebar
+status open
+
+\begin_layout Standard
+tz
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\begin_inset IPA
+
+\begin_layout Standard
+:;eˈˌ|‖.͡*
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+{
+\end_layout
+
+\end_inset
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\begin_inset IPA
+
+\begin_layout Standard
+˥˦˧˨˩ꜜꜛ\IPAChar \tone{15}
+\IPAChar \tone{51}
+\IPAChar \tone{45}
+\IPAChar \tone{12}
+\IPAChar \tone{454}
+↗↘
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+TIPA code in math: 
+\begin_inset Formula $\textipa{\tone{55}|\text{\!b{}\!d{}\!g{}\!G{}\textglobfall{}\textvertline{}\textdoublevertline{}}}$
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Line breaks
+\begin_inset Index breaks
+status collapsed
+
+\begin_layout Plain Layout
+Line breaks
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+They can also or be broken by a newline
+\begin_inset Newline newline
+\end_inset
+
+ or by a starred newline 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+
+\backslash
+*
+\end_layout
+
+\end_inset
+
+or by a newline with space, comment and argument 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+
+\backslash
+[3cm]
+\end_layout
+
+\end_inset
+
+ or by a newline command 
+\begin_inset Newline newline
+\end_inset
+
+or by a line break 
+\begin_inset Newline linebreak
+\end_inset
+
+or by a defined line break 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+linebreak[4]
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+There are even newlines with weird arguments, but these are not handled by 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+LyX
+\end_layout
+
+\end_inset
+
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+
+\backslash
+*[1cm]
+\end_layout
+
+\end_inset
+
+ so we try to use ERT in this case.
+\end_layout
+
+\begin_layout Subsection
+Page breaks
+\begin_inset Index breaks
+status collapsed
+
+\begin_layout Plain Layout
+Page breaks
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+They can also or be broken by a newpage 
+\begin_inset Newpage newpage
+\end_inset
+
+or by a page break 
+\begin_inset Newpage pagebreak
+\end_inset
+
+or by a defined page break 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+\backslash
+pagebreak[4]
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Special characters
+\begin_inset Index idx
+status collapsed
+
+\begin_layout Plain Layout
+Special characters
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Then one has those macros with a long name for a short meaning, like ~, ^ or 
+\backslash
+, \SpecialChar \slash{}
+, \SpecialChar \nobreakdash-
+ and the characters that 
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+LaTeX
+\end_layout
+
+\end_inset
+
+ wants to espace because they are active, like _&#${}%.
+\end_layout
+
+\begin_layout Standard
+And what about special characters like hyphe\SpecialChar \-
+nation mark, ellipsis\SpecialChar \ldots{}
+, and end-of-sentence\SpecialChar \@.
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+LyX
 \end_layout
 
 \end_inset
@@ -6109,6 +6631,14 @@ script with
 .
 \end_layout
 
+\begin_layout Standard
+latex2writer outputs quotes in braces like 
+\begin_inset Quotes ers
+\end_inset
+
+. We swallow the, but this was one broken (bug 8903).
+\end_layout
+
 \begin_layout Section
 Mathematics
 \begin_inset Index idx
@@ -6135,8 +6665,14 @@ $
 .
 \end_layout
 
-\begin_layout Standard
+\begin_layout Section
+Lists/Indices
+\end_layout
 
+\begin_layout Standard
+single 
+\backslash
+addcontentsline: 
 \begin_inset ERT
 status collapsed
 
@@ -6152,10 +6688,18 @@ addcontentsline{toc}{section}{test}
 \end_layout
 
 \begin_layout Standard
-  
+with 
+\backslash
+addcontentsline and 
+\backslash
+phantomsection:
+\end_layout
+
+\begin_layout Standard
 \begin_inset CommandInset bibtex
 LatexCommand bibtex
-bibfiles "IEEEexample"
+bibfiles "xampl"
 options "bibtotoc,test"
 
 \end_inset
@@ -6163,11 +6707,15 @@ options "bibtotoc,test"
 
 \end_layout
 
+\begin_layout Standard
+normal:
+\end_layout
+
 \begin_layout Standard
  
 \begin_inset CommandInset bibtex
 LatexCommand bibtex
-bibfiles "IEEEexample"
+bibfiles "xampl"
 options "test"
 
 \end_inset
@@ -6175,6 +6723,12 @@ options "test"
 
 \end_layout
 
+\begin_layout Standard
+with wrong 
+\backslash
+addcontentsline:
+\end_layout
+
 \begin_layout Standard
 
 \begin_inset ERT
@@ -6200,10 +6754,10 @@ addcontentsline{toc}{section}{test}
 
 \end_inset
 
+  
 \begin_inset CommandInset bibtex
 LatexCommand bibtex
-bibfiles "IEEEexample"
+bibfiles "xampl"
 options "test"
 
 \end_inset
@@ -6211,6 +6765,46 @@ options "test"
 
 \end_layout
 
+\begin_layout Standard
+with 
+\backslash
+addcontentsline and 
+\backslash
+nocite{*}:
+\end_layout
+
+\begin_layout Standard
+  
+\begin_inset CommandInset bibtex
+LatexCommand bibtex
+btprint "btPrintAll"
+bibfiles "xampl"
+options "bibtotoc,test"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+undefined index:
+\end_layout
+
+\begin_layout Standard
+
+\begin_inset CommandInset index_print
+LatexCommand printindex
+type "idx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+index "idx":
+\end_layout
+
 \begin_layout Standard
 
 \begin_inset CommandInset index_print
@@ -6222,6 +6816,68 @@ type "idx"
 
 \end_layout
 
+\begin_layout Standard
+index "new":
+\end_layout
+
+\begin_layout Standard
+
+\begin_inset CommandInset index_print
+LatexCommand printindex
+type "new"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+subindex "new":
+\end_layout
+
+\begin_layout Standard
+
+\begin_inset CommandInset index_print
+LatexCommand printsubindex
+type "idx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+index of all indices:
+\end_layout
+
+\begin_layout Standard
+
+\begin_inset CommandInset index_print
+LatexCommand printindex*
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+subindex of all indices:
+\end_layout
+
+\begin_layout Standard
+
+\begin_inset CommandInset index_print
+LatexCommand printsubindex*
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+normal nomenclature:
+\end_layout
+
 \begin_layout Standard
 
 \begin_inset CommandInset nomencl_print
@@ -6234,7 +6890,7 @@ hello
 \end_layout
 
 \begin_layout Standard
-
+manually set width: 
 \begin_inset ERT
 status collapsed
 
@@ -6258,6 +6914,10 @@ set_width "none"
 
 \end_layout
 
+\begin_layout Standard
+nomenclature with set width:
+\end_layout
+
 \begin_layout Standard
 
 \begin_inset CommandInset nomencl_print