• I write my code usually without manual word wrapping (in this case LaTeX).
    If I post these with wp-syntax nearly all the code is hidden because it is not wrapped inside the available space.

    Is there any possibility to enable word wrapping ?

    Matthias

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    If I post these with wp-syntax

    Well, you could post them without using wp-syntax.

    wp-syntax is using <pre> tags, which is what’s preventing automatic word wrapping. WordPress is happiest when you write your posts as plain text. No formatting. If you need to add formatting, do it in HTML.

    Of course, if you’re posting actual code, then the word wrapping actually matters, doesn’t it? In which case you don’t want the page to add its own word wrap.

    The short of it is that you can’t have it both ways. If you use <pre>, then you’re expected to add your own word wrap, along with everything else.

    Pospiech, If you really want your LaTeX to wrap, you can change the behavior of the white space wrapping of the <pre> tag with a little bit of CSS magic. Here are some resources that might benefit you:

    Making preformatted text wrap
    CSS: white-space

    Also, this page has some wp-syntax styling guidelines that will style your code snippets to automatically add horizontal scroll bars where necessary. I don’t know if this helps your situation or not.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘automatic word wrapping’ is closed to new replies.