LyXHow can I left align with LyX

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
ck9
Posts: 7
Joined: Tue May 19, 2009 10:26 am

How can I left align with LyX

Post by ck9 »

Hi,

I never imagined I'd ever have such a headache trying to left align some text. I'm using the UNSW LyX template (http://threewordslong.com/blog/entry/63 ... for_UNSW_T) which center-aligns all section and subsection headings. I tried editing the following from its default value of 'Centre' to 'Left'
Style Section
Align Left
AlignPossible Block, Center, Left
In LyX, the section headings move to the left, but when previewing the .pdf there's no change.

I think this may need coding in to the preamble. Could you please let me know what code that is? Specifically I'd like the section (and subsection/subsubsection) headings to be left aligned. I'd like to learn LaTeX properly but right now I'm fighting with deadlines.

Thanks

Recommended reading 2024:

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

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

fatra2
Posts: 126
Joined: Fri May 01, 2009 1:43 pm

How can I left align with LyX

Post by fatra2 »

Hi there,

To align your text to the left-hand side of the page, you can do:

Code: Select all

\begin{flushleft}
 Text on line 1 \\
 Text on line 2 \\
 ....
 ....
 \end{flushleft}
or:

Code: Select all

{\raggedright
Your text goes here}
The differences between the two is that \raggedright command will not start a new paragraph, and can be used nested in other environment like quote or parbox.

Cheers
Post Reply