On 05/27/2011 07:00 AM, Daisuke Koya wrote:
> Hello,
>
> I am using LyX 1.6.10 on Mac OS 10.6.7.
>
> It took me a year until someone on this forum pointed out that stuff 
> accumulated in my preamble was causing subfloats to not work properly. I know 
> nothing about LaTeX, and the following code in the preamble was cobbled 
> together by random snippets of code I either found on the Internet or shown 
> by colleagues.
>
> If it's no trouble for the LaTeX and LyX experts on this forum, could someone 
> please tell me which bits of the code below might cause errors in creating 
> documents in LyX?
>
Any of them could interfere. I'd suggest you at least document for
yourself what each of these does (LaTeX comments begin with "%"), and
only include what you know you need for a given document.

> I also recently found out that some of the functionality in the preamble 
> could be specified in LyX: Document Settings. Is it better to use the 
> Document Settings to specify certain aspects of the LyX document rather than 
> doing this in the preamble?
>
Generally, yes, because LyX will try to handle conflicts for you, and
you do not have to worry about which packages are being loaded in which
order, etc. Now....

> \usepackage{calc}
> \usepackage{amsfonts}
> \@ifundefined{definecolor}{\usepackage{color}}{}
>
I doubt you need to load these.

> \usepackage{array}
> \usepackage{hhline}
> \usepackage{hyperref}\hypersetup{pdftex,colorlinks=true,linkcolor=blue,citecolor=blue,filecolor=blue,urlcolor=blue,pdftitle=,pdfauthor=,pdfsubject=,pdfkeywords=}
>
You are better off using the hyperref support in Document>Settings.

> \setlength{\voffset}{-1in}\setlength{\hoffset}{-1in}
> \setlength{\topmargin}{2.27cm}
> \setlength{\oddsidemargin}{2.27cm}
> \setlength{\textheight}{24.259cm}
> \setlength{\textwidth}{16.5cm}
> \setlength{\footskip}{2.0cm}
> \setlength{\headheight}{0cm}
> \setlength{\headsep}{0cm}
> \setlength{\skip\footins}{0.119cm}
>
Paper size and margins can be set in Document>Settings.

> \renewcommand{\footnoterule}{\vspace*{-0.018cm}\setlength\leftskip{0pt}\setlength\rightskip{0pt
>  plus 
> 1fil}\noindent\textcolor{black}{\rule{0.25\columnwidth}{0.018cm}}\vspace*{0.101cm}}
>

> \makeatletter\newcommand{\ps@Standard}{
>  \renewcommand\@oddhead{}
>  \renewcommand\@evenhead{}
>  \renewcommand\@oddfoot{}
>  \renewcommand\@evenfoot{}
>  \renewcommand\thepage{\arabic{page}}
> }\makeatother
>
You are better off using the fancyhdr package, I'd think, to do this.

> \title{}\author{}\date{}
> \usepackage[sf,raggedright,toctitles]{titlesec}
> \usepackage{multirow}
> \renewcommand{\multirowsetup}{\centering}
>
LyX has support for multirow in 2.0.x.

> \hyphenpenalty=5000
> \tolerance=1000
> \renewcommand{\thetable}{\arabic{table}}
> \numberwithin{table}{section}
>
These should be harmless.

rh


Reply via email to