2017-07-06 21:53:54 +08:00
|
|
|
<TeXmacs|1.99.5>
|
2011-08-28 15:59:50 +08:00
|
|
|
|
2017-07-06 21:53:54 +08:00
|
|
|
<style|<tuple|tmdoc|english>>
|
2011-08-28 15:59:50 +08:00
|
|
|
|
|
|
|
<\body>
|
|
|
|
<tmdoc-title|Structured editing>
|
|
|
|
|
|
|
|
As a general rule, the behaviour of most structured editing operations is
|
2017-07-06 23:05:22 +08:00
|
|
|
conditioned by the <em|<rigid|current focus>>. By default, the focus is on
|
|
|
|
the innermost tag that contains the cursor. Whenever some selection is
|
|
|
|
active, the focus is rather on the innermost tag that contains the
|
|
|
|
selection. During structured operations, such as navigating among similar
|
|
|
|
tags, the focus may temporarily be set to something else. The current focus
|
|
|
|
is visually indicated by the innermost cyan box around the cursor.
|
2011-08-28 15:59:50 +08:00
|
|
|
|
|
|
|
For instance, the <em|structured insertion> commands
|
|
|
|
<shortcut|(structured-insert-left)>, <shortcut|(structured-insert-right)>,
|
|
|
|
<shortcut|(structured-insert-up)> and <shortcut|(structured-insert-down)>
|
|
|
|
have a particular meaning both inside tables and trees. Inside tables, they
|
|
|
|
allow you to insert new rows and columns (see
|
|
|
|
figure<nbsp><reference|matrix-insert-fig>). Inside trees, they correspond
|
|
|
|
to the insertion of new nodes (see figure<nbsp><reference|tree-insert-fig>).
|
2017-07-07 00:39:39 +08:00
|
|
|
If you are inside a<nbsp>tree inside a table, then the innermost tag is a
|
2011-08-28 15:59:50 +08:00
|
|
|
tree, and node insertions will take precedence over the insertion of new
|
|
|
|
rows and columns.
|
|
|
|
|
2017-07-06 23:05:22 +08:00
|
|
|
For most editing operations, a \Pdefault particular behaviour\Q has been
|
2017-07-07 00:39:39 +08:00
|
|
|
defined. This behaviour may potentially be overridden for a few exceptional
|
|
|
|
tags. In our example of structured insertion, the default behaviour of
|
2017-07-06 23:05:22 +08:00
|
|
|
<shortcut|(structured-insert-left)> and
|
2011-08-28 15:59:50 +08:00
|
|
|
<shortcut|(structured-insert-right)> is to insert a new argument to the tag
|
2017-07-07 00:39:39 +08:00
|
|
|
at the left or at the right of the cursor (when allowed). Inside tables,
|
|
|
|
this behaviour is overridden so as to insert entire columns.
|
2011-08-28 15:59:50 +08:00
|
|
|
|
|
|
|
<\big-figure>
|
|
|
|
<\equation*>
|
2017-07-06 21:53:54 +08:00
|
|
|
<matrix|<tformat|<table|<row|<cell|a>|<cell|b<cursor>>|<cell|c>>|<row|<cell|d>|<cell|e>|<cell|f>>>>><space|5em><matrix|<tformat|<table|<row|<cell|a>|<cell|b>|<cell|<cursor>>|<cell|c>>|<row|<cell|d>|<cell|e>|<cell|>|<cell|f>>>>><space|2em><matrix|<tformat|<table|<row|<cell|a>|<cell|<cursor>>|<cell|b>|<cell|c>>|<row|<cell|d>|<cell|>|<cell|e>|<cell|f>>>>><space|2em><matrix|<tformat|<table|<row|<cell|a>|<cell|b>|<cell|c>>|<row|<cell|>|<cell|<cursor>>|<cell|>>|<row|<cell|d>|<cell|e>|<cell|f>>>>><space|2em><matrix|<tformat|<table|<row|<cell|>|<cell|<cursor>>|<cell|>>|<row|<cell|a>|<cell|b>|<cell|c>>|<row|<cell|d>|<cell|e>|<cell|f>>>>>
|
2011-08-28 15:59:50 +08:00
|
|
|
</equation*>
|
|
|
|
<|big-figure>
|
|
|
|
<label|matrix-insert-fig>Assume that the cursor is at the position of
|
2017-07-06 21:53:54 +08:00
|
|
|
<cursor> inside the left-most matrix. Then the four other matrices
|
2011-08-28 15:59:50 +08:00
|
|
|
respectively correspond to the insertion of a new column at the
|
|
|
|
left<nbsp>(<shortcut|(structured-insert-left)>) or
|
|
|
|
right<nbsp>(<shortcut|(structured-insert-right)>), <abbr|resp.> a new row
|
|
|
|
above<nbsp>(<shortcut|(structured-insert-up)>) or
|
|
|
|
below<nbsp>(<shortcut|(structured-insert-down)>).
|
|
|
|
</big-figure>
|
|
|
|
|
2017-07-06 21:53:54 +08:00
|
|
|
<\big-figure|<tree|a|b|c<cursor>|d><space|3em><space|3em><tree|a|b|<cursor>|c|d><space|3em><tree|a|b|c|<cursor>|d><space|3em><tree|a|b|<tree|<cursor>|c>|d><space|3em><tree|a|b|<tree|c|<cursor>>|d>>
|
2011-08-28 15:59:50 +08:00
|
|
|
<label|tree-insert-fig>Assume that the cursor is at the position of
|
2017-07-06 21:53:54 +08:00
|
|
|
<cursor> inside the left-most tree. Then the four other trees
|
2011-08-28 15:59:50 +08:00
|
|
|
respectively correspond to the insertion of a new node at the
|
|
|
|
left<nbsp>(<shortcut|(structured-insert-left)>), at the
|
|
|
|
right<nbsp>(<shortcut|(structured-insert-right)>),
|
|
|
|
above<nbsp>(<shortcut|(structured-insert-up)>) or
|
|
|
|
below<nbsp>(<shortcut|(structured-insert-down)>).
|
|
|
|
</big-figure>
|
|
|
|
|
2017-07-07 00:39:39 +08:00
|
|
|
Similarly, still in the case of matrices, the keys
|
2011-08-28 15:59:50 +08:00
|
|
|
<shortcut|(structured-insert-start)>, <shortcut|(structured-insert-end)>,
|
|
|
|
<shortcut|(structured-insert-top)> and <shortcut|(structured-insert-bottom)>
|
|
|
|
can be used for inserting a new first or last column, <abbr|resp.> a new
|
|
|
|
first or last row. The keys <shortcut|(structured-remove-left)> and
|
|
|
|
<shortcut|(structured-remove-right)> are mapped to the commands for
|
2017-07-07 00:39:39 +08:00
|
|
|
backward <abbr|resp.> forward <em|structured deletion>. For matrices, this
|
|
|
|
will result in the removal of the column before or after the cursor (see
|
|
|
|
figure<nbsp><reference|matrix-remove-fig>). In order to remove the
|
|
|
|
enclosing environment you may use <shortcut|(remove-structure-upwards)> or
|
|
|
|
<shortcut|(remove-structure-upwards)>.
|
2011-08-28 15:59:50 +08:00
|
|
|
|
|
|
|
<\big-figure>
|
|
|
|
<\equation*>
|
2017-07-06 21:53:54 +08:00
|
|
|
<matrix|<tformat|<table|<row|<cell|a>|<cell|b<cursor>>|<cell|c>>|<row|<cell|d>|<cell|e>|<cell|f>>>>><space|5em><matrix|<tformat|<table|<row|<cell|b<cursor>>|<cell|c>>|<row|<cell|e>|<cell|f>>>>><space|2em><matrix|<tformat|<table|<row|<cell|a>|<cell|<cursor>c>>|<row|<cell|d>|<cell|f>>>>><space|2em>b<cursor>
|
2011-08-28 15:59:50 +08:00
|
|
|
</equation*>
|
|
|
|
<|big-figure>
|
|
|
|
<label|matrix-remove-fig>Assume that the cursor is at the position of
|
2017-07-06 21:53:54 +08:00
|
|
|
<cursor> inside the left-most matrix. Then pressing the
|
2011-08-28 15:59:50 +08:00
|
|
|
keys<nbsp><shortcut|(structured-remove-left)> and
|
|
|
|
<shortcut|(structured-remove-right)> respectively result in the next two
|
|
|
|
matrices. Pressing either<nbsp><shortcut|(remove-structure-upwards)> or
|
|
|
|
<shortcut|(remove-structure-upwards)> replaces the matrix by the content
|
|
|
|
of the cell in which you are, leaving you with the <math|b> at the
|
|
|
|
right-hand side.
|
|
|
|
</big-figure>
|
|
|
|
|
|
|
|
<tmdoc-copyright|1998--2005|Joris van der Hoeven>
|
|
|
|
|
|
|
|
<tmdoc-license|Permission is granted to copy, distribute and/or modify this
|
|
|
|
document under the terms of the GNU Free Documentation License, Version 1.1
|
|
|
|
or any later version published by the Free Software Foundation; with no
|
|
|
|
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
|
|
|
Texts. A copy of the license is included in the section entitled "GNU Free
|
|
|
|
Documentation License".>
|
|
|
|
</body>
|
|
|
|
|
2017-07-06 21:53:54 +08:00
|
|
|
<initial|<\collection>
|
|
|
|
</collection>>
|