Re: Roman enumerated list layout style

2007-11-13 Thread Helge Hafting

Richard Heck wrote:

Ernesto Posse wrote:

Thanks, but LabelType Static didn't work either. Nevertheless,
LabelType Counter works, but now, it looks like the counter is not
reset for each list. 
I've seen this problem, too. There is a number within option, but 
that only works for other counters. So far as I know, there is not as 
yet any solution to this within LyX. I don't think it would be 
terribly hard to add, but I'm not sure.


rh


I have now

LabelType Counter
LabelCounter enumi
LabelString (\roman{enumi})

I also tried with my own counter and get the same result:

abc
(i) abc
(ii) abc
abc
(iii) abc
(iv) abc
abc

This works with ordinary enumerations in LyX. If you can't make this
work with your own enumeration, then consider filing a bug
report at bugzilla.lyx.org

Helge Hafting


Re: Change Chapter Headings

2007-11-13 Thread Marcelo Acuña
 Hi All,
 
 I'm using document class Report and want to change
 the Chapter  
 headings. The default is to have Chapter 1 - Name
 of Chapter. I  
 just want  1.0 Name of Chapter or something like
 that. How can I do  
 this?
 
 BTW - I'm using the Report class for a proposal,
 perhaps there is a  
 better document class that is more suitable?
 
 Plus Koma-script options (see userguide) you can use
titlesec package (see doc). This package provide a lot
of options for titles.
 Marcelo



  Compartí video en la ventana de tus mensajes (y también tus fotos de 
Flickr). 
Usá el nuevo Yahoo! Messenger versión Beta. http://ar.beta.messenger.yahoo.com/


importing LaTeX

2007-11-13 Thread jb162
Hi, I want to use LyX to work on LaTeX files produced by lhs2tex from
literate haskell scripts (and I know very little about LaTeX). When I
open these files in LyX they are a massive jumble of ERT and ordinary
text. lhs2tex uses a format file which is
at /usr/share/lhs2tex/polycode.fmt on my system. How do I tell lyx about
that? Will that help? What other files might I need to find or create to
get LyX to play nicely with the output of lhs2tex? I've attached the
result of running lhs2Tex on a small literate script -- I can run
pdflatex on this and produce a pdf with no errors, so I suppose the
paths must be set up OK on my system at some level?

Regards,

Jim Burton

TeX produced by lhs2tex from a small literate haskell script:
---

\documentclass{article}
%% ODER: format == = \mathrel{==}
%% ODER: format /= = \neq 
%
%
\makeatletter
[EMAIL PROTECTED]
  [EMAIL PROTECTED]
   \newcommand\SkipToFmtEnd{}%
   \newcommand\EndFmtInput{}%
   \long\def\SkipToFmtEnd#1\EndFmtInput{}%
  }\SkipToFmtEnd

\newcommand
[EMAIL PROTECTED]@namedef{#1}{}}\SkipToFmtEnd}
\usepackage{amstext}
\usepackage{amssymb}
\usepackage{stmaryrd}
\DeclareFontFamily{OT1}{cmtex}{}
\DeclareFontShape{OT1}{cmtex}{m}{n}
  {5678cmtex8
   9cmtex9
   1010.951214.417.2820.7424.88cmtex10}{}
\DeclareFontShape{OT1}{cmtex}{m}{it}
  {- ssub * cmtt/m/it}{}
\newcommand{\texfamily}{\fontfamily{cmtex}\selectfont}
\DeclareFontShape{OT1}{cmtt}{bx}{n}
  {5678cmtt8
   9cmbtt9
   1010.951214.417.2820.7424.88cmbtt10}{}
\DeclareFontShape{OT1}{cmtex}{bx}{n}
  {- ssub * cmtt/bx/n}{}
\newcommand{\tex}[1]{\text{\texfamily#1}}   % NEU

\newcommand{\Sp}{\hskip.4em\relax}


\newcommand{\Conid}[1]{\mathit{#1}}
\newcommand{\Varid}[1]{\mathit{#1}}
\newcommand{\anonymous}{\kern0.06em [EMAIL PROTECTED]
\newcommand{\plus}{\mathbin{+\!\!\!+}}
\newcommand{\bind}{\mathbin{\!\!\!\mkern-6.7mu=}}
\newcommand{\sequ}{\mathbin{\!\!\!}}
\renewcommand{\leq}{\leqslant}
\renewcommand{\geq}{\geqslant}
\usepackage{polytable}

%mathindent has to be defined
[EMAIL PROTECTED]
  {\newdimen\mathindent\mathindent\leftmargini}%
  {}%

\def\resethooks{%
  \global\let\SaveRestoreHook\empty
  \global\let\ColumnHook\empty}
\newcommand*{\savecolumns}[1][default]%
  [EMAIL PROTECTED]@macro\SaveRestoreHook{\savecolumns[#1]}}
\newcommand*{\restorecolumns}[1][default]%
  [EMAIL PROTECTED]@macro\SaveRestoreHook{\restorecolumns[#1]}}
\newcommand*{\aligncolumn}[2]%
  [EMAIL PROTECTED]@macro\ColumnHook{\column{#1}{#2}}}

\resethooks

\newcommand{\onelinecommentchars}{\quad-{}- }
\newcommand{\commentbeginchars}{\enskip\{-}
\newcommand{\commentendchars}{-\}\enskip}

\newcommand{\visiblecomments}{%
  \let\onelinecomment=\onelinecommentchars
  \let\commentbegin=\commentbeginchars
  \let\commentend=\commentendchars}

\newcommand{\invisiblecomments}{%
  \let\onelinecomment=\empty
  \let\commentbegin=\empty
  \let\commentend=\empty}

\visiblecomments

\newlength{\blanklineskip}
\setlength{\blanklineskip}{1mm}

\newcommand{\hsindent}[1]{\quad}% default is fixed indentation
\newcommand{\NB}{\textbf{NB}}
\newcommand{\Todo}[1]{$\langle$\textbf{To do:}~#1$\rangle$}

\makeatother
\EndFmtInput
%
%
%
%
%
%
% This package provides two environments suitable to take the place
% of hscode, called plainhscode and arrayhscode. 
%
% The plain environment surrounds each code block by vertical space,
% and it uses \abovedisplayskip and \belowdisplayskip to get spacing
% similar to formulas. Note that if these dimensions are changed,
% the spacing around displayed math formulas changes as well.
% All code is indented using \leftskip.
%
% Changed 19.08.2004 to reflect changes in colorcode. Should work with
% CodeGroup.sty.
%
\ReadOnlyOnce{polycode.fmt}%
\makeatletter

\newcommand{\hsnewpar}[1]%
  {{\parskip=0pt\parindent=0pt\par\vskip #1\noindent}}

% can be used, for instance, to redefine the code size, by setting the
% command to \small or something alike
\newcommand{\hscodestyle}{}

% The command \sethscode can be used to switch the code formatting
% behaviour by mapping the hscode environment in the subst directive
% to a new LaTeX environment.

\newcommand{\sethscode}[1]%
  {\expandafter\let\expandafter\hscode\csname #1\endcsname
   \expandafter\let\expandafter\endhscode\csname end#1\endcsname}

% compatibility mode restores the non-polycode.fmt layout.

\newenvironment{compathscode}%
  {\par\noindent
   \advance\leftskip\mathindent
   \hscodestyle
   [EMAIL PROTECTED]
   \(\pboxed}%
  {\endpboxed\)%
   \par\noindent
   \ignorespacesafterend}

\newcommand{\compaths}{\sethscode{compathscode}}

% plain mode is the proposed default.

\newenvironment{plainhscode}%
  {\hsnewpar\abovedisplayskip
   \advance\leftskip\mathindent
   \hscodestyle
   [EMAIL PROTECTED]
   \(\pboxed}%
  {\endpboxed\)%
   \hsnewpar\belowdisplayskip
   \ignorespacesafterend}

% Here, we make plainhscode the default environment.

\newcommand{\plainhs}{\sethscode{plainhscode}}
\plainhs

% The arrayhscode is like 

Re: importing LaTeX

2007-11-13 Thread Steve Litt
Hi Jim,

It's kinda wierd that this LaTeX was written by something having to do with 
literate programming. The \SkipToFmtEnd following the closing parenthese of 
the test for definition of lhs2tex.lhs2tex.sty.read looks to the 
LaTeX-untrained eye like it's conditional, but in fact it gets run 
regardless. To make the program more readable, I would have put it on its own 
line.

Anyway, back to your question. I think the general answer is that the 
environments this code declares with the \newenvironment{} command can be 
used in LyX by writing a LyX environment wrapper. This technique is well 
known -- you can readabout it in these three places, as well as many others:

http://www.troubleshooters.cxm/linux/lyx/self_publish_lyx.htm#for_real_tut
http://www.troubleshooters.cxm/lpm/200210/200210.htm#_MakingYourOwnLayout
http://www.troubleshooters.cxm/linux/lyx/lyx_latex_tex.htm#_LyX

More troublesome are the commands defined with \newcommand or \renewcommand. 
These can be used in two places:

1) In the layout file (to define environments and other entities)
2) In the LyX document, but only as ERT

Obviously my answer has just scratched the surface, but perhaps it's a start.

Thanks

SteveT

On Tuesday 13 November 2007 09:10, [EMAIL PROTECTED] wrote:
 Hi, I want to use LyX to work on LaTeX files produced by lhs2tex from
 literate haskell scripts (and I know very little about LaTeX). When I
 open these files in LyX they are a massive jumble of ERT and ordinary
 text. lhs2tex uses a format file which is
 at /usr/share/lhs2tex/polycode.fmt on my system. How do I tell lyx about
 that? Will that help? What other files might I need to find or create to
 get LyX to play nicely with the output of lhs2tex? I've attached the
 result of running lhs2Tex on a small literate script -- I can run
 pdflatex on this and produce a pdf with no errors, so I suppose the
 paths must be set up OK on my system at some level?

 Regards,

 Jim Burton

 TeX produced by lhs2tex from a small literate haskell script:
 ---

 \documentclass{article}
 %% ODER: format == = \mathrel{==}
 %% ODER: format /= = \neq 
 %
 %
 \makeatletter
 [EMAIL PROTECTED]
   [EMAIL PROTECTED]
\newcommand\SkipToFmtEnd{}%
\newcommand\EndFmtInput{}%
\long\def\SkipToFmtEnd#1\EndFmtInput{}%
   }\SkipToFmtEnd

 \newcommand
 [EMAIL PROTECTED]@namedef{#1}{}}\SkipToFmtEnd}
 \usepackage{amstext}
 \usepackage{amssymb}
 \usepackage{stmaryrd}
 \DeclareFontFamily{OT1}{cmtex}{}
 \DeclareFontShape{OT1}{cmtex}{m}{n}
   {5678cmtex8
9cmtex9
1010.951214.417.2820.7424.88cmtex10}{}
 \DeclareFontShape{OT1}{cmtex}{m}{it}
   {- ssub * cmtt/m/it}{}
 \newcommand{\texfamily}{\fontfamily{cmtex}\selectfont}
 \DeclareFontShape{OT1}{cmtt}{bx}{n}
   {5678cmtt8
9cmbtt9
1010.951214.417.2820.7424.88cmbtt10}{}
 \DeclareFontShape{OT1}{cmtex}{bx}{n}
   {- ssub * cmtt/bx/n}{}
 \newcommand{\tex}[1]{\text{\texfamily#1}} % NEU

 \newcommand{\Sp}{\hskip.4em\relax}


 \newcommand{\Conid}[1]{\mathit{#1}}
 \newcommand{\Varid}[1]{\mathit{#1}}
 \newcommand{\anonymous}{\kern0.06em [EMAIL PROTECTED]
 \newcommand{\plus}{\mathbin{+\!\!\!+}}
 \newcommand{\bind}{\mathbin{\!\!\!\mkern-6.7mu=}}
 \newcommand{\sequ}{\mathbin{\!\!\!}}
 \renewcommand{\leq}{\leqslant}
 \renewcommand{\geq}{\geqslant}
 \usepackage{polytable}

 %mathindent has to be defined
 [EMAIL PROTECTED]
   {\newdimen\mathindent\mathindent\leftmargini}%
   {}%

 \def\resethooks{%
   \global\let\SaveRestoreHook\empty
   \global\let\ColumnHook\empty}
 \newcommand*{\savecolumns}[1][default]%
   [EMAIL PROTECTED]@macro\SaveRestoreHook{\savecolumns[#1]}}
 \newcommand*{\restorecolumns}[1][default]%
   [EMAIL PROTECTED]@macro\SaveRestoreHook{\restorecolumns[#1]}}
 \newcommand*{\aligncolumn}[2]%
   [EMAIL PROTECTED]@macro\ColumnHook{\column{#1}{#2}}}

 \resethooks

 \newcommand{\onelinecommentchars}{\quad-{}- }
 \newcommand{\commentbeginchars}{\enskip\{-}
 \newcommand{\commentendchars}{-\}\enskip}

 \newcommand{\visiblecomments}{%
   \let\onelinecomment=\onelinecommentchars
   \let\commentbegin=\commentbeginchars
   \let\commentend=\commentendchars}

 \newcommand{\invisiblecomments}{%
   \let\onelinecomment=\empty
   \let\commentbegin=\empty
   \let\commentend=\empty}

 \visiblecomments

 \newlength{\blanklineskip}
 \setlength{\blanklineskip}{1mm}

 \newcommand{\hsindent}[1]{\quad}% default is fixed indentation
 \newcommand{\NB}{\textbf{NB}}
 \newcommand{\Todo}[1]{$\langle$\textbf{To do:}~#1$\rangle$}

 \makeatother
 \EndFmtInput
 %
 %
 %
 %
 %
 %
 % This package provides two environments suitable to take the place
 % of hscode, called plainhscode and arrayhscode.
 %
 % The plain environment surrounds each code block by vertical space,
 % and it uses \abovedisplayskip and \belowdisplayskip to get spacing
 % similar to formulas. Note that if these dimensions are changed,
 % the spacing around displayed math formulas changes as well.
 % All code is indented using \leftskip.
 %
 % 

hyperlink to html documents?

2007-11-13 Thread Neal Becker
I'm using lyx to document some code (python).  I used epydoc to generate
html docs for the API.  If I want to link from my lyx-generated pdf to that
code, I see that file:///absolute_file_path.html will work (at least, when
viewed with kpdf).  I would rather use a relative file path.  Is this
feasible?  Do other pdf viewers support this as well?



Authors' names in the table-of-contents

2007-11-13 Thread Frederick Noronha [फ़रेदरिक नोरोनया]
Any way I could insert the authors' names in the table-of-contents,
without including the same in the top-of-the-page information? This is
for a multi-authored book, where we need to identify the author of
each chapter adequately. Thanks! FN
-- 
Frederick Noronha http://fn.goa-india.org Ph 0091-832-2409490
12000+ downloadable, sharable hi-res photos http://www.flickr.com/photos/fn-goa/


Re: Authors' names in the table-of-contents

2007-11-13 Thread Juergen Spitzmueller
Unknown wrote:

 Any way I could insert the authors' names in the table-of-contents,
 without including the same in the top-of-the-page information? This is
 for a multi-authored book, where we need to identify the author of
 each chapter adequately.

The easy way, for a book class:

\addcontentsline{toc}{chapter}{\protect\numberline{\it John Doe}\\
chapter title}%

(if you use an article class, replace chapter by section).

More advanced, you can define some environments in the preamble, such as:

%% Titling environments for proceedings

\AtBeginDocument{\setcounter{tocdepth}{0}}
\newcommand\authorfnt[1]{\fontsize{12pt}{14pt}\selectfont\emph{#1}}%
\newcommand\titlefnt[1]{\fontsize{13pt}{16pt}\selectfont #1}%
\newcommand\subtitlefnt[1]{\fontsize{12pt}{14pt}\selectfont #1}%

\makeatletter
[EMAIL PROTECTED]
\def\@@chapauthor{}
\newcommand*{\chapauthor}[2][]{%
\ifx\\#1\\%
\def\@@chapauthor{#2}
\else
\def\@@chapauthor{#1}
\fi
[EMAIL PROTECTED]
}
[EMAIL PROTECTED]
\newcommand*{\affiliation}[1]{%
[EMAIL PROTECTED]
}
[EMAIL PROTECTED]
\def\@@chaptitle{}
\newcommand*{\chaptitle}[2][]{%
\ifx\\#1\\%
\def\@@chaptitle{#2}
\else
\def\@@chaptitle{#1}
\fi
[EMAIL PROTECTED]
}
[EMAIL PROTECTED]
\newcommand*{\subtitle}[1]{%
[EMAIL PROTECTED]
}
\renewcommand\maketitle{%
% Symbolic Footnotes
\let\theoldfootnote\thefootnote
\renewcommand\thefootnote{\fnsymbol{footnote}}
\setcounter{footnote}{0}
[EMAIL PROTECTED]@affiliation\empty\else\  
([EMAIL PROTECTED])\fi}\\[14pt]%
[EMAIL PROTECTED]@subtitle\empty\else\\[14pt]
[EMAIL PROTECTED]
\addcontentsline{toc}{chapter}{\protect\numberline{\it\@@chapauthor}\\
[EMAIL PROTECTED]@[EMAIL PROTECTED]
\markboth{\@@@chapauthor}{\@@chaptitle}%
\setcounter{section}{0}
\setcounter{figure}{0}
\setcounter{table}{0}
\setcounter{footnote}{0}
%% back to numerical footnotes
\let\thefootnote\theoldfootnote
\global\let\@@[EMAIL PROTECTED]
\global\let\@@@[EMAIL PROTECTED]
[EMAIL PROTECTED]@empty
\global\let\@@[EMAIL PROTECTED]
[EMAIL PROTECTED]@empty
[EMAIL PROTECTED]@empty
}
\makeatother

%% end of definitions

Then you can use, at the top of each chapter

\chapauthor[short version for headings]{long version}
\affiliation{affiliation}
\chaptitle[short version for headings]{long version}
\subtitle{subtitle}
\maketitle

you can also define these environments in your layout file, e.g.

--

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[book]{myproceedings}


Format  4

# General textclass parameters
Input book.layout

# Verfasser
Style Chapter_Author
  MarginStatic
  LatexType Command
  LatexName chapauthor
  LeftMarginxx::xx
  LabelSep  xx
  ParSep0.4
  KeepEmpty 1  
  Align Block
  AlignPossible Block, Left
  LabelType Static
  LabelString   Chapter Author:
  OptionalArgs  1
  # label font definition
  LabelFont 
Series  Bold
Shape   Italic
Color   Blue
  EndFont
  InTitle   1
End

# Ort
Style Affiliation
  CopyStyle Chapter_Author
  LatexName affiliation
  LabelString   Affiliation:
  OptionalArgs  0
End

# Titel
Style Chapter_Title
  CopyStyle Chapter_Title
  LatexName chaptitle
  LabelString   Chapter Title:
  TopSep1
  Font 
SizeHuge
  EndFont
  # label font definition
  LabelFont 
Series  Bold
Shape   Italic
Color   Blue
  EndFont
End

# Subtitle
# Ort
Style Untertitel
  CopyStyle Chapter_Title
  LatexName subtitle
  LabelString   Subtitle:
  OptionalArgs  0
End

Style Author
  Obsoletedby   Chapter_Author
End

Style Title
  Obsoletedby   Chapter_Title
End

Style Extratitle
  Obsoletedby   Subtitle
End

NoStyle Chapter
NoStyle Chapter*
NoStyle Date

---

HTH,
Jürgen



table listed in list of tables but no caption with table?

2007-11-13 Thread Jeremy C. Reed
In my content, I have a few tables where I do not want any caption to
Table number listed with them. They are redundant for me.

But I do want these tables still listed by number and caption in the list 
of tables.

Any ideas on how to do that?

Thanks,

  Jeremy C. Reed


Re: Prob posting?

2007-11-13 Thread Wolfgang Engelmann
Am Freitag, 9. November 2007 10:16 schrieb [EMAIL PROTECTED]:
 Is there still anybody who has problems posting?

 The problem was that one of the spam blacklists (the most wellknown)
 stopped working, and my server was trying to connect to it whenever an
 email arrived.  This completely tied down the server.  I am administering 8
 computers here, and I fixed this problem on each 2 months ago when the
 problem started---except on the original (my first) one with the LyX lists
 on it.

 Really sorry guys,

 Máté

Hi,Máté

as one of the persons affected I am trying again whether my message comes 
through this time. Thanks for your help.

Wolfgang


Re: Roman enumerated list layout style

2007-11-13 Thread Helge Hafting

Richard Heck wrote:

Ernesto Posse wrote:

Thanks, but LabelType Static didn't work either. Nevertheless,
LabelType Counter works, but now, it looks like the counter is not
reset for each list. 
I've seen this problem, too. There is a number within option, but 
that only works for other counters. So far as I know, there is not as 
yet any solution to this within LyX. I don't think it would be 
terribly hard to add, but I'm not sure.


rh


I have now

LabelType Counter
LabelCounter enumi
LabelString (\roman{enumi})

I also tried with my own counter and get the same result:

abc
(i) abc
(ii) abc
abc
(iii) abc
(iv) abc
abc

This works with ordinary enumerations in LyX. If you can't make this
work with your own enumeration, then consider filing a bug
report at bugzilla.lyx.org

Helge Hafting


Re: Change Chapter Headings

2007-11-13 Thread Marcelo Acuña
 Hi All,
 
 I'm using document class Report and want to change
 the Chapter  
 headings. The default is to have Chapter 1 - Name
 of Chapter. I  
 just want  1.0 Name of Chapter or something like
 that. How can I do  
 this?
 
 BTW - I'm using the Report class for a proposal,
 perhaps there is a  
 better document class that is more suitable?
 
 Plus Koma-script options (see userguide) you can use
titlesec package (see doc). This package provide a lot
of options for titles.
 Marcelo



  Compartí video en la ventana de tus mensajes (y también tus fotos de 
Flickr). 
Usá el nuevo Yahoo! Messenger versión Beta. http://ar.beta.messenger.yahoo.com/


importing LaTeX

2007-11-13 Thread jb162
Hi, I want to use LyX to work on LaTeX files produced by lhs2tex from
literate haskell scripts (and I know very little about LaTeX). When I
open these files in LyX they are a massive jumble of ERT and ordinary
text. lhs2tex uses a format file which is
at /usr/share/lhs2tex/polycode.fmt on my system. How do I tell lyx about
that? Will that help? What other files might I need to find or create to
get LyX to play nicely with the output of lhs2tex? I've attached the
result of running lhs2Tex on a small literate script -- I can run
pdflatex on this and produce a pdf with no errors, so I suppose the
paths must be set up OK on my system at some level?

Regards,

Jim Burton

TeX produced by lhs2tex from a small literate haskell script:
---

\documentclass{article}
%% ODER: format == = \mathrel{==}
%% ODER: format /= = \neq 
%
%
\makeatletter
[EMAIL PROTECTED]
  [EMAIL PROTECTED]
   \newcommand\SkipToFmtEnd{}%
   \newcommand\EndFmtInput{}%
   \long\def\SkipToFmtEnd#1\EndFmtInput{}%
  }\SkipToFmtEnd

\newcommand
[EMAIL PROTECTED]@namedef{#1}{}}\SkipToFmtEnd}
\usepackage{amstext}
\usepackage{amssymb}
\usepackage{stmaryrd}
\DeclareFontFamily{OT1}{cmtex}{}
\DeclareFontShape{OT1}{cmtex}{m}{n}
  {5678cmtex8
   9cmtex9
   1010.951214.417.2820.7424.88cmtex10}{}
\DeclareFontShape{OT1}{cmtex}{m}{it}
  {- ssub * cmtt/m/it}{}
\newcommand{\texfamily}{\fontfamily{cmtex}\selectfont}
\DeclareFontShape{OT1}{cmtt}{bx}{n}
  {5678cmtt8
   9cmbtt9
   1010.951214.417.2820.7424.88cmbtt10}{}
\DeclareFontShape{OT1}{cmtex}{bx}{n}
  {- ssub * cmtt/bx/n}{}
\newcommand{\tex}[1]{\text{\texfamily#1}}   % NEU

\newcommand{\Sp}{\hskip.4em\relax}


\newcommand{\Conid}[1]{\mathit{#1}}
\newcommand{\Varid}[1]{\mathit{#1}}
\newcommand{\anonymous}{\kern0.06em [EMAIL PROTECTED]
\newcommand{\plus}{\mathbin{+\!\!\!+}}
\newcommand{\bind}{\mathbin{\!\!\!\mkern-6.7mu=}}
\newcommand{\sequ}{\mathbin{\!\!\!}}
\renewcommand{\leq}{\leqslant}
\renewcommand{\geq}{\geqslant}
\usepackage{polytable}

%mathindent has to be defined
[EMAIL PROTECTED]
  {\newdimen\mathindent\mathindent\leftmargini}%
  {}%

\def\resethooks{%
  \global\let\SaveRestoreHook\empty
  \global\let\ColumnHook\empty}
\newcommand*{\savecolumns}[1][default]%
  [EMAIL PROTECTED]@macro\SaveRestoreHook{\savecolumns[#1]}}
\newcommand*{\restorecolumns}[1][default]%
  [EMAIL PROTECTED]@macro\SaveRestoreHook{\restorecolumns[#1]}}
\newcommand*{\aligncolumn}[2]%
  [EMAIL PROTECTED]@macro\ColumnHook{\column{#1}{#2}}}

\resethooks

\newcommand{\onelinecommentchars}{\quad-{}- }
\newcommand{\commentbeginchars}{\enskip\{-}
\newcommand{\commentendchars}{-\}\enskip}

\newcommand{\visiblecomments}{%
  \let\onelinecomment=\onelinecommentchars
  \let\commentbegin=\commentbeginchars
  \let\commentend=\commentendchars}

\newcommand{\invisiblecomments}{%
  \let\onelinecomment=\empty
  \let\commentbegin=\empty
  \let\commentend=\empty}

\visiblecomments

\newlength{\blanklineskip}
\setlength{\blanklineskip}{1mm}

\newcommand{\hsindent}[1]{\quad}% default is fixed indentation
\newcommand{\NB}{\textbf{NB}}
\newcommand{\Todo}[1]{$\langle$\textbf{To do:}~#1$\rangle$}

\makeatother
\EndFmtInput
%
%
%
%
%
%
% This package provides two environments suitable to take the place
% of hscode, called plainhscode and arrayhscode. 
%
% The plain environment surrounds each code block by vertical space,
% and it uses \abovedisplayskip and \belowdisplayskip to get spacing
% similar to formulas. Note that if these dimensions are changed,
% the spacing around displayed math formulas changes as well.
% All code is indented using \leftskip.
%
% Changed 19.08.2004 to reflect changes in colorcode. Should work with
% CodeGroup.sty.
%
\ReadOnlyOnce{polycode.fmt}%
\makeatletter

\newcommand{\hsnewpar}[1]%
  {{\parskip=0pt\parindent=0pt\par\vskip #1\noindent}}

% can be used, for instance, to redefine the code size, by setting the
% command to \small or something alike
\newcommand{\hscodestyle}{}

% The command \sethscode can be used to switch the code formatting
% behaviour by mapping the hscode environment in the subst directive
% to a new LaTeX environment.

\newcommand{\sethscode}[1]%
  {\expandafter\let\expandafter\hscode\csname #1\endcsname
   \expandafter\let\expandafter\endhscode\csname end#1\endcsname}

% compatibility mode restores the non-polycode.fmt layout.

\newenvironment{compathscode}%
  {\par\noindent
   \advance\leftskip\mathindent
   \hscodestyle
   [EMAIL PROTECTED]
   \(\pboxed}%
  {\endpboxed\)%
   \par\noindent
   \ignorespacesafterend}

\newcommand{\compaths}{\sethscode{compathscode}}

% plain mode is the proposed default.

\newenvironment{plainhscode}%
  {\hsnewpar\abovedisplayskip
   \advance\leftskip\mathindent
   \hscodestyle
   [EMAIL PROTECTED]
   \(\pboxed}%
  {\endpboxed\)%
   \hsnewpar\belowdisplayskip
   \ignorespacesafterend}

% Here, we make plainhscode the default environment.

\newcommand{\plainhs}{\sethscode{plainhscode}}
\plainhs

% The arrayhscode is like 

Re: importing LaTeX

2007-11-13 Thread Steve Litt
Hi Jim,

It's kinda wierd that this LaTeX was written by something having to do with 
literate programming. The \SkipToFmtEnd following the closing parenthese of 
the test for definition of lhs2tex.lhs2tex.sty.read looks to the 
LaTeX-untrained eye like it's conditional, but in fact it gets run 
regardless. To make the program more readable, I would have put it on its own 
line.

Anyway, back to your question. I think the general answer is that the 
environments this code declares with the \newenvironment{} command can be 
used in LyX by writing a LyX environment wrapper. This technique is well 
known -- you can readabout it in these three places, as well as many others:

http://www.troubleshooters.cxm/linux/lyx/self_publish_lyx.htm#for_real_tut
http://www.troubleshooters.cxm/lpm/200210/200210.htm#_MakingYourOwnLayout
http://www.troubleshooters.cxm/linux/lyx/lyx_latex_tex.htm#_LyX

More troublesome are the commands defined with \newcommand or \renewcommand. 
These can be used in two places:

1) In the layout file (to define environments and other entities)
2) In the LyX document, but only as ERT

Obviously my answer has just scratched the surface, but perhaps it's a start.

Thanks

SteveT

On Tuesday 13 November 2007 09:10, [EMAIL PROTECTED] wrote:
 Hi, I want to use LyX to work on LaTeX files produced by lhs2tex from
 literate haskell scripts (and I know very little about LaTeX). When I
 open these files in LyX they are a massive jumble of ERT and ordinary
 text. lhs2tex uses a format file which is
 at /usr/share/lhs2tex/polycode.fmt on my system. How do I tell lyx about
 that? Will that help? What other files might I need to find or create to
 get LyX to play nicely with the output of lhs2tex? I've attached the
 result of running lhs2Tex on a small literate script -- I can run
 pdflatex on this and produce a pdf with no errors, so I suppose the
 paths must be set up OK on my system at some level?

 Regards,

 Jim Burton

 TeX produced by lhs2tex from a small literate haskell script:
 ---

 \documentclass{article}
 %% ODER: format == = \mathrel{==}
 %% ODER: format /= = \neq 
 %
 %
 \makeatletter
 [EMAIL PROTECTED]
   [EMAIL PROTECTED]
\newcommand\SkipToFmtEnd{}%
\newcommand\EndFmtInput{}%
\long\def\SkipToFmtEnd#1\EndFmtInput{}%
   }\SkipToFmtEnd

 \newcommand
 [EMAIL PROTECTED]@namedef{#1}{}}\SkipToFmtEnd}
 \usepackage{amstext}
 \usepackage{amssymb}
 \usepackage{stmaryrd}
 \DeclareFontFamily{OT1}{cmtex}{}
 \DeclareFontShape{OT1}{cmtex}{m}{n}
   {5678cmtex8
9cmtex9
1010.951214.417.2820.7424.88cmtex10}{}
 \DeclareFontShape{OT1}{cmtex}{m}{it}
   {- ssub * cmtt/m/it}{}
 \newcommand{\texfamily}{\fontfamily{cmtex}\selectfont}
 \DeclareFontShape{OT1}{cmtt}{bx}{n}
   {5678cmtt8
9cmbtt9
1010.951214.417.2820.7424.88cmbtt10}{}
 \DeclareFontShape{OT1}{cmtex}{bx}{n}
   {- ssub * cmtt/bx/n}{}
 \newcommand{\tex}[1]{\text{\texfamily#1}} % NEU

 \newcommand{\Sp}{\hskip.4em\relax}


 \newcommand{\Conid}[1]{\mathit{#1}}
 \newcommand{\Varid}[1]{\mathit{#1}}
 \newcommand{\anonymous}{\kern0.06em [EMAIL PROTECTED]
 \newcommand{\plus}{\mathbin{+\!\!\!+}}
 \newcommand{\bind}{\mathbin{\!\!\!\mkern-6.7mu=}}
 \newcommand{\sequ}{\mathbin{\!\!\!}}
 \renewcommand{\leq}{\leqslant}
 \renewcommand{\geq}{\geqslant}
 \usepackage{polytable}

 %mathindent has to be defined
 [EMAIL PROTECTED]
   {\newdimen\mathindent\mathindent\leftmargini}%
   {}%

 \def\resethooks{%
   \global\let\SaveRestoreHook\empty
   \global\let\ColumnHook\empty}
 \newcommand*{\savecolumns}[1][default]%
   [EMAIL PROTECTED]@macro\SaveRestoreHook{\savecolumns[#1]}}
 \newcommand*{\restorecolumns}[1][default]%
   [EMAIL PROTECTED]@macro\SaveRestoreHook{\restorecolumns[#1]}}
 \newcommand*{\aligncolumn}[2]%
   [EMAIL PROTECTED]@macro\ColumnHook{\column{#1}{#2}}}

 \resethooks

 \newcommand{\onelinecommentchars}{\quad-{}- }
 \newcommand{\commentbeginchars}{\enskip\{-}
 \newcommand{\commentendchars}{-\}\enskip}

 \newcommand{\visiblecomments}{%
   \let\onelinecomment=\onelinecommentchars
   \let\commentbegin=\commentbeginchars
   \let\commentend=\commentendchars}

 \newcommand{\invisiblecomments}{%
   \let\onelinecomment=\empty
   \let\commentbegin=\empty
   \let\commentend=\empty}

 \visiblecomments

 \newlength{\blanklineskip}
 \setlength{\blanklineskip}{1mm}

 \newcommand{\hsindent}[1]{\quad}% default is fixed indentation
 \newcommand{\NB}{\textbf{NB}}
 \newcommand{\Todo}[1]{$\langle$\textbf{To do:}~#1$\rangle$}

 \makeatother
 \EndFmtInput
 %
 %
 %
 %
 %
 %
 % This package provides two environments suitable to take the place
 % of hscode, called plainhscode and arrayhscode.
 %
 % The plain environment surrounds each code block by vertical space,
 % and it uses \abovedisplayskip and \belowdisplayskip to get spacing
 % similar to formulas. Note that if these dimensions are changed,
 % the spacing around displayed math formulas changes as well.
 % All code is indented using \leftskip.
 %
 % 

hyperlink to html documents?

2007-11-13 Thread Neal Becker
I'm using lyx to document some code (python).  I used epydoc to generate
html docs for the API.  If I want to link from my lyx-generated pdf to that
code, I see that file:///absolute_file_path.html will work (at least, when
viewed with kpdf).  I would rather use a relative file path.  Is this
feasible?  Do other pdf viewers support this as well?



Authors' names in the table-of-contents

2007-11-13 Thread Frederick Noronha [फ़रेदरिक नोरोनया]
Any way I could insert the authors' names in the table-of-contents,
without including the same in the top-of-the-page information? This is
for a multi-authored book, where we need to identify the author of
each chapter adequately. Thanks! FN
-- 
Frederick Noronha http://fn.goa-india.org Ph 0091-832-2409490
12000+ downloadable, sharable hi-res photos http://www.flickr.com/photos/fn-goa/


Re: Authors' names in the table-of-contents

2007-11-13 Thread Juergen Spitzmueller
Unknown wrote:

 Any way I could insert the authors' names in the table-of-contents,
 without including the same in the top-of-the-page information? This is
 for a multi-authored book, where we need to identify the author of
 each chapter adequately.

The easy way, for a book class:

\addcontentsline{toc}{chapter}{\protect\numberline{\it John Doe}\\
chapter title}%

(if you use an article class, replace chapter by section).

More advanced, you can define some environments in the preamble, such as:

%% Titling environments for proceedings

\AtBeginDocument{\setcounter{tocdepth}{0}}
\newcommand\authorfnt[1]{\fontsize{12pt}{14pt}\selectfont\emph{#1}}%
\newcommand\titlefnt[1]{\fontsize{13pt}{16pt}\selectfont #1}%
\newcommand\subtitlefnt[1]{\fontsize{12pt}{14pt}\selectfont #1}%

\makeatletter
[EMAIL PROTECTED]
\def\@@chapauthor{}
\newcommand*{\chapauthor}[2][]{%
\ifx\\#1\\%
\def\@@chapauthor{#2}
\else
\def\@@chapauthor{#1}
\fi
[EMAIL PROTECTED]
}
[EMAIL PROTECTED]
\newcommand*{\affiliation}[1]{%
[EMAIL PROTECTED]
}
[EMAIL PROTECTED]
\def\@@chaptitle{}
\newcommand*{\chaptitle}[2][]{%
\ifx\\#1\\%
\def\@@chaptitle{#2}
\else
\def\@@chaptitle{#1}
\fi
[EMAIL PROTECTED]
}
[EMAIL PROTECTED]
\newcommand*{\subtitle}[1]{%
[EMAIL PROTECTED]
}
\renewcommand\maketitle{%
% Symbolic Footnotes
\let\theoldfootnote\thefootnote
\renewcommand\thefootnote{\fnsymbol{footnote}}
\setcounter{footnote}{0}
[EMAIL PROTECTED]@affiliation\empty\else\  
([EMAIL PROTECTED])\fi}\\[14pt]%
[EMAIL PROTECTED]@subtitle\empty\else\\[14pt]
[EMAIL PROTECTED]
\addcontentsline{toc}{chapter}{\protect\numberline{\it\@@chapauthor}\\
[EMAIL PROTECTED]@[EMAIL PROTECTED]
\markboth{\@@@chapauthor}{\@@chaptitle}%
\setcounter{section}{0}
\setcounter{figure}{0}
\setcounter{table}{0}
\setcounter{footnote}{0}
%% back to numerical footnotes
\let\thefootnote\theoldfootnote
\global\let\@@[EMAIL PROTECTED]
\global\let\@@@[EMAIL PROTECTED]
[EMAIL PROTECTED]@empty
\global\let\@@[EMAIL PROTECTED]
[EMAIL PROTECTED]@empty
[EMAIL PROTECTED]@empty
}
\makeatother

%% end of definitions

Then you can use, at the top of each chapter

\chapauthor[short version for headings]{long version}
\affiliation{affiliation}
\chaptitle[short version for headings]{long version}
\subtitle{subtitle}
\maketitle

you can also define these environments in your layout file, e.g.

--

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[book]{myproceedings}


Format  4

# General textclass parameters
Input book.layout

# Verfasser
Style Chapter_Author
  MarginStatic
  LatexType Command
  LatexName chapauthor
  LeftMarginxx::xx
  LabelSep  xx
  ParSep0.4
  KeepEmpty 1  
  Align Block
  AlignPossible Block, Left
  LabelType Static
  LabelString   Chapter Author:
  OptionalArgs  1
  # label font definition
  LabelFont 
Series  Bold
Shape   Italic
Color   Blue
  EndFont
  InTitle   1
End

# Ort
Style Affiliation
  CopyStyle Chapter_Author
  LatexName affiliation
  LabelString   Affiliation:
  OptionalArgs  0
End

# Titel
Style Chapter_Title
  CopyStyle Chapter_Title
  LatexName chaptitle
  LabelString   Chapter Title:
  TopSep1
  Font 
SizeHuge
  EndFont
  # label font definition
  LabelFont 
Series  Bold
Shape   Italic
Color   Blue
  EndFont
End

# Subtitle
# Ort
Style Untertitel
  CopyStyle Chapter_Title
  LatexName subtitle
  LabelString   Subtitle:
  OptionalArgs  0
End

Style Author
  Obsoletedby   Chapter_Author
End

Style Title
  Obsoletedby   Chapter_Title
End

Style Extratitle
  Obsoletedby   Subtitle
End

NoStyle Chapter
NoStyle Chapter*
NoStyle Date

---

HTH,
Jürgen



table listed in list of tables but no caption with table?

2007-11-13 Thread Jeremy C. Reed
In my content, I have a few tables where I do not want any caption to
Table number listed with them. They are redundant for me.

But I do want these tables still listed by number and caption in the list 
of tables.

Any ideas on how to do that?

Thanks,

  Jeremy C. Reed


Re: Prob posting?

2007-11-13 Thread Wolfgang Engelmann
Am Freitag, 9. November 2007 10:16 schrieb [EMAIL PROTECTED]:
 Is there still anybody who has problems posting?

 The problem was that one of the spam blacklists (the most wellknown)
 stopped working, and my server was trying to connect to it whenever an
 email arrived.  This completely tied down the server.  I am administering 8
 computers here, and I fixed this problem on each 2 months ago when the
 problem started---except on the original (my first) one with the LyX lists
 on it.

 Really sorry guys,

 Máté

Hi,Máté

as one of the persons affected I am trying again whether my message comes 
through this time. Thanks for your help.

Wolfgang


Re: Roman enumerated list layout style

2007-11-13 Thread Helge Hafting

Richard Heck wrote:

Ernesto Posse wrote:

Thanks, but "LabelType Static" didn't work either. Nevertheless,
"LabelType Counter" works, but now, it looks like the counter is not
reset for each list. 
I've seen this problem, too. There is a "number within" option, but 
that only works for other counters. So far as I know, there is not as 
yet any solution to this within LyX. I don't think it would be 
terribly hard to add, but I'm not sure.


rh


I have now

LabelType Counter
LabelCounter enumi
LabelString "(\roman{enumi})"

I also tried with my own counter and get the same result:

abc
(i) abc
(ii) abc
abc
(iii) abc
(iv) abc
abc

This works with ordinary enumerations in LyX. If you can't make this
work with your own enumeration, then consider filing a bug
report at bugzilla.lyx.org

Helge Hafting


Re: Change Chapter Headings

2007-11-13 Thread Marcelo Acuña
> Hi All,
> 
> I'm using document class "Report" and want to change
> the Chapter  
> headings. The default is to have "Chapter 1 - Name
> of Chapter". I  
> just want  "1.0 Name of Chapter" or something like
> that. How can I do  
> this?
> 
> BTW - I'm using the Report class for a proposal,
> perhaps there is a  
> better document class that is more suitable?
 
 Plus Koma-script options (see userguide) you can use
titlesec package (see doc). This package provide a lot
of options for titles.
 Marcelo



  Compartí video en la ventana de tus mensajes (y también tus fotos de 
Flickr). 
Usá el nuevo Yahoo! Messenger versión Beta. http://ar.beta.messenger.yahoo.com/


importing LaTeX

2007-11-13 Thread jb162
Hi, I want to use LyX to work on LaTeX files produced by lhs2tex from
literate haskell scripts (and I know very little about LaTeX). When I
open these files in LyX they are a massive jumble of ERT and ordinary
text. lhs2tex uses a format file which is
at /usr/share/lhs2tex/polycode.fmt on my system. How do I tell lyx about
that? Will that help? What other files might I need to find or create to
get LyX to play nicely with the output of lhs2tex? I've attached the
result of running lhs2Tex on a small literate script -- I can run
pdflatex on this and produce a pdf with no errors, so I suppose the
paths must be set up OK on my system at some level?

Regards,

Jim Burton

TeX produced by lhs2tex from a small literate haskell script:
---

\documentclass{article}
%% ODER: format == = "\mathrel{==}"
%% ODER: format /= = "\neq "
%
%
\makeatletter
[EMAIL PROTECTED]
  [EMAIL PROTECTED]
   \newcommand\SkipToFmtEnd{}%
   \newcommand\EndFmtInput{}%
   \long\def\SkipToFmtEnd#1\EndFmtInput{}%
  }\SkipToFmtEnd

\newcommand
[EMAIL PROTECTED]@namedef{#1}{}}\SkipToFmtEnd}
\usepackage{amstext}
\usepackage{amssymb}
\usepackage{stmaryrd}
\DeclareFontFamily{OT1}{cmtex}{}
\DeclareFontShape{OT1}{cmtex}{m}{n}
  {<5><6><7><8>cmtex8
   <9>cmtex9
   <10><10.95><12><14.4><17.28><20.74><24.88>cmtex10}{}
\DeclareFontShape{OT1}{cmtex}{m}{it}
  {<-> ssub * cmtt/m/it}{}
\newcommand{\texfamily}{\fontfamily{cmtex}\selectfont}
\DeclareFontShape{OT1}{cmtt}{bx}{n}
  {<5><6><7><8>cmtt8
   <9>cmbtt9
   <10><10.95><12><14.4><17.28><20.74><24.88>cmbtt10}{}
\DeclareFontShape{OT1}{cmtex}{bx}{n}
  {<-> ssub * cmtt/bx/n}{}
\newcommand{\tex}[1]{\text{\texfamily#1}}   % NEU

\newcommand{\Sp}{\hskip.4em\relax}


\newcommand{\Conid}[1]{\mathit{#1}}
\newcommand{\Varid}[1]{\mathit{#1}}
\newcommand{\anonymous}{\kern0.06em [EMAIL PROTECTED]
\newcommand{\plus}{\mathbin{+\!\!\!+}}
\newcommand{\bind}{\mathbin{>\!\!\!>\mkern-6.7mu=}}
\newcommand{\sequ}{\mathbin{>\!\!\!>}}
\renewcommand{\leq}{\leqslant}
\renewcommand{\geq}{\geqslant}
\usepackage{polytable}

%mathindent has to be defined
[EMAIL PROTECTED]
  {\newdimen\mathindent\mathindent\leftmargini}%
  {}%

\def\resethooks{%
  \global\let\SaveRestoreHook\empty
  \global\let\ColumnHook\empty}
\newcommand*{\savecolumns}[1][default]%
  [EMAIL PROTECTED]@macro\SaveRestoreHook{\savecolumns[#1]}}
\newcommand*{\restorecolumns}[1][default]%
  [EMAIL PROTECTED]@macro\SaveRestoreHook{\restorecolumns[#1]}}
\newcommand*{\aligncolumn}[2]%
  [EMAIL PROTECTED]@macro\ColumnHook{\column{#1}{#2}}}

\resethooks

\newcommand{\onelinecommentchars}{\quad-{}- }
\newcommand{\commentbeginchars}{\enskip\{-}
\newcommand{\commentendchars}{-\}\enskip}

\newcommand{\visiblecomments}{%
  \let\onelinecomment=\onelinecommentchars
  \let\commentbegin=\commentbeginchars
  \let\commentend=\commentendchars}

\newcommand{\invisiblecomments}{%
  \let\onelinecomment=\empty
  \let\commentbegin=\empty
  \let\commentend=\empty}

\visiblecomments

\newlength{\blanklineskip}
\setlength{\blanklineskip}{1mm}

\newcommand{\hsindent}[1]{\quad}% default is fixed indentation
\newcommand{\NB}{\textbf{NB}}
\newcommand{\Todo}[1]{$\langle$\textbf{To do:}~#1$\rangle$}

\makeatother
\EndFmtInput
%
%
%
%
%
%
% This package provides two environments suitable to take the place
% of hscode, called "plainhscode" and "arrayhscode". 
%
% The plain environment surrounds each code block by vertical space,
% and it uses \abovedisplayskip and \belowdisplayskip to get spacing
% similar to formulas. Note that if these dimensions are changed,
% the spacing around displayed math formulas changes as well.
% All code is indented using \leftskip.
%
% Changed 19.08.2004 to reflect changes in colorcode. Should work with
% CodeGroup.sty.
%
\ReadOnlyOnce{polycode.fmt}%
\makeatletter

\newcommand{\hsnewpar}[1]%
  {{\parskip=0pt\parindent=0pt\par\vskip #1\noindent}}

% can be used, for instance, to redefine the code size, by setting the
% command to \small or something alike
\newcommand{\hscodestyle}{}

% The command \sethscode can be used to switch the code formatting
% behaviour by mapping the hscode environment in the subst directive
% to a new LaTeX environment.

\newcommand{\sethscode}[1]%
  {\expandafter\let\expandafter\hscode\csname #1\endcsname
   \expandafter\let\expandafter\endhscode\csname end#1\endcsname}

% "compatibility" mode restores the non-polycode.fmt layout.

\newenvironment{compathscode}%
  {\par\noindent
   \advance\leftskip\mathindent
   \hscodestyle
   [EMAIL PROTECTED]
   \(\pboxed}%
  {\endpboxed\)%
   \par\noindent
   \ignorespacesafterend}

\newcommand{\compaths}{\sethscode{compathscode}}

% "plain" mode is the proposed default.

\newenvironment{plainhscode}%
  {\hsnewpar\abovedisplayskip
   \advance\leftskip\mathindent
   \hscodestyle
   [EMAIL PROTECTED]
   \(\pboxed}%
  {\endpboxed\)%
   \hsnewpar\belowdisplayskip
   \ignorespacesafterend}

% Here, we make plainhscode the default environment.


Re: importing LaTeX

2007-11-13 Thread Steve Litt
Hi Jim,

It's kinda wierd that this LaTeX was written by something having to do with 
literate programming. The \SkipToFmtEnd following the closing parenthese of 
the test for definition of lhs2tex.lhs2tex.sty.read looks to the 
LaTeX-untrained eye like it's conditional, but in fact it gets run 
regardless. To make the program more readable, I would have put it on its own 
line.

Anyway, back to your question. I think the general answer is that the 
environments this code declares with the \newenvironment{} command can be 
used in LyX by writing a LyX environment wrapper. This technique is well 
known -- you can readabout it in these three places, as well as many others:

http://www.troubleshooters.cxm/linux/lyx/self_publish_lyx.htm#for_real_tut
http://www.troubleshooters.cxm/lpm/200210/200210.htm#_MakingYourOwnLayout
http://www.troubleshooters.cxm/linux/lyx/lyx_latex_tex.htm#_LyX

More troublesome are the commands defined with \newcommand or \renewcommand. 
These can be used in two places:

1) In the layout file (to define environments and other entities)
2) In the LyX document, but only as ERT

Obviously my answer has just scratched the surface, but perhaps it's a start.

Thanks

SteveT

On Tuesday 13 November 2007 09:10, [EMAIL PROTECTED] wrote:
> Hi, I want to use LyX to work on LaTeX files produced by lhs2tex from
> literate haskell scripts (and I know very little about LaTeX). When I
> open these files in LyX they are a massive jumble of ERT and ordinary
> text. lhs2tex uses a format file which is
> at /usr/share/lhs2tex/polycode.fmt on my system. How do I tell lyx about
> that? Will that help? What other files might I need to find or create to
> get LyX to play nicely with the output of lhs2tex? I've attached the
> result of running lhs2Tex on a small literate script -- I can run
> pdflatex on this and produce a pdf with no errors, so I suppose the
> paths must be set up OK on my system at some level?
>
> Regards,
>
> Jim Burton
>
> TeX produced by lhs2tex from a small literate haskell script:
> ---
>
> \documentclass{article}
> %% ODER: format == = "\mathrel{==}"
> %% ODER: format /= = "\neq "
> %
> %
> \makeatletter
> [EMAIL PROTECTED]
>   [EMAIL PROTECTED]
>\newcommand\SkipToFmtEnd{}%
>\newcommand\EndFmtInput{}%
>\long\def\SkipToFmtEnd#1\EndFmtInput{}%
>   }\SkipToFmtEnd
>
> \newcommand
> [EMAIL PROTECTED]@namedef{#1}{}}\SkipToFmtEnd}
> \usepackage{amstext}
> \usepackage{amssymb}
> \usepackage{stmaryrd}
> \DeclareFontFamily{OT1}{cmtex}{}
> \DeclareFontShape{OT1}{cmtex}{m}{n}
>   {<5><6><7><8>cmtex8
><9>cmtex9
><10><10.95><12><14.4><17.28><20.74><24.88>cmtex10}{}
> \DeclareFontShape{OT1}{cmtex}{m}{it}
>   {<-> ssub * cmtt/m/it}{}
> \newcommand{\texfamily}{\fontfamily{cmtex}\selectfont}
> \DeclareFontShape{OT1}{cmtt}{bx}{n}
>   {<5><6><7><8>cmtt8
><9>cmbtt9
><10><10.95><12><14.4><17.28><20.74><24.88>cmbtt10}{}
> \DeclareFontShape{OT1}{cmtex}{bx}{n}
>   {<-> ssub * cmtt/bx/n}{}
> \newcommand{\tex}[1]{\text{\texfamily#1}} % NEU
>
> \newcommand{\Sp}{\hskip.4em\relax}
>
>
> \newcommand{\Conid}[1]{\mathit{#1}}
> \newcommand{\Varid}[1]{\mathit{#1}}
> \newcommand{\anonymous}{\kern0.06em [EMAIL PROTECTED]
> \newcommand{\plus}{\mathbin{+\!\!\!+}}
> \newcommand{\bind}{\mathbin{>\!\!\!>\mkern-6.7mu=}}
> \newcommand{\sequ}{\mathbin{>\!\!\!>}}
> \renewcommand{\leq}{\leqslant}
> \renewcommand{\geq}{\geqslant}
> \usepackage{polytable}
>
> %mathindent has to be defined
> [EMAIL PROTECTED]
>   {\newdimen\mathindent\mathindent\leftmargini}%
>   {}%
>
> \def\resethooks{%
>   \global\let\SaveRestoreHook\empty
>   \global\let\ColumnHook\empty}
> \newcommand*{\savecolumns}[1][default]%
>   [EMAIL PROTECTED]@macro\SaveRestoreHook{\savecolumns[#1]}}
> \newcommand*{\restorecolumns}[1][default]%
>   [EMAIL PROTECTED]@macro\SaveRestoreHook{\restorecolumns[#1]}}
> \newcommand*{\aligncolumn}[2]%
>   [EMAIL PROTECTED]@macro\ColumnHook{\column{#1}{#2}}}
>
> \resethooks
>
> \newcommand{\onelinecommentchars}{\quad-{}- }
> \newcommand{\commentbeginchars}{\enskip\{-}
> \newcommand{\commentendchars}{-\}\enskip}
>
> \newcommand{\visiblecomments}{%
>   \let\onelinecomment=\onelinecommentchars
>   \let\commentbegin=\commentbeginchars
>   \let\commentend=\commentendchars}
>
> \newcommand{\invisiblecomments}{%
>   \let\onelinecomment=\empty
>   \let\commentbegin=\empty
>   \let\commentend=\empty}
>
> \visiblecomments
>
> \newlength{\blanklineskip}
> \setlength{\blanklineskip}{1mm}
>
> \newcommand{\hsindent}[1]{\quad}% default is fixed indentation
> \newcommand{\NB}{\textbf{NB}}
> \newcommand{\Todo}[1]{$\langle$\textbf{To do:}~#1$\rangle$}
>
> \makeatother
> \EndFmtInput
> %
> %
> %
> %
> %
> %
> % This package provides two environments suitable to take the place
> % of hscode, called "plainhscode" and "arrayhscode".
> %
> % The plain environment surrounds each code block by vertical space,
> % and it uses \abovedisplayskip and \belowdisplayskip to get spacing

hyperlink to html documents?

2007-11-13 Thread Neal Becker
I'm using lyx to document some code (python).  I used epydoc to generate
html docs for the API.  If I want to link from my lyx-generated pdf to that
code, I see that file:///absolute_file_path.html will work (at least, when
viewed with kpdf).  I would rather use a relative file path.  Is this
feasible?  Do other pdf viewers support this as well?



Authors' names in the table-of-contents

2007-11-13 Thread Frederick Noronha [फ़रेदरिक नोरोनया]
Any way I could insert the authors' names in the table-of-contents,
without including the same in the top-of-the-page information? This is
for a multi-authored book, where we need to identify the author of
each chapter adequately. Thanks! FN
-- 
Frederick Noronha http://fn.goa-india.org Ph 0091-832-2409490
12000+ downloadable, sharable hi-res photos http://www.flickr.com/photos/fn-goa/


Re: Authors' names in the table-of-contents

2007-11-13 Thread Juergen Spitzmueller
Unknown wrote:

> Any way I could insert the authors' names in the table-of-contents,
> without including the same in the top-of-the-page information? This is
> for a multi-authored book, where we need to identify the author of
> each chapter adequately.

The easy way, for a book class:

\addcontentsline{toc}{chapter}{\protect\numberline{\it John Doe}\\
chapter title}%

(if you use an article class, replace "chapter" by "section").

More advanced, you can define some environments in the preamble, such as:

%% Titling environments for proceedings

\AtBeginDocument{\setcounter{tocdepth}{0}}
\newcommand\authorfnt[1]{\fontsize{12pt}{14pt}\selectfont\emph{#1}}%
\newcommand\titlefnt[1]{\fontsize{13pt}{16pt}\selectfont #1}%
\newcommand\subtitlefnt[1]{\fontsize{12pt}{14pt}\selectfont #1}%

\makeatletter
[EMAIL PROTECTED]
\def\@@chapauthor{}
\newcommand*{\chapauthor}[2][]{%
\ifx\\#1\\%
\def\@@chapauthor{#2}
\else
\def\@@chapauthor{#1}
\fi
[EMAIL PROTECTED]
}
[EMAIL PROTECTED]
\newcommand*{\affiliation}[1]{%
[EMAIL PROTECTED]
}
[EMAIL PROTECTED]
\def\@@chaptitle{}
\newcommand*{\chaptitle}[2][]{%
\ifx\\#1\\%
\def\@@chaptitle{#2}
\else
\def\@@chaptitle{#1}
\fi
[EMAIL PROTECTED]
}
[EMAIL PROTECTED]
\newcommand*{\subtitle}[1]{%
[EMAIL PROTECTED]
}
\renewcommand\maketitle{%
% Symbolic Footnotes
\let\theoldfootnote\thefootnote
\renewcommand\thefootnote{\fnsymbol{footnote}}
\setcounter{footnote}{0}
[EMAIL PROTECTED]@affiliation\empty\else\  
([EMAIL PROTECTED])\fi}\\[14pt]%
[EMAIL PROTECTED]@subtitle\empty\else\\[14pt]
[EMAIL PROTECTED]
\addcontentsline{toc}{chapter}{\protect\numberline{\it\@@chapauthor}\\
[EMAIL PROTECTED]@[EMAIL PROTECTED]
\markboth{\@@@chapauthor}{\@@chaptitle}%
\setcounter{section}{0}
\setcounter{figure}{0}
\setcounter{table}{0}
\setcounter{footnote}{0}
%% back to numerical footnotes
\let\thefootnote\theoldfootnote
\global\let\@@[EMAIL PROTECTED]
\global\let\@@@[EMAIL PROTECTED]
[EMAIL PROTECTED]@empty
\global\let\@@[EMAIL PROTECTED]
[EMAIL PROTECTED]@empty
[EMAIL PROTECTED]@empty
}
\makeatother

%% end of definitions

Then you can use, at the top of each chapter

\chapauthor[short version for headings]{long version}
\affiliation{affiliation}
\chaptitle[short version for headings]{long version}
\subtitle{subtitle}
\maketitle

you can also define these environments in your layout file, e.g.

--

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[book]{myproceedings}


Format  4

# General textclass parameters
Input book.layout

# Verfasser
Style Chapter_Author
  MarginStatic
  LatexType Command
  LatexName chapauthor
  LeftMarginxx::xx
  LabelSep  xx
  ParSep0.4
  KeepEmpty 1  
  Align Block
  AlignPossible Block, Left
  LabelType Static
  LabelString   "Chapter Author:"
  OptionalArgs  1
  # label font definition
  LabelFont 
Series  Bold
Shape   Italic
Color   Blue
  EndFont
  InTitle   1
End

# Ort
Style Affiliation
  CopyStyle Chapter_Author
  LatexName affiliation
  LabelString   Affiliation:
  OptionalArgs  0
End

# Titel
Style Chapter_Title
  CopyStyle Chapter_Title
  LatexName chaptitle
  LabelString   "Chapter Title:"
  TopSep1
  Font 
SizeHuge
  EndFont
  # label font definition
  LabelFont 
Series  Bold
Shape   Italic
Color   Blue
  EndFont
End

# Subtitle
# Ort
Style Untertitel
  CopyStyle Chapter_Title
  LatexName subtitle
  LabelString   Subtitle:
  OptionalArgs  0
End

Style Author
  Obsoletedby   Chapter_Author
End

Style Title
  Obsoletedby   Chapter_Title
End

Style Extratitle
  Obsoletedby   Subtitle
End

NoStyle Chapter
NoStyle Chapter*
NoStyle Date

---

HTH,
Jürgen



table listed in list of tables but no caption with table?

2007-11-13 Thread Jeremy C. Reed
In my content, I have a few tables where I do not want any caption to
Table number listed with them. They are redundant for me.

But I do want these tables still listed by number and caption in the list 
of tables.

Any ideas on how to do that?

Thanks,

  Jeremy C. Reed


Re: Prob posting?

2007-11-13 Thread Wolfgang Engelmann
Am Freitag, 9. November 2007 10:16 schrieb [EMAIL PROTECTED]:
> Is there still anybody who has problems posting?
>
> The problem was that one of the spam blacklists (the most wellknown)
> stopped working, and my server was trying to connect to it whenever an
> email arrived.  This completely tied down the server.  I am administering 8
> computers here, and I fixed this problem on each 2 months ago when the
> problem started---except on the original (my first) one with the LyX lists
> on it.
>
> Really sorry guys,
>
> Máté

Hi,Máté

as one of the persons affected I am trying again whether my message comes 
through this time. Thanks for your help.

Wolfgang