1

When I compile this:

\documentclass{article}
\usepackage{listings}
\lstset{language=[R/3 6.10]ABAP,
    breaklines=true,}

\begin{document}
\lstinline|METHODS print_number IMPORTING VALUE(iv_number) TYPE i.|
\end{document}

The space between (iv_number) and TYPE is gobbled. It is not even there when copy & pasting. This seems to be related to the breaklines option. For my actual document I would need that option. Is there some global method to solve the problem? I would prefer that to writing \lstinline[breaklines=f]|METHODS print_number IMPORTING VALUE(iv_number) TYPE i.| everytime.

3
  • 1
    Just a suggestion: you can use minted instead of listings. I used listings before and had to manually set a lot of things that minted does out of the box. Sep 27, 2016 at 12:52
  • This is nice! It took a bit of work to switch and customize again but minted seems to be the superior solution!
    – Benjamin
    Sep 27, 2016 at 15:53
  • I believe that not solving your listings problem may have been the better solution ;D Sep 27, 2016 at 19:03

1 Answer 1

0

Using minted avoids these problems. The package is a bit more work to install but it is much more flexible.

The example with minted would look like this:

\documentclass{article}

\usepackage{minted}
\setminted[ABAP]{breaklines=true}

\begin{document}
\mintinline{ABAP}{METHODS print_number IMPORTING VALUE(iv_number) TYPE i.}
\end{document}

You can even set options just for inline code with:

\setmintedinline[ABAP]{breaklines=false}

You must log in to answer this question.

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