The listings
package supports line breaks inside lstlisting
environment. But it doesn't produce automatic line breaks for lstinline
environment. For example, in the following paragraph the first line flows out of the margins:
The parameters \lstinline|base_rmr_brain|, \lstinline|base_rmr_fat|, and \lstinline|baseline_basal_rmr_of_lean_tissues| are metabolic rates of brain, fat, and lean tissues in kcal/(kg*day). The parameter \lstinline|mass_brain| denotes the mass of the brain in gram.
Is there any solution for this problem?
The literate feature of listings could be helpful, e.g. to introduce linebreaks at underscores:
\lstset{
literate={\_}{}{0\discretionary{\_}{}{\_}}%
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With