2

What I need is very first line in the document and every line that follows explicitly-specified break (\\) to have 0 mm space (no space) between its first character and left margin of the page (which is default behavior) while every line that follows implicitly initiated break by TeX (due to reaching right margin of the page) begins with space (between its first character and left margin of the page) which is 10 mm greater than such space of previous line.

1234567890123456789012345678901234567 <- 37 characters before auto-wrap
This is very first line with no space
 while this is second line after
  automatic break.\\
This line also doesn't begin with
 space but this one does.
bp2017
  • 3,756
  • 1
  • 13
  • 33

1 Answers1

1

A blank line is clearer than \\.

Here's a way, using \parshape:

\documentclass[twocolumn]{article}

\usepackage{xparse}

\ExplSyntaxOn

\NewDocumentEnvironment{bizarre}{O{\columnwidth}}
 {
  \par
  \setlength{\parindent}{0pt}
  \bp_make_parshape:n { #1 }
  \everypar{\parshape 50~\l_bp_parshape_tl}
 }
 {
  \par
 }

\tl_new:N \l_bp_parshape_tl
\dim_new:N \l_bp_parshape_dim

\cs_new:Nn \bp_make_parshape:n
 {
  \dim_set:Nn \l_bp_parshape_dim { #1 }
  \tl_set:Nx \l_bp_parshape_tl
   {
    \int_step_function:nN { 50 } \__bp_parshape:n
   }
 }
\cs_new:Nn \__bp_parshape:n
 {
  \dim_eval:n { 10mm*(#1-1) } ~
  \dim_eval:n { \l_bp_parshape_dim - 10mm*(#1-1) }
 }

\ExplSyntaxOff

\begin{document}

\begin{bizarre}
This is very first line with no space
 while this is second line after
  automatic break.

This line also doesn't begin with
 space but this one does.
\end{bizarre}

\begin{bizarre}[0.8\columnwidth]
This is very first line with no space
 while this is second line after
  automatic break.

This line also doesn't begin with
 space but this one does.
\end{bizarre}

\end{document}

enter image description here

egreg
  • 1,121,712