私が必要としているのは、文書の最初の行と、明示的に指定された改行 (\\) に続くすべての行の最初の文字とページの左余白の間に 0 mm のスペース (スペースなし) があることです (これはデフォルトの動作です)。一方、TeX によって暗黙的に開始された改行 (ページの右余白に達したため) に続くすべての行は、前の行のスペースよりも 10 mm 大きいスペース (最初の文字とページの左余白の間) で始まります。
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.
答え1
空白行は よりも明確です\\
。
次のような方法があります\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}