# Line width in parshape environment

I would like to get the current line width in a \parshape environment.

The following variables return the full page width (345pt), where I would expect 300pt:

\documentclass{report}

\usepackage{lipsum}

\begin{document}

\parshape=5
0pt 300pt
0pt 300pt
0pt 300pt
0pt 300pt
0pt 300pt
\noindent\the\textwidth\\ \the\linewidth\\ \the\columnwidth\\ \the\hsize\\\lipsum[1]

\end{document}


How can I get the expected (size) value?

• The text width is not available anyway while the paragraph is being typeset, because TeX decides which word goes in which line only after the paragraph has ended. – egreg May 6 '16 at 10:46
• @egreg. Thanks for your answer. I have "solved" my problem by looking for linebreaks, measuring lines individually and then comparing them to the "expected" width (set in parshape). This works okay to draw a colored trapezium behind the text at the appropriate width. – Alexed May 17 '16 at 9:47

\parshapeindent

each of them followed by an integer, to access the indent and length of lines under the current \parshape specification, but it's impossible to know what's the line length or indent pertaining to the line where a word will appear, because that's decided on much later, when TeX has applied its algorithm for splitting the paragraph into lines. In other words, there's no notion of “the current line”. Examples can be made of paragraphs where changing one word can lead to largely different line breaks.