]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/test/test-insets.tex
Fix some texl2yx accent bugs
[lyx.git] / src / tex2lyx / test / test-insets.tex
index 71a16802536977cf91d4b5604308ef870e911ce3..0feb452c06cf961b5a3c4e2e2fedd130d61b5325 100644 (file)
 \providecommand{\makenomenclature}{\makeglossary}
 \makenomenclature
 \usepackage{varioref}
-\usepackage{prettyref}
-\usepackage{makeidx}
 \usepackage{splitidx}
 \makeindex
-
+\newindex[Index]{idx}
+\newindex[new]{new}
+\newindex{test}
 \usepackage{graphicx}
 \usepackage{longtable}
 \usepackage{xargs}
 \usepackage{subscript}
+\usepackage{rotating}
+\usepackage{listings}
+\usepackage{hyperref}
+\usepackage{array}
+\usepackage{booktabs}
+\usepackage{multirow}
+\usepackage{hhline}
+\usepackage{pdfpages}
+\usepackage{textcomp}
+\usepackage{amssymb}
+\usepackage{color}
+\usepackage[ps,mover]{lyxskak}
+\usepackage{tipa}
+\usepackage{tipx}
+\usepackage{tone}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
 \providecommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
 
+% 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}}}
+\usepackage{prettyref}
+
 \def\mycommand{\textquestiondown}
 
 \begin{document}
 
+\title{Title}
+
+\date %stupid stuff
+{two days ago}
+
+\maketitle
+
 \tableofcontents
 \lstlistoflistings
 
@@ -59,6 +87,8 @@ reference~\pageref{lab:test}, but also equation
 reference~\eqref{lab:test} (from amsmath package), or varioref's
 equivalents~\vref{lab:test} and~\vpageref{lab:test}, without
 forgetting pretty references like~\prettyref{lab:test}.
+The command \secref{lab:test} will be parsed in ERT, since LyX
+does not support refstyle and prettyref natively at the same time.
 
 \section{Cites\index{Cites}}
 
@@ -116,7 +146,16 @@ M., \& Rasio, F.~A. 2004, ApJ, 604, 632\end{thebibliography}
 \section{Input files\index{Input files}}
 
 We can input files too, like this \input{DummyDocument}, or with the include
-variant \include{DummyDocument} % unfortunately, including the doc twice generates a multiply defined label
+variant (tests quoting as well):
+\include{\string"Dummy\space Document\string"}
+\include{\string"Dummy Document\string".tex}
+\include{\string"Dummy\string~Document\string"}
+\include{\string"Dummy\string~Document\string".tex}
+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).
+\include{\string"Dummy\string"Document\string".tex}
 
 We can also import chess diagrams:
 
@@ -124,7 +163,11 @@ We can also import chess diagrams:
 
 Spreadsheets:
 
-\def\inputGnumericTable{}\input{../../../lib/examples/longsheet.gnumeric}
+\def\inputGnumericTable{}\input{../../../lib/examples/longsheet.tex}
+
+XFig drawings:
+
+\input{xfigtest.pstex_t}
 
 and PDF pages:
 
@@ -138,6 +181,8 @@ between~\verbatiminput{foo} or~\verbatiminput*{foo}.
 
 An URL: \url{http://www.lyx.org} \nomenclature{URL2}{uniform resource locator}
 
+An URL with strange characters: \url{http://www.lyx.org/percent%dollar$}
+
 link:\href{http://www.test.test}{www.test.test}
 
 link2:\href{http://www.test.test}{http://www.test.test}
@@ -150,6 +195,10 @@ ftp:\href{ftp://www.test.test}{ftp://www.test.test}
 
 ftp2:\href{ftp://www.test.test}{www.test.test}
 
+parser test (stupid, but valid):\href{http://www.test.test}{\}}
+
+parser test (escaped):\href{http://www.test.test}{a brace \} and another one \{ and something}
+
 
 \section{Lists\index{Lists}}
 
@@ -159,7 +208,7 @@ ftp2:\href{ftp://www.test.test}{www.test.test}
 
 \section{Listings}
 
-Inline: \lstinline[language={C++}]!int a=5;!\\
+Inline: \lstinline[language={C++},keywordstyle={\color{green}}]!int a=5;!\\
 Float:
 
 \begin{lstlisting}[caption={Example Listing float},label={lst:Example-Listing},language=Python]
@@ -368,7 +417,7 @@ A table*:
 \begin{tabular*} % some comment
 {0.8\columnwidth}[b]{lr}
 two\\
-lonely&lines
+\begin{turn}{-50}lonely\end{turn}&\begin{sideways}lines\end{sideways}
 \end{tabular*}
 
 A booktabs table:
@@ -477,6 +526,76 @@ test\phantom{\textcolor{green}{W}\mathbf{ow}\textsuperscript{Wow}}test
 $test\vphantom{Wow\&\%}test$
 
 
+\subsection{TIPA}
+
+\begin{IPA}
+\textsubring{e}
+\r{e}
+\textsubwedge{e}
+\textsubumlaut{e}
+\textsubtilde{e}
+\textseagull{e}
+\textsubbridge{e}
+\textinvsubbridge{e}
+\textsubsquare{e}
+e\textsuperscript{h}
+\textsubrhalfring{e}
+\textsublhalfring{e}
+\textsubplus{e}
+\=*{e}
+\b{e}
+\"{e}
+\textovercross{e}
+\s{e}
+\textsyllabic{e}
+\textsubarch{e}
+e\textrhoticity
+e\textsuperscript{w}
+e\textsuperscript{j}
+e\textsuperscript{\textgamma}
+e\textsuperscript{\textrevglotstop}
+\textsuperimposetilde{e}
+\textraising{e}
+\textlowering{e}
+\textadvancing{e}
+\textretracting{e}
+\~{e}
+e\textsuperscript{n}
+e\textsuperscript{l}
+e\textcorner{}
+\H{e}
+
+\`{e}
+\={e}
+\'{e}
+\textdoublegrave{e}
+\v{e}
+\^{e}
+\texthighrise{e}
+\textlowrise{e}
+\textrisefall{e}
+\u{e}
+\end{IPA}
+
+\textipa{pbtd\:t\:dc\textbardotlessj k\textscriptg q\;G}
+\textipa{PmMn\:n\textltailn N\;N\;Br\;RR}
+\textipa{\:rFBfvTDszSZ\:s}
+\textipa{\:zçJxGXK\textcrh QhH\textbeltl{}}
+\textipa{\textlyoghlig V\*r\:Rh\textturnmrleg l\:lL\;L}
+
+\textipa{\!o|!\textdoublebarpipe ||\!b\!d\!j\!g\!Ge'}
+
+\textipa{iy1\textbaru W\textcolor{red}{uIY}Ueø987o@E½3\textcloserevepsilon 2Oæ5a\textscoelig A6}
+
+\textipa{\*ww4\;H\textbarrevglotstop\textbarglotstop C\textctz\textturnlonglegr\texththeng \texttoptiebar{ar}\textbottomtiebar{tz}}
+
+\textipa{:;e\textprimstress\textsecstress \textvertline{}\textdoublevertline{}.\t*{ }}
+
+\textipa{\tone{55}\tone{44}\tone{33}\tone{22}\tone{11}\textdownstep\textupstep \tone{15}\tone{51}\tone{45}\tone{12}\tone{454}\textglobrise \textglobfall{}}
+
+TIPA code in math:
+$\textipa{\tone{55}|\text{\!b{}\!d{}\!g{}\!G{}\textglobfall{}\textvertline{}\textdoublevertline{}}}$
+
 \subsection{Line breaks\sindex[breaks]{Line breaks}}
 
 They can also or be broken by a newline\\
@@ -499,6 +618,7 @@ or by a page break \pagebreak
 or by a defined page break \pagebreak % again with a comment
        [4]
 
+
 \section{Special characters\index{Special characters}}
 
 Then one has those macros with a long name for a short meaning, like
@@ -528,12 +648,77 @@ builtin \textasciicircum % with a comment
 A sub\textsubscript{sc\emph{ript}} and super\textsuperscript{script
 with $a^2+b^2=c^2$ math}.
 
+
+\section{Mathematics\index{Mathematics}}
+
+Let $f:\left[  a,b\right]  \rightarrow%
+%TCIMACRO{\U{211d} }%
+%BeginExpansion
+\mathbb{R}
+%EndExpansion
+$.
+
+
+\section{Lists/Indices}
+
+single \textbackslash{}addcontentsline: \addcontentsline{toc}{section}{test}
+
+with \textbackslash{}addcontentsline and \textbackslash{}phantomsection:
+
+\bibliographystyle{test}
+\phantomsection\addcontentsline{toc}{section}{\refname}\bibliography{xampl}
+
+
+normal:
+
+\bibliographystyle{test}
+\bibliography{xampl}
+
+
+with wrong \textbackslash{}addcontentsline:
+
+\bibliographystyle{test} \addcontentsline{toc}{section}{test} \bibliographystyle{test}
+\bibliography{xampl}
+
+
+with \textbackslash{}addcontentsline and \textbackslash{}nocite\{{*}\}:
+
+\bibliographystyle{test}
+\addcontentsline{toc}{section}{\refname}\nocite{*}
+\bibliography{xampl}
+
+
+undefined index:
+
 \printindex{}
 
+index "idx":
+
+\printindex[idx]{}
+
+index "new":
+
+\printindex[new]{}
+
+subindex "new":
+
+\printsubindex[idx]{}
+
+index of all indices:
+
+\printindex*{}
+
+subindex of all indices:
+
+\printsubindex*{}
+
+normal nomenclature:
+
 \printnomenclature hello
 
-\settowidth{\nomlabelwidth}{URL2}
-\printnomenclature{}
+manually set width: \settowidth{\nomlabelwidth}{URL2} \printnomenclature{}
+
+nomenclature with set width:
 
 \printnomenclature[0.02\linewidth]{}