I would like to justify and center text in the following manner:


Notice how each line is exactly the same length. How is this done?

I am using a documentclass article and no packages.

jajasdjsdjsd sdj asj

or you could use

jajasdjsdjsd sdj asj

(which allows page breaking)

or you could use

jajasdjsdjsd sdj asj

which is more or less the same, but writes abstract at the start.


Notice how each line is exactly the same length.

Surely you want only a narrower paragraph, but as you asked for it, this solution produce the same length also in the last line using to \parfillskip and \emergencystretch. The rest of the obfuscated TeX code is just to be outlandish and not use a simple LaTeX environment (Disclaimer: except for a abstract-like simple paragraph this could produce unexpected problems).

The use of microtype package is optional (if you are tolerant to very bad spacing).


%dummy text
\textbf{Abstract}. nano  is  a small, free and friendly editor 
which aims to replace Pico,  the default editor included in the 
non-free Pine package.  Rather than  just  copying  Pico's  look
and feel, nano also implements some missing (or disabled by 
default) features in Pico, such as ``search and replace''  and 
``go to line and column number''.}






Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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