I wonder if there is a way to tell to WinEdt (or TexStudio) to start a new line when a word reaches the margins of a document.

The reason is that I don't like to have long expressions and I don't want to hit "enter" in order to start a new line manually each time a word reaches the margins of a page.

Thanks in advance

  • For Winedt: Read in the manual the section about wrapping. Jun 22, 2015 at 10:18
  • Thank you for your quick reply! I will try it as soon as possible!!!
    – Yorgos
    Jun 22, 2015 at 10:22
  • I tried it, but it does not seem to work..
    – Yorgos
    Jun 22, 2015 at 10:44

2 Answers 2


For TeXstudio:

You can control line wrapping at

Options -> Advanced Editor -> Special Options -> Line Wrapping

Note: The option "Hard Wrapping" uses Soft-Wrapping during the edit session. This makes editing easier. The soft wraps are converted to line breaks during the save operation.

If you want to explicitly apply hard wraps during an edit session, you can use Idefix -> Hard Line Break ... and Idefix -> Repeat Hard Line Break.


If you are working on WinEdt, you can simply add the following line as the first line of your document:

% -*-TeX-*- -*-Hard-*-

In this way way you are telling WinEdt that yours is a TeX document and you want to use "smart wrapping" (end of line = new line) instead of "soft wrapping" (default).

For already opened documents, you will have to run the command 'Get Mode' from the 'Document' mode to have that wrapping mode in effect immediately (otherwise you will have to restart WinEdt).

If you want this behavior for all you TeX files, do the following

Open 'Options' -> 'Preferences' dialog and in the 'Wrapping' tab, 'Use Soft Wrapping for Modes', delete 'TeX' from the list:

enter image description here

You can also vary the length of the line by modifying the value of 'Fixed Right Margin':

enter image description here

This will affect only new documents or documents that have not been already opened.

To affect also already opened documents, close all your documents, choose 'File' -> 'Recent File List' -> 'Clear List'

enter image description here

and then press 'Apply'.

Note that for documents that have already been typeset in "soft wrapping" mode you may have have to run "Edit" -> "Format" -> "Format Document" to apply the new settings.

You must log in to answer this question.

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