Text FormattingAlignment for itemized List

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
dieinfolk
Posts: 12
Joined: Sun Sep 30, 2012 11:26 pm

Alignment for itemized List

Post by dieinfolk »

Hello,

I have problems aligning an item.

Code: Select all

\begin{itemize}[labelindent=1.3em, labelsep=-3cm,leftmargin=*]
  \resitem{\hspace*{\fill}{\footnotesize myText1}}\hfill {\textnormal {myText2}}
\end{itemize}
Text on the right side ("myTex2" in the example) goes outside my document right margins.

How can I force this item to make it fit inside margins?

Thanks in advance,
dieinfolk

Recommended reading 2024:

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

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

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Alignment for itemized List

Post by localghost »

Get used to giving an adequate problem description along with a proper minimal example instead of useless code snippets.


Thorsten
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Alignment for itemized List

Post by Stefan Kottwitz »

I guess without a testable code which shows the situation you won't get a fix. I guess a compilable MWE would also contain the definition of \resitem, which is an unknown macro here.

Stefan
LaTeX.org admin
dieinfolk
Posts: 12
Joined: Sun Sep 30, 2012 11:26 pm

Alignment for itemized List

Post by dieinfolk »

Hello,

I am sorry for my previous post. I'll try to make myself better understood.

My problem is that I can't get my itemize justified with the whole document. My item is always going outside of the right margin, so it is not a justified text anymore.

I use this settings:

Code: Select all

\raggedbottom
\raggedright 
\setlength{\tabcolsep}{0in}

% Adjust margins
\addtolength{\oddsidemargin}{-0.375in}
\addtolength{\evensidemargin}{0.375in}
\addtolength{\textwidth}{0.1in}
\addtolength{\topmargin}{-.375in}
\addtolength{\textheight}{0.75in}

% Adjust margins for itemize
\setlength{\leftmargini}{4pt}
And my itemize environment:

Code: Select all

\newcommand{\myItem}[1]{\item #1 \vspace{-2pt}}

\begin{itemize}[labelindent=1.3em, labelsep=-3cm,leftmargin=*]
	\myItem{\hspace*{\fill}{\footnotesize AAA}}\hfill {\textnormal {BBB}}
\end{itemize}
According to this example, \textnormal {BBB} is not justified, goes outside margins.

Thanks a lot, one more time.
dieinfolk
dieinfolk
Posts: 12
Joined: Sun Sep 30, 2012 11:26 pm

Alignment for itemized List

Post by dieinfolk »

Hello,

I'm gonna express my problem in a different way, with the following example:

Code: Select all

\documentclass{article}

% Adjust margins for itemize
\setlength{\leftmargini}{4pt}

\newcommand{\resitem}[1]{\item #1 \vspace{-2pt}}

\begin{itemize}
	\resitem{%Here it goes a full paragraph%}
\end{itemize}
My paragraph has an uneven alignment (not justified). I don't want a right or left alignment, but just justified.
Should this happen in that class of document? I've seen solutions for beamer, but in my case, I'm lost..

Thanks again,
dieinfolk
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Alignment for itemized List

Post by Stefan Kottwitz »

dieinfolk wrote:I don't want a right or left alignment, but just justified.
Full justification is the default. In an earlier post you used \raggedright which switches to left justification and ragged right margin. Just remove that.

The last example is not useful, it doesn't show anything. It's not compilable, there's no output even if I add \begin{document} etc. text is commented out instead of inserting dummy text which breaks compilation (closing brace commented out). It remains fictional, no test, no comparison, no verification. I just tell you so you could make it better next time. Please follow this link to learn how to improve question code: Infominimal working example (beside Thorsten's links). It's just for helping you to get a solution more quickly and to make the life in the forum easier.

Stefan
LaTeX.org admin
dieinfolk
Posts: 12
Joined: Sun Sep 30, 2012 11:26 pm

Alignment for itemized List

Post by dieinfolk »

Sorry for the mess... I'm quite new with latex.

@Stefan, you were right. I could solve my problem removing \raggedright.

Many Thanks,
dieinfolk.
Last edited by cgnieder on Thu Nov 01, 2012 7:07 pm, edited 1 time in total.
Post Reply