Text FormattingJustification (both right and left) and page-break for margi

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
SuzuBell
Posts: 14
Joined: Sat Dec 13, 2014 7:08 am

Justification (both right and left) and page-break for margi

Post by SuzuBell »

I am including an enumeration in the margin. I am able to get this to work, but noticed two problems. First, I am trying to justify the text. Currently, it is justified on the left, but not on the right. Second, I would like the margin enumeration to page-break at the appropriate location. Is it possible to accomplish this?

Below is my MWE (Notice that there should be a page break so that is spans 2 - and not 1 - pages. And notice that the right side of the text is not aligned):

Code: Select all

\documentclass[12pt,english,nohyper]{tufte-handout}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage[space]{grffile}
\usepackage{geometry}
\usepackage{pgffor}
\usepackage{caption}
\usepackage{calc}
\usepackage{enumitem}
\usepackage[english]{babel}
\usepackage{blindtext}

\makeatletter
\makeatother

\begin{document}
\SweaveOpts{concordance=TRUE}

\marginpar{
\noindent
\begin{minipage}{53mm}
\vspace{7mm}
\underline{Here is the list:}
\vspace{0.5mm}
\footnotesize

\begin{enumerate}[label=\Alph*.,itemsep=-1ex,leftmargin=*]
\item \blindtext[1]
\item \blindtext[1]
\item \blindtext[1]
\item \blindtext[1]
\end{enumerate}
\end{minipage}
}

\end{document}
I wanted to reiterate that I want to keep the left-alignment as it is currently. (The enumerations A. B. C. D. are all a bit further left than the rest of the text, which is neatly aligned). Thank you for any advice.

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

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Justification (both right and left) and page-break for margi

Post by Stefan Kottwitz »

You could load the package ragged2e in your preamble:

Code: Select all

\usepackage{ragged2e}
The you could insert \justify at the start of margin notes:

Code: Select all

\marginpar{\justify
  \noindent
  ...
}
Furthermore, I recommend to load the microtype package:

Code: Select all

\usepackage{microtype}
You may notice that it can improve justification.

Stefan
LaTeX.org admin
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Justification (both right and left) and page-break for m

Post by Johannes_B »

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