Does anyone have experience with using the 'keystroke' LaTeX package with LyX 
documents? I would like to use the keyboard symbols (Enter key, Space bar, 
etc) that this package provides, but it appears to conflict with one (or 
possibly more) of the other packages that I'm using. The error messages that 
it produces in the LaTeX log file are of the form 

! LaTeX Error: Command \Enter already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...   

I've tried exporting the LyX file as LaTeX and hand-editing the preamble 
(given in full below) to identify where the conflicts are occurring. It seems 
that the conflicts are resolved if I remove the 'english' option from the 
documentclass line below

\documentclass[10pt,english,fleqn]{book}

but then babel.sty complains that I haven't specified a language option.

Any ideas? Is it my kludgy preamble? Thanks,

Mike Barnsley



Extract from preamble
==========================

%% LyX 1.3 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[10pt,english,fleqn]{book}
\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\geometry{verbose,paperwidth=156mm,paperheight=234mm}
\pagestyle{headings}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{array}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Bold symbol macro for standard LaTeX users
\newcommand{\boldsymbol}[1]{\mbox{\boldmath $#1$}}

%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
 \usepackage{verbatim}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
%%---------Required packages---------------------%%
\usepackage[all]{xy}
\usepackage{listings,color,textcomp,wasysym,graphicx,amssymb,subfigure}
\usepackage{pstricks,pst-node,pst-plot,multirow,bibspacing,fancybox,rotating}
\usepackage[small,hang]{caption}
\usepackage{/home/mbarnsle/bibstyles/envmod}
%%----------------------------------------------------%%

%%---------New colours-----------------------------%%
\newrgbcolor{palegray}{0.9 0.9 0.9}
\newrgbcolor{lightgray}{0.8 0.8 0.8}
\newrgbcolor{midgray}{0.75 0.75 0.75}
\newrgbcolor{brown}{0.6 0.15 0.15}
\newrgbcolor{darkgreen}{0.0 0.35 0.0}
\newrgbcolor{uwsgreen}{0.482 0.722 0.361}
\newrgbcolor{darkblue}{0 0.1 0.5}
\newrgbcolor{darkred}{0.75 0 0}
\newrgbcolor{gold}{1 0.85 0}
%%----------------------------------------------------%%

%%--------Remaining preamble-----------------------%%
\newcommand{\HRule}{\rule{11.8cm}{2mm}}
\newcommand{\eg}{e.g.~}
\newcommand{\ie}{i.e.~}
\newcommand{\etc}{etc.}
\newcommand{\etal}{\emph{et al.}}
\newcommand{\cf}{c.f.~}
\newcommand{\vs}{vs.~}
\newcommand{\Keys}[1]{\Ovalbox{\texttt{\footnotesize{#1}}}}
\newcommand{\gawk}{\textsf{\textsc{gawk}}}
\newcommand{\awk}{\textsf{\textsc{awk}}}
\newcommand{\notepad}{\textsf{\textsc{notepad}}}
\newcommand{\gnuplot}{\textsf{\textsc{gnuplot}}}
\newcommand{\jfe}{\textsf{\textsc{Jfe}}}
\newcommand{\nedit}{\textsf{\textsc{Nedit}}}
\newcommand{\doskey}{\textsf{\textsc{doskey}}}
%%-------------------------------------------------%%

%%--------Set up for Listings package -------------%%
\lstset{basicstyle=\tt\small, breaklines=false,%
         morecomment=[l]{\#}, %
         commentstyle=\emph, xleftmargin=2pt, xrightmargin=12pt, %
         framexleftmargin=2pt, belowcaptionskip=10pt, %
         float=tb, frameround=ffff, stepnumber=1, numbers=right, 
numberstyle=\scriptsize\it, %
         numbersep=5pt, postbreak=\pointer, prebreak=\pointer,%
         showstringspaces=false, tabsize=2, showspaces=false }
\lstset{emph={pattern,action,action(s),filename,inputFile,outputFile,variable,value}, 
%
         emphstyle=\emph}
\lstset{emph={[2]BEGIN,END},emphstyle={[2]}, %
         emph={[3]print,printf,if,else,for,while,do},emphstyle={[3]},%
         
emph={[4]initialisation,condition,increment,body},emphstyle={[4]\itshape}}
%%-------------------------------------------------%%

%%----------------Page dimensions--------------%%
\setlength{\textheight}{191mm}
\setlength{\textwidth}{119mm}
\setlength{\skip\footins}{6mm}
\setlength{\mathindent}{2em}
\setlength{\textfloatsep}{15\p@ [EMAIL PROTECTED] 5\p@ [EMAIL PROTECTED] [EMAIL 
PROTECTED]
\setlength{\parsep}{0mm}
[EMAIL PROTECTED]@empty
%%-------------------------------------------------%%

%%--------------Modifications to the basic book.cls--------------------%%
[EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -1ex 
[EMAIL PROTECTED] -.2ex}{2.3ex [EMAIL PROTECTED]
[EMAIL PROTECTED]@} [EMAIL PROTECTED] 
-1ex [EMAIL PROTECTED] -.2ex}{1.5ex [EMAIL PROTECTED] 
.2ex}{\normalfont\normalsize\bfseries}}
[EMAIL PROTECTED]@[EMAIL PROTECTED] 
-1ex [EMAIL PROTECTED] -.2ex}{1.5ex [EMAIL PROTECTED] 
.2ex}{\normalfont\normalsize\itshape}}
\renewcommand{\chaptername}{CHAPTER}
\renewcommand{\lstlistingname}{\small \bf Program}
\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}\cleardoublepage}}
[EMAIL PROTECTED] {\small \figurename~\thefigure}}
[EMAIL PROTECTED] {\bfseries \tablename~\thetable}}
[EMAIL PROTECTED]
    [EMAIL PROTECTED]@[EMAIL PROTECTED]@empty
    [EMAIL PROTECTED]
    [EMAIL PROTECTED]
    [EMAIL PROTECTED]@gobbletwo
    [EMAIL PROTECTED]
    [EMAIL PROTECTED]
}
%%------------------------------------------------------------------------%%

\usepackage{babel}
\makeatother
\begin{document}

Reply via email to