Manually typing \\ for every line is not an option.
Is there a package that will interpret every instance of ENTER as a line break, so that every time I ENTER down on my keyboard it will be interpreted as \\ ? (Not in math mode, just in normal text mode).
Text Formatting ⇒ Package for automatic interpretation of linebreak
Package for automatic interpretation of linebreak
Last edited by ptrcao on Sat Mar 19, 2011 2:37 pm, edited 1 time in total.
OS info: Win XP | Debian 6.0 | Ubuntu 10.04
Latex editor of choice: TexWorks (for dual view feature)
Latex editor of choice: TexWorks (for dual view feature)
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Package for automatic interpretation of linebreak
LaTeX.org admin
Re: Package for automatic interpretation of linebreak
Thanks Stef. Does it work in a begin/end environment? What if I only need it in sections of my document, how do I turn it off and on as needed, so it selectively applies to sections?
OS info: Win XP | Debian 6.0 | Ubuntu 10.04
Latex editor of choice: TexWorks (for dual view feature)
Latex editor of choice: TexWorks (for dual view feature)
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Package for automatic interpretation of linebreak
\obeylines works within environments and is local to that. That means, if you use it within an environment, it has no effect after that environment has ended.
You can limit the scope of this command also by \begingroup ... \endgroup or by cury braces { ... }.
Also,
would be a way.
These are general ways for local declarations.
Stefan
You can limit the scope of this command also by \begingroup ... \endgroup or by cury braces { ... }.
Also,
Code: Select all
\begin{obeylines}
...
\end{obeylines}
These are general ways for local declarations.
Stefan
LaTeX.org admin
Package for automatic interpretation of linebreak
Thanks again Stef, very good explanation - your answer was comprehensive and concise.Stefan_K wrote:\obeylines works within environments and is local to that. That means, if you use it within an environment, it has no effect after that environment has ended.
You can limit the scope of this command also by \begingroup ... \endgroup or by cury braces { ... }.
Also,
would be a way.Code: Select all
\begin{obeylines} ... \end{obeylines}
These are general ways for local declarations.
Stefan

OS info: Win XP | Debian 6.0 | Ubuntu 10.04
Latex editor of choice: TexWorks (for dual view feature)
Latex editor of choice: TexWorks (for dual view feature)
Package for automatic interpretation of linebreak
Just a warning: when \obeylines is active, some tools in \table or \tabular will fail. In particular, \hline won't work due to some conflict with defined line endings.