Text Formattingmemoir | Itemized List misaligned

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
spartanguy07
Posts: 10
Joined: Wed Feb 08, 2012 7:29 pm

memoir | Itemized List misaligned

Post by spartanguy07 »

I am writing a memoir document with an itemized list in one of the subsections. For some reason, the itemized list will not align with the left margin of the section. The majority of what should be on the itemized list is off the page, while I only see the last few words of what should be in the left margin.

Here is a screen shot of the problem area (since my description may be confusing).
itemize-misalign.jpg
itemize-misalign.jpg (5.35 KiB) Viewed 8360 times
The rest of the document is fine, it is only this part of the itemized list that is causing a problem.

I hope someone can give me some guidance on how to fix the problem.
Last edited by localghost on Wed Feb 08, 2012 8:48 pm, edited 1 time in total.

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

memoir | Itemized List misaligned

Post by localghost »

spartanguy07 wrote:[…] Here is a screen shot of the problem area (since my description may be confusing). […]
A proper minimal example would be much less confusing. This one here works as expected.

Code: Select all

\documentclass{memoir}
\usepackage[T1]{fontenc}

\begin{document}
  The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
    \begin{itemize}
      \item The quick brown fox jumps over the lazy dog.
      \item The quick brown fox jumps over the lazy dog.
      \item The quick brown fox jumps over the lazy dog.
    \end{itemize}
\end{document}

Best regards and welcome to the board
Thorsten
spartanguy07
Posts: 10
Joined: Wed Feb 08, 2012 7:29 pm

Re: memoir | Itemized List misaligned

Post by spartanguy07 »

I did not post the actual full code because I was concerned of potentially confidential information located in the list, however in my screen shot of the error, nothing that could be problematic was displayed.

When I create a test document to use the code that you sent me, it works fine, with no error.

Thank you for the welcome.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: memoir | Itemized List misaligned

Post by localghost »

That's the purpose of a minimal example. Follow the link in my first reply to get detailed instructions about how to create one. Take a copy of your document, cut it down to the problem and post it here. Drop all code that is not necessary to reproduce the problem.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Re: memoir | Itemized List misaligned

Post by Stefan Kottwitz »

You could replace the confidential information by some dummy text. If it would be possible for us to compile the example and reproduce the problem, I'm completely sure we could fix it then. Thorsten mentioned the best way for getting the demonstration example: reducing a copy as long as it shows the problem.

Stefan
LaTeX.org admin
spartanguy07
Posts: 10
Joined: Wed Feb 08, 2012 7:29 pm

memoir | Itemized List misaligned

Post by spartanguy07 »

Example

Code: Select all

\documentclass[12pt,a4paper]{memoir}
%%%% Begin latex configuration

% command for code
\DeclareFixedFont {\codefont}{OT1}{pcr}{m}{n}{10}
\newcommand{\code}[1]{\codefont#1\normalfont}
%%%% End latex configuration

\begin{document}
\begin{itemize}
\item[File uploading (POST on \code{THIS IS SAMPLE TEXT}]
\item [File downloading (GET on \code{This is a second example})]
\end{itemize}
\end{document}
So just cutting it down, it seems that the \code command is what causes the problem, however I am not sure why.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

memoir | Itemized List misaligned

Post by localghost »

It's not your new \codefont command. It's the way you try to typeset the list items. Drop the square brackets and see what happens.

The reason for the misalignment is that there is only a restricted amount of reserved space for the width of the item label. And with the content inside the square brackets you add an optional argument to the \item command which represents a label. But the width of this label exceeds the reserved space.
spartanguy07
Posts: 10
Joined: Wed Feb 08, 2012 7:29 pm

Re: memoir | Itemized List misaligned

Post by spartanguy07 »

I actually started without brackets when I originally wrote the list. Then I added the brackets and came up with the new misalignment problem. But maybe you guys can help me figure out what the other error was originally.

Removing the brackets on the test makes it align fine, however on my actual document I receive this error:

! Font \csname\endcsname=fplmr at 12.0pt not loadable: Metric (TFM) file not found.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

memoir | Itemized List misaligned

Post by localghost »

spartanguy07 wrote:
! Font \csname\endcsname=fplmr at 12.0pt not loadable: Metric (TFM) file not found.
Hm. With your example I can't reproduce this compiler message. It compiles flawlessly. No warnings, no errors. Maybe due to the fact that your example doesn't load mathpazo, where »fplmr.tfm« belongs to.

If you are using this font package in your document, it might be not installed properly. De-installation and re-installation of that package by the package manager of your TeX distribution might help to remedy this issue.
Post Reply