]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/test/test-refstyle-theorems.tex
Update tex2lyx test references
[lyx.git] / src / tex2lyx / test / test-refstyle-theorems.tex
1 %% LyX trick_preamble_code_into_believing_that_this_was_created_by_lyx created this file.  For more info, see http://www.lyx.org/.
2 %% Do not edit unless you really know what you are doing.
3 \documentclass[english]{book}
4 \usepackage[T1]{fontenc}
5 \usepackage[latin9]{inputenc}
6 \usepackage{refstyle}
7 \usepackage{float}
8 \usepackage{amsthm}
9
10 \makeatletter
11
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
13
14 \AtBeginDocument{\providecommand\partref[1]{\ref{part:#1}}}
15 \AtBeginDocument{\providecommand\chapref[1]{\ref{chap:#1}}}
16 \AtBeginDocument{\providecommand\secref[1]{\ref{sec:#1}}}
17 \AtBeginDocument{\providecommand\subref[1]{\ref{sub:#1}}}
18 \AtBeginDocument{\providecommand\parref[1]{\ref{par:#1}}}
19 \AtBeginDocument{\providecommand\figref[1]{\ref{fig:#1}}}
20 \AtBeginDocument{\providecommand\tabref[1]{\ref{tab:#1}}}
21 \AtBeginDocument{\providecommand\algref[1]{\ref{alg:#1}}}
22 \AtBeginDocument{\providecommand\fnref[1]{\ref{fn:#1}}}
23 \AtBeginDocument{\providecommand\enuref[1]{\ref{enu:#1}}}
24 \AtBeginDocument{\providecommand\eqref[1]{\ref{eq:#1}}}
25 \AtBeginDocument{\providecommand\lemref[1]{\ref{lem:#1}}}
26 \AtBeginDocument{\providecommand\thmref[1]{\ref{thm:#1}}}
27 \AtBeginDocument{\providecommand\corref[1]{\ref{cor:#1}}}
28 \AtBeginDocument{\providecommand\propref[1]{\ref{prop:#1}}}
29 \floatstyle{ruled}
30 \newfloat{algorithm}{tbp}{loa}[chapter]
31 \providecommand{\algorithmname}{Algorithm}
32 \floatname{algorithm}{\protect\algorithmname}
33 \RS@ifundefined{subref}
34   {\def\RSsubtxt{section~}\newref{sub}{name = \RSsubtxt}}
35   {}
36 \RS@ifundefined{thmref}
37   {\def\RSthmtxt{theorem~}\newref{thm}{name = \RSthmtxt}}
38   {}
39 \RS@ifundefined{lemref}
40   {\def\RSlemtxt{lemma~}\newref{lem}{name = \RSlemtxt}}
41   {}
42
43
44 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
45 \theoremstyle{plain}
46 \newtheorem{thm}{\protect\theoremname}
47 \theoremstyle{plain}
48 \newtheorem{lem}[thm]{\protect\lemmaname}
49 \theoremstyle{plain}
50 \newtheorem{cor}[thm]{\protect\corollaryname}
51 \theoremstyle{plain}
52 \newtheorem{prop}[thm]{\protect\propositionname}
53 \theoremstyle{plain}
54 \newtheorem{conjecture}[thm]{\protect\conjecturename}
55 \theoremstyle{plain}
56 \newtheorem{fact}[thm]{\protect\factname}
57 \theoremstyle{definition}
58 \newtheorem{defn}[thm]{\protect\definitionname}
59 \theoremstyle{definition}
60 \newtheorem{example}[thm]{\protect\examplename}
61 \theoremstyle{definition}
62 \newtheorem{problem}[thm]{\protect\problemname}
63 \theoremstyle{definition}
64 \newtheorem{xca}[thm]{\protect\exercisename}
65 \theoremstyle{remark}
66 \newtheorem{rem}[thm]{\protect\remarkname}
67 \theoremstyle{remark}
68 \newtheorem{claim}[thm]{\protect\claimname}
69 \ifx\proof\undefined
70 \newenvironment{proof}[1][\protect\proofname]{\par
71 \normalfont\topsep6\p@\@plus6\p@\relax
72 \trivlist
73 \itemindent\parindent
74 \item[\hskip\labelsep\scshape #1]\ignorespaces
75 }{%
76 \endtrivlist\@endpefalse
77 }
78 \providecommand{\proofname}{Proof}
79 \fi
80
81 \makeatother
82
83 \usepackage{babel}
84 \providecommand{\claimname}{Claim}
85 \providecommand{\conjecturename}{Conjecture}
86 \providecommand{\corollaryname}{Corollary}
87 \providecommand{\definitionname}{Definition}
88 \providecommand{\examplename}{Example}
89 \providecommand{\exercisename}{Exercise}
90 \providecommand{\factname}{Fact}
91 \providecommand{\lemmaname}{Lemma}
92 \providecommand{\problemname}{Problem}
93 \providecommand{\propositionname}{Proposition}
94 \providecommand{\remarkname}{Remark}
95 \providecommand{\theoremname}{Theorem}
96
97 \begin{document}
98
99 \part{part\label{part:part}}
100
101 \partref{part}
102
103
104 \chapter{chapter\label{chap:chapter}}
105
106 \chapref{chapter}
107
108
109 \section{Section\label{sec:Section}}
110
111 \secref{Section}
112
113
114 \subsection{Subsection\label{sub:subsection}}
115
116 Ref to \subref{subsection}.
117
118
119 \subsubsection{Subsubsection\label{sub:Subsubsection}}
120
121 Ref to \subref{Subsubsection}.
122
123
124 \paragraph{paragraph\label{par:paragraph}}
125
126 \parref{paragraph}
127
128
129 \subparagraph{subparagraph\label{par:subparagraph}}
130
131 \parref{subparagraph}
132
133 \begin{figure}
134 \protect\caption{figure\label{fig:figure}}
135 \end{figure}
136
137
138 \figref{figure}
139
140 \begin{table}
141 \protect\caption{table\label{tab:table}}
142 \end{table}
143
144
145 \tabref{table}
146
147 \begin{algorithm}
148 \protect\caption{algorithm\label{alg:algorithm}}
149 \end{algorithm}
150
151
152 \algref{algorithm}
153
154 \footnote{foot\label{fn:foot}%
155 }
156
157 \fnref{foot}
158
159 \marginpar{margin\label{margin}}
160
161 \ref{margin}
162 \begin{enumerate}
163 \item item\label{enu:item}
164 \end{enumerate}
165 \enuref{item}
166
167 \begin{equation}
168 A=B\label{eq:A=00003DB}
169 \end{equation}
170
171
172 \eqref{A=00003DB}
173 \begin{lem}
174 lemma\label{lem:lemma}
175
176 \lemref{lemma}\end{lem}
177 \begin{thm}
178 theorem\label{thm:theorem}
179
180 \thmref{theorem}\end{thm}
181 \begin{cor}
182 corollary\label{cor:corollary}
183
184 \corref{corollary}\end{cor}
185 \begin{prop}
186 proposition\label{prop:proposition}
187
188 \propref{proposition}\end{prop}
189 \begin{conjecture}
190 conjecture\label{conjecture}
191
192 \ref{conjecture}\end{conjecture}
193 \begin{fact}
194 fact\label{fact}
195
196 \ref{fact}\end{fact}
197 \begin{defn}
198 definition\label{definition}
199
200 \ref{definition}\end{defn}
201 \begin{example}
202 example\label{example}
203
204 \ref{example}\end{example}
205 \begin{problem}
206 problem\label{problem}
207
208 \ref{problem}\end{problem}
209 \begin{xca}
210 exercise\label{exercise}
211
212 \ref{exercise}\end{xca}
213 \begin{rem}
214 remark\label{remark}
215
216 \ref{remark}\end{rem}
217 \begin{claim}
218 claim\label{claim}
219
220 \ref{claim}\end{claim}
221 \begin{proof}
222 proof\label{proof}
223
224 \ref{proof}\end{proof}
225
226 \end{document}