1

In the MWE, after the arrow the line is empty and the text starts in a new line. Can I achieve that the text starts after the arrow? Neither ~ nor \nolinebreak do not work. The arrow should be where it is in the MWE.

\documentclass{article}
\usepackage{blindtext}
\usepackage{changepage}

\newenvironment{myenvironment}
{\noindent$\rightarrow$\begin{adjustwidth}{3em}{0em}}
{\end{adjustwidth}}

\begin{document}
\noindent Hello.
\begin{myenvironment}
\blindtext
\end{myenvironment}
\end{document}
1
  • adjustwidth is a display environment, like center, you can't put anything to the left of it Dec 19, 2018 at 21:02

1 Answer 1

3

Include the elements as part of the adjustwidth environment contents rather than before it:

enter image description here

\documentclass{article}

\usepackage{blindtext}
\usepackage{changepage}

\newenvironment{myenvironment}
  {\begin{adjustwidth}{3em}{0em}
   \makebox[0pt][r]{\makebox[3em][l]{$\rightarrow$}}\ignorespaces}
  {\end{adjustwidth}}

\begin{document}

\noindent Hello.
\begin{myenvironment}
\blindtext
\end{myenvironment}

\end{document}
2
  • But then the arrow is also indented, but it should be were it is in the MWE.
    – Thales
    Dec 19, 2018 at 20:50
  • @Thales: That wasn't clear from the question. I've updated my answer to hopefully reflect what you're after.
    – Werner
    Dec 19, 2018 at 20:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .