Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The simplecv class (for LyX), provides the Itemize environment which is defined in simplecv.layout as follows:

Style Itemize
    Margin                Static
    LatexType             Item_Environment
    LatexName             itemize
    NextNoIndent          1
    LeftMargin            MMN
    LabelSep              xx
    ItemSep               0.2
    TopSep                0.7
    BottomSep             0.7
    ParSep                0.3
    Align                 Block
    AlignPossible         Block, Left
    LabelType             Itemize
    LabelString           "*"
End

Using items with the paragraph alignment set to justified (which is the default), produces a visually correct list of items (screenshot below, left).

I would like to have an Left alignment. Trying to do so (i.e. changing through LyX' paragraph settings interface), prints the (default) bullet, on its own, and pushes the text in the next line (screenshot below, right)!

enter image description hereenter image description here

The complete code, this time using {\raggedright ... \par}, as seen in LyX' LaTeX Source window reads:

% Preview source code

%% LyX 2.0.2 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage{charter}
\usepackage[scaled=0.8]{berasans}
\usepackage{beramono}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[a4paper]{geometry}
\geometry{verbose,tmargin=1.4cm,bmargin=3cm,lmargin=2cm,rmargin=2.5cm}
\pagestyle{empty}
\setcounter{secnumdepth}{0}
\setcounter{tocdepth}{2}
\setlength{\parskip}{\medskipamount}
\setlength{\parindent}{0pt}
\usepackage{pifont}

\makeatletter
\@ifundefined{date}{}{\date{}}
\AtBeginDocument{
  \def\labelitemi{\footnotesize\(\bullet\)}
  \def\labelitemii{\footnotesize\(\circ\)}
  \def\labelitemiii{\tiny\ding{71}}
  \def\labelitemiv{\tiny\ding{75}}
}

\makeatother

\usepackage{babel}
\begin{document}
\begin{itemize}
\item \noindent \begin{flushleft}
{\raggedright Sample text sample text sample text sample text sample
text sample text sample text sample text sample text sample text sample
text sample text sample text sample text sample text sample text sample
text sample text sample text sample text sample text sample text sample
text sample text sample text sample text sample text sample text sample
text sample text sample text sample text sample text sample text sample
text sample text sample text sample text sample text sample text sample
text\par}
\par\end{flushleft}
\item \noindent Sample text sample text sample text sample text sample text
sample text sample text sample text sample text sample text sample
text sample text sample text sample text sample text sample text sample
text sample text sample text sample text sample text sample text sample
text sample text sample text sample text sample text sample text sample
text sample text sample text sample text sample text sample text sample
text sample text sample text sample text sample text sample text sample
text\end{itemize}

\end{document}

The visual result, as seen in a larger screenshot, is an incorrect left aligned item and a correctly justified item:

incorecct and correct left alingment of item

How is it possible to achieve a correct Left alignment? Are the Align, AlignPossible instructions in simplecv.layout related?

[Question to self: did I touch some other, global, setting which affects the behaviour in question?]

share|improve this question

closed as off topic by Marco Daniel, zeroth, Claudio Fiandrino, Paul Gaborit, percusse Oct 4 '12 at 0:26

Questions on TeX - LaTeX Stack Exchange are expected to relate to TeX, LaTeX or related typesetting systems within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
If you don't have any luck here, try the mailing list: lyx-users@lists.lyx.org –  scottkosty Sep 30 '12 at 0:01
1  
Can I read any comments clarifying why this question is (voted as) off-topic? –  Nikos Alexandris Sep 30 '12 at 8:09
    
Updated the question with complete code and a large(r) screenshot, this time using @Werners' suggestion. –  Nikos Alexandris Sep 30 '12 at 8:36
2  
@NikosAlexandris: By the way, I don't find LyX questions to be off-topic here. It is an interface used by some (many?) as the editor-of-choice for (La)TeX. And, since it provides a front-end and removes the user from any low-level TeX, many problems introduced by LyX can still be overridden using ERTs using basic (La)TeX macros. Closing as off-topic would drop a number of users from this site that would most likely not be able to find help elsewhere but on the LyX mailing list (which may not possess the response rate/quality as is found here). –  Werner Sep 30 '12 at 14:57
1  
Adding to the discussion: by accepting, as I answered @percusse, I meant I respect the opinion of folks that consider(ed) this kind of question(s) as off-topic. This, however, does not mean that I agree with their Skepsis. By definition, TeX.SE is a free, community driven Q&A for users of TeX, LaTeX, ConTeXt, and related typesetting systems. And I perceive LyX as a related typesetting system. LyX' mailing list is the best source to dig when facing problems. However, the *.SE fora, are such a fine way to communicate (democratically). LyX belongs here! –  Nikos Alexandris Sep 30 '12 at 15:13

1 Answer 1

up vote 3 down vote accepted

LyX inserts the "Don't Indent Paragraph" formatting before the alignment environment flushleft, which causes the layout problems. Instead, remove the \noindent by selecting "Indent Paragraph" from the paragraph settings window:

enter image description here

Note that the flushleft environment automatically sets the paragraph indent to be 0pt, so there's no need to specify the "No Paragraph Indent" check. Actually, this is done internally via \raggedright, so you could also achieve this via two ERTs manually {\raggedright ... \par}:

enter image description here

\raggedright sets the paragraph to be "left aligned" while \par ensures that the paragraph/bullet is finished - TeX requires this since it sets lines of text based on a paragraph basis.

enter image description here

share|improve this answer
    
Thanks. I can't reproduce your correct example (shrug). I updated my question with more code and a big screenshot. Maybe something else I 've changed elsewhere in the settings? I am trying to trace it. –  Nikos Alexandris Sep 30 '12 at 8:26
    
I think I found the difference! It is an additional \noindent after the \item command. However, I don't know precisely where from and why this is coming from. It seems it is related with LyX' selection under: Document > Settings > Text Layout > Separate paragraphs with: Vertical space. Switching between Alignment settings (within from the Paragraph Settings interface), while on Vertical space adds the \noindent command after the \item command. –  Nikos Alexandris Sep 30 '12 at 12:14
    
@NikosAlexandris: The \noindent is inserted because you unchecked the "Indent Paragraph" box under Paragraph Settings. Since paragraphs are indented by default, no indentation causes a specific command to be inserted. So, "re-insert" this indentation and the problem should go away. I've update the answer accordingly. Also, update your LyX version to the latest (currently at 2.0.4) from your existing 2.0.2. –  Werner Sep 30 '12 at 14:38
    
Thanks. I also found the way to un-do the \noindent, even by keeping Vertical space as a global setting. LyX 2.0.2 is current in the ubuntu repos. I also run lyx-dev sometimes manually compiled. –  Nikos Alexandris Sep 30 '12 at 14:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.