# (yatexe)Intelligent newline

Next: Usepackage checker Prev: What column Up: Top

Intelligent newline
*******************

At the end of begin-type completion of tabular[*], array, itemize,
enumerate or tabbing environment, or typing

ESC RET'
... Intelligent newline

in these environments inserts the contents corresponding to the current
environment in the next line.  (At the begin-type completion, this
contents can be removed by undo'.)  In tabular' environment, for
example, ESC RET' inserts the certain number of &' and trailing \\',
and \hline' if other \hline' is found in backward.  Here are the list of
contents vs. environments.

* tabular', tabular*', array'

Corresponding number of &' and \\'.  And \hline' if
needed.

* tabbing'

The same number of \>' as \=' in the first line.

* itemize', enumerate', description', list'

\item' or item[]'.

Note that since this function works seeing the contents of the first
line, please call this after the second line if possible.

If you want to apply these trick to other environments, foo'
environment for example, define the function named
YaTeX-intelligent-newline-foo' to insert corresponding contents.
That function will be called at the beginning of the next line after the
newline is inserted to the current line.  Since the function
YaTeX-indent-line' is designed to indent the current line properly,
calling this function before your code to insert certain contents must be
useful.  See the definition of the function
`YaTeX-intelligent-newline-itemize' as an example.

automatically generated by info2www.cgi version 1.2