Text FormattingUsing indent with ragged2e and page numbering position

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

Using indent with ragged2e and page numbering position

Post by etp94 »

Hi!

I've been using ragged2e package in order to get all my document left justified. Since I'm using this package LaTex stop generating indents at the beginning of my paragraphs.

I'm trying to use:

Code: Select all

\documentclass[12pt,openany]{report}
\usepackage[document]{ragged2e}
\usepackage{parskip}

\setlength\parindent{0.5 in}
But it's not working, also I'm using this commands in order to get 1 inch margins:

Code: Select all

	
\addtolength{\oddsidemargin}{-.875in}
\addtolength{\evensidemargin}{-.875in}
\addtolength{\textwidth}{1.75in}
\addtolength{\topmargin}{-.875in}
\addtolength{\textheight}{1.75in}
1.- Is some of this configurations makes LaTex to stop the paragraph indentation?

2.- Does anybody knows how to use the page numbering in the fashion that is showed in the file attached at this topic? (I've been using \pagenumbering{roman or arabic} command)

Thanks for reading! :)
Attachments
Page numbering desired
Page numbering desired
pagenumbering.png (74.87 KiB) Viewed 8566 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

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Using indent with ragged2e and page numbering position

Post by cgnieder »

etp94 wrote:I'm trying to use:

Code: Select all

\usepackage{parskip}
1.- Is some of this configurations makes LaTex to stop the paragraph indentation?
If you use the parskip package it sets the paragraph indent to zero and the paragraph skip to some non-zero value. Remove the package and the indent will be back.

\pagenumbering{arabic} (as in the picture you show) is the default for a LaTeX document (unless you're using a non-common document class maybe) so I'm really unsure what your actual question is. I'm guessing you're asking how to get the page number from the footer to the header?

Regards
site moderator & package author
etp94
Posts: 16
Joined: Sat Sep 03, 2016 11:55 pm

Using indent with ragged2e and page numbering position

Post by etp94 »

Thanks for answering! :)
cgnieder wrote: If you use the parskip package it sets the paragraph indent to zero and the paragraph skip to some non-zero value. Remove the package and the indent will be back.
In my last topic:

http://www.latex-community.org/forum/vi ... 44&t=28168

I've been suggested to use parskip package instead of double backslash (because the double backslash does not work with ragged2e package), I want to have both indent and blank line between every paragraph, is there a solution or parskip package is not compatible with indentation?
cgnieder wrote: I'm guessing you're asking how to get the page number from the footer to the header?
Yes that is my question (sorry for not being clear)
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Using indent with ragged2e and page numbering position

Post by Stefan Kottwitz »

ragged2e sets \parindent to zero. That's intended, because indented lines in ragged documents look bad. But you can still adjust it. Use this after loading ragged2e:

\setlength{\RaggedRightParindent}{0.5in}

Stefan
LaTeX.org admin
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Using indent with ragged2e and page numbering position

Post by cgnieder »

Two examples:

Code: Select all

\documentclass{article}

\usepackage{parskip}
\setlength\parindent{1em}
\usepackage{lipsum}

\begin{document}

\lipsum

\end{document}
parskip-indent.png
parskip-indent.png (69.04 KiB) Viewed 8535 times

Code: Select all

\documentclass{article}

\usepackage[document]{ragged2e}
\usepackage{parskip}
\setlength\RaggedRightParindent{1em}
\usepackage{lipsum}

\begin{document}

\lipsum

\end{document}
parskip-indent-ragged.png
parskip-indent-ragged.png (75.68 KiB) Viewed 8535 times
Regards
site moderator & package author
etp94
Posts: 16
Joined: Sat Sep 03, 2016 11:55 pm

Re: Using indent with ragged2e and page numbering position

Post by etp94 »

Thanks a lot!!

One more question:

How can I get the page number from the footer to the header?

Really thanks a lot!! :)
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Using indent with ragged2e and page numbering position

Post by Johannes_B »

This seems to be a new question, but popular packages are scrlayer-scrpage and fancyhdr. It is quite easy, but if you have questions, don't hesitate to open a new thread. ;-)
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