Re: LyX-Code and Typewriter environment: how to change the font?

2006-02-24 Thread Helge Hafting

Joerg Hau wrote:


Hi,

How does one change the font that is used (a) for the LyX-Code 
environment, (b) for typewriter character markup?


I would like to modify the font size, and/or eventually change the font for 
these two completely. Maybe I have searched in the wrong places ;-), but I 
have not found an answer to this question yet ... ?


Thanks for any hint,
and have a nice day!
 


This can be done with a small custom .layout, such as
the one at the end of this message.  It is a custom document
type (mybook) that simply inherits everything from
scrbook (Koma-script book) and adds a smallcode
paragraph type that provides scriptsized code with no
extra left margin.

Put it in .lyx/layouts, use the reconfigure menu option, and
you may then use the mybook document class which supports
smallcode paragraphs.

If you want mybook based on something else than scrbook,
change the \DeclareLaTeXClass and Input scrbook.layout
in the beginning.

For a different fontsize, replace scriptsize with another size.

If you like the extra left/right margins LyX-Code provides,
change to LeftMargin MMM and RightMargin MMM.

Note that this file is for lyx-1.4, but doing the same
for lyx-1.3 is no harder.

The file mybook.layout:
#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[scrbook]{book (mybook)}

Format 2
Input scrbook.layout

Columns 1
Sides 1
PageStyle fancy

Classoptions
PageStyle empty|fancy
FontSize 12
End

DefaultStyle Standard

Style Code-small
 CopyStyle LyX-Code
 LatexType Environment
 LatexName codesmall
 LeftMargin 
 RightMargin 
 Font
   Size Scriptsize
   Family Typewriter
 EndFont
 Preamble
\newenvironment{codesmall}
{\begin{scriptsize}\begin{list}{}{
\setlength{\leftmargin}{0pt}
\setlength{\rightmargin}{0pt}
\setlength{\listparindent}{0pt}% needed for AMS classes
\raggedright
\setlength{\itemsep}{0pt}
\setlength{\parsep}{0pt}
\normalfont\ttfamily}%
\item[]}
{\end{list}\end{scriptsize}}
 EndPreamble
End

Preamble

EndPreamble



Re: LyX-Code and Typewriter environment: how to change the font?

2006-02-24 Thread Helge Hafting

Joerg Hau wrote:


Hi,

How does one change the font that is used (a) for the LyX-Code 
environment, (b) for typewriter character markup?


I would like to modify the font size, and/or eventually change the font for 
these two completely. Maybe I have searched in the wrong places ;-), but I 
have not found an answer to this question yet ... ?


Thanks for any hint,
and have a nice day!
 


This can be done with a small custom .layout, such as
the one at the end of this message.  It is a custom document
type (mybook) that simply inherits everything from
scrbook (Koma-script book) and adds a smallcode
paragraph type that provides scriptsized code with no
extra left margin.

Put it in .lyx/layouts, use the reconfigure menu option, and
you may then use the mybook document class which supports
smallcode paragraphs.

If you want mybook based on something else than scrbook,
change the \DeclareLaTeXClass and Input scrbook.layout
in the beginning.

For a different fontsize, replace scriptsize with another size.

If you like the extra left/right margins LyX-Code provides,
change to LeftMargin MMM and RightMargin MMM.

Note that this file is for lyx-1.4, but doing the same
for lyx-1.3 is no harder.

The file mybook.layout:
#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[scrbook]{book (mybook)}

Format 2
Input scrbook.layout

Columns 1
Sides 1
PageStyle fancy

Classoptions
PageStyle empty|fancy
FontSize 12
End

DefaultStyle Standard

Style Code-small
 CopyStyle LyX-Code
 LatexType Environment
 LatexName codesmall
 LeftMargin 
 RightMargin 
 Font
   Size Scriptsize
   Family Typewriter
 EndFont
 Preamble
\newenvironment{codesmall}
{\begin{scriptsize}\begin{list}{}{
\setlength{\leftmargin}{0pt}
\setlength{\rightmargin}{0pt}
\setlength{\listparindent}{0pt}% needed for AMS classes
\raggedright
\setlength{\itemsep}{0pt}
\setlength{\parsep}{0pt}
\normalfont\ttfamily}%
\item[]}
{\end{list}\end{scriptsize}}
 EndPreamble
End

Preamble

EndPreamble



Re: "LyX-Code" and "Typewriter" environment: how to change the font?

2006-02-24 Thread Helge Hafting

Joerg Hau wrote:


Hi,

How does one change the font that is used (a) for the "LyX-Code" 
environment, (b) for "typewriter" character markup?


I would like to modify the font size, and/or eventually change the font for 
these two completely. Maybe I have searched in the wrong places ;-), but I 
have not found an answer to this question yet ... ?


Thanks for any hint,
and have a nice day!
 


This can be done with a small custom .layout, such as
the one at the end of this message.  It is a custom document
type (mybook) that simply inherits everything from
scrbook (Koma-script book) and adds a smallcode
paragraph type that provides scriptsized code with no
extra left margin.

Put it in .lyx/layouts, use the "reconfigure" menu option, and
you may then use the "mybook" document class which supports
"smallcode" paragraphs.

If you want "mybook" based on something else than scrbook,
change the "\DeclareLaTeXClass" and "Input scrbook.layout"
in the beginning.

For a different fontsize, replace "scriptsize" with another size.

If you like the extra left/right margins LyX-Code provides,
change to LeftMargin MMM and RightMargin MMM.

Note that this file is for lyx-1.4, but doing the same
for lyx-1.3 is no harder.

The file mybook.layout:
#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[scrbook]{book (mybook)}

Format 2
Input scrbook.layout

Columns 1
Sides 1
PageStyle fancy

Classoptions
PageStyle "empty|fancy"
FontSize "12"
End

DefaultStyle "Standard"

Style Code-small
 CopyStyle LyX-Code
 LatexType Environment
 LatexName codesmall
 LeftMargin ""
 RightMargin ""
 Font
   Size Scriptsize
   Family Typewriter
 EndFont
 Preamble
\newenvironment{codesmall}
{\begin{scriptsize}\begin{list}{}{
\setlength{\leftmargin}{0pt}
\setlength{\rightmargin}{0pt}
\setlength{\listparindent}{0pt}% needed for AMS classes
\raggedright
\setlength{\itemsep}{0pt}
\setlength{\parsep}{0pt}
\normalfont\ttfamily}%
\item[]}
{\end{list}\end{scriptsize}}
 EndPreamble
End

Preamble

EndPreamble



Re: LyX-Code and Typewriter environment: how to change the font?

2006-02-23 Thread Joerg Hau
Hi,

On Tuesday 21 February 2006 00:22, Paul A. Rubin wrote:
  How does one change the font that is used (a) for the LyX-Code
  environment, (b) for typewriter character markup?

 If you mean you want to change LyX-Code globally (for all documents on
 your system), you need to hack the file lyxmacros.inc in the
 ...\Resources\lyx\layouts directory on Windows systems (at least for
 versions 1.3.6 and 1.3.7) or .../share/lyx/layouts on Unix-like systems.

That would be too much hassle: I'm co-editing the same document with 
another person, and (for various reasons) we do this on at least four 
different computers :-(

 In the section beginning Style LyX-Code there is a \newenvironment
 command, near the end of which is \normalfont\ttfamily.  You can
 change \ttfamily to something like \rmfamily or \sffamily (although IMHO
 a monospaced font would seem to be needed here). You should also be
 able to append a size command, for instance

 \normalfont\rmfamily\large

 or

 \normalfont\sffamily\fontsize{9pt}{11pt}.

Yes, basically I'd like a monospaced, narrower and eventually smaller font 
(the common Courier-type is too laaarge for my taste  purpose).

 Changing the typewriter font itself, so that for instance \ttfamily does
 something different from what it does now, is something I think you'll
 have to do with LaTeX commands in the preamble.  Perhaps a LaTeX guru
 (which decidedly excludes me) can help.

Imho this would be the way to go, especially due to said portability ... 
something along the line of \renewcommand\ttfont{\mynewfont\small}, but I 
haven't found the right syntax yet ... any ideas?

Cheers,

- Joerg


-- 
joerg.hau(at)dplanet.ch * Lausanne, Switzerland
http://homepage.sunrise.ch/mysunrise/joerg.hau/
All standard disclaimers apply.
Never take life seriously. You won't get out alive anyway.


Re: LyX-Code and Typewriter environment: how to change the font?

2006-02-23 Thread Joerg Hau
Hi,

On Tuesday 21 February 2006 00:22, Paul A. Rubin wrote:
  How does one change the font that is used (a) for the LyX-Code
  environment, (b) for typewriter character markup?

 If you mean you want to change LyX-Code globally (for all documents on
 your system), you need to hack the file lyxmacros.inc in the
 ...\Resources\lyx\layouts directory on Windows systems (at least for
 versions 1.3.6 and 1.3.7) or .../share/lyx/layouts on Unix-like systems.

That would be too much hassle: I'm co-editing the same document with 
another person, and (for various reasons) we do this on at least four 
different computers :-(

 In the section beginning Style LyX-Code there is a \newenvironment
 command, near the end of which is \normalfont\ttfamily.  You can
 change \ttfamily to something like \rmfamily or \sffamily (although IMHO
 a monospaced font would seem to be needed here). You should also be
 able to append a size command, for instance

 \normalfont\rmfamily\large

 or

 \normalfont\sffamily\fontsize{9pt}{11pt}.

Yes, basically I'd like a monospaced, narrower and eventually smaller font 
(the common Courier-type is too laaarge for my taste  purpose).

 Changing the typewriter font itself, so that for instance \ttfamily does
 something different from what it does now, is something I think you'll
 have to do with LaTeX commands in the preamble.  Perhaps a LaTeX guru
 (which decidedly excludes me) can help.

Imho this would be the way to go, especially due to said portability ... 
something along the line of \renewcommand\ttfont{\mynewfont\small}, but I 
haven't found the right syntax yet ... any ideas?

Cheers,

- Joerg


-- 
joerg.hau(at)dplanet.ch * Lausanne, Switzerland
http://homepage.sunrise.ch/mysunrise/joerg.hau/
All standard disclaimers apply.
Never take life seriously. You won't get out alive anyway.


Re: "LyX-Code" and "Typewriter" environment: how to change the font?

2006-02-23 Thread Joerg Hau
Hi,

On Tuesday 21 February 2006 00:22, Paul A. Rubin wrote:
> > How does one change the font that is used (a) for the "LyX-Code"
> > environment, (b) for "typewriter" character markup?
>
> If you mean you want to change LyX-Code globally (for all documents on
> your system), you need to hack the file lyxmacros.inc in the
> ...\Resources\lyx\layouts directory on Windows systems (at least for
> versions 1.3.6 and 1.3.7) or .../share/lyx/layouts on Unix-like systems.

That would be too much hassle: I'm co-editing the same document with 
another person, and (for various reasons) we do this on at least four 
different computers :-(

> In the section beginning "Style LyX-Code" there is a \newenvironment
> command, near the end of which is "\normalfont\ttfamily".  You can
> change \ttfamily to something like \rmfamily or \sffamily (although IMHO
> a monospaced font would seem to be needed here). You should also be
> able to append a size command, for instance
>
> \normalfont\rmfamily\large
>
> or
>
> \normalfont\sffamily\fontsize{9pt}{11pt}.

Yes, basically I'd like a monospaced, narrower and eventually smaller font 
(the common Courier-type is too laaarge for my taste & purpose).

> Changing the typewriter font itself, so that for instance \ttfamily does
> something different from what it does now, is something I think you'll
> have to do with LaTeX commands in the preamble.  Perhaps a LaTeX guru
> (which decidedly excludes me) can help.

Imho this would be the way to go, especially due to said "portability" ... 
something along the line of \renewcommand\ttfont{\mynewfont\small}, but I 
haven't found the right syntax yet ... any ideas?

Cheers,

- Joerg


-- 
joerg.hau(at)dplanet.ch * Lausanne, Switzerland
http://homepage.sunrise.ch/mysunrise/joerg.hau/
"All standard disclaimers apply."
Never take life seriously. You won't get out alive anyway.


LyX-Code and Typewriter environment: how to change the font?

2006-02-20 Thread Joerg Hau
Hi,

How does one change the font that is used (a) for the LyX-Code 
environment, (b) for typewriter character markup?

I would like to modify the font size, and/or eventually change the font for 
these two completely. Maybe I have searched in the wrong places ;-), but I 
have not found an answer to this question yet ... ?

Thanks for any hint,
and have a nice day!

- Joerg


-- 
joerg.hau(at)dplanet.ch * Lausanne, Switzerland
http://homepage.sunrise.ch/mysunrise/joerg.hau/
All standard disclaimers apply.
Never take life seriously. You won't get out alive anyway.


Re: LyX-Code and Typewriter environment: how to change the font?

2006-02-20 Thread Paul A. Rubin

Joerg Hau wrote:

Hi,

How does one change the font that is used (a) for the LyX-Code 
environment, (b) for typewriter character markup?


I would like to modify the font size, and/or eventually change the font for 
these two completely. Maybe I have searched in the wrong places ;-), but I 
have not found an answer to this question yet ... ?


Thanks for any hint,
and have a nice day!

- Joerg




If you mean you want to change LyX-Code globally (for all documents on 
your system), you need to hack the file lyxmacros.inc in the 
...\Resources\lyx\layouts directory on Windows systems (at least for 
versions 1.3.6 and 1.3.7) or .../share/lyx/layouts on Unix-like systems. 
 You might want to put the hacked version in your local layouts 
directory (under your home) and leave the original intact, just in case.


In the section beginning Style LyX-Code there is a \newenvironment 
command, near the end of which is \normalfont\ttfamily.  You can 
change \ttfamily to something like \rmfamily or \sffamily (although IMHO 
a monospaced font would seem to be needed here).  You should also be 
able to append a size command, for instance


\normalfont\rmfamily\large

or

\normalfont\sffamily\fontsize{9pt}{11pt}.

Beneath the preamble insertion in the .inc file is a subsection

Font
  Family  Typewriter
EndFont

I think you'll want to change Typewriter to Roman (or whatever) there as 
well, so that the screen display matches what you'll get in the output.


Changing the typewriter font itself, so that for instance \ttfamily does 
something different from what it does now, is something I think you'll 
have to do with LaTeX commands in the preamble.  Perhaps a LaTeX guru 
(which decidedly excludes me) can help.


/Paul



LyX-Code and Typewriter environment: how to change the font?

2006-02-20 Thread Joerg Hau
Hi,

How does one change the font that is used (a) for the LyX-Code 
environment, (b) for typewriter character markup?

I would like to modify the font size, and/or eventually change the font for 
these two completely. Maybe I have searched in the wrong places ;-), but I 
have not found an answer to this question yet ... ?

Thanks for any hint,
and have a nice day!

- Joerg


-- 
joerg.hau(at)dplanet.ch * Lausanne, Switzerland
http://homepage.sunrise.ch/mysunrise/joerg.hau/
All standard disclaimers apply.
Never take life seriously. You won't get out alive anyway.


Re: LyX-Code and Typewriter environment: how to change the font?

2006-02-20 Thread Paul A. Rubin

Joerg Hau wrote:

Hi,

How does one change the font that is used (a) for the LyX-Code 
environment, (b) for typewriter character markup?


I would like to modify the font size, and/or eventually change the font for 
these two completely. Maybe I have searched in the wrong places ;-), but I 
have not found an answer to this question yet ... ?


Thanks for any hint,
and have a nice day!

- Joerg




If you mean you want to change LyX-Code globally (for all documents on 
your system), you need to hack the file lyxmacros.inc in the 
...\Resources\lyx\layouts directory on Windows systems (at least for 
versions 1.3.6 and 1.3.7) or .../share/lyx/layouts on Unix-like systems. 
 You might want to put the hacked version in your local layouts 
directory (under your home) and leave the original intact, just in case.


In the section beginning Style LyX-Code there is a \newenvironment 
command, near the end of which is \normalfont\ttfamily.  You can 
change \ttfamily to something like \rmfamily or \sffamily (although IMHO 
a monospaced font would seem to be needed here).  You should also be 
able to append a size command, for instance


\normalfont\rmfamily\large

or

\normalfont\sffamily\fontsize{9pt}{11pt}.

Beneath the preamble insertion in the .inc file is a subsection

Font
  Family  Typewriter
EndFont

I think you'll want to change Typewriter to Roman (or whatever) there as 
well, so that the screen display matches what you'll get in the output.


Changing the typewriter font itself, so that for instance \ttfamily does 
something different from what it does now, is something I think you'll 
have to do with LaTeX commands in the preamble.  Perhaps a LaTeX guru 
(which decidedly excludes me) can help.


/Paul



"LyX-Code" and "Typewriter" environment: how to change the font?

2006-02-20 Thread Joerg Hau
Hi,

How does one change the font that is used (a) for the "LyX-Code" 
environment, (b) for "typewriter" character markup?

I would like to modify the font size, and/or eventually change the font for 
these two completely. Maybe I have searched in the wrong places ;-), but I 
have not found an answer to this question yet ... ?

Thanks for any hint,
and have a nice day!

- Joerg


-- 
joerg.hau(at)dplanet.ch * Lausanne, Switzerland
http://homepage.sunrise.ch/mysunrise/joerg.hau/
"All standard disclaimers apply."
Never take life seriously. You won't get out alive anyway.


Re: "LyX-Code" and "Typewriter" environment: how to change the font?

2006-02-20 Thread Paul A. Rubin

Joerg Hau wrote:

Hi,

How does one change the font that is used (a) for the "LyX-Code" 
environment, (b) for "typewriter" character markup?


I would like to modify the font size, and/or eventually change the font for 
these two completely. Maybe I have searched in the wrong places ;-), but I 
have not found an answer to this question yet ... ?


Thanks for any hint,
and have a nice day!

- Joerg




If you mean you want to change LyX-Code globally (for all documents on 
your system), you need to hack the file lyxmacros.inc in the 
...\Resources\lyx\layouts directory on Windows systems (at least for 
versions 1.3.6 and 1.3.7) or .../share/lyx/layouts on Unix-like systems. 
 You might want to put the hacked version in your "local" layouts 
directory (under your home) and leave the original intact, just in case.


In the section beginning "Style LyX-Code" there is a \newenvironment 
command, near the end of which is "\normalfont\ttfamily".  You can 
change \ttfamily to something like \rmfamily or \sffamily (although IMHO 
a monospaced font would seem to be needed here).  You should also be 
able to append a size command, for instance


\normalfont\rmfamily\large

or

\normalfont\sffamily\fontsize{9pt}{11pt}.

Beneath the preamble insertion in the .inc file is a subsection

Font
  Family  Typewriter
EndFont

I think you'll want to change Typewriter to Roman (or whatever) there as 
well, so that the screen display matches what you'll get in the output.


Changing the typewriter font itself, so that for instance \ttfamily does 
something different from what it does now, is something I think you'll 
have to do with LaTeX commands in the preamble.  Perhaps a LaTeX guru 
(which decidedly excludes me) can help.


/Paul