]> git.lyx.org Git - features.git/blob - autotests/mathmacros/masterOfSpace.lyx
Regression test for cprotect, #7116
[features.git] / autotests / mathmacros / masterOfSpace.lyx
1 #LyX 2.2 created this file. For more info see http://www.lyx.org/
2 \lyxformat 503
3 \begin_document
4 \begin_header
5 \origin unavailable
6 \textclass article
7 \use_default_options false
8 \maintain_unincluded_children false
9 \language english
10 \language_package default
11 \inputencoding auto
12 \fontencoding global
13 \font_roman "default" "default"
14 \font_sans "default" "default"
15 \font_typewriter "default" "default"
16 \font_math "auto" "auto"
17 \font_default_family default
18 \use_non_tex_fonts false
19 \font_sc false
20 \font_osf false
21 \font_sf_scale 100 100
22 \font_tt_scale 100 100
23 \graphics default
24 \default_output_format default
25 \output_sync 0
26 \bibtex_command default
27 \index_command default
28 \paperfontsize default
29 \use_hyperref false
30 \papersize default
31 \use_geometry false
32 \use_package amsmath 1
33 \use_package amssymb 1
34 \use_package cancel 1
35 \use_package esint 1
36 \use_package mathdots 0
37 \use_package mathtools 1
38 \use_package mhchem 1
39 \use_package stackrel 1
40 \use_package stmaryrd 1
41 \use_package undertilde 1
42 \cite_engine basic
43 \cite_engine_type default
44 \biblio_style plain
45 \use_bibtopic false
46 \use_indices false
47 \paperorientation portrait
48 \suppress_date false
49 \justification true
50 \use_refstyle 0
51 \index Index
52 \shortcut idx
53 \color #008000
54 \end_index
55 \secnumdepth 3
56 \tocdepth 3
57 \paragraph_separation indent
58 \paragraph_indentation default
59 \quotes_language english
60 \papercolumns 1
61 \papersides 1
62 \paperpagestyle default
63 \tracking_changes false
64 \html_math_output 0
65 \html_css_as_file 0
66 \output_changes false
67 \html_be_strict false
68 \end_header
69
70 \begin_body
71
72 \begin_layout Title
73 Child and Master Testcases
74 \end_layout
75
76 \begin_layout Standard
77 This is the master.
78  Let's define some macros: 
79 \begin_inset FormulaMacro
80 \newcommand{\foo}{A}
81 \end_inset
82
83
84 \begin_inset FormulaMacro
85 \newcommand{\fooo}{B}
86 \end_inset
87
88
89 \begin_inset FormulaMacro
90 \newcommand{\foooo}{C}
91 \end_inset
92
93
94 \begin_inset Formula 
95 \begin{eqnarray*}
96  & \foo\mbox{ should be }A\\
97  & \fooo\mbox{ should be }B\\
98  & \foooo\mbox{ should be }C
99 \end{eqnarray*}
100
101 \end_inset
102
103
104 \end_layout
105
106 \begin_layout Section
107 Child Document
108 \end_layout
109
110 \begin_layout Standard
111 \begin_inset CommandInset include
112 LatexCommand input
113 filename "Spacechild1.lyx"
114
115 \end_inset
116
117
118 \end_layout
119
120 \begin_layout Standard
121 Now back in the master:
122 \begin_inset Formula 
123 \[
124 \foo\mbox{ should be }A1
125 \]
126
127 \end_inset
128
129
130 \end_layout
131
132 \begin_layout Standard
133 Let's redefine it again.
134  
135 \begin_inset FormulaMacro
136 \renewcommand{\foo}{AA}
137 \end_inset
138
139
140 \begin_inset Formula 
141 \[
142 \foo\mbox{ should be \foo}
143 \]
144
145 \end_inset
146
147
148 \end_layout
149
150 \begin_layout Section
151 Same Child Document embedded again
152 \end_layout
153
154 \begin_layout Standard
155 \begin_inset CommandInset include
156 LatexCommand input
157 filename "Spacechild1.lyx"
158
159 \end_inset
160
161
162 \end_layout
163
164 \begin_layout Standard
165 Back in the master:
166 \begin_inset Formula 
167 \[
168 \foo\mbox{ should be }A1
169 \]
170
171 \end_inset
172
173
174 \end_layout
175
176 \begin_layout Standard
177 Let's redefine it once again: 
178 \begin_inset FormulaMacro
179 \renewcommand{\foo}{AAA}
180 \end_inset
181
182
183 \begin_inset Formula 
184 \[
185 \foo\mbox{ should be }AAA
186 \]
187
188 \end_inset
189
190
191 \end_layout
192
193 \begin_layout Section
194 A Child Document with another Child Document
195 \end_layout
196
197 \begin_layout Standard
198 \begin_inset CommandInset include
199 LatexCommand input
200 filename "Spacechild2.lyx"
201
202 \end_inset
203
204
205 \end_layout
206
207 \begin_layout Standard
208 Back in the master:
209 \begin_inset Formula 
210 \[
211 \foo\mbox{ should be }A3
212 \]
213
214 \end_inset
215
216
217 \end_layout
218
219 \begin_layout Standard
220 And finally overwriting it a last time: 
221 \begin_inset FormulaMacro
222 \renewcommand{\foo}{AAAA}
223 \end_inset
224
225
226 \begin_inset Formula 
227 \[
228 \foo\mbox{ should be }AAAA
229 \]
230
231 \end_inset
232
233
234 \end_layout
235
236 \begin_layout Section
237 A Child Document inside of font changes
238 \end_layout
239
240 \begin_layout Standard
241 This is 
242 \emph on
243
244 \begin_inset Quotes eld
245 \end_inset
246
247 input
248 \begin_inset Quotes erd
249 \end_inset
250
251 ed
252 \emph default
253  without font change: 
254 \begin_inset CommandInset include
255 LatexCommand input
256 filename "Spacechild1.lyx"
257
258 \end_inset
259
260
261 \begin_inset Formula 
262 \[
263 \foo\mbox{ should be }A1.
264 \]
265
266 \end_inset
267
268
269 \end_layout
270
271 \begin_layout Standard
272 \begin_inset FormulaMacro
273 \renewcommand{\foo}{AAAA}
274 \end_inset
275
276
277 \end_layout
278
279 \begin_layout Standard
280 This is 
281 \emph on
282 included
283 \emph default
284  with a 
285 \series bold
286 font change: 
287 \begin_inset CommandInset include
288 LatexCommand include
289 filename "Spacechild1.lyx"
290
291 \end_inset
292
293
294 \end_layout
295
296 \begin_layout Standard
297 Back in master:
298 \begin_inset Formula 
299 \[
300 \foo\mbox{ should be }A1.
301 \]
302
303 \end_inset
304
305
306 \end_layout
307
308 \begin_layout Standard
309 \begin_inset FormulaMacro
310 \renewcommand{\foo}{AAAA}
311 \end_inset
312
313
314 \end_layout
315
316 \begin_layout Standard
317 This is 
318 \emph on
319
320 \begin_inset Quotes eld
321 \end_inset
322
323 input
324 \begin_inset Quotes erd
325 \end_inset
326
327 ed
328 \emph default
329  with a 
330 \series bold
331 font change: 
332 \begin_inset CommandInset include
333 LatexCommand input
334 filename "Spacechild1.lyx"
335
336 \end_inset
337
338
339 \end_layout
340
341 \begin_layout Standard
342 Back in master:
343 \begin_inset Formula 
344 \[
345 \foo\mbox{ should be }A1.
346 \]
347
348 \end_inset
349
350
351 \end_layout
352
353 \begin_layout Standard
354 \begin_inset FormulaMacro
355 \renewcommand{\foo}{AAAA}
356 \end_inset
357
358
359 \end_layout
360
361 \begin_layout Standard
362 \begin_inset Box Frameless
363 position "t"
364 hor_pos "c"
365 has_inner_box 1
366 inner_pos "t"
367 use_parbox 0
368 use_makebox 0
369 width "100col%"
370 special "none"
371 height "1in"
372 height_special "totalheight"
373 thickness "0.4pt"
374 separation "3pt"
375 shadowsize "4pt"
376 framecolor "black"
377 backgroundcolor "none"
378 status open
379
380 \begin_layout Plain Layout
381
382 \series bold
383 \begin_inset CommandInset include
384 LatexCommand include
385 filename "Spacechild1.lyx"
386
387 \end_inset
388
389
390 \end_layout
391
392 \end_inset
393
394
395 \end_layout
396
397 \begin_layout Standard
398 \begin_inset Formula 
399 \[
400 \foo\mbox{ should be }A1
401 \]
402
403 \end_inset
404
405
406 \end_layout
407
408 \begin_layout Standard
409 \begin_inset FormulaMacro
410 \renewcommand{\foo}{AAAA}
411 \end_inset
412
413 A macro inside of 
414 \series bold
415 bold 
416 \begin_inset FormulaMacro
417 \renewcommand{\foo}{BBBB}
418 \end_inset
419
420  text
421 \series default
422 .
423 \begin_inset Formula 
424 \[
425 \foo\mbox{ should }BBBB
426 \]
427
428 \end_inset
429
430
431 \end_layout
432
433 \end_body
434 \end_document