Based on the answer of Markus Scharrer, I am using the custom lstnewenvironment to get code and Section with my environment. Since I use an environment in an environment (I know it may not be the best approach, but I have to do it like this) I am not able to set the indentation of my list..

Here's my MWE:



     {Return value:
     \begin{itemize}[labelindent=\parindent, leftmargin=*, labelsep=0.5cm,itemsep=0.8pt]}

  \newcommand{\returnvalue}[2] %Name, Description
     {\item #1: #2}

which I am using like this:

  \begin{method}{SaveDocument}{Description of the Method \\
  \returnvalue{True}{Saved successfully.}
  Method Boolean SaveDocument()

Any idea why my list is not indented like I customized? I could change leftmargin to anything with no influence..

  • This reminds me of a bug in listings that fails to set \if@nobreak to false. – egreg Jul 2 '13 at 21:01
  • and how can I fix it? – Kathiieee Jul 3 '13 at 6:52
  • @egreg: I don't think it's related to your hint. I think the calculation of the width fails. I tried the following \fbox{\vbox{\MethodDescription}} and it looks really odd. – Marco Daniel Jul 3 '13 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.