[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The commands that insert start-tags works only if the document has an associated DTD.
Keyboard commands for inserting:
sgml-insert-tag
).
If the option sgml-balanced-tag-edit
is non-nil, inserting a
start-tag will also insert the corresponding end-tag. If, in addition,
sgml-auto-insert-required-elements
is non-nil, tags for elements
required between the inserted tags will also be inserted.
The list of valid tags, computed for a position in the buffer, will contain:
sgml-balanced-tag-edit
is nil. Furthermore it will contain
end-tags for enclosing elements if the necessary omissible end-tag
declarations have been made in the DTD.
sgml-omittag-transparent
is nil, the above will be limited to the
elements that can occur within the current element.
sgml-insert-element
). The name of the element is read
from the mini-buffer with completion on valid elements. If
sgml-insert-end-tag-on-new-line
is non-nil or the
element has element content, the end-tag will be inserted on a
new line after the start-tag.
If sgml-omittag-transparent
is nil, the list of valid elements
will only contain the elements that can be in the content of the current
element.
Required elements in the content will be automatically inserted if the
option sgml-auto-insert-required-elements
is non-nil.
When the content model demands an element but there is more
than one to choose from, a comment can be inserted with the
available choices if the option
sgml-insert-missing-element-comment
is non-nil.
sgml-tag-region
). Reads
element name from mini-buffer with completion as for C-c C-e.
sgml-insert-end-tag
).
Typical use is to start a new paragraph element when inside a paragraph.
sgml-insert-attribute
). If point is immediately
after a start-tag, this command operates on that start-tag. Otherwise
the command will operate on the element after point.
The attribute name will be read with completion. If the attribute has a token list as declared value the attribute value will also be read with completion. The prompt for attribute value will typically look like:
Value for attribute (type Default: current value): |
Menu bar:
Sub menus:
The menu has a sub menu for every attribute which declared value is a token list. The rest of the attributes are collected in one sub menu. For the token list attributes, selecting a value will insert that attribute-value pair. Selecting some other attribute reads the attribute-value from the mini-buffer and inserts the attribute value pair.
A menu is also available directly with a mouse button click in the buffer. In GNU Emacs it is the first mouse button combined with shift (S-mouse-3). In XEmacs it is bound to the third mouse button. The mouse button click will pop-up a menu of valid tags or a menu of attributes if the point is in a start-tag. The attributes menu works as the "Insert attribute" menu from the menu-bar. The tags list is the list of valid tags described above for command C-c <. Selection from the tags menu works like the C-c < command, with the following exception:
You can tag a region, with start and end-tag. There are two ways to indicate the region to mark:
For this to work you must either use transient mark mode
(see section `Transient Mark Mode' in The Emacs Editor) or set the option sgml-tag-region-if-active
to non-nil
(don't set this unless you are sure that you want it).
transient-mark-mode
must be on for the region to be tagged.
Example:
(("Version1" "<![%Version1[\r]]>") ("New page" "<?NewPage>")) |
sgml-insert-element
will insert a comment if there is an
element required but there is more than one to choose from.
sgml-insert-element
will put the end-tag on
a new line after the start-tag. Useful on slow terminals if you
find the end-tag after the cursor irritating.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If you are typing in markup directly, M-TAB will help you by
completing a tag name, an entity name or a markup declaration name. If
you type M-TAB after a plain word, ispell-complete-word
will be invoked instead.
If you have typed (-!- marks the position of point)
&At-!- |
and type M-TAB (assuming you use the `ISOLat1' entity set) you get:
Ã-!- |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Commands for showing information obtained by parsing the buffer.
sgml-show-context
). The form of
the string is controled by the user option
sgml-show-context-function
.
sgml-what-element
).
To include an element type el1 that would otherwise be excluded:
<?PSGML element el1 structure=t?> |
To exclude an element type el2 that would otherwise be included:
<?PSGML element el2 structure=ignore?> |
List contextually valid tags (sgml-list-valid-tags
). Displays
information about current element, all valid end-tags, valid start-tags
in current element, and start-tags valid at this point but in other
elements together with the tags omitted.
sgml-show-context-standard
,
the default, generates a string like `#PCDATA in para in chapter
in book'. The function sgml-show-context-backslash
generates a
string like `book\chapter\para'.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You can indent a line according to the depth of element nesting at the
beginning of the line. To indent the current line use TAB.
You can also use LFD (newline-and-indent
) to start a
new line with correct indentation.
If this is nil, TAB will insert a tab instead of indenting.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These commands move in the element structure. The commands uses knowledge of SGML syntax, and if available the specific DTD.
sgml-beginning-of-element
).
sgml-end-of-element
).
sgml-forward-element
).
sgml-backward-element
).
sgml-backward-up-element
).
sgml-up-element
).
sgml-down-element
).
sgml-next-data-field
).
You can also move to the next place where there is some structural error with C-c C-o (see section 5. Running an external SGML parser).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If you want to change the attributes of a start-tag you can simply edit
them directly in the buffer. Or you can place the cursor at or after
the start-tag and use the sgml-edit-attributes
command, available
from the `SGML'-menu or on C-c C-a. This will create a new
Emacs window with all possible attributes listed in the form
attribute name = current value. |
The current value may be shown as `#DEFAULT' if the attribute has not been given a value in the start-tag. The list also contains the attributes declaration as a comment. Note also that the current value is show without eventual quotes.
It is now possible to edit the attribute values. You can move to the next attribute with TAB. If you want to let an attribute have its default value use C-c C-d, this will insert a `#DEFAULT' in the value field.
If Emacs is running in an X window, the `#DEFAULT' will be underlined to distinguish it from normal values.
Finish the editing with C-c C-c; this will replace the attribute values in the main buffer with those edited. Note that values will be quoted as needed.
If you want to abort the editing, you can remove the window with C-x 0 or if you want it neat, kill the buffer and remove the window.
Some other keys are:
sgml-edit-attrib-field-start
).
sgml-edit-attrib-field-end
).
sgml-edit-attrib-clear
).
sgml-edit-attrib-default
). This is a special value that will
make the attribute be implied.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
sgml-change-element-name
).
Tries to translate attribute specifications. An attribute will be
translated to an attribute with the same name. If the new element has
no attribute with the same name, the attribute will be ignored. If
there is an attribute with the same name but different declared content,
a warning is given.
ID attributes are handled specially, an attribute with declared value ID will always be translated to the attribute with declared value ID.
sgml-kill-markup
).
sgml-kill-element
).
sgml-untag-element
).
sgml-make-character-reference
). If called with a numeric
argument, convert a character reference back to a normal character.
sgml-fill-element
). This is a
substitute for the normal fill-paragraph
. The command uses
heuristics to decide what should be a paragraph.
nil
, or if
called interactive with numeric prefix argument, all short references
are replaced by generally entity references.
There is one argument, to-entity, with the same meaning as for
sgml-expand-all-shortrefs
.
There is one option for the normalize command. With its default value, normalize may actually change the data content of some elements. But only by removing some white-space from the end of elements with omitted end-tags.
sgml-normalize
will trim off white space from end of
element when adding end-tag.
Default: t
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Set the variable sgml-display-char-list-filename
to a file that
contains mappings between all characters present in the presentation
character set, and their "standard replacement text" names, e.g. "å"
-> "[aring ]", e.t.c.
The default value for this variable is `iso88591.map'.
Then use the functions (also in the Modify menu)
sgml-charent-to-display-char
sgml-display-char-to-charent
to translate between entities and characters.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by XEmacs shared group account on December, 19 2009
using texi2html 1.65.