Text FormattingTrying to left-justified text but got issues with ragged2e

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
etp94
Posts: 16
Joined: Sat Sep 03, 2016 11:55 pm

Trying to left-justified text but got issues with ragged2e

Post by etp94 »

Hi!

I'm a LaTex newbie, I took some packages from a partner document, I've been studying some of them carefully but it seems that LaTex use completely justified text as default configuration.

I found that by using \usepackage[document]{ragged2e} you can get all your document left justified. The problem I've is that the pdf output stop obeying my paragraph delimitation by using \\,

I've attached both pdf outputs with and without using ragged2e package.

Also I've been using this packages and configuration:

Code: Select all

\documentclass[12pt,openany]{report}
\usepackage[document]{ragged2e}
\usepackage{graphicx}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[spanish,activeacute,es-lcroman,es-tabla]{babel}
\usepackage{mathtools}
\usepackage[latin1]{inputenc}
\usepackage{dcolumn}
\usepackage{float}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{epstopdf}
\usepackage{subfig}
\usepackage{color}
\usepackage{pifont}
\usepackage{apacite}
\usepackage{authblk}
\usepackage{rotating}
\usepackage{verbatim}
\usepackage{moreverb}

	\spanishdecimal{.}

	\addtolength{\oddsidemargin}{-.875in}
	\addtolength{\evensidemargin}{-.875in}
	\addtolength{\textwidth}{1.75in}

	\addtolength{\topmargin}{-.875in}
	\addtolength{\textheight}{1.75in}
Is any of these could generate my issue by using it with the ragged2e package?

Thanks for reading!! :)
Attachments
Default text justification (66,7% zoom)
Default text justification (66,7% zoom)
defaultjustification.png (98.32 KiB) Viewed 4898 times
PDF output by using ragged2e package (75% zoom)
PDF output by using ragged2e package (75% zoom)
leftjustified.png (78.41 KiB) Viewed 4898 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Trying to left-justified text but got issues with ragged2e

Post by Johannes_B »

Hi and welcome.
etp94 wrote:The problem I've is that the pdf output stop obeying my paragraph delimitation by using \\,

Never do that, never use a double backslash at the end of paragraphs, it is not only bad, it is really really wrong.
Instead, you sould use package parskip.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
etp94
Posts: 16
Joined: Sat Sep 03, 2016 11:55 pm

Trying to left-justified text but got issues with ragged2e

Post by etp94 »

Johannes_B wrote:Never do that, never use a double backslash at the end of paragraphs, it is not only bad, it is really really wrong.
Instead, you sould use package parskip.
Hi!

Thanks for answering!

I've search for LaTex parkskip but I've found that it is a package and a command, should I use use just the package instead of using \parskip at the end of every paragraph (like if I were using double backslash)?.

I've found this information about the package form:
TeX leaves no vertical space between paragraphs by default (\parskip=0pt). Similar to \parindent, setting \parskip in the document preamble controls the vertical space between paragraphs document-wide.

\documentclass{article}
\usepackage{blindtext}
\parskip=12pt % adds vertical space between paragraphs
\begin{document}
\blindtext

\blindtext
\end{document}
from http://texblog.org/2013/02/27/on-paragr ... -texlatex/

Is it what you recommended to me? should I use just the package or must they be used at the same time?

Regards!
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Trying to left-justified text but got issues with ragged2e

Post by Johannes_B »

Use the blank line and the package.

Do not use \parskip=12pt. It is not LaTeX and doesn't do the same as the package does.

But the really important thing is the blank line between paragraphs in your input text.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply