0

Code

....
\makeatletter
\def\flushboth{%
      \let\\\@normalcr
        \@rightskip\z@skip \rightskip\@rightskip
          \leftskip\z@skip
            \parindent 1.5em\relax}
\makeatother

....

\begin{document}

....

\flushboth{
{\small{You're sitting at home, glass of Henri Jayer Echezeaux Grand Cru in hand, scrolling through Airbnb listings in pursuit of the perfect home to rent for your next trip to the Mediterranean.

"No, no, no!" you scream at the screen in frustration, knuckles turning white as you grip the stem of your Chateau Baccarat glass.

"These properties simply will not do!"

Fear not, dear luxury lover, for the rise of the online sharing economy hasn't left you behind.

In recent years, several luxury-focused sites have been launched to allow owners of multi-million dollar properties an outlet to rent out their mansions, villas and penthouses to their wealthy counterparts for the short term. }}%
}

....

\end{document}

Output

Here you can see the output

Purpose

Flush text left and right without setting any tabs at every new line.

Maybe the tabs are setted because I*m using R Sweave and this formatting is used in that way. Using only text produces the same like \flushboth. But I tried flushboth to get the required solution.

Using flushleft works to clear the tabs but then the whole text is flushed left. Using flushleft and flushright does not work. You can use either flushleft or flushright. If you use both then that one which is closer to the text will be applied.

b4154
  • 157
  • The indentation is not at every new line, but at every new paragraph. An empty line in the code starts a new paragraph. The amount of indentation is controlled by the \parindent length. Also, \small is not a command that takes an argument, it should be used as {\small ...}, not \small{...}. – Torbjørn T. Dec 22 '15 at 13:59
  • OK, but removing or changing ´small´ does not make any differences considering my purpose described above – b4154 Dec 22 '15 at 14:19
  • Presumably you are after http://tex.stackexchange.com/questions/42/is-there-an-easy-way-to-have-my-whole-document-with-a-space-between-paragraphs-r – Joseph Wright Dec 22 '15 at 14:27
  • No, of course not, that was more of an apropos. The sentence prior to that was the most relevant to your question. By the way, just to clarify, do you want that behaviour for the entire document, or just some parts? – Torbjørn T. Dec 22 '15 at 14:27
  • In some documents for the entire document. In some others only for one part – b4154 Dec 22 '15 at 14:56
  • Only the indentation at each new line disturbs – b4154 Dec 22 '15 at 15:07
  • 1
    your question is not understandable at all sorry. \flushboth just sets left and right sikip to 0pt which is the default behaviour, so why do you need a command at all? You have defined it with no argument but use it as \flushboth{...} apparently as if with an argument (the same comment applies to \small) Latex Does not normally use the tab character at all (it treats it like a space) this code does not change the interpretation of tab so I can not guess what you meant by tabs being set or not set? – David Carlisle Dec 22 '15 at 17:46
  • @DavidCarlisle I think he means \parindent. – Torbjørn T. Dec 22 '15 at 21:56
  • Yes, using \setlength{\parindent}{0pt} and clearing flushboth solves the problem. Thanks – b4154 Dec 23 '15 at 09:09
  • Please post an answer – b4154 Dec 23 '15 at 09:09

1 Answers1

1

Using \setlength{\parindent}{0pt} in preamble solves the problem.

Defined \flushboth can be cleared.

Torbjørn T.
  • 206,688
b4154
  • 157