1

A lot of my LaTeX documents are informal lists for my own use. I prefer to organize these informally, without using any of the "list" type formatting available to LaTeX.

I have a new line before and after most of my list items (see sample LaTeX source below), but ideally would like to have each items on its own line as opposed to being concatenated together as they are by default.

Currently I need to put a blank newline in the source to ensure the item on the next line will be on it's own line. That's the action I want to eliminate.

Ideally I can put a formatting line at the start of documents and not have to set each list item as an item.

Examples:

by default, this LaTeX code:

\documentclass{report}
\begin{document}
test1
test2
test3
\end{document}

Will produce a pdf with text like this

test1 test2 test3

I want text instead to be produced like this

test1
test2
test3

Basically, I want newlines in the latexsource to be honored in the document output.

I don't want to use easylist or any special list package.

If any string starts on a newline in the LaTeX source I want it to start on a newline in the output, and it does not by default. That's it.

image:

Visual Example

edit:

I saw werner solution, which works quiet well. Is it possible to start the overlay command, and to end it after a certain section? That would be perfect

Ryan
  • 17
  • 1
    Welcome! What's the question? You could explain better by showing us rather than telling us, I suspect. What do you have? What are you trying to do? – cfr Feb 18 '17 at 03:49
  • 1
    Consider using Markdown and converting to LaTeX if desired. Or look at easylist, I think it is called. But I don't know if any of this is what you want. – cfr Feb 18 '17 at 03:51
  • 1
    I cannot understand what this means: 'would like to have multiple items on a line, and have them formatted with spacing between them, as opposed to being concatenated together'. Words on a line are 'formatted with spacing between them' already. What are items? single words? strings (of words)? (I second easylist if you want minimal list 'markup'.) An image might help (me) understand what you are hoping to achieve. – jon Feb 18 '17 at 04:09

1 Answers1

3

If you want line breaks in your code to be obeyed in your output, then issue \obeylines (in your preamble):

test1
test2
test3

\documentclass{report}
\obeylines
\begin{document}
test1
test2
test3
\end{document}

Note that consecutive line breaks will still be treated as a single line break.

Werner
  • 603,163