X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftex2lyx%2Ftest%2Ftest-insets.lyx.lyx;h=8424bdb27373d66d07b716a3d0ea9ad06c9fb449;hb=d3c63f97c4fce4e091277ced6c1829473c311231;hp=d598d406b659588f2ea78e2bdc0c40ac90878f01;hpb=99cdabd206aeb836a08a4db4a10980da4ce5e1b9;p=lyx.git diff --git a/src/tex2lyx/test/test-insets.lyx.lyx b/src/tex2lyx/test/test-insets.lyx.lyx index d598d406b6..8424bdb273 100644 --- a/src/tex2lyx/test/test-insets.lyx.lyx +++ b/src/tex2lyx/test/test-insets.lyx.lyx @@ -1,7 +1,9 @@ -#LyX file created by tex2lyx 2.1 -\lyxformat 474 +#LyX file created by tex2lyx 2.3 +\lyxformat 512 \begin_document \begin_header +\save_transient_properties true +\origin roundtrip \textclass article \begin_preamble @@ -21,16 +23,17 @@ \language_package none \inputencoding iso8859-15 \fontencoding T1 -\font_roman default -\font_sans default -\font_typewriter default -\font_math auto +\font_roman "default" "default" +\font_sans "default" "default" +\font_typewriter "default" "default" +\font_math "auto" "auto" \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false -\font_sf_scale 100 -\font_tt_scale 100 +\font_sf_scale 100 100 +\font_tt_scale 100 100 +\use_microtype 0 \graphics default \default_output_format default \output_sync 0 @@ -111,6 +114,10 @@ status collapsed %stupid stuff \end_layout +\begin_layout Plain Layout + +\end_layout + \end_inset @@ -250,6 +257,18 @@ reference "lab:test" LatexCommand formatted 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 @@ -284,17 +303,7 @@ status collapsed \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. + will be parsed in ERT, since LyX does not support refstyle and prettyref natively at the same time. \end_layout \begin_layout Section @@ -636,6 +645,10 @@ status collapsed bibliography since LaTeX throws an error. \end_layout +\begin_layout Plain Layout + +\end_layout + \end_inset @@ -648,6 +661,10 @@ status collapsed bibliographystyle{unsrt} \end_layout +\begin_layout Plain Layout + +\end_layout + \end_inset @@ -695,6 +712,28 @@ key "gur+04" \begin_layout Bibliography +\begin_inset CommandInset bibitem +LatexCommand bibitem +label "Möstl et~al.(2010)" +key "Mostl2010" + +\end_inset + + Gürkan, M. +\begin_inset space ~ + +\end_inset + +A., Freitag, M., & Rasio, F. +\begin_inset space ~ + +\end_inset + +A. 2004, ApJ, 604, 632 +\end_layout + +\begin_layout Bibliography + \begin_inset CommandInset bibitem LatexCommand bibitem label "{{Gürkan et~al.}(2004)}" @@ -1402,11 +1441,12 @@ kill \begin_inset Caption Standard -\begin_layout Standard +\begin_layout Plain Layout \begin_inset Argument 1 status collapsed + \begin_layout Standard An optional table caption (used in the list of tables) \end_layout @@ -1483,11 +1523,12 @@ Second \begin_inset Caption Standard -\begin_layout Standard +\begin_layout Plain Layout \begin_inset Argument 1 status collapsed + \end_inset (continued) @@ -1556,19 +1597,9 @@ Second \begin_layout Standard -\begin_inset Caption LongTableNoNumber - -\begin_layout Standard - -\begin_inset Argument 1 -status collapsed - -\begin_layout Standard -An optional table foot caption (used in the list of tables) -\end_layout - -\end_inset +\begin_inset Caption Unnumbered +\begin_layout Plain Layout standard foot \end_layout @@ -1611,15 +1642,9 @@ bottom. \begin_layout Standard -\begin_inset Caption LongTableNoNumber - -\begin_layout Standard - -\begin_inset Argument 1 -status collapsed - -\end_inset +\begin_inset Caption Unnumbered +\begin_layout Plain Layout (last foot) \end_layout @@ -3110,7 +3135,8 @@ row \begin_inset Quotes erd \end_inset - of the table can take up several lines. Note however that TeX + of the table can take up several lines. Note however that \SpecialChar TeX + \begin_inset space \space{} \end_inset @@ -3437,17 +3463,7 @@ like this. \end_layout \begin_layout Standard -From bug 7412 another example with more captions (can currently not produced in -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout -LyX -\end_layout - -\end_inset - -): +From bug 7412 another example with more captions (can currently not produced in LyX): \begin_inset Tabular @@ -3461,7 +3477,7 @@ LyX \begin_inset Caption Standard -\begin_layout Standard +\begin_layout Plain Layout A long table \end_layout @@ -3486,8 +3502,8 @@ A long table \begin_inset Caption Standard -\begin_layout Standard -A long table -- continued +\begin_layout Plain Layout +A long table – continued \end_layout \end_inset @@ -4399,6 +4415,10 @@ status collapsed % some comment \end_layout +\begin_layout Plain Layout + +\end_layout + \end_inset @@ -4467,7 +4487,7 @@ status open \begin_inset Caption Standard -\begin_layout Standard +\begin_layout Plain Layout \begin_inset CommandInset label LatexCommand label @@ -4980,164 +5000,793 @@ in % of pixel size \end_layout -\begin_layout Section -Macros +\begin_layout Standard +A table using dcolumn: \end_layout \begin_layout Standard -\begin_inset ERT -status collapsed +\begin_inset Float table +wide false +sideways false +status open -\begin_layout Plain Layout -LyX -\end_layout -\end_inset +\begin_layout Standard - supports several kinds of macros: def -\begin_inset FormulaMacro -\def\macroa #1{a #1 a} -\end_inset +\begin_inset Tabular + + + + + + + + + +\begin_inset Text - global def -\begin_inset FormulaMacro -\def\macrob #1{b #1 b} -\end_inset +\begin_layout Standard +One +\end_layout - long def -\begin_inset FormulaMacro -\def\macroc #1{c #1 c} \end_inset + + +\begin_inset Text + +\begin_layout Standard +Two +\end_layout - global long def -\begin_inset FormulaMacro -\def\macrod #1{d #1 d} \end_inset + + +\begin_inset Text - providecommand -\begin_inset ERT -status collapsed +\begin_layout Standard -\begin_layout Plain Layout +\family roman +Three +\family default -\backslash -providecommand{ -\backslash -macroe}[1]{e #1 e} \end_layout \end_inset + + +\begin_inset Text - providecommand* -\begin_inset ERT -status collapsed +\begin_layout Standard -\begin_layout Plain Layout +\family roman +Four +\family default -\backslash -providecommand*{ -\backslash -macrof}[1]{f #1 f} \end_layout \end_inset + + +\begin_inset Text - newcommand -\begin_inset FormulaMacro -\newcommand{\macrog}[1]{g #1 g} -\end_inset +\begin_layout Standard + +\family roman +Five +\family default + +\end_layout - renewcommand -\begin_inset FormulaMacro -\renewcommand{\macrog}[1]{h #1 h} \end_inset + + + + +\begin_inset Text - newcommand* -\begin_inset ERT -status collapsed +\begin_layout Standard +one +\end_layout -\begin_layout Plain Layout +\end_inset + + +\begin_inset Text -\backslash -newcommand*{ -\backslash -macroi}[1]{i #1 i} +\begin_layout Standard +two \end_layout \end_inset + + +\begin_inset Text - renewcommand* -\begin_inset ERT -status collapsed +\begin_layout Standard -\begin_layout Plain Layout +\begin_inset Box Frameless +position "c" +hor_pos "c" +has_inner_box 1 +inner_pos "c" +use_parbox 0 +use_makebox 1 +width "" +special "none" +height "1in" +height_special "totalheight" +thickness "0.4pt" +separation "3pt" +shadowsize "4pt" +framecolor "black" +backgroundcolor "none" +status open -\backslash -renewcommand*{ -\backslash -macroi}[1]{j #1 j} + +\begin_layout Standard +three \end_layout \end_inset - providecommandx -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout -\backslash -providecommandx{ -\backslash -macrok}[1]{k #1 k} \end_layout \end_inset + + +\begin_inset Text - providecommandx* -\begin_inset ERT -status collapsed +\begin_layout Standard -\begin_layout Plain Layout +\begin_inset Box Frameless +position "c" +hor_pos "c" +has_inner_box 1 +inner_pos "c" +use_parbox 0 +use_makebox 1 +width "" +special "none" +height "1in" +height_special "totalheight" +thickness "0.4pt" +separation "3pt" +shadowsize "4pt" +framecolor "black" +backgroundcolor "none" +status open -\backslash -providecommandx*{ -\backslash -macrok}[1]{l #1 l} + +\begin_layout Standard +four \end_layout \end_inset - newcommandx -\begin_inset FormulaMacro -\newcommandx{\macrom}[1]{m #1 m} -\end_inset - renewcommandx -\begin_inset FormulaMacro -\renewcommandx{\macrom}[1]{n #1 n} +\end_layout + \end_inset + + +\begin_inset Text - newcommandx* -\begin_inset ERT -status collapsed +\begin_layout Standard -\begin_layout Plain Layout +\begin_inset Box Frameless +position "c" +hor_pos "c" +has_inner_box 1 +inner_pos "c" +use_parbox 0 +use_makebox 1 +width "" +special "none" +height "1in" +height_special "totalheight" +thickness "0.4pt" +separation "3pt" +shadowsize "4pt" +framecolor "black" +backgroundcolor "none" +status open -\backslash -newcommandx*{ -\backslash -macroo}[1]{o #1 o} + +\begin_layout Standard +five \end_layout \end_inset - renewcommandx* -\begin_inset ERT -status collapsed -\begin_layout Plain Layout +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Standard +He +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +2 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +2.77234 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +45672. +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +0.69 +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Standard +C +\begin_inset Foot +status collapsed + + +\begin_layout Standard +Some tables require footnotes. +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +C +\begin_inset Foot +status collapsed + + +\begin_layout Standard +Some tables need more than one footnote. +\end_layout + +\end_inset + + +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +12537.64 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +37.66345 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +86.37 +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +A table using decimal alignment: +\end_layout + +\begin_layout Standard + +\begin_inset Float table +wide false +sideways false +status open + + +\begin_layout Standard + +\begin_inset Tabular + + + + + + + + + + + + +\begin_inset Text + +\begin_layout Standard +One +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +Two +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +Three +\end_layout + +\end_inset + + +\begin_inset Text + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +Four +\end_layout + +\end_inset + + +\begin_inset Text + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +Five +\end_layout + +\end_inset + + +\begin_inset Text + +\end_inset + + + + +\begin_inset Text + +\begin_layout Standard +one +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +two +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +three +\end_layout + +\end_inset + + +\begin_inset Text + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +four +\end_layout + +\end_inset + + +\begin_inset Text + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +five +\end_layout + +\end_inset + + +\begin_inset Text + +\end_inset + + + + +\begin_inset Text + +\begin_layout Standard +He +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +2 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +2 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +77234 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +45672 +\end_layout + +\end_inset + + +\begin_inset Text + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +0 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +69 +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Standard +C +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +C +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +12537 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +64 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +37 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +66345 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +86 +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Standard +37 +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Section +Macros +\end_layout + +\begin_layout Standard +LyX supports several kinds of macros: def +\begin_inset FormulaMacro +\def\macroa #1{a #1 a} +\end_inset + + global def +\begin_inset FormulaMacro +\def\macrob #1{b #1 b} +\end_inset + + long def +\begin_inset FormulaMacro +\def\macroc #1{c #1 c} +\end_inset + + global long def +\begin_inset FormulaMacro +\def\macrod #1{d #1 d} +\end_inset + + providecommand +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + +\backslash +providecommand{ +\backslash +macroe}[1]{e #1 e} +\end_layout + +\end_inset + + providecommand* +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + +\backslash +providecommand*{ +\backslash +macrof}[1]{f #1 f} +\end_layout + +\end_inset + + newcommand +\begin_inset FormulaMacro +\newcommand{\macrog}[1]{g #1 g} +\end_inset + + renewcommand +\begin_inset FormulaMacro +\renewcommand{\macrog}[1]{h #1 h} +\end_inset + + newcommand* +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + +\backslash +newcommand*{ +\backslash +macroi}[1]{i #1 i} +\end_layout + +\end_inset + + renewcommand* +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + +\backslash +renewcommand*{ +\backslash +macroi}[1]{j #1 j} +\end_layout + +\end_inset + + providecommandx +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + +\backslash +providecommandx{ +\backslash +macrok}[1]{k #1 k} +\end_layout + +\end_inset + + providecommandx* +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + +\backslash +providecommandx*{ +\backslash +macrok}[1]{l #1 l} +\end_layout + +\end_inset + + newcommandx +\begin_inset FormulaMacro +\newcommandx{\macrom}[1]{m #1 m} +\end_inset + + renewcommandx +\begin_inset FormulaMacro +\renewcommandx{\macrom}[1]{n #1 n} +\end_inset + + newcommandx* +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout + +\backslash +newcommandx*{ +\backslash +macroo}[1]{o #1 o} +\end_layout + +\end_inset + + renewcommandx* +\begin_inset ERT +status collapsed + +\begin_layout Plain Layout \backslash renewcommandx*{ @@ -5565,17 +6214,7 @@ Special formattings \end_layout \begin_layout Subsection - -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout -LyX -\end_layout - -\end_inset - - line +LyX line \end_layout \begin_layout Standard @@ -5665,7 +6304,30 @@ height "1pt" \end_layout \begin_layout Subsection -rules +Rules +\end_layout + +\begin_layout Standard +test +\end_layout + +\begin_layout Standard + +\size tiny + +\begin_inset CommandInset line +LatexCommand rule +offset "0.5ex" +width "100line%" +height "1pt" + +\end_inset + + +\size default + +\size tiny + \end_layout \begin_layout Standard @@ -5763,7 +6425,7 @@ ow \begin_inset script superscript -\begin_layout Standard +\begin_layout Plain Layout Wow \end_layout @@ -5831,16 +6493,16 @@ TIPA e̥ e̊ e̬ e̤ ḛ e̼ e̪ e̺ e̻ e \begin_inset script superscript -\begin_layout Standard +\begin_layout Plain Layout h \end_layout \end_inset - e̹ e̜ e̟ e̠ e̠ ë e̽ e̩ e̩ e̯ e˞e + e̹ e̜ e̟ e̠ (don't mix up with e̱) ë e̽ e̩ e̩ e̯ e˞e \begin_inset script superscript -\begin_layout Standard +\begin_layout Plain Layout w \end_layout @@ -5849,7 +6511,7 @@ w e \begin_inset script superscript -\begin_layout Standard +\begin_layout Plain Layout j \end_layout @@ -5858,7 +6520,7 @@ j e \begin_inset script superscript -\begin_layout Standard +\begin_layout Plain Layout ɣ \end_layout @@ -5867,7 +6529,7 @@ j e \begin_inset script superscript -\begin_layout Standard +\begin_layout Plain Layout ʕ \end_layout @@ -5876,7 +6538,7 @@ j e̴ e̝ e̞ e̘ e̙ ẽ e \begin_inset script superscript -\begin_layout Standard +\begin_layout Plain Layout n \end_layout @@ -5885,7 +6547,7 @@ n e \begin_inset script superscript -\begin_layout Standard +\begin_layout Plain Layout l \end_layout @@ -6242,6 +6904,14 @@ TIPA code in math: \end_layout +\begin_layout Subsection +Other symbols +\end_layout + +\begin_layout Standard +All three should be converted to U+00C5: Å Å Å (not U+212B). All three should be converted to U+00E5: å å å. +\end_layout + \begin_layout Subsection Line breaks \begin_inset Index breaks @@ -6313,17 +6983,7 @@ linebreak[4] \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 - - +There are even newlines with weird arguments, but these are not handled by LyX \begin_inset ERT status collapsed @@ -6395,122 +7055,90 @@ Special characters \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 _&#${}%. +, \SpecialChar breakableslash +, \SpecialChar nobreakdash + and the characters that LaTeX 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 - - also supports a menu separator\SpecialChar \menuseparator -and a spif\SpecialChar \textcompwordmark{} +And what about special characters like hyphe\SpecialChar softhyphen +nation mark, ellipsis\SpecialChar ldots +, and end-of-sentence\SpecialChar endofsentence + LyX also supports a menu separator\SpecialChar menuseparator +and a spif\SpecialChar ligaturebreak fy ligature break. \end_layout \begin_layout Standard - -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout -LyX -\end_layout - -\end_inset - - translates the phrases +There are dashes: endash in short form – and long form –, emdash is alike: — and —. If we really want several hyphens in a row, we need to separate them: - \begin_inset ERT status collapsed \begin_layout Plain Layout -LyX +{} \end_layout \end_inset -, +-, - \begin_inset ERT status collapsed \begin_layout Plain Layout -TeX +{} \end_layout \end_inset -, +- \begin_inset ERT status collapsed \begin_layout Plain Layout -LaTeX +{} \end_layout \end_inset -2e and +-, - \begin_inset ERT status collapsed \begin_layout Plain Layout -LaTeX +{} \end_layout \end_inset - to the commands LyX, TeX, LaTeX2e and LaTeX. If these phrases occur as part of other words (like 1 +- \begin_inset ERT status collapsed \begin_layout Plain Layout -LyX +{} \end_layout \end_inset - or a +- \begin_inset ERT status collapsed \begin_layout Plain Layout -TeX +{} \end_layout \end_inset - or -\begin_inset ERT -status collapsed - -\begin_layout Plain Layout -LaTeX +- etc. \end_layout -\end_inset - -3) they should not be put into ERT. +\begin_layout Standard +LyX translates the phrases LyX, TeX, LaTeX2e and LaTeX to the commands \SpecialChar LyX +, \SpecialChar TeX +, \SpecialChar LaTeX2e + and \SpecialChar LaTeX +. If these phrases occur as part of other words (like 1LyX or aTeX or LaTeX3) they should not be put into ERT. \end_layout \begin_layout Standard @@ -6590,6 +7218,10 @@ status collapsed % and another \end_layout +\begin_layout Plain Layout + +\end_layout + \end_inset @@ -6609,7 +7241,7 @@ status collapsed A sub \begin_inset script subscript -\begin_layout Standard +\begin_layout Plain Layout sc \emph on ript @@ -6622,7 +7254,7 @@ ript and super \begin_inset script superscript -\begin_layout Standard +\begin_layout Plain Layout script with \begin_inset Formula $a^2+b^2=c^2$ \end_inset @@ -6669,6 +7301,19 @@ $ . \end_layout +\begin_layout Standard + +\begin_inset Formula \[ +\begin{array}{rclccc} +1 + 2 & = & 3 +\multicolumn{3}{c}{4 < 5 \leq 6 } +\end{array} +\] +\end_inset + + +\end_layout + \begin_layout Section Lists/Indices \end_layout