I have a really long formula in Mathematica notebook. I want to display the formula as one long line. Mathematica keeps making the formula longer than one line so makes two lines. I need the formula displayed as one long line because I'm saving the document as a pdf.

  • 3
    $\begingroup$ does SetOptions[EvaluationNotebook[], PageWidth -> Infinity] give what you need? $\endgroup$
    – kglr
    Aug 28, 2018 at 8:53

1 Answer 1


You can wrap the expression with Style with the option LineBreakWithin-> False :

Style[StringTake[ExampleData[{"Text", "DeclarationOfIndependence"}], 400],
   LineBreakWithin -> False]

enter image description here

Alternatively, you can set the PageWidth to Infinity for all cells in the current notebook:

SetOptions[EvaluationNotebook[], PageWidth -> Infinity]

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.