]> git.lyx.org Git - lyx.git/blob - lib/examples/Braille.lyx
Avoid processing multiple times the same paragraph when converting latex arguments.
[lyx.git] / lib / examples / Braille.lyx
1 #LyX 2.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 474
3 \begin_document
4 \begin_header
5 \textclass article
6 \begin_preamble
7 % color greyed-out notes blue
8 \renewenvironment{lyxgreyedout}
9  {\textcolor{blue}\bgroup}{\egroup}
10 \end_preamble
11 \use_default_options false
12 \begin_modules
13 braille
14 \end_modules
15 \maintain_unincluded_children false
16 \language english
17 \language_package default
18 \inputencoding utf8
19 \fontencoding global
20 \font_roman default
21 \font_sans default
22 \font_typewriter default
23 \font_math auto
24 \font_default_family default
25 \use_non_tex_fonts false
26 \font_sc false
27 \font_osf false
28 \font_sf_scale 100
29 \font_tt_scale 100
30 \graphics default
31 \default_output_format default
32 \output_sync 0
33 \bibtex_command default
34 \index_command default
35 \paperfontsize default
36 \spacing single
37 \use_hyperref true
38 \pdf_title "How to write Braille with LyX"
39 \pdf_author "Uwe Stöhr"
40 \pdf_bookmarks false
41 \pdf_bookmarksnumbered false
42 \pdf_bookmarksopen false
43 \pdf_bookmarksopenlevel 1
44 \pdf_breaklinks false
45 \pdf_pdfborder false
46 \pdf_colorlinks true
47 \pdf_backref false
48 \pdf_pdfusetitle false
49 \pdf_quoted_options "pdfstartview=XYZ"
50 \papersize default
51 \use_geometry true
52 \use_package amsmath 1
53 \use_package amssymb 1
54 \use_package cancel 0
55 \use_package esint 1
56 \use_package mathdots 1
57 \use_package mathtools 0
58 \use_package mhchem 1
59 \use_package stackrel 0
60 \use_package stmaryrd 0
61 \use_package undertilde 0
62 \cite_engine basic
63 \cite_engine_type default
64 \biblio_style plain
65 \use_bibtopic false
66 \use_indices false
67 \paperorientation portrait
68 \suppress_date false
69 \justification true
70 \use_refstyle 0
71 \index Index
72 \shortcut idx
73 \color #008000
74 \end_index
75 \leftmargin 2.5cm
76 \rightmargin 2.5cm
77 \secnumdepth 3
78 \tocdepth 3
79 \paragraph_separation skip
80 \defskip medskip
81 \quotes_language english
82 \papercolumns 1
83 \papersides 1
84 \paperpagestyle default
85 \tracking_changes false
86 \output_changes false
87 \html_math_output 0
88 \html_css_as_file 0
89 \html_be_strict false
90 \end_header
91
92 \begin_body
93
94 \begin_layout Title
95 How to write Braille with LyX
96 \end_layout
97
98 \begin_layout Author
99 Uwe Stöhr
100 \end_layout
101
102 \begin_layout Standard
103 First a general note: The Braille you can create with LaTeX is not complete!
104  Braille can have 6 or 8
105 \begin_inset space \thinspace{}
106 \end_inset
107
108 dots, while LaTeX (and therefore LyX) only supports only 6
109 \begin_inset space \thinspace{}
110 \end_inset
111
112 dot Braille without accented characters.
113 \end_layout
114
115 \begin_layout Standard
116 To write Braille with LyX, load the module 
117 \family sans
118 Braille
119 \family default
120  in the document settings under 
121 \family sans
122 Modules
123 \family default
124 .
125  Now select the environment 
126 \family sans
127 Braille
128 \begin_inset space ~
129 \end_inset
130
131 (default)
132 \family default
133  or 
134 \family sans
135 Braille
136 \begin_inset space ~
137 \end_inset
138
139 (textsize)
140 \family default
141  from LyX's environment selection box and write your text.
142  The other Braille environments are only turn on/off some properties as
143  described below; keep them empty!
144 \end_layout
145
146 \begin_layout Standard
147 Here is an example:
148 \begin_inset Newline newline
149 \end_inset
150
151
152 \begin_inset CommandInset line
153 LatexCommand rule
154 offset "0.5ex"
155 width "100line%"
156 height "1pt"
157
158 \end_inset
159
160
161 \end_layout
162
163 \begin_layout Standard
164 with Latin letters:
165 \begin_inset Newline newline
166 \end_inset
167
168 This is an example sentence written in Braille.
169 \end_layout
170
171 \begin_layout Standard
172 with Braille letters:
173 \end_layout
174
175 \begin_layout Braille (default)
176 This is an example sentence written in Braille.
177 \end_layout
178
179 \begin_layout Standard
180 \noindent
181 \begin_inset CommandInset line
182 LatexCommand rule
183 offset "0.5ex"
184 width "100line%"
185 height "1pt"
186
187 \end_inset
188
189
190 \end_layout
191
192 \begin_layout Standard
193 \begin_inset VSpace bigskip
194 \end_inset
195
196 You can see that LaTeX is not able to hyphenate words written in Braille;
197  you have to do this manually.
198 \end_layout
199
200 \begin_layout Standard
201 \begin_inset VSpace bigskip
202 \end_inset
203
204
205 \begin_inset Note Greyedout
206 status open
207
208 \begin_layout Plain Layout
209
210 \series bold
211 Note:
212 \series default
213  Only Latin letters, numbers, punctuations, parentheses, and brackets can
214  be printed in Braille.
215  Special characters like 
216 \begin_inset Quotes eld
217 \end_inset
218
219 @
220 \begin_inset Quotes erd
221 \end_inset
222
223 , or 
224 \begin_inset Quotes eld
225 \end_inset
226
227 $
228 \begin_inset Quotes erd
229 \end_inset
230
231 , accented characters like umlauts, as well as line breaks are not supported.
232 \end_layout
233
234 \end_inset
235
236
237 \end_layout
238
239 \begin_layout Standard
240 \begin_inset VSpace bigskip
241 \end_inset
242
243
244 \begin_inset Note Greyedout
245 status open
246
247 \begin_layout Plain Layout
248
249 \series bold
250 Note:
251 \series default
252  LyX's and LaTeX's proper names 
253 \begin_inset Quotes eld
254 \end_inset
255
256 LaTeX
257 \begin_inset Quotes erd
258 \end_inset
259
260
261 \begin_inset Quotes eld
262 \end_inset
263
264 LaTeX2e
265 \begin_inset Quotes erd
266 \end_inset
267
268
269 \begin_inset Quotes eld
270 \end_inset
271
272 TeX
273 \begin_inset Quotes erd
274 \end_inset
275
276 , and 
277 \begin_inset Quotes eld
278 \end_inset
279
280 LyX
281 \begin_inset Quotes erd
282 \end_inset
283
284  must be inserted as TeX code like in the following example:
285 \end_layout
286
287 \end_inset
288
289
290 \end_layout
291
292 \begin_layout Standard
293 \noindent
294 \begin_inset CommandInset line
295 LatexCommand rule
296 offset "0.5ex"
297 width "100line%"
298 height "1pt"
299
300 \end_inset
301
302
303 \end_layout
304
305 \begin_layout Standard
306 Latin: 
307 \begin_inset ERT
308 status collapsed
309
310 \begin_layout Plain Layout
311
312 LyX
313 \end_layout
314
315 \end_inset
316
317  is cool!
318 \begin_inset Newline newline
319 \end_inset
320
321 Braille:
322 \end_layout
323
324 \begin_layout Braille (default)
325 \begin_inset ERT
326 status collapsed
327
328 \begin_layout Plain Layout
329
330 LyX
331 \end_layout
332
333 \end_inset
334
335  is cool!
336 \end_layout
337
338 \begin_layout Standard
339 \noindent
340 \begin_inset CommandInset line
341 LatexCommand rule
342 offset "0.5ex"
343 width "100line%"
344 height "1pt"
345
346 \end_inset
347
348
349 \end_layout
350
351 \begin_layout Standard
352 Here is an overview about the different Braille environments using the example
353  text 
354 \begin_inset Quotes eld
355 \end_inset
356
357 This is Braille.
358 \begin_inset Quotes erd
359 \end_inset
360
361
362 \end_layout
363
364 \begin_layout Standard
365 \begin_inset VSpace bigskip
366 \end_inset
367
368
369 \family sans
370 Braille
371 \begin_inset space ~
372 \end_inset
373
374 (default)
375 \family default
376 :
377 \end_layout
378
379 \begin_layout Braille (default)
380 This is Braille.
381 \end_layout
382
383 \begin_layout Standard
384
385 \family sans
386 Braille
387 \begin_inset space ~
388 \end_inset
389
390 (textsize)
391 \family default
392  - size that approximately matches the document's text size:
393 \end_layout
394
395 \begin_layout Braille (textsize)
396 This is Braille.
397 \end_layout
398
399 \begin_layout Standard
400 \begin_inset VSpace bigskip
401 \end_inset
402
403
404 \family sans
405 Braille
406 \begin_inset space ~
407 \end_inset
408
409 (dots on)
410 \family default
411  - tiny dots can be displayed at empty positions:
412 \end_layout
413
414 \begin_layout Braille (dots on)
415
416 \end_layout
417
418 \begin_layout Braille (textsize)
419 This is Braille.
420 \end_layout
421
422 \begin_layout Standard
423 \begin_inset VSpace bigskip
424 \end_inset
425
426 Text can be printed mirror-inverted for embossing the Braille by hand with
427  a needle or another suitable device:
428 \end_layout
429
430 \begin_layout Standard
431 Normal:
432 \end_layout
433
434 \begin_layout Braille (default)
435 This is Braille.
436 \end_layout
437
438 \begin_layout Standard
439
440 \family sans
441 Braille
442 \begin_inset space ~
443 \end_inset
444
445 (mirror on)
446 \family default
447 :
448 \end_layout
449
450 \begin_layout Braille (mirror on)
451
452 \end_layout
453
454 \begin_layout Braille (default)
455 This is Braille.
456 \end_layout
457
458 \begin_layout Braille (mirror off)
459
460 \end_layout
461
462 \begin_layout Standard
463 \begin_inset VSpace bigskip
464 \end_inset
465
466 Braille characters can alternatively be created by writing a number to a
467  Braille box.
468  A Braille box is inserted with the menu
469 \family sans
470  Insert\SpecialChar \menuseparator
471 Custom
472 \begin_inset space ~
473 \end_inset
474
475 insets
476 \family default
477 .
478  Every number in this box turns on the corresponding Braille dot.
479  For example, the number
480 \series bold
481  6145
482 \series default
483  results in:
484 \begin_inset Newline newline
485 \end_inset
486
487
488 \begin_inset Flex Braillebox
489 status open
490
491 \begin_layout Plain Layout
492 6145
493 \end_layout
494
495 \end_inset
496
497
498 \end_layout
499
500 \begin_layout Standard
501 \begin_inset VSpace bigskip
502 \end_inset
503
504 Computer Braille that uses 8
505 \begin_inset space \thinspace{}
506 \end_inset
507
508 dots can be turned on with the command
509 \series bold
510  
511 \backslash
512 brailleeightdotstrue
513 \series default
514 .
515  But the two extra dots are only printed when using a Braille box.
516  For example, the number 
517 \series bold
518 8175
519 \series default
520  in a Braille box results in:
521 \begin_inset Newline newline
522 \end_inset
523
524
525 \begin_inset ERT
526 status collapsed
527
528 \begin_layout Plain Layout
529
530
531 \backslash
532 brailleeightdotstrue 
533 \end_layout
534
535 \end_inset
536
537  
538 \begin_inset Flex Braillebox
539 status open
540
541 \begin_layout Plain Layout
542 8175
543 \end_layout
544
545 \end_inset
546
547  
548 \begin_inset ERT
549 status collapsed
550
551 \begin_layout Plain Layout
552
553
554 \backslash
555 brailleeightdotsfalse 
556 \end_layout
557
558 \end_inset
559
560
561 \end_layout
562
563 \begin_layout Standard
564 \begin_inset VSpace bigskip
565 \end_inset
566
567 The size of the default Braille font can be changed by the length 
568 \series bold
569
570 \backslash
571 brailleunit
572 \series default
573 .
574  Its default value is 2.4
575 \begin_inset space \thinspace{}
576 \end_inset
577
578 mm.
579  To get e.
580 \begin_inset space \thinspace{}
581 \end_inset
582
583 g.
584 \begin_inset space \space{}
585 \end_inset
586
587 double-sized Braille use this command in TeX code in your document:
588 \end_layout
589
590 \begin_layout Standard
591
592 \series bold
593
594 \backslash
595 renewcommand{
596 \backslash
597 braillenormal}[1]
598 \begin_inset Newline newline
599 \end_inset
600
601
602 \begin_inset space ~
603 \end_inset
604
605 {
606 \backslash
607 setlength{
608 \backslash
609 brailleunit}{4.8mm}
610 \backslash
611 braille{#1}}
612 \end_layout
613
614 \begin_layout Standard
615 Double-sized Braille:
616 \begin_inset ERT
617 status collapsed
618
619 \begin_layout Plain Layout
620
621
622 \backslash
623 renewcommand{
624 \backslash
625 braillenormal}[1]
626 \end_layout
627
628 \begin_layout Plain Layout
629
630  {
631 \backslash
632 setlength{
633 \backslash
634 brailleunit}{4mm}
635 \backslash
636 braille{#1}}
637 \end_layout
638
639 \end_inset
640
641
642 \end_layout
643
644 \begin_layout Braille (default)
645 This is Braille.
646 \end_layout
647
648 \begin_layout Standard
649 \begin_inset ERT
650 status collapsed
651
652 \begin_layout Plain Layout
653
654
655 \backslash
656 renewcommand{
657 \backslash
658 braillenormal}[1]
659 \end_layout
660
661 \begin_layout Plain Layout
662
663  {
664 \backslash
665 setlength{
666 \backslash
667 brailleunit}{2mm}
668 \backslash
669 braille{#1}}
670 \end_layout
671
672 \end_inset
673
674
675 \end_layout
676
677 \begin_layout Standard
678 \begin_inset VSpace bigskip
679 \end_inset
680
681 For more informations about the Braille cell dimensions have a look at
682 \begin_inset Newline newline
683 \end_inset
684
685
686 \begin_inset CommandInset href
687 LatexCommand href
688 name "http://www.tiresias.org/research/reports/braille_cell.htm"
689 target "http://www.tiresias.org/research/reports/braille_cell.htm"
690
691 \end_inset
692
693 .
694 \end_layout
695
696 \end_body
697 \end_document