I'm trying to understand if there is anyway to get \\
, when in \raggedright
or \RaggedRight
, to produce a new line that is not indented, while \parindent
or \RaggedRightParindent
are set in order to have indented paragraphs. This is necessary for certain types of text blocks (e.g., an address or a block of text with "header" info [e.g., for homework]), in which I want to set each line on its own with a hard break and no indentation. I know that people on this board strongly discourage using \\
, but this seems like an appropriate use. Furthermore, as I'm exporting to Tex from markdown, via Pandoc, \\
are used for markdown line breaks (indicated by two or more spaces at the end of a line). I actually get the desired output when text is set according to memoir's default, that is, with neither \RaggedRight
nor \raggedright
.
So, is there any easy way to do this? I can't find anything about the relationship between \RaggedRight
or \raggedright
and \\
or \newline
in either the ragged2e or memoir docs. My hope is to do this without other markup in the text, just adjustments in my preamble, as I write in more-or-less pure markdown and then automatically convert it to Latex. Of course, this might not be possible, but it seems so from the third example.
Here are my MWEs:
In \RaggedRight
, which is my preferred way of setting text, both \\
and \newline
indent the new lines (see both the header block on top and the address in the middle).
\documentclass[12pt,article,oneside]{memoir}
\usepackage{lipsum}
\usepackage{ragged2e}
\setlength{\RaggedRightParindent}{2em}
\RaggedRight
%\raggedright
%\setlength{\parindent}{2em}
\checkandfixthelayout
\begin{document}
\noindent
LastName\newline Line 2\\Line 3\\Line 4\\29 August 2014
\section{Lorem Ipsum}\label{lip}
\lipsum[1-2]
And here is my address, that I want to have set flush left with no indentation:\\
My Name\newline 7999 Any St Apt 3\\Los Angeles CA 99999\\
With more text, that also should be flowed in the paragraph, with no indentation, coming after the address. \lipsum[1]
\end{document}
In \raggedright
, \\
, but not \newline
, indents the new lines (see both the header block on top and the address in the middle).
\documentclass[12pt,article,oneside]{memoir}
\usepackage{lipsum}
\usepackage{ragged2e}
%\setlength{\RaggedRightParindent}{2em}
%\RaggedRight
\raggedright
\setlength{\parindent}{2em}
\checkandfixthelayout
\begin{document}
\noindent
LastName\newline Line 2\\Line 3\\Line 4\\29 August 2014
\section{Lorem Ipsum}\label{lip}
\lipsum[1-2]
And here is my address, that I want to have set flush left with no indentation:\\
My Name\newline 7999 Any St Apt 3\\Los Angeles CA 99999\\
With more text, that also should be flowed in the paragraph, with no indentation, coming after the address. \lipsum[1]
\end{document}
Finally, with neither \RaggedRight
nor \raggedright
in place, I actually get my desired result.
\documentclass[12pt,article,oneside]{memoir}
\usepackage{lipsum}
\usepackage{ragged2e}
%\setlength{\RaggedRightParindent}{2em}
%\RaggedRight
%\raggedright
%\setlength{\parindent}{2em}
\checkandfixthelayout
\begin{document}
\noindent
LastName\newline Line 2\\Line 3\\Line 4\\29 August 2014
\section{Lorem Ipsum}\label{lip}
\lipsum[1-2]
And here is my address, that I want to have set flush left with no indentation:\\
My Name\newline 7999 Any St Apt 3\\Los Angeles CA 99999\\
With more text, that also should be flowed in the paragraph, with no indentation, coming after the address. \lipsum[1]
\end{document}