Skip to content

Using listings instead of verbatim to enable code wrap #9068

Open

Description

@redraven984

Hi All,

I'm trying to export a notebook with nbconvert to latex. How can I convert the code cells so that long code lines are wrapped?

My understanding is that if verbatim is switched to listings this can be done. However, I dont know what to do with commandchars if I switch.

Thanks for your help! and Im sorry about this basic question.

Activity

  1. added this to the not ipython milestone on Dec 11, 2015
  2. Carreau commented on Dec 11, 2015

    @Carreau
    Member

    That'a likely a jupyter/nbconvert issue, that can be done with custom templates.
    There is not easy option.

    jupyter/nbconvert#141 should help.

  3. redraven984 commented on Dec 11, 2015

    @redraven984
    Author

    Thanks for getting back to me. Do you know what the 'commandchars' line does in verbatim?

  4. Carreau commented on Dec 11, 2015

    @Carreau
    Member

    commandchars

    No, I havent touched verbatim in years, sorry.

  5. t-makaro commented on Jun 10, 2019

    @t-makaro

    If anyone cares to, this can be closed as nbconvert not has line wrapping in latex (though without using listings).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions