"Fossies" - the Fresh Open Source Software Archive 
Member "teapot-2.3.0/doc/teapot.lyx" (6 Feb 2012, 107898 Bytes) of package /linux/privat/old/teapot-2.3.0.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 #LyX 1.6.7 created this file. For more info see http://www.lyx.org/
2 \lyxformat 345
3 \begin_document
4 \begin_header
5 \textclass scrartcl
6 \begin_preamble
7 \usepackage{tikz}
8 \usepackage{pgffor}
9 \end_preamble
10 \options DIV=11
11 \use_default_options false
12 \language english
13 \inputencoding auto
14 \font_roman newcent
15 \font_sans default
16 \font_typewriter default
17 \font_default_family default
18 \font_sc false
19 \font_osf false
20 \font_sf_scale 100
21 \font_tt_scale 100
22
23 \graphics default
24 \paperfontsize default
25 \spacing single
26 \use_hyperref true
27 \pdf_title "Teapot User Guide"
28 \pdf_author "Michael Haardt, Jörg Walter"
29 \pdf_bookmarks true
30 \pdf_bookmarksnumbered true
31 \pdf_bookmarksopen true
32 \pdf_bookmarksopenlevel 2
33 \pdf_breaklinks false
34 \pdf_pdfborder true
35 \pdf_colorlinks false
36 \pdf_backref false
37 \pdf_pdfusetitle true
38 \papersize default
39 \use_geometry false
40 \use_amsmath 1
41 \use_esint 1
42 \cite_engine basic
43 \use_bibtopic false
44 \paperorientation portrait
45 \secnumdepth 3
46 \tocdepth 3
47 \paragraph_separation indent
48 \defskip medskip
49 \quotes_language english
50 \papercolumns 1
51 \papersides 1
52 \paperpagestyle fancy
53 \tracking_changes false
54 \output_changes false
55 \author ""
56 \author ""
57 \end_header
58
59 \begin_body
60
61 \begin_layout Title
62 Teapot User Guide
63 \end_layout
64
65 \begin_layout Author
66 Michael Haardt, Jörg Walter
67 \end_layout
68
69 \begin_layout Date
70 \begin_inset CommandInset href
71 LatexCommand href
72 name " http://www.syntax-k.de/projekte/teapot"
73 target "http://www.syntax-k.de/projekte/teapot"
74
75 \end_inset
76
77
78 \end_layout
79
80 \begin_layout Abstract
81 For ages, spread sheet programs have been closely associated with financial
82 calculations done by typical end-users.
83 But it has shown that there is also hacker's work which can be done with
84 them, like calculate monitor timings for various resolutions, produce convincin
85 g time statistics which justify the lack of documentation or the need for
86 a budget increase to your employer.
87 This first part of this user guide explains how the various functions of
88 teapot are used, whereas the second part gives an introduction to spread
89 sheets and explains the expression evaluator and its functions.
90 \end_layout
91
92 \begin_layout Standard
93 \begin_inset CommandInset toc
94 LatexCommand tableofcontents
95
96 \end_inset
97
98
99 \end_layout
100
101 \begin_layout Standard
102 \begin_inset Newpage newpage
103 \end_inset
104
105
106 \end_layout
107
108 \begin_layout Section
109 Copyright, Contributors and License
110 \end_layout
111
112 \begin_layout Standard
113
114 \noun on
115 teapot
116 \noun default
117 (Table Editor And Planner, Or: Teapot), is copyrighted 1995--2006 by Michael
118 Haardt, and 2009--2010 by Jörg Walter.
119 \end_layout
120
121 \begin_layout Standard
122 The implementation of clocked expressions is modelled after the description
123 of clocked evaluation in the PhD work of Jörg Wittenberger at the University
124 of Technology in Dresden, Germany.
125 The trigonometric functions were inspired by Koniorczyk Mátyás.
126 The context output format was contributed by Marko Schuetz.
127 \end_layout
128
129 \begin_layout Standard
130 The (currently unused) message catalogs were contributed by Guido Müsch,
131 Wim van Dorst, and Volodymyr M.
132 Lisivka.
133 \end_layout
134
135 \begin_layout Standard
136 This program is free software: you can redistribute it and/or modify it
137 under the terms of the GNU General Public License as published by the Free
138 Software Foundation, either version 3 of the License, or (at your option)
139 any later version.
140
141 \end_layout
142
143 \begin_layout Standard
144 This program is distributed in the hope that it will be useful, but WITHOUT
145 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
146 FOR A PARTICULAR PURPOSE.
147 See the GNU General Public License for more details.
148
149 \end_layout
150
151 \begin_layout Standard
152 You should have received a copy of the GNU General Public License along
153 with this program.
154 If not, see <
155 \begin_inset CommandInset href
156 LatexCommand href
157 target "http://www.gnu.org/licenses/"
158
159 \end_inset
160
161 >.
162 \end_layout
163
164 \begin_layout Section
165 Introduction to Spread Sheets
166 \end_layout
167
168 \begin_layout Subsection
169 General Introduction
170 \end_layout
171
172 \begin_layout Standard
173 A spread sheet consists of cells formed by rows and columns.
174 Additionally, in many spread sheets you have a third dimension, which you
175 can imagine as various sheets laying on top of each other.
176 The third dimension allows you to hide intermediate results, show you additiona
177 l results you do not want to appear in the
178 \begin_inset Quotes eld
179 \end_inset
180
181 official
182 \begin_inset Quotes erd
183 \end_inset
184
185 tables, keep sheets per time period (like 12 sheets for each month in a
186 year) while allowing you to make calculations over the entire time interval
187 and much more.
188 Figure
189 \begin_inset CommandInset ref
190 LatexCommand ref
191 reference "fig:Three-Dimensional-Spread-Sheet"
192
193 \end_inset
194
195 shows the three dimensions:
196 \end_layout
197
198 \begin_layout Standard
199 \begin_inset Float figure
200 placement h
201 wide false
202 sideways false
203 status open
204
205 \begin_layout Plain Layout
206 \align center
207 \begin_inset ERT
208 status open
209
210 \begin_layout Plain Layout
211
212 {
213 \backslash
214 color{white}
215 \backslash
216 hrule}
217 \end_layout
218
219 \begin_layout Plain Layout
220
221 \end_layout
222
223 \begin_layout Plain Layout
224
225
226 \backslash
227 begin{tikzpicture}[scale=.1,anchor=west]
228 \end_layout
229
230 \begin_layout Plain Layout
231
232
233 \backslash
234 foreach
235 \backslash
236 z in {0,2,4,6}
237 \backslash
238 filldraw[fill=white,ystep=1,xstep=3,shift={(0,0,
239 \backslash
240 z)}] (0,0) rectangle (60,10) (0,0) grid (60,10);
241 \end_layout
242
243 \begin_layout Plain Layout
244
245
246 \backslash
247 draw[->] (70,10,10) -- +(30,0,0) node{x};
248 \end_layout
249
250 \begin_layout Plain Layout
251
252
253 \backslash
254 draw[->] (70,10,10) -- +(0,-10,0) node{y};
255 \end_layout
256
257 \begin_layout Plain Layout
258
259
260 \backslash
261 draw[->] (70,10,10) -- +(0,0,-10) node{z};
262 \end_layout
263
264 \begin_layout Plain Layout
265
266
267 \backslash
268 end{tikzpicture}
269 \end_layout
270
271 \begin_layout Plain Layout
272
273 {
274 \backslash
275 color{white}
276 \backslash
277 hrule}
278 \end_layout
279
280 \end_inset
281
282
283 \end_layout
284
285 \begin_layout Plain Layout
286 \begin_inset Caption
287
288 \begin_layout Plain Layout
289 \begin_inset CommandInset label
290 LatexCommand label
291 name "fig:Three-Dimensional-Spread-Sheet"
292
293 \end_inset
294
295 Three-Dimensional Spread Sheet Layout
296 \end_layout
297
298 \end_inset
299
300
301 \end_layout
302
303 \end_inset
304
305
306 \end_layout
307
308 \begin_layout Standard
309 You can think of cells as variables, which value is the value of an associated
310 expression.
311 The expression may be constant, like 1.23, or it may be a function of other
312 cell values.
313 The advantage compared to a programmable calculator is that if you change
314 a number, you directly see all changes in other cells caused by that.
315 Often this allows you to get a feeling how much you may change basic sizes
316 with still getting satisfying results without having to solve the problem
317 analytically.
318
319 \end_layout
320
321 \begin_layout Standard
322 Spread sheets offer many editing functions in order to modify, clear, copy
323 and move cells or blocks of cells.
324 Besides the usual mathematical functions, there are functions which work
325 on blocks of cells, like calculating the sum of a block or counting all
326 non-empty elements.
327 Further there are functions working on character strings, because most
328 likely you also want text besides numbers.
329 The next section will introduce you to some of these by examples.
330
331 \end_layout
332
333 \begin_layout Standard
334 teapot is a traditional spread sheet and a typical UNIX program, because
335 it does just one thing: Calculations.
336 It does not include any graphics functions and never will, but it allows
337 to export data in many formats, so you can use your favourite graphics
338 software.
339
340 \end_layout
341
342 \begin_layout Subsection
343 The First Steps
344 \end_layout
345
346 \begin_layout Standard
347 Now that you should have an idea, it is probably a good time to make your
348 first steps.
349 This section will show you how to create and save a sheet which contains
350 two numbers and their sum.
351 Start the program without any arguments
352 \begin_inset Foot
353 status collapsed
354
355 \begin_layout Plain Layout
356 If you are using the graphical version of teapot, please see section
357 \begin_inset CommandInset ref
358 LatexCommand vref
359 reference "sub:Differences-Between-User"
360
361 \end_inset
362
363 .
364 \end_layout
365
366 \end_inset
367
368 :
369 \end_layout
370
371 \begin_layout Quote
372
373 \family typewriter
374 teapot
375 \end_layout
376
377 \begin_layout Standard
378 You see an empty sheet with the cell cursor being at the upper left corner.
379 Further, the status line tells you that this cell is really empty:
380 \end_layout
381
382 \begin_layout Quote
383
384 \family typewriter
385 E @(0,0,0)=
386 \family default
387
388 \end_layout
389
390 \begin_layout Standard
391 The
392 \family typewriter
393 E
394 \family default
395 means that you can edit the sheet.
396 A
397 \family typewriter
398 V
399 \family default
400 would mean that you could only view its contents.
401 The meaning of
402 \family typewriter
403 @()
404 \family default
405 will be explained soon.
406 You are now in the command mode of teapot.
407 Press the
408 \series bold
409 Enter
410 \series default
411 key to edit this cell.
412 A complete list of command mode functions will be given later.
413 A prompt will appear below the status line:
414 \end_layout
415
416 \begin_layout Quote
417
418 \family typewriter
419 Cell contents:
420 \family default
421
422 \series bold
423 1
424 \series default
425
426 \end_layout
427
428 \begin_layout Standard
429 Now the cell at position 0,0,0 has the integer constant 1.
430 The status line shows you the cell contents, whereas in the sheet you see
431 its value.
432 Since constants are identical with their values, both are 1.
433 Now move the cell cursor down one row and edit that cell, giving it the
434 integer constant
435 \family typewriter
436 41
437 \family default
438 .
439
440 \end_layout
441
442 \begin_layout Standard
443 Now that you have two numbers, move the cell cursor to cell 0,2,0 and give
444 that cell the following contents:
445 \end_layout
446
447 \begin_layout Quote
448
449 \family typewriter
450 Cell contents:
451 \family default
452
453 \series bold
454 @(0,0,0)+@(0,1,0)
455 \series default
456
457 \end_layout
458
459 \begin_layout Standard
460 If you were confused about the difference between contents and value of
461 a cell, it should become more clear now: The status line shows the contents,
462 which is the arithmetic expression to calculate the sum of two cells, whereas
463 in the sheet you see the value of that expression: 42, which was to be
464 expected.
465
466 \family typewriter
467 @(
468 \family default
469 \shape italic
470 x
471 \family typewriter
472 \shape default
473 ,
474 \family default
475 \shape italic
476 y
477 \family typewriter
478 \shape default
479 ,
480 \family default
481 \shape italic
482 z
483 \family typewriter
484 \shape default
485 )
486 \family default
487 is a function which takes three coordinates and returns the value of the
488 cell at the given position.
489
490 \end_layout
491
492 \begin_layout Standard
493 As you can see, the arithmetic expression is not too readable.
494 If you would move cells around, it would not even work any more.
495 For these reasons, you can use symbolic names instead of coordinates, called
496 labels.
497 When used in an expression, a label is like a pointer to a cell, its data
498 type is
499 \emph on
500 location
501 \emph default
502 .
503 Move to cell 0,0,0 and use
504 \series bold
505 /
506 \series default
507 (slash) in command mode to get into the main menu.
508 Depending on your screen size, you may not see all of it.
509 In this case, move the highlighted block right (or left) to scroll through
510 it and to see all items.
511 Now change its label attribute: A)ttributes, L)abel:
512 \end_layout
513
514 \begin_layout Quote
515
516 \family typewriter
517 Cell label:
518 \family default
519
520 \series bold
521 Paper
522 \end_layout
523
524 \begin_layout Standard
525 Then go one cell down and change its label to
526 \series bold
527 Tapes
528 \series default
529 .
530 After, move again one cell down and change the expression to:
531 \end_layout
532
533 \begin_layout Quote
534
535 \family typewriter
536 Cell contents:
537 \family default
538
539 \series bold
540 @(Paper)+@(Tapes)
541 \end_layout
542
543 \begin_layout Standard
544 As you see, you can call the function
545 \family typewriter
546 @
547 \family default
548 with three integer values or with one location value.
549 Now the expression is more understandable, at least to you.
550 To someone else, the sheet only contained three numbers, so a little text
551 should be added.
552 To accomplish that, a new column needs to be inserted: B)lock, I)insert,
553 C)olumn, W)hole column.
554 The last menu item means that you want to insert a whole new column, not
555 only a partial column.
556 If you move the cursor around, you will see that everything is still fine,
557 because you used labels.
558 Go to cell 0,0,0 and edit it:
559 \end_layout
560
561 \begin_layout Quote
562
563 \family typewriter
564 Cell contents:
565 \family default
566
567 \series bold
568 "Paper:"
569 \end_layout
570
571 \begin_layout Standard
572 This is how you enter strings.
573 A string is a data type on its own, don't confuse this with labels.
574 If you feel like it, leave the quotes and the colon away, and you will
575 see the difference, because the result will not be a string, but the value
576 of the label
577 \family typewriter
578 Paper
579 \family default
580 , which is
581 \family typewriter
582 &(1,0,0)
583 \family default
584 .
585 Now change the cells below to
586 \series bold
587 "Tapes:"
588 \series default
589 and
590 \series bold
591 "Result:"
592 \series default
593 .
594 This is something that is understandable to others, too.
595
596 \end_layout
597
598 \begin_layout Standard
599 As the last step, save your work sheet to a file: F)ile, S)ave.
600 The native file format is XDR, so choose that.
601 Up to now, your sheet does not have a name, so you will be prompted for
602 one:
603 \end_layout
604
605 \begin_layout Quote
606
607 \family typewriter
608 New file name:
609 \family default
610
611 \series bold
612 firststep
613 \end_layout
614
615 \begin_layout Standard
616 Unless you see an error message after, your sheet is written to a file.
617
618 \end_layout
619
620 \begin_layout Standard
621 If you have come this far, quit (from the main menu) and you have successfully
622 completed your first steps on using teapot.
623 Now you know cells, the difference between contents and values, you learned
624 that labels are a good thing and you can do simple cell modifications as
625 well as saving your work.
626 This is enough for most applications.
627 If the capabilities described in the next section confuse you, then it
628 is unlikely that you need them really.
629 Just skip that section and don't worry about it.
630
631 \end_layout
632
633 \begin_layout Standard
634 You may wonder what happens if you have circular dependencies, i.e.
635 you have a cell which evaluates to its own value plus one.
636 Well, the answer is that it depends on the order in which you create this
637 cell.
638 If you first give it the value 1 and after edit it to contain the expression
639 which refers to itself plus 1, then you will find that each recalculation,
640 like after editing other cells, will increase the value.
641 While this may be funny, it is certainly not useful as you can not reset
642 the cell and you have little control of its development.
643
644 \end_layout
645
646 \begin_layout Standard
647 What you really want is a base value and an iterative expression along with
648 a way to control the recalculations.
649 teapot supports this by allowing two expressions per cell.
650 The expressions you have used so far are the ones which evaluate to the
651 base values.
652 Each time you edit a cell, the whole sheet will be reset, which means that
653 all results are recalculated using the base values.
654 After, you can clock the sheet, which is why the iterative part is also
655 called clocked expression.
656 A clock is an atomic operation, which means that all cell results will
657 be recalculated in a way that the new result will only show after the entire
658 recalculation.
659
660 \end_layout
661
662 \begin_layout Standard
663 An examples will demonstrate how to make use of this feature.
664 The notation
665 \shape italic
666 x
667 \shape default
668 ->
669 \shape italic
670 y
671 \shape default
672 means that
673 \shape italic
674 x
675 \shape default
676 is the base expression and
677 \shape italic
678 y
679 \shape default
680 is the clocked expression.
681 Don't let this confuse you, as both are entered separately: teapot does
682 not have an -> operator, but it displays the cell contents this way for
683 increased overview.
684 So, give the cell a base expression of
685 \family typewriter
686 1
687 \family default
688 and a clocked expression of
689 \family typewriter
690 @(0,0,0)+1
691 \family default
692 (using
693 \series bold
694 ESC-Enter
695 \series default
696 or
697 \series bold
698 Meta-Enter
699 \series default
700 ) and you will see:
701 \end_layout
702
703 \begin_layout Quote
704
705 \family typewriter
706 @(0,0,0)=1 -> @(0,0,0)+1
707 \end_layout
708
709 \begin_layout Standard
710 The sheet is currently in reset condition and the result is 1.
711 Now clock it and you will see how the value increases.
712
713 \end_layout
714
715 \begin_layout Standard
716 After this introductional chapter, you should be familiar with the basic
717 concepts in spread sheets.
718 The next chapters explain all functions available in detail.
719 You should read them to get an overview of the possibilities offered by
720 teapot.
721 Finally, we will come back to using teapot by showing some common problems
722 and their solutions.
723
724 \end_layout
725
726 \begin_layout Subsection
727 \begin_inset CommandInset label
728 LatexCommand label
729 name "sub:Differences-Between-User"
730
731 \end_inset
732
733 Differences Between User Interfaces
734 \end_layout
735
736 \begin_layout Standard
737
738 \noun on
739 teapot
740 \noun default
741 comes in two flavours: A mouse-and-keyboard operated graphical application
742 and a traditional console-based program.
743 Large parts of this manual were written when the GUI version didn't exist,
744 so there may be occasional inconsistencies.
745 \end_layout
746
747 \begin_layout Standard
748 Most notably, a few key bindings don't exist.
749 If something doesn't work as described in here, refer to the pull-down
750 menus, where all functionality can be found.
751 In addition to the common keys, the GUI variant has extended mouse and
752 keyboard bindings that work similarly to other GUI applications.
753 There are not yet documented, but should
754 \begin_inset Quotes eld
755 \end_inset
756
757 just work
758 \begin_inset Quotes erd
759 \end_inset
760
761 as expected.
762 \end_layout
763
764 \begin_layout Section
765 Command Mode
766 \end_layout
767
768 \begin_layout Standard
769 Right after starting teapot, you are in the command mode.
770 Many functions from the command mode are also available from menus, but
771 using keys is faster and some things, like moving the cell cursor, are
772 only available through keys.
773 Table
774 \begin_inset CommandInset ref
775 LatexCommand vref
776 reference "tab:Key-Bindings-in"
777
778 \end_inset
779
780 lists all available key bindings
781 \begin_inset Foot
782 status collapsed
783
784 \begin_layout Plain Layout
785 If you are using the graphical version of teapot, please see section
786 \begin_inset CommandInset ref
787 LatexCommand vref
788 reference "sub:Differences-Between-User"
789
790 \end_inset
791
792 .
793 \end_layout
794
795 \end_inset
796
797 .
798 \end_layout
799
800 \begin_layout Standard
801 \begin_inset Float table
802 wide false
803 sideways false
804 status open
805
806 \begin_layout Plain Layout
807 \begin_inset Tabular
808 <lyxtabular version="3" rows="31" columns="3">
809 <features>
810 <column alignment="left" valignment="top" width="0">
811 <column alignment="left" valignment="top" width="0">
812 <column alignment="left" valignment="top" width="0">
813 <row>
814 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
815 \begin_inset Text
816
817 \begin_layout Plain Layout
818 Function Key
819 \end_layout
820
821 \end_inset
822 </cell>
823 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
824 \begin_inset Text
825
826 \begin_layout Plain Layout
827 ASCII Key
828 \end_layout
829
830 \end_inset
831 </cell>
832 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
833 \begin_inset Text
834
835 \begin_layout Plain Layout
836 Function
837 \end_layout
838
839 \end_inset
840 </cell>
841 </row>
842 <row>
843 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
844 \begin_inset Text
845
846 \begin_layout Plain Layout
847 Next Line
848 \end_layout
849
850 \end_inset
851 </cell>
852 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
853 \begin_inset Text
854
855 \begin_layout Plain Layout
856 Ctrl-N
857 \end_layout
858
859 \end_inset
860 </cell>
861 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
862 \begin_inset Text
863
864 \begin_layout Plain Layout
865 Cursor down
866 \end_layout
867
868 \end_inset
869 </cell>
870 </row>
871 <row>
872 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
873 \begin_inset Text
874
875 \begin_layout Plain Layout
876 Previous Line
877 \end_layout
878
879 \end_inset
880 </cell>
881 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
882 \begin_inset Text
883
884 \begin_layout Plain Layout
885 Ctrl-P
886 \end_layout
887
888 \end_inset
889 </cell>
890 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
891 \begin_inset Text
892
893 \begin_layout Plain Layout
894 Cursor up
895 \end_layout
896
897 \end_inset
898 </cell>
899 </row>
900 <row>
901 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
902 \begin_inset Text
903
904 \begin_layout Plain Layout
905 Begin
906 \end_layout
907
908 \end_inset
909 </cell>
910 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
911 \begin_inset Text
912
913 \begin_layout Plain Layout
914 Ctrl-A
915 \end_layout
916
917 \end_inset
918 </cell>
919 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
920 \begin_inset Text
921
922 \begin_layout Plain Layout
923 Cursor to column 0
924 \end_layout
925
926 \end_inset
927 </cell>
928 </row>
929 <row>
930 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
931 \begin_inset Text
932
933 \begin_layout Plain Layout
934 End
935 \end_layout
936
937 \end_inset
938 </cell>
939 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
940 \begin_inset Text
941
942 \begin_layout Plain Layout
943 Ctrl-E
944 \end_layout
945
946 \end_inset
947 </cell>
948 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
949 \begin_inset Text
950
951 \begin_layout Plain Layout
952 Cursor to last column
953 \end_layout
954
955 \end_inset
956 </cell>
957 </row>
958 <row>
959 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
960 \begin_inset Text
961
962 \begin_layout Plain Layout
963
964 \end_layout
965
966 \end_inset
967 </cell>
968 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
969 \begin_inset Text
970
971 \begin_layout Plain Layout
972 +
973 \end_layout
974
975 \end_inset
976 </cell>
977 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
978 \begin_inset Text
979
980 \begin_layout Plain Layout
981 Cursor to next layer
982 \end_layout
983
984 \end_inset
985 </cell>
986 </row>
987 <row>
988 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
989 \begin_inset Text
990
991 \begin_layout Plain Layout
992
993 \end_layout
994
995 \end_inset
996 </cell>
997 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
998 \begin_inset Text
999
1000 \begin_layout Plain Layout
1001 - (Dash)
1002 \end_layout
1003
1004 \end_inset
1005 </cell>
1006 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1007 \begin_inset Text
1008
1009 \begin_layout Plain Layout
1010 Cursor to previous layer
1011 \end_layout
1012
1013 \end_inset
1014 </cell>
1015 </row>
1016 <row>
1017 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1018 \begin_inset Text
1019
1020 \begin_layout Plain Layout
1021
1022 \end_layout
1023
1024 \end_inset
1025 </cell>
1026 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1027 \begin_inset Text
1028
1029 \begin_layout Plain Layout
1030 <
1031 \end_layout
1032
1033 \end_inset
1034 </cell>
1035 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1036 \begin_inset Text
1037
1038 \begin_layout Plain Layout
1039 Cursor to line 0
1040 \end_layout
1041
1042 \end_inset
1043 </cell>
1044 </row>
1045 <row>
1046 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1047 \begin_inset Text
1048
1049 \begin_layout Plain Layout
1050
1051 \end_layout
1052
1053 \end_inset
1054 </cell>
1055 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1056 \begin_inset Text
1057
1058 \begin_layout Plain Layout
1059 >
1060 \end_layout
1061
1062 \end_inset
1063 </cell>
1064 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1065 \begin_inset Text
1066
1067 \begin_layout Plain Layout
1068 Cursor to last line
1069 \end_layout
1070
1071 \end_inset
1072 </cell>
1073 </row>
1074 <row>
1075 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1076 \begin_inset Text
1077
1078 \begin_layout Plain Layout
1079
1080 \end_layout
1081
1082 \end_inset
1083 </cell>
1084 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1085 \begin_inset Text
1086
1087 \begin_layout Plain Layout
1088 _ (Underscore)
1089 \end_layout
1090
1091 \end_inset
1092 </cell>
1093 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1094 \begin_inset Text
1095
1096 \begin_layout Plain Layout
1097 Cursor to layer 0
1098 \end_layout
1099
1100 \end_inset
1101 </cell>
1102 </row>
1103 <row>
1104 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1105 \begin_inset Text
1106
1107 \begin_layout Plain Layout
1108
1109 \end_layout
1110
1111 \end_inset
1112 </cell>
1113 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1114 \begin_inset Text
1115
1116 \begin_layout Plain Layout
1117 *
1118 \end_layout
1119
1120 \end_inset
1121 </cell>
1122 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1123 \begin_inset Text
1124
1125 \begin_layout Plain Layout
1126 Cursor to last layer
1127 \end_layout
1128
1129 \end_inset
1130 </cell>
1131 </row>
1132 <row>
1133 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1134 \begin_inset Text
1135
1136 \begin_layout Plain Layout
1137
1138 \end_layout
1139
1140 \end_inset
1141 </cell>
1142 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1143 \begin_inset Text
1144
1145 \begin_layout Plain Layout
1146 Ctrl-X <
1147 \end_layout
1148
1149 \end_inset
1150 </cell>
1151 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1152 \begin_inset Text
1153
1154 \begin_layout Plain Layout
1155 One page left
1156 \end_layout
1157
1158 \end_inset
1159 </cell>
1160 </row>
1161 <row>
1162 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1163 \begin_inset Text
1164
1165 \begin_layout Plain Layout
1166
1167 \end_layout
1168
1169 \end_inset
1170 </cell>
1171 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1172 \begin_inset Text
1173
1174 \begin_layout Plain Layout
1175 Ctrl-X >
1176 \end_layout
1177
1178 \end_inset
1179 </cell>
1180 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1181 \begin_inset Text
1182
1183 \begin_layout Plain Layout
1184 One page right
1185 \end_layout
1186
1187 \end_inset
1188 </cell>
1189 </row>
1190 <row>
1191 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1192 \begin_inset Text
1193
1194 \begin_layout Plain Layout
1195 F10
1196 \end_layout
1197
1198 \end_inset
1199 </cell>
1200 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1201 \begin_inset Text
1202
1203 \begin_layout Plain Layout
1204 /
1205 \end_layout
1206
1207 \end_inset
1208 </cell>
1209 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1210 \begin_inset Text
1211
1212 \begin_layout Plain Layout
1213 Main menu
1214 \end_layout
1215
1216 \end_inset
1217 </cell>
1218 </row>
1219 <row>
1220 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1221 \begin_inset Text
1222
1223 \begin_layout Plain Layout
1224 F2
1225 \end_layout
1226
1227 \end_inset
1228 </cell>
1229 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1230 \begin_inset Text
1231
1232 \begin_layout Plain Layout
1233
1234 \end_layout
1235
1236 \end_inset
1237 </cell>
1238 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1239 \begin_inset Text
1240
1241 \begin_layout Plain Layout
1242 Save menu
1243 \end_layout
1244
1245 \end_inset
1246 </cell>
1247 </row>
1248 <row>
1249 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1250 \begin_inset Text
1251
1252 \begin_layout Plain Layout
1253 F3
1254 \end_layout
1255
1256 \end_inset
1257 </cell>
1258 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1259 \begin_inset Text
1260
1261 \begin_layout Plain Layout
1262
1263 \end_layout
1264
1265 \end_inset
1266 </cell>
1267 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1268 \begin_inset Text
1269
1270 \begin_layout Plain Layout
1271 Load menu
1272 \end_layout
1273
1274 \end_inset
1275 </cell>
1276 </row>
1277 <row>
1278 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1279 \begin_inset Text
1280
1281 \begin_layout Plain Layout
1282
1283 \end_layout
1284
1285 \end_inset
1286 </cell>
1287 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1288 \begin_inset Text
1289
1290 \begin_layout Plain Layout
1291 Ctrl-X Ctrl-R
1292 \end_layout
1293
1294 \end_inset
1295 </cell>
1296 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1297 \begin_inset Text
1298
1299 \begin_layout Plain Layout
1300 Load file
1301 \end_layout
1302
1303 \end_inset
1304 </cell>
1305 </row>
1306 <row>
1307 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1308 \begin_inset Text
1309
1310 \begin_layout Plain Layout
1311 Enter
1312 \end_layout
1313
1314 \end_inset
1315 </cell>
1316 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1317 \begin_inset Text
1318
1319 \begin_layout Plain Layout
1320 Ctrl-J, Ctrl-M
1321 \end_layout
1322
1323 \end_inset
1324 </cell>
1325 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1326 \begin_inset Text
1327
1328 \begin_layout Plain Layout
1329 Edit cell contents
1330 \end_layout
1331
1332 \end_inset
1333 </cell>
1334 </row>
1335 <row>
1336 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1337 \begin_inset Text
1338
1339 \begin_layout Plain Layout
1340
1341 \end_layout
1342
1343 \end_inset
1344 </cell>
1345 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1346 \begin_inset Text
1347
1348 \begin_layout Plain Layout
1349 \begin_inset Quotes eld
1350 \end_inset
1351
1352 , @,
1353 \emph on
1354 digit
1355 \emph default
1356 ,
1357 \emph on
1358 letter
1359 \end_layout
1360
1361 \end_inset
1362 </cell>
1363 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1364 \begin_inset Text
1365
1366 \begin_layout Plain Layout
1367 Overwrite cell contents
1368 \end_layout
1369
1370 \end_inset
1371 </cell>
1372 </row>
1373 <row>
1374 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1375 \begin_inset Text
1376
1377 \begin_layout Plain Layout
1378 Meta-Enter
1379 \end_layout
1380
1381 \end_inset
1382 </cell>
1383 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1384 \begin_inset Text
1385
1386 \begin_layout Plain Layout
1387 Esc Ctrl-J, Esc Ctrl-M
1388 \end_layout
1389
1390 \end_inset
1391 </cell>
1392 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1393 \begin_inset Text
1394
1395 \begin_layout Plain Layout
1396 Edit clocked cell contents
1397 \end_layout
1398
1399 \end_inset
1400 </cell>
1401 </row>
1402 <row>
1403 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1404 \begin_inset Text
1405
1406 \begin_layout Plain Layout
1407 Backspace
1408 \end_layout
1409
1410 \end_inset
1411 </cell>
1412 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1413 \begin_inset Text
1414
1415 \begin_layout Plain Layout
1416 Ctrl-H
1417 \end_layout
1418
1419 \end_inset
1420 </cell>
1421 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1422 \begin_inset Text
1423
1424 \begin_layout Plain Layout
1425 Edit cell contents
1426 \end_layout
1427
1428 \end_inset
1429 </cell>
1430 </row>
1431 <row>
1432 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1433 \begin_inset Text
1434
1435 \begin_layout Plain Layout
1436
1437 \end_layout
1438
1439 \end_inset
1440 </cell>
1441 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1442 \begin_inset Text
1443
1444 \begin_layout Plain Layout
1445 .
1446 (Period)
1447 \end_layout
1448
1449 \end_inset
1450 </cell>
1451 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1452 \begin_inset Text
1453
1454 \begin_layout Plain Layout
1455 Mark block
1456 \end_layout
1457
1458 \end_inset
1459 </cell>
1460 </row>
1461 <row>
1462 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1463 \begin_inset Text
1464
1465 \begin_layout Plain Layout
1466
1467 \end_layout
1468
1469 \end_inset
1470 </cell>
1471 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1472 \begin_inset Text
1473
1474 \begin_layout Plain Layout
1475 Ctrl-L
1476 \end_layout
1477
1478 \end_inset
1479 </cell>
1480 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1481 \begin_inset Text
1482
1483 \begin_layout Plain Layout
1484 Redraw screen
1485 \end_layout
1486
1487 \end_inset
1488 </cell>
1489 </row>
1490 <row>
1491 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1492 \begin_inset Text
1493
1494 \begin_layout Plain Layout
1495
1496 \end_layout
1497
1498 \end_inset
1499 </cell>
1500 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1501 \begin_inset Text
1502
1503 \begin_layout Plain Layout
1504 Ctrl-Y
1505 \end_layout
1506
1507 \end_inset
1508 </cell>
1509 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1510 \begin_inset Text
1511
1512 \begin_layout Plain Layout
1513 Paste block
1514 \end_layout
1515
1516 \end_inset
1517 </cell>
1518 </row>
1519 <row>
1520 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1521 \begin_inset Text
1522
1523 \begin_layout Plain Layout
1524
1525 \end_layout
1526
1527 \end_inset
1528 </cell>
1529 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1530 \begin_inset Text
1531
1532 \begin_layout Plain Layout
1533 Ctrl-R
1534 \end_layout
1535
1536 \end_inset
1537 </cell>
1538 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1539 \begin_inset Text
1540
1541 \begin_layout Plain Layout
1542 Reset sheet
1543 \end_layout
1544
1545 \end_inset
1546 </cell>
1547 </row>
1548 <row>
1549 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1550 \begin_inset Text
1551
1552 \begin_layout Plain Layout
1553 F9
1554 \end_layout
1555
1556 \end_inset
1557 </cell>
1558 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1559 \begin_inset Text
1560
1561 \begin_layout Plain Layout
1562 Ctrl-S
1563 \end_layout
1564
1565 \end_inset
1566 </cell>
1567 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1568 \begin_inset Text
1569
1570 \begin_layout Plain Layout
1571 Clock sheet
1572 \end_layout
1573
1574 \end_inset
1575 </cell>
1576 </row>
1577 <row>
1578 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1579 \begin_inset Text
1580
1581 \begin_layout Plain Layout
1582
1583 \end_layout
1584
1585 \end_inset
1586 </cell>
1587 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1588 \begin_inset Text
1589
1590 \begin_layout Plain Layout
1591 Esc z
1592 \end_layout
1593
1594 \end_inset
1595 </cell>
1596 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1597 \begin_inset Text
1598
1599 \begin_layout Plain Layout
1600 Save and quit
1601 \end_layout
1602
1603 \end_inset
1604 </cell>
1605 </row>
1606 <row>
1607 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1608 \begin_inset Text
1609
1610 \begin_layout Plain Layout
1611
1612 \end_layout
1613
1614 \end_inset
1615 </cell>
1616 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1617 \begin_inset Text
1618
1619 \begin_layout Plain Layout
1620 Ctrl-X Ctrl-C
1621 \end_layout
1622
1623 \end_inset
1624 </cell>
1625 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1626 \begin_inset Text
1627
1628 \begin_layout Plain Layout
1629 Quit
1630 \end_layout
1631
1632 \end_inset
1633 </cell>
1634 </row>
1635 <row>
1636 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1637 \begin_inset Text
1638
1639 \begin_layout Plain Layout
1640 Next Page
1641 \end_layout
1642
1643 \end_inset
1644 </cell>
1645 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1646 \begin_inset Text
1647
1648 \begin_layout Plain Layout
1649 Ctrl-V
1650 \end_layout
1651
1652 \end_inset
1653 </cell>
1654 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1655 \begin_inset Text
1656
1657 \begin_layout Plain Layout
1658 One page down
1659 \end_layout
1660
1661 \end_inset
1662 </cell>
1663 </row>
1664 <row>
1665 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1666 \begin_inset Text
1667
1668 \begin_layout Plain Layout
1669 Previous Page
1670 \end_layout
1671
1672 \end_inset
1673 </cell>
1674 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1675 \begin_inset Text
1676
1677 \begin_layout Plain Layout
1678 Meta-V
1679 \end_layout
1680
1681 \end_inset
1682 </cell>
1683 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1684 \begin_inset Text
1685
1686 \begin_layout Plain Layout
1687 One page up
1688 \end_layout
1689
1690 \end_inset
1691 </cell>
1692 </row>
1693 <row>
1694 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1695 \begin_inset Text
1696
1697 \begin_layout Plain Layout
1698 Cancel
1699 \end_layout
1700
1701 \end_inset
1702 </cell>
1703 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1704 \begin_inset Text
1705
1706 \begin_layout Plain Layout
1707 Ctrl-G, Ctrl-C
1708 \end_layout
1709
1710 \end_inset
1711 </cell>
1712 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1713 \begin_inset Text
1714
1715 \begin_layout Plain Layout
1716 Abort current action
1717 \end_layout
1718
1719 \end_inset
1720 </cell>
1721 </row>
1722 </lyxtabular>
1723
1724 \end_inset
1725
1726
1727 \end_layout
1728
1729 \begin_layout Plain Layout
1730 \begin_inset Caption
1731
1732 \begin_layout Plain Layout
1733 \begin_inset CommandInset label
1734 LatexCommand label
1735 name "tab:Key-Bindings-in"
1736
1737 \end_inset
1738
1739 Key Bindings in Command Mode
1740 \end_layout
1741
1742 \end_inset
1743
1744
1745 \end_layout
1746
1747 \end_inset
1748
1749
1750 \end_layout
1751
1752 \begin_layout Standard
1753 .
1754 (Period) marks blocks: The first time it marks the beginning of a block,
1755 which is then extended by moving the cell cursor.
1756 The next time, it marks the end of the block which lets you move the cell
1757 cursor after without changing the block.
1758 The third time, it removes the block marks again.
1759
1760 \end_layout
1761
1762 \begin_layout Section
1763 The Line Editor
1764 \end_layout
1765
1766 \begin_layout Standard
1767 Many functions in teapot require editing a line of text, e.g.
1768 editing cell contents, typing file names and the line.
1769 Similar to the command mode, all things can be reached by control codes
1770 and most by function keys.
1771 Table
1772 \begin_inset CommandInset ref
1773 LatexCommand vref
1774 reference "tab:Key-Bindings-forLineEditor"
1775
1776 \end_inset
1777
1778 lists all available key bindings
1779 \begin_inset Foot
1780 status collapsed
1781
1782 \begin_layout Plain Layout
1783 These only apply to the console version.
1784 The GUI version has input fields that work like all other input fields.
1785 \end_layout
1786
1787 \end_inset
1788
1789 .
1790 \end_layout
1791
1792 \begin_layout Standard
1793 \begin_inset Float table
1794 wide false
1795 sideways false
1796 status open
1797
1798 \begin_layout Plain Layout
1799 \begin_inset Tabular
1800 <lyxtabular version="3" rows="13" columns="3">
1801 <features>
1802 <column alignment="left" valignment="top" width="0">
1803 <column alignment="left" valignment="top" width="0">
1804 <column alignment="left" valignment="top" width="0">
1805 <row>
1806 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1807 \begin_inset Text
1808
1809 \begin_layout Plain Layout
1810 Function Key
1811 \end_layout
1812
1813 \end_inset
1814 </cell>
1815 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
1816 \begin_inset Text
1817
1818 \begin_layout Plain Layout
1819 ASCII Key
1820 \end_layout
1821
1822 \end_inset
1823 </cell>
1824 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
1825 \begin_inset Text
1826
1827 \begin_layout Plain Layout
1828 Function
1829 \end_layout
1830
1831 \end_inset
1832 </cell>
1833 </row>
1834 <row>
1835 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1836 \begin_inset Text
1837
1838 \begin_layout Plain Layout
1839 Previous Character
1840 \end_layout
1841
1842 \end_inset
1843 </cell>
1844 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1845 \begin_inset Text
1846
1847 \begin_layout Plain Layout
1848 Ctrl-B
1849 \end_layout
1850
1851 \end_inset
1852 </cell>
1853 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1854 \begin_inset Text
1855
1856 \begin_layout Plain Layout
1857 Move cursor left
1858 \end_layout
1859
1860 \end_inset
1861 </cell>
1862 </row>
1863 <row>
1864 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1865 \begin_inset Text
1866
1867 \begin_layout Plain Layout
1868 Next Character
1869 \end_layout
1870
1871 \end_inset
1872 </cell>
1873 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1874 \begin_inset Text
1875
1876 \begin_layout Plain Layout
1877 Ctrl-F
1878 \end_layout
1879
1880 \end_inset
1881 </cell>
1882 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1883 \begin_inset Text
1884
1885 \begin_layout Plain Layout
1886 Move cursor right
1887 \end_layout
1888
1889 \end_inset
1890 </cell>
1891 </row>
1892 <row>
1893 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1894 \begin_inset Text
1895
1896 \begin_layout Plain Layout
1897 Begin
1898 \end_layout
1899
1900 \end_inset
1901 </cell>
1902 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1903 \begin_inset Text
1904
1905 \begin_layout Plain Layout
1906 Ctrl-A
1907 \end_layout
1908
1909 \end_inset
1910 </cell>
1911 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1912 \begin_inset Text
1913
1914 \begin_layout Plain Layout
1915 Move cursor to column 0
1916 \end_layout
1917
1918 \end_inset
1919 </cell>
1920 </row>
1921 <row>
1922 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1923 \begin_inset Text
1924
1925 \begin_layout Plain Layout
1926 End
1927 \end_layout
1928
1929 \end_inset
1930 </cell>
1931 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1932 \begin_inset Text
1933
1934 \begin_layout Plain Layout
1935 Ctrl-E
1936 \end_layout
1937
1938 \end_inset
1939 </cell>
1940 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1941 \begin_inset Text
1942
1943 \begin_layout Plain Layout
1944 Move cursor to last column
1945 \end_layout
1946
1947 \end_inset
1948 </cell>
1949 </row>
1950 <row>
1951 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1952 \begin_inset Text
1953
1954 \begin_layout Plain Layout
1955 Enter
1956 \end_layout
1957
1958 \end_inset
1959 </cell>
1960 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1961 \begin_inset Text
1962
1963 \begin_layout Plain Layout
1964 Ctrl-J, Ctrl-M
1965 \end_layout
1966
1967 \end_inset
1968 </cell>
1969 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1970 \begin_inset Text
1971
1972 \begin_layout Plain Layout
1973 Finish editing
1974 \end_layout
1975
1976 \end_inset
1977 </cell>
1978 </row>
1979 <row>
1980 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1981 \begin_inset Text
1982
1983 \begin_layout Plain Layout
1984
1985 \end_layout
1986
1987 \end_inset
1988 </cell>
1989 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
1990 \begin_inset Text
1991
1992 \begin_layout Plain Layout
1993 Ctrl-L
1994 \end_layout
1995
1996 \end_inset
1997 </cell>
1998 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
1999 \begin_inset Text
2000
2001 \begin_layout Plain Layout
2002 Redraw screen
2003 \end_layout
2004
2005 \end_inset
2006 </cell>
2007 </row>
2008 <row>
2009 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2010 \begin_inset Text
2011
2012 \begin_layout Plain Layout
2013
2014 \end_layout
2015
2016 \end_inset
2017 </cell>
2018 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2019 \begin_inset Text
2020
2021 \begin_layout Plain Layout
2022 Ctrl-T
2023 \end_layout
2024
2025 \end_inset
2026 </cell>
2027 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2028 \begin_inset Text
2029
2030 \begin_layout Plain Layout
2031 Transpose characters
2032 \end_layout
2033
2034 \end_inset
2035 </cell>
2036 </row>
2037 <row>
2038 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2039 \begin_inset Text
2040
2041 \begin_layout Plain Layout
2042
2043 \end_layout
2044
2045 \end_inset
2046 </cell>
2047 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2048 \begin_inset Text
2049
2050 \begin_layout Plain Layout
2051 Ctrl-
2052 \backslash
2053
2054 \end_layout
2055
2056 \end_inset
2057 </cell>
2058 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2059 \begin_inset Text
2060
2061 \begin_layout Plain Layout
2062 Go to matching paren
2063 \end_layout
2064
2065 \end_inset
2066 </cell>
2067 </row>
2068 <row>
2069 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2070 \begin_inset Text
2071
2072 \begin_layout Plain Layout
2073 Cancel
2074 \end_layout
2075
2076 \end_inset
2077 </cell>
2078 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2079 \begin_inset Text
2080
2081 \begin_layout Plain Layout
2082 Ctrl-G, Ctrl-C
2083 \end_layout
2084
2085 \end_inset
2086 </cell>
2087 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2088 \begin_inset Text
2089
2090 \begin_layout Plain Layout
2091 Abort editing
2092 \end_layout
2093
2094 \end_inset
2095 </cell>
2096 </row>
2097 <row>
2098 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2099 \begin_inset Text
2100
2101 \begin_layout Plain Layout
2102 Backspace
2103 \end_layout
2104
2105 \end_inset
2106 </cell>
2107 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2108 \begin_inset Text
2109
2110 \begin_layout Plain Layout
2111 Ctrl-H
2112 \end_layout
2113
2114 \end_inset
2115 </cell>
2116 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2117 \begin_inset Text
2118
2119 \begin_layout Plain Layout
2120 Delete previous character
2121 \end_layout
2122
2123 \end_inset
2124 </cell>
2125 </row>
2126 <row>
2127 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2128 \begin_inset Text
2129
2130 \begin_layout Plain Layout
2131 Delete
2132 \end_layout
2133
2134 \end_inset
2135 </cell>
2136 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2137 \begin_inset Text
2138
2139 \begin_layout Plain Layout
2140 Ctrl-?, Ctrl-D
2141 \end_layout
2142
2143 \end_inset
2144 </cell>
2145 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
2146 \begin_inset Text
2147
2148 \begin_layout Plain Layout
2149 Delete current character
2150 \end_layout
2151
2152 \end_inset
2153 </cell>
2154 </row>
2155 <row>
2156 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2157 \begin_inset Text
2158
2159 \begin_layout Plain Layout
2160 Insert
2161 \end_layout
2162
2163 \end_inset
2164 </cell>
2165 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
2166 \begin_inset Text
2167
2168 \begin_layout Plain Layout
2169
2170 \end_layout
2171
2172 \end_inset
2173 </cell>
2174 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
2175 \begin_inset Text
2176
2177 \begin_layout Plain Layout
2178 Toggle insert mode
2179 \end_layout
2180
2181 \end_inset
2182 </cell>
2183 </row>
2184 </lyxtabular>
2185
2186 \end_inset
2187
2188
2189 \end_layout
2190
2191 \begin_layout Plain Layout
2192 \begin_inset Caption
2193
2194 \begin_layout Plain Layout
2195 \begin_inset CommandInset label
2196 LatexCommand label
2197 name "tab:Key-Bindings-forLineEditor"
2198
2199 \end_inset
2200
2201 Key Bindings for the line editor
2202 \end_layout
2203
2204 \end_inset
2205
2206
2207 \end_layout
2208
2209 \end_inset
2210
2211
2212 \end_layout
2213
2214 \begin_layout Standard
2215 Besides the regular line editor functions, you may use Ctrl-O (Tab in the
2216 GUI version) to temporarily leave the editor in order to move around in
2217 the sheet if you are editing cell contents.
2218 Another Ctrl-O (resp.
2219 Tab) brings you back to the line editor.
2220 While moving around in the sheet, you can insert the value (v) or position
2221 (p) at the cursor position in the edited cell.
2222 Clicking on a cell while editing has the same effect as moving to that
2223 cell and pressing (p).
2224 \end_layout
2225
2226 \begin_layout Standard
2227 Aborting line editing means that you will get right back to command mode,
2228 whatever you started doing will have no effect.
2229
2230 \end_layout
2231
2232 \begin_layout Section
2233 Interactive Functions
2234 \end_layout
2235
2236 \begin_layout Standard
2237 Most actions are available through the menu.
2238 Most of these will be applied to all cells within a block if a block of
2239 cells is marked.
2240 \end_layout
2241
2242 \begin_layout Subsection
2243 \begin_inset CommandInset label
2244 LatexCommand label
2245 name "sub:Cell-Attributes"
2246
2247 \end_inset
2248
2249 Cell Attributes
2250 \end_layout
2251
2252 \begin_layout Standard
2253 Cells can have several attributes:
2254 \end_layout
2255
2256 \begin_layout Itemize
2257 A cell label, which is useful because it avoids to directly address cells
2258 by their position.
2259 A cell label must be different from function names.
2260
2261 \end_layout
2262
2263 \begin_layout Itemize
2264 The cell adjustment, which determines if the cell value is printed left
2265 adjusted, right adjusted or centered.
2266
2267 \end_layout
2268
2269 \begin_layout Itemize
2270 The precision for the output of floating point values.
2271 The default is 2 digits after the dot.
2272
2273 \end_layout
2274
2275 \begin_layout Itemize
2276 If floating point numbers should be printed in scientific notation (0.123e1)
2277 or as decimal number (1.23).
2278 It only affects the output, if the cell value is a floating point number.
2279
2280 \end_layout
2281
2282 \begin_layout Itemize
2283 If the cell is shadowed by its left neighbour.
2284 This means that the left neighbour cell additionally uses the room of the
2285 shadowed cell.
2286
2287 \end_layout
2288
2289 \begin_layout Itemize
2290 If the cell is locked which prevents to accidentally edit or clear it.
2291 Note that block operations override this attribute, because when you deal
2292 with blocks, you usually know what you are doing.
2293
2294 \end_layout
2295
2296 \begin_layout Itemize
2297 If special characters for e.g.
2298 roff and LaTeX should be quoted (default) or not.
2299 Not quoting them allows special effects (if you know roff or LaTeX), but
2300 is of course not portable.
2301
2302 \end_layout
2303
2304 \begin_layout Subsubsection
2305 Precision
2306 \end_layout
2307
2308 \begin_layout Standard
2309 The precision only changes what is printed, teapot always uses the maximum
2310 precision for calculations.
2311 It also only affects the output if the cell value is a floating point number.
2312 Entering an empty precision means to set it to the default value.
2313
2314 \end_layout
2315
2316 \begin_layout Subsubsection
2317 Exponential / Decimal
2318 \end_layout
2319
2320 \begin_layout Standard
2321 Forces exponential notation for numbers in a cell.
2322 Decimal mode will prefer plain decimal numbers unless the result is very
2323 big or very small.
2324 \end_layout
2325
2326 \begin_layout Subsubsection
2327 Adjustment
2328 \end_layout
2329
2330 \begin_layout Standard
2331 Cells contents can be aligned to the left, right or centered.
2332 By default, text is left adjusted and numbers are right adjusted.
2333 \end_layout
2334
2335 \begin_layout Subsubsection
2336 Label
2337 \end_layout
2338
2339 \begin_layout Standard
2340 This function lets you edit the cell label of the current cell.
2341 Further it changes all occurences of it in the cell contents to the new
2342 value, unless you erased the cell label.
2343 If a block has been marked by the time you edit the cell label, all occurences
2344 of the label in contents of cells in that block will be changed.
2345
2346 \end_layout
2347
2348 \begin_layout Subsubsection
2349 Lock
2350 \end_layout
2351
2352 \begin_layout Standard
2353 You can lock cells to protect them from accidental editing.
2354 Note that this protects you from modifying single cells.
2355 If you modify a block of cells which contains locked cells, those will
2356 be modified as well.
2357 This has been done because when using block commands, you usually know
2358 what you are doing.
2359
2360 \end_layout
2361
2362 \begin_layout Subsubsection
2363 Ignore
2364 \end_layout
2365
2366 \begin_layout Standard
2367 Ignored cells will be completely ignored.
2368 They appear as empty cells on screen and during calculations.
2369 This is useful for temporarily disabling parts of your calculation, as
2370 the former content reappears when the ignore is removed again.
2371 \end_layout
2372
2373 \begin_layout Subsubsection
2374 Transparent
2375 \end_layout
2376
2377 \begin_layout Standard
2378 Usually, values are quoted as needed so that you get the exact same output
2379 as on screen.
2380 Transparent cells will be exported as-is into display-oriented file formats
2381 (LaTeX, etc.) so that you can embed commands for subsequent processing in
2382 cell values.
2383 \end_layout
2384
2385 \begin_layout Subsubsection
2386 Shadow
2387 \end_layout
2388
2389 \begin_layout Standard
2390 Shadowed cells are effectively nonexistant.
2391 Instead, their left neighbour cell extends into the shadowed cell, so that
2392 longer text can be displayed.
2393 You may think of shadowing as a way to get multi-column cells.
2394 \end_layout
2395
2396 \begin_layout Subsubsection
2397 Column Width
2398 \end_layout
2399
2400 \begin_layout Standard
2401 The column width only affects the screen display, not the formatting of
2402 the final output (except formatted text files).
2403 It is intended to let you make better usage of the screen for more overview.
2404 If the width is too small to display the cell value, a placeholder will
2405 be displayed.
2406
2407 \end_layout
2408
2409 \begin_layout Subsection
2410 Block Functions
2411 \end_layout
2412
2413 \begin_layout Subsubsection
2414 Copy/Move
2415 \end_layout
2416
2417 \begin_layout Standard
2418 To copy a block of cells, mark it, then move the cell cursor to where the
2419 upper left corner of the copy should be and issue the copy command.
2420 Moving works similar, just use the move command.
2421 Of course you can mark three-dimensional blocks and copy them anywhere
2422 in the three-dimensional sheet, but doing so requires a good three-dimensional
2423 imagination to get what you want.
2424
2425 \end_layout
2426
2427 \begin_layout Subsubsection
2428 Fill
2429 \end_layout
2430
2431 \begin_layout Standard
2432 To fill a block of cells, first mark a the block it should be filled with.
2433 This may be just one cell! Then move the cell cursor to where the upper
2434 left corner of the block to be filled should be and issue the fill command.
2435 You will be prompted for how often the marked block should be repeated
2436 in each dimension.
2437 For example, you may to repeat a cell 9 times below.
2438 Mark it, then move down one row.
2439 Issue the fill command and answer 1 to the number of column repetitions,
2440 9 to rows and 1 to layers.
2441
2442 \end_layout
2443
2444 \begin_layout Subsubsection
2445 Clear
2446 \end_layout
2447
2448 \begin_layout Standard
2449 Clearing means to delete the cell contents and set all attributes to the
2450 default value.
2451 If you want to preserve the attributes, just edit the contents of a cell
2452 and delete them.
2453
2454 \end_layout
2455
2456 \begin_layout Subsubsection
2457 Insert
2458 \end_layout
2459
2460 \begin_layout Standard
2461 Since work sheets can be three-dimensional, you can insert cells in all
2462 three dimensions, too.
2463 The inserted cells will be empty and their attributes have the default
2464 values.
2465 Cells will always be moved away from the front upper left corner to make
2466 room for the inserted cells.
2467 If no block is marked, you will be asked if you really only want to insert
2468 a cell of if you want to insert a whole row, line or sheet.
2469
2470 \end_layout
2471
2472 \begin_layout Subsubsection
2473 Delete
2474 \end_layout
2475
2476 \begin_layout Standard
2477 Deleting works contrary to inserting.
2478 The deleted cells will be filled by moving neighbour cells to their positions.
2479 You will be prompted for the direction from where those cells will be taken.
2480 Deleting an entire column column-wise is done by marking the column, use
2481 the delete command and chose X direction.
2482
2483 \end_layout
2484
2485 \begin_layout Subsubsection
2486 \begin_inset CommandInset label
2487 LatexCommand label
2488 name "sub:Sort"
2489
2490 \end_inset
2491
2492 Sort
2493 \end_layout
2494
2495 \begin_layout Standard
2496 Marked blocks of cells can be sorted after one or multiple keys, either
2497 column-wise, row-wise or depth-wise.
2498 Sorting a two dimensional block row-wise will sort lines, but if a three
2499 dimensional block is sorted row-wise, then horizontal layers will be sorted.
2500 The sort key is specified as vector which is orthogonal to the sorted elements,
2501 either in ascending or descending order.
2502 The following example illustrates the sort function.
2503 The upper left part of the screen should look like this:
2504 \end_layout
2505
2506 \begin_layout Standard
2507 \align center
2508 \begin_inset Tabular
2509 <lyxtabular version="3" rows="5" columns="3">
2510 <features>
2511 <column alignment="center" valignment="top" width="0">
2512 <column alignment="center" valignment="top" width="0">
2513 <column alignment="center" valignment="top" width="0">
2514 <row>
2515 <cell alignment="center" valignment="top" usebox="none">
2516 \begin_inset Text
2517
2518 \begin_layout Plain Layout
2519 0
2520 \end_layout
2521
2522 \end_inset
2523 </cell>
2524 <cell alignment="center" valignment="top" usebox="none">
2525 \begin_inset Text
2526
2527 \begin_layout Plain Layout
2528 0
2529 \end_layout
2530
2531 \end_inset
2532 </cell>
2533 <cell alignment="center" valignment="top" usebox="none">
2534 \begin_inset Text
2535
2536 \begin_layout Plain Layout
2537 1
2538 \end_layout
2539
2540 \end_inset
2541 </cell>
2542 </row>
2543 <row>
2544 <cell alignment="center" valignment="top" usebox="none">
2545 \begin_inset Text
2546
2547 \begin_layout Plain Layout
2548 0
2549 \end_layout
2550
2551 \end_inset
2552 </cell>
2553 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2554 \begin_inset Text
2555
2556 \begin_layout Plain Layout
2557 1
2558 \end_layout
2559
2560 \end_inset
2561 </cell>
2562 <cell alignment="center" valignment="top" topline="true" usebox="none">
2563 \begin_inset Text
2564
2565 \begin_layout Plain Layout
2566 one
2567 \end_layout
2568
2569 \end_inset
2570 </cell>
2571 </row>
2572 <row>
2573 <cell alignment="center" valignment="top" usebox="none">
2574 \begin_inset Text
2575
2576 \begin_layout Plain Layout
2577 1
2578 \end_layout
2579
2580 \end_inset
2581 </cell>
2582 <cell alignment="center" valignment="top" leftline="true" usebox="none">
2583 \begin_inset Text
2584
2585 \begin_layout Plain Layout
2586 2
2587 \end_layout
2588
2589 \end_inset
2590 </cell>
2591 <cell alignment="center" valignment="top" usebox="none">
2592 \begin_inset Text
2593
2594 \begin_layout Plain Layout
2595 two
2596 \end_layout
2597
2598 \end_inset
2599 </cell>
2600 </row>
2601 <row>
2602 <cell alignment="center" valignment="top" usebox="none">
2603 \begin_inset Text
2604
2605 \begin_layout Plain Layout
2606 2
2607 \end_layout
2608
2609 \end_inset
2610 </cell>
2611 <cell alignment="center" valignment="top" leftline="true" usebox="none">
2612 \begin_inset Text
2613
2614 \begin_layout Plain Layout
2615 3
2616 \end_layout
2617
2618 \end_inset
2619 </cell>
2620 <cell alignment="center" valignment="top" usebox="none">
2621 \begin_inset Text
2622
2623 \begin_layout Plain Layout
2624 three
2625 \end_layout
2626
2627 \end_inset
2628 </cell>
2629 </row>
2630 <row>
2631 <cell alignment="center" valignment="top" usebox="none">
2632 \begin_inset Text
2633
2634 \begin_layout Plain Layout
2635 3
2636 \end_layout
2637
2638 \end_inset
2639 </cell>
2640 <cell alignment="center" valignment="top" leftline="true" usebox="none">
2641 \begin_inset Text
2642
2643 \begin_layout Plain Layout
2644 4
2645 \end_layout
2646
2647 \end_inset
2648 </cell>
2649 <cell alignment="center" valignment="top" usebox="none">
2650 \begin_inset Text
2651
2652 \begin_layout Plain Layout
2653 four
2654 \end_layout
2655
2656 \end_inset
2657 </cell>
2658 </row>
2659 </lyxtabular>
2660
2661 \end_inset
2662
2663
2664 \end_layout
2665
2666 \begin_layout Standard
2667 The box shows you which block to mark.
2668 Now this block should be sorted row-wise, with the sort key being the numbers
2669 in descending order, i.e.
2670 we want the lines being numbered 4,3,2,1.
2671 Go to the block menu, then select sort.
2672 Use
2673 \family typewriter
2674 R)ow
2675 \family default
2676 , because that is how we want to sort this block.
2677 The X position of the sort key vector is 0, because the column 0 contains
2678 the numbers.
2679 The Z position is 0, too, because those numbers are on sheet 0.
2680 Now chose
2681 \family typewriter
2682 D)escending
2683 \family default
2684 as direction.
2685 At this point, you could add a secondary key or decide to sort the block
2686 by the keys entered so far.
2687 Use
2688 \family typewriter
2689 S)ort region
2690 \family default
2691 to sort it.
2692 That's it, the screen should look like this now:
2693 \end_layout
2694
2695 \begin_layout Standard
2696 \align center
2697 \begin_inset Tabular
2698 <lyxtabular version="3" rows="5" columns="3">
2699 <features>
2700 <column alignment="center" valignment="top" width="0">
2701 <column alignment="center" valignment="top" width="0">
2702 <column alignment="center" valignment="top" width="0">
2703 <row>
2704 <cell alignment="center" valignment="top" usebox="none">
2705 \begin_inset Text
2706
2707 \begin_layout Plain Layout
2708 0
2709 \end_layout
2710
2711 \end_inset
2712 </cell>
2713 <cell alignment="center" valignment="top" usebox="none">
2714 \begin_inset Text
2715
2716 \begin_layout Plain Layout
2717 0
2718 \end_layout
2719
2720 \end_inset
2721 </cell>
2722 <cell alignment="center" valignment="top" usebox="none">
2723 \begin_inset Text
2724
2725 \begin_layout Plain Layout
2726 1
2727 \end_layout
2728
2729 \end_inset
2730 </cell>
2731 </row>
2732 <row>
2733 <cell alignment="center" valignment="top" usebox="none">
2734 \begin_inset Text
2735
2736 \begin_layout Plain Layout
2737 0
2738 \end_layout
2739
2740 \end_inset
2741 </cell>
2742 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
2743 \begin_inset Text
2744
2745 \begin_layout Plain Layout
2746 4
2747 \end_layout
2748
2749 \end_inset
2750 </cell>
2751 <cell alignment="center" valignment="top" topline="true" usebox="none">
2752 \begin_inset Text
2753
2754 \begin_layout Plain Layout
2755 four
2756 \end_layout
2757
2758 \end_inset
2759 </cell>
2760 </row>
2761 <row>
2762 <cell alignment="center" valignment="top" usebox="none">
2763 \begin_inset Text
2764
2765 \begin_layout Plain Layout
2766 1
2767 \end_layout
2768
2769 \end_inset
2770 </cell>
2771 <cell alignment="center" valignment="top" leftline="true" usebox="none">
2772 \begin_inset Text
2773
2774 \begin_layout Plain Layout
2775 3
2776 \end_layout
2777
2778 \end_inset
2779 </cell>
2780 <cell alignment="center" valignment="top" usebox="none">
2781 \begin_inset Text
2782
2783 \begin_layout Plain Layout
2784 three
2785 \end_layout
2786
2787 \end_inset
2788 </cell>
2789 </row>
2790 <row>
2791 <cell alignment="center" valignment="top" usebox="none">
2792 \begin_inset Text
2793
2794 \begin_layout Plain Layout
2795 2
2796 \end_layout
2797
2798 \end_inset
2799 </cell>
2800 <cell alignment="center" valignment="top" leftline="true" usebox="none">
2801 \begin_inset Text
2802
2803 \begin_layout Plain Layout
2804 2
2805 \end_layout
2806
2807 \end_inset
2808 </cell>
2809 <cell alignment="center" valignment="top" usebox="none">
2810 \begin_inset Text
2811
2812 \begin_layout Plain Layout
2813 two
2814 \end_layout
2815
2816 \end_inset
2817 </cell>
2818 </row>
2819 <row>
2820 <cell alignment="center" valignment="top" usebox="none">
2821 \begin_inset Text
2822
2823 \begin_layout Plain Layout
2824 3
2825 \end_layout
2826
2827 \end_inset
2828 </cell>
2829 <cell alignment="center" valignment="top" leftline="true" usebox="none">
2830 \begin_inset Text
2831
2832 \begin_layout Plain Layout
2833 1
2834 \end_layout
2835
2836 \end_inset
2837 </cell>
2838 <cell alignment="center" valignment="top" usebox="none">
2839 \begin_inset Text
2840
2841 \begin_layout Plain Layout
2842 one
2843 \end_layout
2844
2845 \end_inset
2846 </cell>
2847 </row>
2848 </lyxtabular>
2849
2850 \end_inset
2851
2852
2853 \end_layout
2854
2855 \begin_layout Subsubsection
2856 Mirror
2857 \end_layout
2858
2859 \begin_layout Standard
2860 Mirroring a marked block of cells can be done in three directions: Left/right,
2861 upside/down and front/back.
2862
2863 \end_layout
2864
2865 \begin_layout Subsection
2866 Saving and Loading
2867 \end_layout
2868
2869 \begin_layout Subsubsection
2870 File names
2871 \end_layout
2872
2873 \begin_layout Standard
2874 Usually, you want to overwrite the loaded file.
2875 For this reason, the loaded file name is remembered.
2876 If the sheet doesn't have a file name, like after starting an empty sheet,
2877 you will be asked for a name when saving.
2878 \end_layout
2879
2880 \begin_layout Standard
2881 Occasionally, you may want to rename a sheet, like before making critical
2882 changes or when you load an existing sheet to have a start for making a
2883 new one.
2884 The Save As function allows you to save the file under a new name.
2885 \end_layout
2886
2887 \begin_layout Subsubsection
2888 File Formats
2889 \end_layout
2890
2891 \begin_layout Paragraph
2892 XDR (.tp)
2893 \end_layout
2894
2895 \begin_layout Standard
2896 XDR (eXternal Data Representation) is a standard invented by Sun Microsystems
2897 which defines a canonical way of storing/transporting data on external
2898 media.
2899 Its advantage is that it is widely available and that it defines a portable
2900 floating point number format.
2901 The native teapot file format uses XDR so it is portable across different
2902 machine architectures and operating systems.
2903 The advantage of this over the portable ASCII format is that due to the
2904 (usually) missing conversion calculations any floating point constants
2905 will be saved/loaded exactly without conversion errors.
2906 \end_layout
2907
2908 \begin_layout Paragraph
2909 ASCII (.tpa)
2910 \end_layout
2911
2912 \begin_layout Standard
2913 The ASCII file format allows easy generation/modification of saved sheets
2914 by shell scripts.
2915 Due to binary/ASCII conversion, there may be conversion errors in floating
2916 point constants.
2917 The default extension is
2918 \family typewriter
2919 .
2920 \family default
2921 tpa.
2922
2923 \end_layout
2924
2925 \begin_layout Paragraph
2926 CSV (.csv)
2927 \end_layout
2928
2929 \begin_layout Standard
2930 CSV (comma seperated value) files only contain the data, not the expressions
2931 calculating it.
2932 Many spread sheets can generate this file format and many graphics programs
2933 like gnuplot(1) can read it.
2934 The field separator usually is a tab or comma, strings may be enclosed
2935 in double quotes and decimal numbers have a dot to mark the fractional
2936 part.
2937 One popular variation uses semicolons for separating fields and a decimal
2938 comma instead of a decimal point, which teapot tries to autodetect.
2939 \end_layout
2940
2941 \begin_layout Standard
2942 On load, strings without quotes and with a
2943 \emph on
2944 0x
2945 \emph default
2946 prefix followed by hexadecimal digits will be converted to integers.
2947 When loading CSV files, the sheet will not be cleared and the data will
2948 be load relative to the current cursor position.
2949 \end_layout
2950
2951 \begin_layout Paragraph
2952 SC SpreadsheetCalculator (.sc)
2953 \end_layout
2954
2955 \begin_layout Standard
2956 teapot can load simple SC sheets to convert them to teapot's native format.
2957 While loading, teapot converts all references to absolute cell positions
2958 to labels.
2959 This allows to insert and delete in such sheets without screwing the whole
2960 sheet up.
2961 teapot can not save sheets in SC format, because SC lacks many features.
2962 For now, only the most basic SC features are supported.
2963 \end_layout
2964
2965 \begin_layout Paragraph
2966 Lotus 1-2-3 (.wk1)
2967 \end_layout
2968
2969 \begin_layout Standard
2970 teapot can load simple WK1 sheets to convert them to teapot's native format.
2971 By default, 1-2-3 cell references are relative, so don't be surprised by
2972 a big amount of relative references in the resulting teapot sheet.
2973 For now, only the most basic 1-2-3 features are supported.
2974 \end_layout
2975
2976 \begin_layout Paragraph
2977 Formatted ASCII (.txt)
2978 \end_layout
2979
2980 \begin_layout Standard
2981 The generated formatted ASCII files contain about what you see on the screen.
2982 If your sheet has more than one layer, then the various layers will be
2983 saved separated by form feeds.
2984 \end_layout
2985
2986 \begin_layout Paragraph
2987 Troff tbl (.tbl)
2988 \end_layout
2989
2990 \begin_layout Standard
2991 teapot can generate tbl(1) table bodies in single files which are supposed
2992 to be used like this:
2993 \end_layout
2994
2995 \begin_layout Quote
2996
2997 \family typewriter
2998 .TS
2999 \begin_inset Newline newline
3000 \end_inset
3001
3002
3003 \family default
3004 \shape italic
3005 options
3006 \family typewriter
3007 \shape default
3008 ;
3009 \begin_inset Newline newline
3010 \end_inset
3011
3012 .so
3013 \family default
3014
3015 \shape italic
3016 filename
3017 \begin_inset Newline newline
3018 \end_inset
3019
3020
3021 \family typewriter
3022 \shape default
3023 .TE
3024 \end_layout
3025
3026 \begin_layout Standard
3027 You will have to use soelim(1) to eliminate the
3028 \family typewriter
3029 .so
3030 \family default
3031 requests before the tbl run.
3032 The
3033 \shape italic
3034 options
3035 \family typewriter
3036 \shape default
3037 ;
3038 \family default
3039 are optional.
3040 If you use GNU roff, you will need to eliminate
3041 \family typewriter
3042 .lf
3043 \family default
3044 requests, because this GNU roff extension confuses GNU tbl:
3045 \end_layout
3046
3047 \begin_layout Quote
3048
3049 \family typewriter
3050 soelim
3051 \family default
3052
3053 \shape italic
3054 file
3055 \shape default
3056
3057 \family typewriter
3058 | grep -v '^
3059 \backslash
3060 .lf'
3061 \end_layout
3062
3063 \begin_layout Standard
3064 Alternatively, you can generate a stand-alone document, which needs no further
3065 operations to format and print.
3066 Note: If no block is marked, the whole sheet will be saved.
3067 \end_layout
3068
3069 \begin_layout Paragraph
3070 LaTeX (.latex)
3071 \end_layout
3072
3073 \begin_layout Standard
3074 If you generate LaTeX2e tables in single files, you include them in documents
3075 using the
3076 \family typewriter
3077
3078 \backslash
3079 include
3080 \family default
3081 command.
3082 Alternatively, you can generate a stand-alone document, which needs no
3083 further operations to format and print.
3084 Note: If no block is marked, the whole sheet will be saved.
3085 \end_layout
3086
3087 \begin_layout Paragraph
3088 ConTeXt (.tex)
3089 \end_layout
3090
3091 \begin_layout Standard
3092 Analogous to LaTeX output, this generates input suitable to the ConTeXt
3093 macro package.
3094 \end_layout
3095
3096 \begin_layout Paragraph
3097 HTML (.html)
3098 \end_layout
3099
3100 \begin_layout Standard
3101 You can generate html table bodies in single files which could be used in
3102 combination with server-side includes.
3103 This feature differs between the various servers, so refer to the manual
3104 for your web server for details, please.
3105
3106 \end_layout
3107
3108 \begin_layout Standard
3109 Alternatively, you can generate a stand-alone document.
3110 Note: If no block is marked, the whole sheet will be saved.
3111 \end_layout
3112
3113 \begin_layout Subsection
3114 Other Functions
3115 \end_layout
3116
3117 \begin_layout Subsubsection
3118 Goto Location
3119 \end_layout
3120
3121 \begin_layout Standard
3122 Sometimes, you directly want to go to a specific position, either to change
3123 its contents to see which cell a location expression refers to.
3124 This function lets you enter an expression, which must evaluate to a value
3125 of the type location.
3126 If so, the cursor is positioned to that location.
3127 For example, you could enter
3128 \family typewriter
3129 &(10,2)
3130 \family default
3131 to go to cell 10,2 of the current layer or you could enter the name of
3132 a label you want to go to.
3133 Relative movements are no problem, either.
3134
3135 \end_layout
3136
3137 \begin_layout Subsubsection
3138 Shell
3139 \end_layout
3140
3141 \begin_layout Standard
3142 Start a sub shell.
3143 Exiting from that sub shell will bring you back into teapot.
3144 This function does not exist in the GUI version.
3145 \end_layout
3146
3147 \begin_layout Subsubsection
3148 Version
3149 \end_layout
3150
3151 \begin_layout Standard
3152 teapot will display its version number and copyright statement.
3153 \end_layout
3154
3155 \begin_layout Subsubsection
3156 Help
3157 \end_layout
3158
3159 \begin_layout Standard
3160 If teapot was built with the integrated help viewer, you can access this
3161 manual from within teapot itself.
3162 \end_layout
3163
3164 \begin_layout Section
3165 Batch functions
3166 \end_layout
3167
3168 \begin_layout Standard
3169 Besides interactive facilities, teapot has a batch mode.
3170 Using this batch mode, shell scripts can generate output from teapot sheets.
3171 This is handy if you use make(1) to generate a bigger document containing
3172 tables, because you don't have to generate a tbl or LaTeX file each time
3173 you modified a sheet: make will do so.
3174 In batch mode, teapot reads batch commands from standard input.
3175 The following commands are available:
3176 \end_layout
3177
3178 \begin_layout Description
3179
3180 \family typewriter
3181 \series bold
3182 goto
3183 \family default
3184 \shape italic
3185
3186 \begin_inset space ~
3187 \end_inset
3188
3189 location
3190 \series default
3191 \shape default
3192 Go to the specified
3193 \shape italic
3194 location
3195 \shape default
3196 .
3197
3198 \end_layout
3199
3200 \begin_layout Description
3201
3202 \family typewriter
3203 \series bold
3204 from
3205 \family default
3206 \shape italic
3207
3208 \begin_inset space ~
3209 \end_inset
3210
3211 location
3212 \series default
3213 \shape default
3214 Start marking a block.
3215
3216 \end_layout
3217
3218 \begin_layout Description
3219
3220 \family typewriter
3221 \series bold
3222 to
3223 \family default
3224 \shape italic
3225
3226 \begin_inset space ~
3227 \end_inset
3228
3229 location
3230 \series default
3231 \shape default
3232 End marking a block.
3233
3234 \end_layout
3235
3236 \begin_layout Description
3237
3238 \family typewriter
3239 \series bold
3240 sort-x
3241 \family default
3242
3243 \begin_inset space ~
3244 \end_inset
3245
3246 d|a
3247 \emph on
3248
3249 \begin_inset space ~
3250 \end_inset
3251
3252 y
3253 \begin_inset space ~
3254 \end_inset
3255
3256 z
3257 \emph default
3258
3259 \begin_inset space ~
3260 \end_inset
3261
3262 [
3263 \begin_inset space ~
3264 \end_inset
3265
3266 d|a
3267 \emph on
3268
3269 \begin_inset space ~
3270 \end_inset
3271
3272 y
3273 \begin_inset space ~
3274 \end_inset
3275
3276 z
3277 \emph default
3278
3279 \begin_inset space ~
3280 \end_inset
3281
3282 ...
3283 \begin_inset space ~
3284 \end_inset
3285
3286 ]
3287 \end_layout
3288
3289 \begin_layout Description
3290
3291 \family typewriter
3292 \series bold
3293 sort-
3294 \family default
3295 y
3296 \begin_inset space ~
3297 \end_inset
3298
3299 d|a
3300 \emph on
3301
3302 \begin_inset space ~
3303 \end_inset
3304
3305 x
3306 \begin_inset space ~
3307 \end_inset
3308
3309 z
3310 \emph default
3311
3312 \begin_inset space ~
3313 \end_inset
3314
3315 [
3316 \begin_inset space ~
3317 \end_inset
3318
3319 d|a
3320 \emph on
3321
3322 \begin_inset space ~
3323 \end_inset
3324
3325 x
3326 \begin_inset space ~
3327 \end_inset
3328
3329 z
3330 \emph default
3331
3332 \begin_inset space ~
3333 \end_inset
3334
3335 ...
3336 \begin_inset space ~
3337 \end_inset
3338
3339 ]
3340 \series default
3341
3342 \end_layout
3343
3344 \begin_layout Description
3345
3346 \family typewriter
3347 \series bold
3348 sort-
3349 \family default
3350 z
3351 \begin_inset space ~
3352 \end_inset
3353
3354 d|a
3355 \emph on
3356
3357 \begin_inset space ~
3358 \end_inset
3359
3360 x
3361 \begin_inset space ~
3362 \end_inset
3363
3364
3365 \emph default
3366 y
3367 \begin_inset space ~
3368 \end_inset
3369
3370 [
3371 \begin_inset space ~
3372 \end_inset
3373
3374 d|a
3375 \emph on
3376
3377 \begin_inset space ~
3378 \end_inset
3379
3380 x
3381 \begin_inset space ~
3382 \end_inset
3383
3384
3385 \emph default
3386 y
3387 \begin_inset space ~
3388 \end_inset
3389
3390 ...
3391 \begin_inset space ~
3392 \end_inset
3393
3394 ]
3395 \series default
3396 Sorts the marked block as described in section
3397 \begin_inset CommandInset ref
3398 LatexCommand vref
3399 reference "sub:Sort"
3400
3401 \end_inset
3402
3403 , column-wise, row-wise or depth-wise, respectivly.
3404 "d" or "a" specify the sort order to be descending or ascending.
3405
3406 \emph on
3407 x
3408 \emph default
3409 ,
3410 \emph on
3411 y
3412 \emph default
3413 and
3414 \emph on
3415 z
3416 \emph default
3417 specify the position of the sort key
3418 \family typewriter
3419 relative
3420 \family default
3421 to the first cell of the marked block.
3422 Up to eight sort keys can be specified.
3423 This example reproduces the result from section
3424 \begin_inset CommandInset ref
3425 LatexCommand ref
3426 reference "sub:Sort"
3427
3428 \end_inset
3429
3430 :
3431 \end_layout
3432
3433 \begin_deeper
3434 \begin_layout Quote
3435
3436 \family typewriter
3437 echo "
3438 \begin_inset Newline newline
3439 \end_inset
3440
3441 from &(1,1,0)
3442 \begin_inset Newline newline
3443 \end_inset
3444
3445 to &(2,4,0)
3446 \begin_inset Newline newline
3447 \end_inset
3448
3449 sort-y d 0 0
3450 \begin_inset Newline newline
3451 \end_inset
3452
3453 save-csv result_num.txt
3454 \begin_inset Newline newline
3455 \end_inset
3456
3457 " | teapot -b doc/unsorted
3458 \end_layout
3459
3460 \end_deeper
3461 \begin_layout Description
3462
3463 \family typewriter
3464 \series bold
3465 save-tbl
3466 \family default
3467 \emph on
3468
3469 \begin_inset space ~
3470 \end_inset
3471
3472 file
3473 \series default
3474 \emph default
3475
3476 \end_layout
3477
3478 \begin_layout Description
3479
3480 \family typewriter
3481 \series bold
3482 save-csv
3483 \family default
3484 \emph on
3485
3486 \begin_inset space ~
3487 \end_inset
3488
3489 file
3490 \series default
3491 \emph default
3492
3493 \end_layout
3494
3495 \begin_layout Description
3496
3497 \family typewriter
3498 \series bold
3499 save-latex
3500 \family default
3501 \emph on
3502
3503 \begin_inset space ~
3504 \end_inset
3505
3506 file
3507 \series default
3508 \emph default
3509
3510 \end_layout
3511
3512 \begin_layout Description
3513
3514 \family typewriter
3515 \series bold
3516 save-context
3517 \family default
3518 \emph on
3519
3520 \begin_inset space ~
3521 \end_inset
3522
3523 file
3524 \series default
3525 \emph default
3526
3527 \end_layout
3528
3529 \begin_layout Description
3530
3531 \family typewriter
3532 \series bold
3533 save-html
3534 \begin_inset space ~
3535 \end_inset
3536
3537
3538 \family default
3539 \emph on
3540 file
3541 \series default
3542 \emph default
3543 Save the marked block in the specified format as
3544 \emph on
3545 file
3546 \emph default
3547 .
3548
3549 \end_layout
3550
3551 \begin_layout Description
3552
3553 \family typewriter
3554 \series bold
3555 load-csv
3556 \begin_inset space ~
3557 \end_inset
3558
3559
3560 \family default
3561 \emph on
3562 file
3563 \series default
3564 \emph default
3565 Load
3566 \emph on
3567 file
3568 \emph default
3569 in the specified format to the last
3570 \family typewriter
3571 goto
3572 \family default
3573 location.
3574 This is the same functionality as the interactive load described in subsection
3575
3576 \emph on
3577 5.12.4
3578 \emph default
3579 .
3580
3581 \end_layout
3582
3583 \begin_layout Section
3584 Expressions
3585 \end_layout
3586
3587 \begin_layout Standard
3588 Cells consist of a base (reset) expression, a clocked expression, and a
3589 current value.
3590 If the sheet is currently in the reset state (the default), all cells display
3591 their base value as current value.
3592 \end_layout
3593
3594 \begin_layout Standard
3595 When the sheet is clocked (see Table
3596 \begin_inset CommandInset ref
3597 LatexCommand ref
3598 reference "tab:Key-Bindings-in"
3599
3600 \end_inset
3601
3602 ), the clocked expression is evaluated, using the current value of referenced
3603 cells.
3604 The new current value is the result of that evaluation.
3605 \end_layout
3606
3607 \begin_layout Subsection
3608 Data Types
3609 \end_layout
3610
3611 \begin_layout Standard
3612 In teapot, each value has an associated data type.
3613 The following data types exist:
3614 \end_layout
3615
3616 \begin_layout Description
3617 Empty Empty cells have 0, 0.0 or
3618 \begin_inset Quotes eld
3619 \end_inset
3620
3621
3622 \begin_inset Quotes erd
3623 \end_inset
3624
3625 as value, depending on context.
3626
3627 \end_layout
3628
3629 \begin_layout Description
3630 String A string is a sequence of characters enclosed by double quotes:
3631 \family typewriter
3632 "This is a string"
3633 \family default
3634 .
3635 A double quote can be part of the string, if it is quoted using a backslash:
3636
3637 \family typewriter
3638
3639 \begin_inset Quotes eld
3640 \end_inset
3641
3642
3643 \backslash
3644
3645 \family default
3646
3647 \begin_inset Quotes erd
3648 \end_inset
3649
3650
3651 \begin_inset Quotes erd
3652 \end_inset
3653
3654 .
3655 If you want the backslash to appear in the output instead of quoting the
3656 next character, use it to quote itself:
3657 \family typewriter
3658
3659 \begin_inset Quotes eld
3660 \end_inset
3661
3662
3663 \backslash
3664
3665 \backslash
3666
3667 \family default
3668
3669 \begin_inset Quotes erd
3670 \end_inset
3671
3672 .
3673 \end_layout
3674
3675 \begin_layout Description
3676 Floating
3677 \begin_inset space ~
3678 \end_inset
3679
3680 Point Floating point values are inexact, their precision and range depends
3681 on the implementation of the C type double on your system.
3682 An example is:
3683 \family typewriter
3684 42.0
3685 \family default
3686
3687 \end_layout
3688
3689 \begin_layout Description
3690 Integer Integer values are exact, their range depends on the C type long
3691 on your system.
3692 An example is:
3693 \family typewriter
3694 42
3695 \family default
3696
3697 \end_layout
3698
3699 \begin_layout Description
3700 Location Cell labels and the
3701 \family typewriter
3702 &()
3703 \family default
3704 function have this type, but there are no location constant literals.
3705 \end_layout
3706
3707 \begin_layout Description
3708 Error Syntactical or semantical (type mismatch) errors cause this value,
3709 as well as division by 0 and the function
3710 \family typewriter
3711 error()
3712 \family default
3713 .
3714 An error always has an assigned error message.
3715 Functions and operators, when applied to a value of the type error, evaluate
3716 to just that value.
3717 That way, the first error which was found deep inside a complicated expression
3718 will be shown.
3719
3720 \end_layout
3721
3722 \begin_layout Subsection
3723 Operators
3724 \end_layout
3725
3726 \begin_layout Standard
3727 Unlike other spread sheets, the operators in teapot check the type of the
3728 values they are applied to, which means the try to add a string to a floating
3729 point number will result in an type error.
3730 The following operators are available, listed in ascending precendence:
3731
3732 \end_layout
3733
3734 \begin_layout Description
3735
3736 \series bold
3737 \emph on
3738 x
3739 \family typewriter
3740 \emph default
3741 <
3742 \family default
3743 \emph on
3744 y
3745 \series default
3746 \emph default
3747 evaluates to 1 if
3748 \emph on
3749 x
3750 \emph default
3751 is less than
3752 \emph on
3753 y
3754 \emph default
3755 .
3756 If
3757 \emph on
3758 x
3759 \emph default
3760 or
3761 \emph on
3762 y
3763 \emph default
3764 are empty, they are considered to be 0 if the other is an integer number,
3765 0.0 if it is a floating point number and the empty string if it is a string.
3766
3767 \end_layout
3768
3769 \begin_layout Description
3770
3771 \series bold
3772 \emph on
3773 x
3774 \family typewriter
3775 \emph default
3776 <=
3777 \family default
3778 \emph on
3779 y
3780 \series default
3781 \emph default
3782 evaluates to 1 if
3783 \emph on
3784 x
3785 \emph default
3786 is less than or equal to
3787 \emph on
3788 y
3789 \emph default
3790 .
3791 \end_layout
3792
3793 \begin_layout Description
3794
3795 \series bold
3796 \emph on
3797 x
3798 \family typewriter
3799 \emph default
3800 >=
3801 \family default
3802 \emph on
3803 y
3804 \series default
3805 \emph default
3806 evaluates to 1 if
3807 \emph on
3808 x
3809 \emph default
3810 is greater than or equal to
3811 \emph on
3812 y
3813 \emph default
3814 .
3815 \end_layout
3816
3817 \begin_layout Description
3818
3819 \series bold
3820 \emph on
3821 x
3822 \family typewriter
3823 \emph default
3824 >
3825 \family default
3826 \emph on
3827 y
3828 \series default
3829 \emph default
3830 evaluates to 1 if
3831 \emph on
3832 x
3833 \emph default
3834 is greater than
3835 \emph on
3836 y
3837 \emph default
3838 .
3839 \end_layout
3840
3841 \begin_layout Description
3842
3843 \series bold
3844 \emph on
3845 x
3846 \family typewriter
3847 \emph default
3848 ==
3849 \family default
3850 \emph on
3851 y
3852 \series default
3853 \emph default
3854 evaluates to 1 if
3855 \emph on
3856 x
3857 \emph default
3858 is equal to
3859 \emph on
3860 y
3861 \emph default
3862 .
3863 \end_layout
3864
3865 \begin_layout Description
3866
3867 \series bold
3868 \emph on
3869 x
3870 \family typewriter
3871 \emph default
3872 =
3873 \family default
3874 \emph on
3875 y
3876 \series default
3877 \emph default
3878 evaluates to 1 if the floating point value
3879 \emph on
3880 x
3881 \emph default
3882 is almost equal to the floating point value
3883 \emph on
3884 y
3885 \emph default
3886 .
3887 Almost equal means, the numbers are at most neighbours.
3888
3889 \end_layout
3890
3891 \begin_layout Description
3892
3893 \series bold
3894 \emph on
3895 x
3896 \family typewriter
3897 \emph default
3898 !=
3899 \family default
3900 \emph on
3901 y
3902 \series default
3903 \emph default
3904 evaluates to 1 if
3905 \emph on
3906 x
3907 \emph default
3908 is not equal to
3909 \emph on
3910 y
3911 \emph default
3912 .
3913 \end_layout
3914
3915 \begin_layout Description
3916
3917 \series bold
3918 \emph on
3919 x
3920 \family typewriter
3921 \emph default
3922 +
3923 \family default
3924 \emph on
3925 y
3926 \series default
3927 \emph default
3928 evaluates to the sum if
3929 \emph on
3930 x
3931 \emph default
3932 and
3933 \emph on
3934 y
3935 \emph default
3936 are numbers.
3937 If
3938 \emph on
3939 x
3940 \emph default
3941 and
3942 \emph on
3943 y
3944 \emph default
3945 are strings, the result is the concatenated string.
3946 There is no dedicated logical
3947 \noun on
3948 or
3949 \noun default
3950 operation, so use
3951 \family typewriter
3952 +
3953 \family default
3954 for that.
3955
3956 \end_layout
3957
3958 \begin_layout Description
3959
3960 \series bold
3961 \emph on
3962 x
3963 \family typewriter
3964 \emph default
3965 -
3966 \family default
3967 \emph on
3968 y
3969 \series default
3970 \emph default
3971 evaluates to the difference if
3972 \emph on
3973 x
3974 \emph default
3975 and
3976 \emph on
3977 y
3978 \emph default
3979 are numbers.
3980 \end_layout
3981
3982 \begin_layout Description
3983
3984 \series bold
3985 \emph on
3986 x
3987 \family typewriter
3988 \emph default
3989 *
3990 \family default
3991 \emph on
3992 y
3993 \series default
3994 \emph default
3995 evaluates to the product if
3996 \emph on
3997 x
3998 \emph default
3999 and
4000 \emph on
4001 y
4002 \emph default
4003 are numbers.
4004 There is no dedicated logical
4005 \noun on
4006 and
4007 \noun default
4008 operation, so use
4009 \family typewriter
4010 *
4011 \family default
4012 for that.
4013
4014 \end_layout
4015
4016 \begin_layout Description
4017
4018 \series bold
4019 \emph on
4020 x
4021 \family typewriter
4022 \emph default
4023 /
4024 \family default
4025 \emph on
4026 y
4027 \series default
4028 \emph default
4029 evaluates to the quotient if
4030 \emph on
4031 x
4032 \emph default
4033 and
4034 \emph on
4035 y
4036 \emph default
4037 are numbers.
4038 \end_layout
4039
4040 \begin_layout Description
4041
4042 \series bold
4043 \emph on
4044 x
4045 \family typewriter
4046 \emph default
4047 %
4048 \family default
4049 \emph on
4050 y
4051 \series default
4052 \emph default
4053 evaluates to the remainder of the division if
4054 \emph on
4055 x
4056 \emph default
4057 and
4058 \emph on
4059 y
4060 \emph default
4061 are numbers.
4062 \end_layout
4063
4064 \begin_layout Description
4065
4066 \series bold
4067 \emph on
4068 x^y
4069 \series default
4070 \emph default
4071 evaluates to
4072 \emph on
4073 x
4074 \emph default
4075 to the power of
4076 \emph on
4077 y
4078 \emph default
4079 .
4080 \end_layout
4081
4082 \begin_layout Description
4083
4084 \family typewriter
4085 \series bold
4086 -
4087 \family default
4088 \emph on
4089 x
4090 \series default
4091 \emph default
4092 evaluates to
4093 \family typewriter
4094 -
4095 \family default
4096 \emph on
4097 x
4098 \emph default
4099 if
4100 \emph on
4101 x
4102 \emph default
4103 is a number.
4104 If
4105 \emph on
4106 x
4107 \emph default
4108 is empty, the result will be empty, too.
4109
4110 \end_layout
4111
4112 \begin_layout Description
4113
4114 \family typewriter
4115 \series bold
4116 (
4117 \family default
4118 \emph on
4119 expression
4120 \family typewriter
4121 \emph default
4122 )
4123 \family default
4124 \series default
4125 evaluates to the expression.
4126
4127 \end_layout
4128
4129 \begin_layout Description
4130
4131 \series bold
4132 \emph on
4133 function
4134 \family typewriter
4135 \emph default
4136 (
4137 \family default
4138 \emph on
4139 argument
4140 \family typewriter
4141 \emph default
4142 ,
4143 \family default
4144 ...
4145 \family typewriter
4146 )
4147 \family default
4148 \series default
4149 evaluates to the value of the function applied to the values resulting
4150 from evaluating the argument expressions.
4151
4152 \end_layout
4153
4154 \begin_layout Subsection
4155 Functions
4156 \end_layout
4157
4158 \begin_layout Standard
4159 This section documents all available functions in alphabetical order.
4160 The functions are given in a C-like notation, so use
4161 \family typewriter
4162 @(0,0,0)
4163 \family default
4164 instead of
4165 \family typewriter
4166 @(integer 0, integer 0, integer 0)
4167 \family default
4168 .
4169 If no type is given for the result of a function, it means the result type
4170 depends on the arguments.
4171 Brackets mark optional arguments.
4172
4173 \end_layout
4174
4175 \begin_layout Description
4176 @
4177 \series medium
4178 ([int
4179 \begin_inset space ~
4180 \end_inset
4181
4182
4183 \emph on
4184 x
4185 \emph default
4186 ][,[int
4187 \emph on
4188
4189 \begin_inset space ~
4190 \end_inset
4191
4192 y
4193 \emph default
4194 ][,[int
4195 \emph on
4196
4197 \begin_inset space ~
4198 \end_inset
4199
4200 z
4201 \emph default
4202 ]]])
4203 \end_layout
4204
4205 \begin_layout Description
4206 @
4207 \series medium
4208 (location
4209 \emph on
4210
4211 \begin_inset space ~
4212 \end_inset
4213
4214 l
4215 \emph default
4216 )
4217 \series default
4218 returns the value of the cell at position
4219 \emph on
4220 x
4221 \emph default
4222 ,
4223 \emph on
4224 y
4225 \emph default
4226 ,
4227 \emph on
4228 z
4229 \emph default
4230 .
4231 If any of
4232 \emph on
4233 x
4234 \emph default
4235 ,
4236 \emph on
4237 y
4238 \emph default
4239 or
4240 \emph on
4241 z
4242 \emph default
4243 is omitted, the coordinate of the cell is used.
4244
4245 \end_layout
4246
4247 \begin_layout Description
4248
4249 \series medium
4250 location
4251 \begin_inset space ~
4252 \end_inset
4253
4254
4255 \series default
4256 &
4257 \series medium
4258 ([int
4259 \emph on
4260
4261 \begin_inset space ~
4262 \end_inset
4263
4264 x
4265 \emph default
4266 ][,
4267 \begin_inset space ~
4268 \end_inset
4269
4270 [int
4271 \emph on
4272
4273 \begin_inset space ~
4274 \end_inset
4275
4276 y
4277 \emph default
4278 ][,
4279 \begin_inset space ~
4280 \end_inset
4281
4282 [int
4283 \emph on
4284
4285 \begin_inset space ~
4286 \end_inset
4287
4288 z
4289 \emph default
4290 ]]])
4291 \series default
4292 returns a pointer to the cell at location
4293 \emph on
4294 x
4295 \emph default
4296 ,
4297 \emph on
4298 y
4299 \emph default
4300 ,
4301 \emph on
4302 z
4303 \emph default
4304 .
4305 If
4306 \emph on
4307 z
4308 \emph default
4309 is omitted, the
4310 \emph on
4311 z
4312 \emph default
4313 position of the current cell is used.
4314 If
4315 \emph on
4316 y
4317 \emph default
4318 is missing as well, the
4319 \emph on
4320 y
4321 \emph default
4322 position (row) of the cell is used.
4323
4324 \end_layout
4325
4326 \begin_layout Description
4327
4328 \series medium
4329 string
4330 \begin_inset space ~
4331 \end_inset
4332
4333
4334 \series default
4335 $
4336 \series medium
4337 (string
4338 \emph on
4339
4340 \begin_inset space ~
4341 \end_inset
4342
4343 env
4344 \emph default
4345 )
4346 \series default
4347 evaluates to the contents of the specified environment variable.
4348 If the variable does not exist, then an empty string will be returned.
4349
4350 \end_layout
4351
4352 \begin_layout Description
4353
4354 \series medium
4355 float
4356 \begin_inset space ~
4357 \end_inset
4358
4359
4360 \series default
4361 abs
4362 \series medium
4363 (float
4364 \emph on
4365
4366 \begin_inset space ~
4367 \end_inset
4368
4369 x
4370 \emph default
4371 )
4372 \series default
4373
4374 \end_layout
4375
4376 \begin_layout Description
4377
4378 \series medium
4379 int
4380 \begin_inset space ~
4381 \end_inset
4382
4383
4384 \series default
4385 abs
4386 \series medium
4387 (int
4388 \begin_inset space ~
4389 \end_inset
4390
4391
4392 \emph on
4393 x
4394 \emph default
4395 )
4396 \series default
4397 evaluates to the absolute value of
4398 \emph on
4399 x
4400 \emph default
4401 .
4402
4403 \end_layout
4404
4405 \begin_layout Description
4406
4407 \series medium
4408 float
4409 \begin_inset space ~
4410 \end_inset
4411
4412
4413 \series default
4414 acos
4415 \series medium
4416 (float|int
4417 \emph on
4418
4419 \begin_inset space ~
4420 \end_inset
4421
4422 x
4423 \emph default
4424 )
4425 \series default
4426 evaluates to the arc cosine of
4427 \emph on
4428 x
4429 \emph default
4430 , where
4431 \emph on
4432 x
4433 \emph default
4434 is given in radians.
4435
4436 \end_layout
4437
4438 \begin_layout Description
4439
4440 \series medium
4441 float
4442 \begin_inset space ~
4443 \end_inset
4444
4445
4446 \series default
4447 arcosh
4448 \series medium
4449 (float|int
4450 \emph on
4451
4452 \begin_inset space ~
4453 \end_inset
4454
4455 x
4456 \emph default
4457 )
4458 \series default
4459 evaluates to the arc hyperbolic cosine of
4460 \emph on
4461 x
4462 \emph default
4463 , where
4464 \emph on
4465 x
4466 \emph default
4467 is given in radians.
4468
4469 \end_layout
4470
4471 \begin_layout Description
4472
4473 \series medium
4474 float
4475 \begin_inset space ~
4476 \end_inset
4477
4478
4479 \series default
4480 arsinh
4481 \series medium
4482 (float|int
4483 \emph on
4484
4485 \begin_inset space ~
4486 \end_inset
4487
4488 x
4489 \emph default
4490 )
4491 \series default
4492 evaluates to the arc hyperbolic sine of
4493 \emph on
4494 x
4495 \emph default
4496 , where
4497 \emph on
4498 x
4499 \emph default
4500 is given in radians.
4501
4502 \end_layout
4503
4504 \begin_layout Description
4505
4506 \series medium
4507 float
4508 \begin_inset space ~
4509 \end_inset
4510
4511
4512 \series default
4513 artanh
4514 \series medium
4515 (float|int
4516 \emph on
4517
4518 \begin_inset space ~
4519 \end_inset
4520
4521 x
4522 \emph default
4523 )
4524 \series default
4525 evaluates to the arc hyperbolic tangent of
4526 \emph on
4527 x
4528 \emph default
4529 , where
4530 \emph on
4531 x
4532 \emph default
4533 is given in radians.
4534
4535 \end_layout
4536
4537 \begin_layout Description
4538
4539 \series medium
4540 float
4541 \begin_inset space ~
4542 \end_inset
4543
4544
4545 \series default
4546 asin
4547 \series medium
4548 (float|int
4549 \emph on
4550
4551 \begin_inset space ~
4552 \end_inset
4553
4554 x
4555 \emph default
4556 )
4557 \series default
4558 evaluates to the arc sine of
4559 \emph on
4560 x
4561 \emph default
4562 , where
4563 \emph on
4564 x
4565 \emph default
4566 is given in radians.
4567
4568 \end_layout
4569
4570 \begin_layout Description
4571
4572 \series medium
4573 float
4574 \begin_inset space ~
4575 \end_inset
4576
4577
4578 \series default
4579 atan
4580 \series medium
4581 (float|int
4582 \emph on
4583
4584 \begin_inset space ~
4585 \end_inset
4586
4587 x
4588 \emph default
4589 )
4590 \series default
4591 evaluates to the arc tangent of
4592 \emph on
4593 x
4594 \emph default
4595 , where
4596 \emph on
4597 x
4598 \emph default
4599 is given in radians.
4600
4601 \end_layout
4602
4603 \begin_layout Description
4604 clock
4605 \series medium
4606 (integer
4607 \emph on
4608
4609 \begin_inset space ~
4610 \end_inset
4611
4612 condition
4613 \emph default
4614 ,[location[,location])
4615 \series default
4616 conditionally clocks the specified cell if the condition is not 0.
4617 If two locations are given, all cells in that range will be clocked.
4618 The return value of clock is empty.
4619
4620 \end_layout
4621
4622 \begin_layout Description
4623
4624 \series medium
4625 float
4626 \begin_inset space ~
4627 \end_inset
4628
4629
4630 \series default
4631 cos
4632 \series medium
4633 (float|int
4634 \emph on
4635
4636 \begin_inset space ~
4637 \end_inset
4638
4639 x
4640 \emph default
4641 )
4642 \series default
4643 evaluates to the cosine of
4644 \emph on
4645 x
4646 \emph default
4647 , where
4648 \emph on
4649 x
4650 \emph default
4651 is given in radians.
4652
4653 \end_layout
4654
4655 \begin_layout Description
4656
4657 \series medium
4658 float
4659 \begin_inset space ~
4660 \end_inset
4661
4662
4663 \series default
4664 cosh
4665 \series medium
4666 (float|int
4667 \emph on
4668
4669 \begin_inset space ~
4670 \end_inset
4671
4672 x
4673 \emph default
4674 )
4675 \series default
4676 evaluates to the hyperbolic cosine of
4677 \emph on
4678 x
4679 \emph default
4680 , where
4681 \emph on
4682 x
4683 \emph default
4684 is given in radians.
4685
4686 \end_layout
4687
4688 \begin_layout Description
4689
4690 \series medium
4691 float
4692 \begin_inset space ~
4693 \end_inset
4694
4695
4696 \series default
4697 deg2rad
4698 \series medium
4699 (float|int
4700 \emph on
4701
4702 \begin_inset space ~
4703 \end_inset
4704
4705 x
4706 \emph default
4707 )
4708 \series default
4709 evaluates to the degrees that are equivalent to
4710 \emph on
4711 x
4712 \emph default
4713 radians.
4714
4715 \end_layout
4716
4717 \begin_layout Description
4718
4719 \series medium
4720 float
4721 \begin_inset space ~
4722 \end_inset
4723
4724
4725 \series default
4726 e
4727 \series medium
4728 ()
4729 \series default
4730 evaluates to the Euler constant
4731 \emph on
4732 e
4733 \emph default
4734 .
4735
4736 \end_layout
4737
4738 \begin_layout Description
4739
4740 \series medium
4741 error
4742 \begin_inset space ~
4743 \end_inset
4744
4745
4746 \series default
4747 error
4748 \series medium
4749 (string
4750 \emph on
4751
4752 \begin_inset space ~
4753 \end_inset
4754
4755 message
4756 \emph default
4757 )
4758 \series default
4759 evaluates to an error with the specified message.
4760
4761 \end_layout
4762
4763 \begin_layout Description
4764 eval
4765 \series medium
4766 (location)
4767 \series default
4768 evaluates to the value of the expression in the cell at the given
4769 \emph on
4770 location
4771 \emph default
4772 , but evaluated in the context of the cell using eval().
4773 This function may not be used nested any deeper than 32 times.
4774
4775 \end_layout
4776
4777 \begin_layout Description
4778
4779 \series medium
4780 float
4781 \begin_inset space ~
4782 \end_inset
4783
4784
4785 \series default
4786 float
4787 \series medium
4788 (string
4789 \emph on
4790
4791 \begin_inset space ~
4792 \end_inset
4793
4794 s
4795 \emph default
4796 )
4797 \series default
4798 converts the given string into a floating point number.
4799
4800 \end_layout
4801
4802 \begin_layout Description
4803
4804 \series medium
4805 float
4806 \begin_inset space ~
4807 \end_inset
4808
4809
4810 \series default
4811 frac
4812 \series medium
4813 (float
4814 \emph on
4815
4816 \begin_inset space ~
4817 \end_inset
4818
4819 x
4820 \emph default
4821 )
4822 \series default
4823 evaluates to the fractional part of
4824 \emph on
4825 x
4826 \emph default
4827 .
4828
4829 \end_layout
4830
4831 \begin_layout Description
4832
4833 \series medium
4834 int
4835 \begin_inset space ~
4836 \end_inset
4837
4838
4839 \series default
4840 int
4841 \series medium
4842 (float
4843 \emph on
4844
4845 \begin_inset space ~
4846 \end_inset
4847
4848 x
4849 \emph default
4850 [,integer
4851 \emph on
4852
4853 \begin_inset space ~
4854 \end_inset
4855
4856 neg
4857 \emph default
4858 ,
4859 \begin_inset space ~
4860 \end_inset
4861
4862 integer
4863 \emph on
4864
4865 \begin_inset space ~
4866 \end_inset
4867
4868 pos
4869 \emph default
4870 ])
4871 \series default
4872 converts
4873 \emph on
4874 x
4875 \emph default
4876 to an integer value by cutting off the fractional part.
4877 If given, the value of
4878 \emph on
4879 neg
4880 \emph default
4881 and
4882 \emph on
4883 pos
4884 \emph default
4885 determines how negative and non-negative numbers will be converted:
4886 \end_layout
4887
4888 \begin_layout Quote
4889 \begin_inset Tabular
4890 <lyxtabular version="3" rows="6" columns="2">
4891 <features>
4892 <column alignment="center" valignment="top" width="0">
4893 <column alignment="left" valignment="top" width="0">
4894 <row>
4895 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
4896 \begin_inset Text
4897
4898 \begin_layout Plain Layout
4899
4900 \emph on
4901 neg
4902 \emph default
4903 /
4904 \emph on
4905 pos
4906 \end_layout
4907
4908 \end_inset
4909 </cell>
4910 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
4911 \begin_inset Text
4912
4913 \begin_layout Plain Layout
4914 Result
4915 \end_layout
4916
4917 \end_inset
4918 </cell>
4919 </row>
4920 <row>
4921 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4922 \begin_inset Text
4923
4924 \begin_layout Plain Layout
4925 < -1
4926 \end_layout
4927
4928 \end_inset
4929 </cell>
4930 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4931 \begin_inset Text
4932
4933 \begin_layout Plain Layout
4934 next smaller integer value
4935 \end_layout
4936
4937 \end_inset
4938 </cell>
4939 </row>
4940 <row>
4941 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4942 \begin_inset Text
4943
4944 \begin_layout Plain Layout
4945 -1
4946 \end_layout
4947
4948 \end_inset
4949 </cell>
4950 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4951 \begin_inset Text
4952
4953 \begin_layout Plain Layout
4954 round downward
4955 \end_layout
4956
4957 \end_inset
4958 </cell>
4959 </row>
4960 <row>
4961 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4962 \begin_inset Text
4963
4964 \begin_layout Plain Layout
4965 0
4966 \end_layout
4967
4968 \end_inset
4969 </cell>
4970 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4971 \begin_inset Text
4972
4973 \begin_layout Plain Layout
4974 cut fractional part off (default)
4975 \end_layout
4976
4977 \end_inset
4978 </cell>
4979 </row>
4980 <row>
4981 <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
4982 \begin_inset Text
4983
4984 \begin_layout Plain Layout
4985 1
4986 \end_layout
4987
4988 \end_inset
4989 </cell>
4990 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
4991 \begin_inset Text
4992
4993 \begin_layout Plain Layout
4994 round upward
4995 \end_layout
4996
4997 \end_inset
4998 </cell>
4999 </row>
5000 <row>
5001 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
5002 \begin_inset Text
5003
5004 \begin_layout Plain Layout
5005 > 1
5006 \end_layout
5007
5008 \end_inset
5009 </cell>
5010 <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
5011 \begin_inset Text
5012
5013 \begin_layout Plain Layout
5014 next larger integer value
5015 \end_layout
5016
5017 \end_inset
5018 </cell>
5019 </row>
5020 </lyxtabular>
5021
5022 \end_inset
5023
5024
5025 \end_layout
5026
5027 \begin_layout Description
5028
5029 \series medium
5030 int
5031 \begin_inset space ~
5032 \end_inset
5033
5034
5035 \series default
5036 int
5037 \series medium
5038 (string
5039 \emph on
5040
5041 \begin_inset space ~
5042 \end_inset
5043
5044 s
5045 \emph default
5046 )
5047 \series default
5048 converts
5049 \emph on
5050 s
5051 \emph default
5052 to an integer number.
5053
5054 \end_layout
5055
5056 \begin_layout Description
5057
5058 \series medium
5059 string
5060 \begin_inset space ~
5061 \end_inset
5062
5063
5064 \series default
5065 len
5066 \series medium
5067 (string
5068 \emph on
5069
5070 \begin_inset space ~
5071 \end_inset
5072
5073 s
5074 \emph default
5075 )
5076 \series default
5077 evaluates to the length of
5078 \emph on
5079 s
5080 \emph default
5081 .
5082
5083 \end_layout
5084
5085 \begin_layout Description
5086
5087 \series medium
5088 float
5089 \begin_inset space ~
5090 \end_inset
5091
5092
5093 \series default
5094 log
5095 \series medium
5096 (float|int
5097 \emph on
5098
5099 \begin_inset space ~
5100 \end_inset
5101
5102 x
5103 \emph default
5104 [,float|int
5105 \emph on
5106
5107 \begin_inset space ~
5108 \end_inset
5109
5110 y
5111 \emph default
5112 )
5113 \series default
5114 evaluates to the logarithm of
5115 \emph on
5116 x
5117 \emph default
5118 .
5119 If
5120 \emph on
5121 y
5122 \emph default
5123 is specified, the result will be the natural logarithm, otherwise it will
5124 be the logarithm to the base of
5125 \emph on
5126 y
5127 \emph default
5128 .
5129
5130 \end_layout
5131
5132 \begin_layout Description
5133
5134 \series medium
5135 location
5136 \begin_inset space ~
5137 \end_inset
5138
5139
5140 \series default
5141 max
5142 \series medium
5143 (location
5144 \emph on
5145
5146 \begin_inset space ~
5147 \end_inset
5148
5149 l1
5150 \emph default
5151 ,
5152 \begin_inset space ~
5153 \end_inset
5154
5155 location
5156 \emph on
5157
5158 \begin_inset space ~
5159 \end_inset
5160
5161 l2
5162 \emph default
5163 )
5164 \series default
5165 evaluates to the maximum in the same way min does for the minimum.
5166
5167 \end_layout
5168
5169 \begin_layout Description
5170
5171 \series medium
5172 location
5173 \begin_inset space ~
5174 \end_inset
5175
5176
5177 \series default
5178 min
5179 \series medium
5180 (location
5181 \emph on
5182
5183 \begin_inset space ~
5184 \end_inset
5185
5186 l1
5187 \emph default
5188 ,
5189 \begin_inset space ~
5190 \end_inset
5191
5192 location
5193 \emph on
5194
5195 \begin_inset space ~
5196 \end_inset
5197
5198 l2
5199 \emph default
5200 )
5201 \series default
5202 evaluates to the location of the minimum of all values in the block marked
5203 by the corners pointed to by
5204 \emph on
5205 l1
5206 \emph default
5207 and
5208 \emph on
5209 l2
5210 \emph default
5211 .
5212 Note that the empty cell is equal to 0, 0.0 and "", so if the first minimum
5213 is an empty cell, the result will be a pointer to this cell, too.
5214 If you are not interested in the location of the minimum but the value
5215 itself, use @(min(
5216 \emph on
5217 l1
5218 \emph default
5219 ,
5220 \emph on
5221 l2
5222 \emph default
5223 )).
5224
5225 \end_layout
5226
5227 \begin_layout Description
5228
5229 \series medium
5230 int
5231 \begin_inset space ~
5232 \end_inset
5233
5234
5235 \series default
5236 n
5237 \series medium
5238 (location
5239 \emph on
5240
5241 \begin_inset space ~
5242 \end_inset
5243
5244 l1
5245 \emph default
5246 ,
5247 \begin_inset space ~
5248 \end_inset
5249
5250 location
5251 \emph on
5252
5253 \begin_inset space ~
5254 \end_inset
5255
5256 l2
5257 \emph default
5258 )
5259 \series default
5260 evaluates to the number of non-empty cells in the block marked by the corners
5261 pointed to by
5262 \emph on
5263 l1
5264 \emph default
5265 and
5266 \emph on
5267 l2
5268 \emph default
5269 .
5270
5271 \end_layout
5272
5273 \begin_layout Description
5274 poly
5275 \series medium
5276 (float|integer
5277 \emph on
5278
5279 \begin_inset space ~
5280 \end_inset
5281
5282 x
5283 \emph default
5284 ,
5285 \begin_inset space ~
5286 \end_inset
5287
5288 float|integer
5289 \emph on
5290
5291 \begin_inset space ~
5292 \end_inset
5293
5294 cn
5295 \emph default
5296 [,
5297 \begin_inset space ~
5298 \end_inset
5299
5300 ...])
5301 \series default
5302 evaluates the polynome
5303 \emph on
5304
5305 \begin_inset Formula $c_{n}\cdot x^{n}+\ldots+c_{0}\cdot x^{0}$
5306 \end_inset
5307
5308
5309 \emph default
5310 .
5311
5312 \end_layout
5313
5314 \begin_layout Description
5315
5316 \series medium
5317 float
5318 \begin_inset space ~
5319 \end_inset
5320
5321
5322 \series default
5323 rad2deg
5324 \series medium
5325 (float|int
5326 \emph on
5327
5328 \begin_inset space ~
5329 \end_inset
5330
5331 x
5332 \emph default
5333 )
5334 \series default
5335 evaluates to the radians that are equivalent to
5336 \emph on
5337 x
5338 \emph default
5339 degrees.
5340
5341 \end_layout
5342
5343 \begin_layout Description
5344
5345 \series medium
5346 float
5347 \begin_inset space ~
5348 \end_inset
5349
5350
5351 \series default
5352 rnd
5353 \series medium
5354 ()
5355 \series default
5356 evaluates to a pseudo-random number between 0.0 and 1.0.
5357
5358 \end_layout
5359
5360 \begin_layout Description
5361
5362 \series medium
5363 float
5364 \begin_inset space ~
5365 \end_inset
5366
5367
5368 \series default
5369 sin
5370 \series medium
5371 (float|int
5372 \emph on
5373
5374 \begin_inset space ~
5375 \end_inset
5376
5377 x
5378 \emph default
5379 )
5380 \series default
5381 evaluates to the sine of
5382 \emph on
5383 x
5384 \emph default
5385 , where
5386 \emph on
5387 x
5388 \emph default
5389 is given in radians.
5390
5391 \end_layout
5392
5393 \begin_layout Description
5394
5395 \series medium
5396 float
5397 \begin_inset space ~
5398 \end_inset
5399
5400
5401 \series default
5402 sinh
5403 \series medium
5404 (float|int
5405 \emph on
5406
5407 \begin_inset space ~
5408 \end_inset
5409
5410 x
5411 \emph default
5412 )
5413 \series default
5414 evaluates to the hyperbolic sine of
5415 \emph on
5416 x
5417 \emph default
5418 , where
5419 \emph on
5420 x
5421 \emph default
5422 is given in radians.
5423
5424 \end_layout
5425
5426 \begin_layout Description
5427
5428 \series medium
5429 string
5430 \begin_inset space ~
5431 \end_inset
5432
5433
5434 \series default
5435 strftime
5436 \series medium
5437 (string
5438 \emph on
5439
5440 \begin_inset space ~
5441 \end_inset
5442
5443 f
5444 \emph default
5445
5446 \begin_inset space ~
5447 \end_inset
5448
5449 [,
5450 \begin_inset space ~
5451 \end_inset
5452
5453 integer
5454 \emph on
5455
5456 \begin_inset space ~
5457 \end_inset
5458
5459 t
5460 \emph default
5461 ])
5462 \series default
5463 evaluates to the time
5464 \emph on
5465 t
5466 \emph default
5467 formatted according to the format specified in
5468 \emph on
5469 f
5470 \emph default
5471 .
5472 Times in
5473 \emph on
5474 t
5475 \emph default
5476 are counted in seconds since epoch (1970-1-1 0:00).
5477 If
5478 \emph on
5479 t
5480 \emph default
5481 is empty or 0, the actual time is used.
5482 For the format specifications consult the man page of your c library, strftime
5483 (3).
5484 Example:
5485 \emph on
5486 @(now)=int(strftime("%s"))
5487 \emph default
5488 sets the field with label now to the actual time.
5489
5490 \end_layout
5491
5492 \begin_layout Description
5493
5494 \series medium
5495 string
5496 \begin_inset space ~
5497 \end_inset
5498
5499
5500 \series default
5501 string
5502 \series medium
5503 (location
5504 \emph on
5505
5506 \begin_inset space ~
5507 \end_inset
5508
5509 l
5510 \emph default
5511 )
5512 \end_layout
5513
5514 \begin_layout Description
5515
5516 \series medium
5517 string
5518 \begin_inset space ~
5519 \end_inset
5520
5521
5522 \series default
5523 string
5524 \series medium
5525 (integer
5526 \emph on
5527
5528 \begin_inset space ~
5529 \end_inset
5530
5531 x
5532 \emph default
5533 )
5534 \series default
5535
5536 \end_layout
5537
5538 \begin_layout Description
5539
5540 \series medium
5541 string
5542 \begin_inset space ~
5543 \end_inset
5544
5545
5546 \series default
5547 string
5548 \series medium
5549 (float
5550 \emph on
5551
5552 \begin_inset space ~
5553 \end_inset
5554
5555 x
5556 \emph default
5557 [,
5558 \begin_inset space ~
5559 \end_inset
5560
5561 [integer
5562 \emph on
5563
5564 \begin_inset space ~
5565 \end_inset
5566
5567 precision
5568 \emph default
5569 ][,
5570 \begin_inset space ~
5571 \end_inset
5572
5573 integer
5574 \emph on
5575
5576 \begin_inset space ~
5577 \end_inset
5578
5579 scientific
5580 \emph default
5581 ]])
5582 \series default
5583 evaluates to a string containing the current value of the given cell at
5584 location
5585 \emph on
5586 l
5587 \emph default
5588 , or to the numeric value
5589 \emph on
5590 x
5591 \emph default
5592 with the given
5593 \emph on
5594 precision
5595 \emph default
5596 .
5597 The
5598 \emph on
5599 scientific
5600 \emph default
5601 flag determines if decimal (0) or scientific (unequal 0) representation
5602 is used.
5603
5604 \end_layout
5605
5606 \begin_layout Description
5607
5608 \series medium
5609 int
5610 \begin_inset space ~
5611 \end_inset
5612
5613
5614 \series default
5615 strptime
5616 \series medium
5617 (string
5618 \emph on
5619
5620 \begin_inset space ~
5621 \end_inset
5622
5623 f
5624 \emph default
5625 ,
5626 \begin_inset space ~
5627 \end_inset
5628
5629 string
5630 \emph on
5631
5632 \begin_inset space ~
5633 \end_inset
5634
5635 datetime
5636 \emph default
5637 )
5638 \series default
5639 evaluates to the seconds since epoch (1970-1-1 0:00) of the
5640 \emph on
5641 datetime
5642 \emph default
5643 string, parsed according to the format specified in
5644 \emph on
5645 f
5646 \emph default
5647 .
5648 For the format specifications consult the man page of your c library, strptime
5649 (3).
5650
5651 \end_layout
5652
5653 \begin_layout Description
5654
5655 \series medium
5656 string
5657 \begin_inset space ~
5658 \end_inset
5659
5660
5661 \series default
5662 substr
5663 \series medium
5664 (string
5665 \emph on
5666
5667 \begin_inset space ~
5668 \end_inset
5669
5670 s,
5671 \emph default
5672 integer
5673 \emph on
5674
5675 \begin_inset space ~
5676 \end_inset
5677
5678 x,
5679 \emph default
5680 integer
5681 \emph on
5682
5683 \begin_inset space ~
5684 \end_inset
5685
5686 y
5687 \emph default
5688 )
5689 \series default
5690 evaluates to the substring of
5691 \emph on
5692 s
5693 \emph default
5694 between
5695 \emph on
5696 x
5697 \emph default
5698 and
5699 \emph on
5700 y
5701 \emph default
5702 , which start at 0.
5703
5704 \end_layout
5705
5706 \begin_layout Description
5707 sum
5708 \series medium
5709 (location
5710 \emph on
5711
5712 \begin_inset space ~
5713 \end_inset
5714
5715 l1
5716 \emph default
5717 ,
5718 \begin_inset space ~
5719 \end_inset
5720
5721 location
5722 \emph on
5723
5724 \begin_inset space ~
5725 \end_inset
5726
5727 l2
5728 \emph default
5729 )
5730 \series default
5731 evaluates to the sum of all values in the block marked by the corners pointed
5732 to by
5733 \emph on
5734 l1
5735 \emph default
5736 and
5737 \emph on
5738 l2
5739 \emph default
5740 .
5741
5742 \end_layout
5743
5744 \begin_layout Description
5745
5746 \series medium
5747 float
5748 \begin_inset space ~
5749 \end_inset
5750
5751
5752 \series default
5753 tan
5754 \series medium
5755 (float|int
5756 \emph on
5757
5758 \begin_inset space ~
5759 \end_inset
5760
5761 x
5762 \emph default
5763 )
5764 \series default
5765 evaluates to the tangent of
5766 \emph on
5767 x
5768 \emph default
5769 , where
5770 \emph on
5771 x
5772 \emph default
5773 is given in radians.
5774
5775 \end_layout
5776
5777 \begin_layout Description
5778
5779 \series medium
5780 float
5781 \begin_inset space ~
5782 \end_inset
5783
5784
5785 \series default
5786 tanh
5787 \series medium
5788 (float|int
5789 \emph on
5790
5791 \begin_inset space ~
5792 \end_inset
5793
5794 x
5795 \emph default
5796 )
5797 \series default
5798 evaluates to the hyperbolic tangent of
5799 \emph on
5800 x
5801 \emph default
5802 , where
5803 \emph on
5804 x
5805 \emph default
5806 is given in radians.
5807
5808 \end_layout
5809
5810 \begin_layout Description
5811
5812 \series medium
5813 int
5814 \begin_inset space ~
5815 \end_inset
5816
5817
5818 \series default
5819 x
5820 \series medium
5821 ([location
5822 \emph on
5823
5824 \begin_inset space ~
5825 \end_inset
5826
5827 l
5828 \emph default
5829 ])
5830 \series default
5831
5832 \end_layout
5833
5834 \begin_layout Description
5835
5836 \series medium
5837 int
5838 \begin_inset space ~
5839 \end_inset
5840
5841
5842 \series default
5843 y
5844 \series medium
5845 ([location
5846 \emph on
5847
5848 \begin_inset space ~
5849 \end_inset
5850
5851 l
5852 \emph default
5853 ])
5854 \series default
5855
5856 \end_layout
5857
5858 \begin_layout Description
5859
5860 \series medium
5861 int
5862 \begin_inset space ~
5863 \end_inset
5864
5865
5866 \series default
5867 z
5868 \series medium
5869 ([location
5870 \emph on
5871
5872 \begin_inset space ~
5873 \end_inset
5874
5875 l
5876 \emph default
5877 ])
5878 \series default
5879 evaluate to the
5880 \emph on
5881 x
5882 \emph default
5883 ,
5884 \emph on
5885 y
5886 \emph default
5887 and
5888 \emph on
5889 z
5890 \emph default
5891 position of the given location, of the currently updated cell if none is
5892 given.
5893 These functions are usually used in combination with the @ function for
5894 relative relations to other cells.
5895
5896 \end_layout
5897
5898 \begin_layout Subsection
5899 Expression Grammar
5900 \end_layout
5901
5902 \begin_layout Description
5903 digit::=
5904 \family typewriter
5905 0
5906 \family default
5907 | ..
5908 |
5909 \family typewriter
5910 9
5911 \end_layout
5912
5913 \begin_layout Description
5914 hex_digit::=
5915 \family typewriter
5916 0
5917 \family default
5918 | ..
5919 |
5920 \family typewriter
5921 9
5922 \family default
5923 |
5924 \family typewriter
5925 a
5926 \family default
5927 | ..
5928 |
5929 \family typewriter
5930 f
5931 \end_layout
5932
5933 \begin_layout Description
5934 octal_digit::=
5935 \family typewriter
5936 0
5937 \family default
5938 | ..
5939 |
5940 \family typewriter
5941 7
5942 \end_layout
5943
5944 \begin_layout Description
5945 decimal_integer::=
5946 \emph on
5947 digit
5948 \emph default
5949 {
5950 \emph on
5951 digit
5952 \emph default
5953 }
5954 \end_layout
5955
5956 \begin_layout Description
5957 hex_integer::=
5958 \family typewriter
5959 0x
5960 \family default
5961
5962 \emph on
5963 hex_digit
5964 \emph default
5965 {
5966 \emph on
5967 hexdigit
5968 \emph default
5969 }
5970 \end_layout
5971
5972 \begin_layout Description
5973 octal_integer::=
5974 \family typewriter
5975 0
5976 \family default
5977
5978 \emph on
5979 octal_digit
5980 \emph default
5981 {
5982 \emph on
5983 octdigit
5984 \emph default
5985 }
5986 \end_layout
5987
5988 \begin_layout Description
5989 integer::=
5990 \emph on
5991 decimal_integer
5992 \emph default
5993 |
5994 \emph on
5995 hex_integer
5996 \emph default
5997 |
5998 \emph on
5999 octal_integer
6000 \end_layout
6001
6002 \begin_layout Description
6003 float::=
6004 \emph on
6005 digit
6006 \emph default
6007 {
6008 \emph on
6009 digit
6010 \emph default
6011 } [
6012 \family typewriter
6013 .
6014
6015 \family default
6016 ] {
6017 \emph on
6018 digit
6019 \emph default
6020 } [
6021 \family typewriter
6022 e
6023 \family default
6024 |
6025 \family typewriter
6026 E
6027 \family default
6028 [
6029 \family typewriter
6030 +
6031 \family default
6032 |
6033 \family typewriter
6034 -
6035 \family default
6036 ]
6037 \emph on
6038 digit
6039 \emph default
6040 {
6041 \emph on
6042 digit
6043 \emph default
6044 } ]
6045 \end_layout
6046
6047 \begin_layout Description
6048 quoted_character::=
6049 \emph on
6050
6051 \backslash
6052 any_character
6053 \end_layout
6054
6055 \begin_layout Description
6056 character::=
6057 \emph on
6058 any_character
6059 \emph default
6060 |
6061 \emph on
6062 quoted_character
6063 \end_layout
6064
6065 \begin_layout Description
6066 string::=
6067 \family typewriter
6068 "
6069 \family default
6070 {
6071 \emph on
6072 character
6073 \emph default
6074 }
6075 \family typewriter
6076 "
6077 \end_layout
6078
6079 \begin_layout Description
6080 identifier_character::=
6081 \family typewriter
6082 _
6083 \family default
6084 |
6085 \family typewriter
6086 @
6087 \family default
6088 |
6089 \family typewriter
6090 &
6091 \family default
6092 |
6093 \family typewriter
6094 .
6095
6096 \family default
6097 |
6098 \family typewriter
6099 $
6100 \family default
6101 |
6102 \emph on
6103 alpha_character
6104 \end_layout
6105
6106 \begin_layout Description
6107 identifier::=
6108 \emph on
6109 identifier_character
6110 \emph default
6111 {
6112 \emph on
6113 identifier_character
6114 \emph default
6115 |
6116 \emph on
6117 digit
6118 \emph default
6119 }
6120 \end_layout
6121
6122 \begin_layout Description
6123 function::=
6124 \emph on
6125 identifier
6126 \emph default
6127
6128 \family typewriter
6129 (
6130 \family default
6131 [
6132 \emph on
6133 term
6134 \emph default
6135 ] {
6136 \family typewriter
6137 ,
6138 \family default
6139 [
6140 \emph on
6141 term
6142 \emph default
6143 ] }
6144 \family typewriter
6145 )
6146 \end_layout
6147
6148 \begin_layout Description
6149 label::=
6150 \emph on
6151 identifier
6152 \end_layout
6153
6154 \begin_layout Description
6155 parenterm::=
6156 \family typewriter
6157 (
6158 \family default
6159
6160 \emph on
6161 term
6162 \emph default
6163
6164 \family typewriter
6165 )
6166 \end_layout
6167
6168 \begin_layout Description
6169 negterm::=
6170 \family typewriter
6171 -
6172 \family default
6173
6174 \emph on
6175 primary
6176 \end_layout
6177
6178 \begin_layout Description
6179 primary::=
6180 \emph on
6181 function
6182 \emph default
6183 |
6184 \emph on
6185 label
6186 \emph default
6187 |
6188 \emph on
6189 parenterm
6190 \emph default
6191 |
6192 \emph on
6193 negterm
6194 \end_layout
6195
6196 \begin_layout Description
6197 powterm::=
6198 \emph on
6199 primary
6200 \emph default
6201 {
6202 \family typewriter
6203 ‸
6204 \family default
6205
6206 \emph on
6207 primary
6208 \emph default
6209 }
6210 \end_layout
6211
6212 \begin_layout Description
6213 mathterm::=
6214 \emph on
6215 powterm
6216 \emph default
6217 {
6218 \family typewriter
6219 /
6220 \family default
6221 |
6222 \family typewriter
6223 *
6224 \family default
6225 |
6226 \family typewriter
6227 %
6228 \family default
6229
6230 \emph on
6231 powterm
6232 \emph default
6233 }
6234 \end_layout
6235
6236 \begin_layout Description
6237 factor::=
6238 \emph on
6239 mathterm
6240 \emph default
6241 {
6242 \family typewriter
6243 +
6244 \family default
6245 |
6246 \family typewriter
6247 -
6248 \family default
6249
6250 \emph on
6251 mathterm
6252 \emph default
6253 }
6254 \end_layout
6255
6256 \begin_layout Description
6257 term::=
6258 \emph on
6259 factor
6260 \emph default
6261 {
6262 \family typewriter
6263 <
6264 \family default
6265 |
6266 \family typewriter
6267 <=
6268 \family default
6269 |
6270 \family typewriter
6271 >=
6272 \family default
6273 |
6274 \family typewriter
6275 >
6276 \family default
6277 |
6278 \family typewriter
6279 ==
6280 \family default
6281 |
6282 \family typewriter
6283 !=
6284 \family default
6285
6286 \emph on
6287 factor
6288 \emph default
6289 }
6290 \end_layout
6291
6292 \begin_layout Section
6293 Frequently Asked Questions
6294 \end_layout
6295
6296 \begin_layout Subsection
6297 Why is 1.0 unequal 1.0?
6298 \end_layout
6299
6300 \begin_layout Standard
6301 If your machine uses binary floating point arithmetic, and chances are that
6302 it does, you may eventually find yourself in the following situation:
6303 \end_layout
6304
6305 \begin_layout Quote
6306 0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1+0.1
6307 \end_layout
6308
6309 \begin_layout Standard
6310 You expect to see 1.0 as result, and indeed that is what you get.
6311 Now you compare this result to the constant 1.0, but surprisingly for many
6312 users, the result is 0.
6313 Appearantly, 1.0 is unequal 1.0 for teapot.
6314
6315 \end_layout
6316
6317 \begin_layout Standard
6318 This is not a bug in teapot, in fact it is not a bug at all.
6319 The problem is, that 0.1 (1.0/10.0) does not have an exact representation
6320 in binary floating point arithmetic, similar to how 1.0/3.0 does not have
6321 an exact representation in decimal arithmetic (or binary, for that matter).
6322 As such, a value very close to 0.1 is used, but when displaying it, it will
6323 be rounded to 0.1.
6324 The result is obvious, adding this number which is a little different from
6325 0.1 ten times leads to a result very close to but not quite 1.0.
6326 Since it is so close, displaying it rounded to only a few digits precision
6327 shows 1.0.
6328
6329 \end_layout
6330
6331 \begin_layout Standard
6332 To solve the comparison problem, teapot has the operator
6333 \family typewriter
6334 =
6335 \family default
6336 (in contrast to the operator ==), which compares two floating point values
6337 apart from the last significant bit.
6338 Use this operator to compare the two values from above and the result will
6339 be 1, meaning they are about equal.
6340 Don't assume that a number which can be expressed with a finite number
6341 of decimal digits will be represented exactly in binary floating point
6342 arithmetic.
6343
6344 \end_layout
6345
6346 \begin_layout Subsection
6347 How do I hide intermediate results?
6348 \end_layout
6349
6350 \begin_layout Standard
6351 If you used flat, two-dimensional spread sheets before, you are probably
6352 used to hidden cells which contain intermediate results, global constants,
6353 scratch areas and the like.
6354 teapot has no way to hide cells, but you have three dimensions.
6355 Just use one or more layers for such cells and give each cell a label in
6356 order to reference and find it easily.
6357
6358 \end_layout
6359
6360 \begin_layout Subsection
6361 Why is there no conditional evaluation?
6362 \end_layout
6363
6364 \begin_layout Standard
6365 There is no special operator or function for conditional evaluation.
6366 I could add one easily, but then next someone would ask for loops and someone
6367 else for user-defined functions, variables and so on.
6368 If you need a programming language, you know where to find it.
6369
6370 \end_layout
6371
6372 \begin_layout Standard
6373 But don't worry.
6374 The answer is, that conditional evaluation comes for free with teapot's
6375 orthogonal cell addressing.
6376 As an example, depending on the cell labelled
6377 \family typewriter
6378 X
6379 \family default
6380 being negative or not, you want the result to be the string
6381 \family typewriter
6382 "BAD
6383 \family default
6384 or
6385 \family typewriter
6386 "GOOD"
6387 \family default
6388 .
6389 This is the solution:
6390 \end_layout
6391
6392 \begin_layout Quote
6393 eval(&((@(X)>=0)+x(BAD),y(BAD),z(BAD)))
6394 \end_layout
6395
6396 \begin_layout Standard
6397 The cell labelled
6398 \family typewriter
6399 BAD
6400 \family default
6401 contains the string
6402 \family typewriter
6403 "BAD"
6404 \family default
6405 , its right neighbour contains the string
6406 \family typewriter
6407 "GOOD"
6408 \family default
6409 .
6410 If you have nested conditions, you could weight them with 1, 2, 4 and so
6411 on to address a bigger range of cells.
6412 Alternatively, you could make use of all three dimensions for nested conditions.
6413
6414 \end_layout
6415
6416 \end_body
6417 \end_document