Re: [LyX] Keep enumeration across subsections?

2006-03-04 Thread Joerg Hau
Hi,
>
>> How can I preserve the ongoing numbering of the "Enumerate" environment
>> across subsections?

> See attached LyX-example file.

Thanks Uwe, but your file uses \setcounter{enumi}{4}, i.e. a pre-defined 
counter. This is exactly what I want to avoid:

> My question is, how do you achieve this in LyX? (One particular
> challenge is that the numbering shall be truly automatic, i.e. I don't
> want to specify "starting numbers" after an intermediate title)

any hint ... ?

Thanks,

- Joerg


(PS: I'm afraid this posting will mess up threading somewhat, but I have 
not found a way to reply to a single message from inside the digest?)


-- 
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] Keep enumeration across subsections?

2006-03-04 Thread Joerg Hau
Hi All,

How can I preserve the ongoing numbering of the "Enumerate" environment 
across subsections?

I am writing a tutorial, which is a "step-by-step" guide through some 
functions of some software. Since the sequence of actions is of some 
importance, the "Enumerate" environment is perfect here.

This tutorial will be a bit lengthy, thus I would like to insert some 
"intermediate titles" (preferably subsections or subsubsections), so that 
the user "knows what's coming next". Roughly like this:

STARTING UP
  1. Text Text Text Text Text ...
  2. Text Text Text Text Text ...
  3. Text Text Text Text Text ...
LOGGING IN
  4. Text Text Text Text Text ...
  5. Text Text Text Text Text ...
QUERYING
  6. Text Text Text Text Text ...
  7. Text Text Text Text Text ...

... I think you get the idea. 

My question is, how do you achieve this in LyX? (One particular challenge 
is that the numbering shall be truly automatic, i.e. I don't want to 
specify "starting numbers" after an intermediate title)

Thanks for any hint,
and have a nice day!

- Joerg


PS: Please DO NOT cc me with your reply. I'm already reading the list ;-)


-- 
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: Automatic formatting of a particular word?

2006-02-20 Thread Joerg Hau
Hi Kevin,

> In preamble:
> \newcommand{\PKflasche}{\textit{Die Flasche}}
>
> In text (ERT):
> \PKflasche{}

Inserting ERT in the text is exactly the opposite of what I want to do.

An example of what I am looking for: Open a document in LyX, write e.g. 
"LyX is a kind of LaTeX frontend" (upper/lowercase!), and go to the 
preview ... the two words "LyX" and "LaTeX" are displayed in their very 
particular style, but without any need to have them ERT'd.

... how can I get this behavior with "any" word?

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.


Automatic formatting of a particular word?

2006-02-20 Thread Joerg Hau
Hi again,

Yet another question ... 

I am currently writing a manual for some software, and I would like the 
name of the software to appear automagically in a particular typesetting, 
i.e. without the need for special markup in the text of the document (not 
unlike the proper names of "LyX" and "LaTeX" in the documentation ... you 
get the idea).

(If you need an example: Let's assume the name is MySoft, I want the "My" 
in red, the rest in blue, and the whole thing in sans-serif font and small 
caps. Sufficiently weird? ;-)

The problem is, I don't have the slightest idea about the way to define 
this .. preamble, yes, but how exactly? Any pointers?

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.


"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.


tex2pdf (was: Lyx from the commandline, pdf creation)

2005-11-22 Thread Joerg Hau
Hi,
On Tuesday 22 November 2005 18:15, Stephen Gross wrote:
> I've got a lyx document that I want to turn into a pdf. I know this is
> easy to do through the graphical interface; is there a way to do it via
> the commandline?  

Yes. Get Steffen Evers' script 'tex2pdf', it does all you need from the 
command line - including conversion of hyperlinks, thumbnail generation, 
etc. In spite of its name, it can deal with LyX _and_ LaTeX.

(The script used to be at http://tex2pdf.berlios.de/, but something is 
wrong with that right now ...)

Cheers & HTH,

- 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 and "listings": code is double-spaced when I use copy/paste?

2005-11-21 Thread Joerg Hau
Dear All,

I have a weird problem formatting source code ... using "listings" and LyX 
1.3.6 on a (no ... several ;-) Linux systemS.

If I use the \lstinputlisting directive (i.e. importing a file directly), 
everything works as intended. Fine. 

If I take the same code and copy/paste it in a piece of ERT containing the 
\begin{lstlisting}...\end{lstlisting} "brackets", the whole code is 
displayed double-spaced. Example below. Oops?!

Anyone knows how to work around this problem? In this particular case I 
would like to avoid using \lstinputlisting, since I need a number of small 
code snippets - and the files' location in the filesystem may change.

Any help greatly appreciated :-)

- Joerg


Example follows:

#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass article
\begin_preamble
\usepackage{listings}
\lstset{language=bash,numbers=left,numbersep=5pt,frame=single}
\end_preamble
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 0
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default
\layout Standard

This is a test for the
\emph on
listings
\emph default
package.
\layout Standard

Reading an
\begin_inset Quotes eld
\end_inset

external
\begin_inset Quotes erd
\end_inset

 file:
\layout Standard

\begin_inset ERT
status Open

\layout Standard

\backslash
lstinputlisting[firstline=26,lastline=29]{.bashrc}
\end_inset

\layout Standard

Another example, with code inserted via copy/paste ...
 notice the double-spaced file?
\layout Standard

\begin_inset ERT
status Open

\layout Standard

\backslash
begin{lstlisting}
\layout Standard
# e.g. 57600 or 38400; lowest is 9600 (very slow!)
\layout Standard
#
\layout Standard
export PILOTPORT=/dev/pilot
\layout Standard
export PILOTRATE=115200
\layout Standard
\backslash
end{lstlisting}

\layout Standard
\end_inset
\the_end

-- 
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: Problem converting from LyX 1.1.x to 1.3.5

2005-04-20 Thread Joerg Hau
Hi All,

> You can't insert a graphic in a list item. Looking at the original, you
> had that wrong there too, so you just got lucky. All that has happened
> is that LyX has got better at spotting errors in the LaTeX log file.
>
> To fix your document, I changed all those list items containing
> graphics, so:
>
> 
> item
>   
>   text
> 
>
> to
>
> 
> item
> 
> 
>   
>     graphic
>     text
>   
> 
> 
> item
> 

Thanks a lot for spotting this .. yet: technically this gets rid of the 
error message, but practically the problem is replaced by another one: the 
graphics is no longer where it belongs. 

Indeed I need the graphics (here, a symbolic mouse button) to be the list 
item, with its corresponding text to the right. In other words, the first 
of the above representations is correct, but not the second. 

Since this worked in previous versions, it seems that this construct as 
such is at least "LaTeX-compatible" ... now, JMarc's fix seems to apply to 
LaTeX only, so if there is a solution for LyX I would truly appreciate 
more details :-)

Best regards!

- 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: Problem converting from LyX 1.1.x to 1.3.5

2005-04-20 Thread Joerg Hau
Hi,

> > Another, related question: The LyX file mentioned above includes
> > numerous symbols of mouse buttons, which I formatted as small "inline"
> > graphics in the original document (2.5 mm width). In the LyX 1.3.5
> > editing screen, these are _huge_; is this intended behaviour?
>
> However, if you're worried about it, you can set the size of hte image
> on the LyX screen indenpendent of its size in the output. See the
> graphics dialog.

That was my point ... the "old" LyX version did not have the scaling option 
(upper part of the graphics dialogue); the on-screen display was just 
adapted to the desired output size (lower part). 

The new "scaling" option does the job; I was just confused that this refers 
to the scaling of the _original_ graphics where I would have expected a 
scaling relative to the _output_ size ;-)

Thanks 
and best regards!

- Joerg



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


Problem converting from LyX 1.1.x to 1.3.5

2005-04-18 Thread Joerg Hau
Dear All,

I have a problem with an "old" LyX file (created with LyX 1.1.x; it says 
"\lyxformat 218") that generates lots of error messages.

To reproduce:
(1) Download and unpack 
.

(2) Open doc/msgman21.lyx (it includes a bunch of graphics) in LyX 1.3.5

(3) Select any View; you will run into an error message saying "There were 
errors during the LaTex run. 74 errors detected." As usual, the individual 
error messages are more cryptic than helpful :-(

Second try using tex2pdf:

When I run tex2pdf (3.1b), I get the error message  "! LaTeX Error: 
Something's wrong--perhaps a missing \item." (but more than 74 times ;-), 
However, tex2pdf is sturdy and still generates a PDF, which at first 
glance looks OK ... up to chapter 5, where suddenly the page layout starts 
to change.

Does anyone know what exactly goes wrong here (and, more importantly, how 
to fix it)? I had no problems opening/TeXing many other documents that I 
created with that same "old" version of LyX; only this particular document 
is causing problems.

This problem is reproducible on SuSE 9.0 and RedHat EL3; in both cases LyX 
was compiled from the same source.

Another, related question: The LyX file mentioned above includes numerous 
symbols of mouse buttons, which I formatted as small "inline" graphics in 
the original document (2.5 mm width). In the LyX 1.3.5 editing screen, 
these are _huge_; is this intended behaviour?

Thanks for any help,
and best regards!

- Joerg



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


Re: Shading for all floats in a LyX document, and caption styles

2005-01-23 Thread Joerg Hau
Hi Uwe et al.,

> > I'm currently writing a long document with a number of table
> > floats (actually they contain code snippets). I would like to put
> > a frame around those, and/or use a shaded background.
>
> With the LaTeX-package "float", you can define your own float or
> redefine an existing one. But the package does only provide four
> float styles: plain, plaintop, boxed, and ruled
>
> In the attached example, I redefined the table float in the
> preamble in the style boxed. 

That's already more than I got, but the caption is still outside the 
box :-(

> Because the float package defines the caption label as bold, 
> I used the LaTeX-package "caption" to set the label in sansserif.

"\usepackage[labelfont=sf]{caption}" leads to an error here (LyX 1.3.5 
on a SuSE 9.0)., but with "\usepackage[sf]{caption}", it works as 
intended ... however, this command only sets the caption label, not 
the whole caption. I like to have the whole caption in a different 
font, so I use the following code in the LaTeX Preamble: 

\usepackage{caption2}
\renewcommand\captionfont{\itshape\small}

The problem is that both are overridden if you change the float style 
to "boxed" (which is a nice style for code) ...

> I'm interested in a floatstyle with a colored background. In the
> description of "float" the code is described to define own styles,
> but my plain TeX knowledge lacks.

There are some ideas in the 'fancybox' package, but still is _nothing_ 
about shading the background ...

Thanks & best regards,

- Joerg


-- 
joerg.hau(at)swissonline.ch * Lausanne, Switzerland
"All standard disclaimers apply."
Never take life seriously. You won't get out alive anyway.



Q: Define shading (or frame) for all floats in a LyX document?

2005-01-20 Thread Joerg Hau
Dear All,

I'm currently writing a long document with a number of table floats 
(actually they contain code snippets). I would like to put a frame 
around those, and/or use a shaded background.

Note that I'm not looking for individually shaded cells - I want the 
_whole_ float to have a shaded background (including the caption), 
and it should be defined "once and for all" (e.g. in the preamble). 
It seems to be a dumb question, but I've only found material that was 
basically "TeX-only" ... and most adress each float individually :-(

Is there a straightforward way to tell LyX that it should use a frame 
or shading for _all_ table floats, without the need of adressing them 
one-by-one? 

Any suggestions welcome.

Thanks & best regards,

- Joerg



-- 
joerg.hau(at)swissonline.ch * Lausanne, Switzerland
"All standard disclaimers apply."
Never take life seriously. You won't get out alive anyway.



Re: Creating an URL

2001-10-09 Thread Joerg Hau

> > I would like to have a link as "HTML link" (as above) upon export
> > to HTML, but on the other hand the URL should be _printed_ when
> > the document is converted to DVI/PS/PDF/... In other words:
> >
> > HTML should give
> > http://x.y.z>My Link
> >
> > DVI/PS should give
> > My Link (http://x.y.z)
> >
> > (or a similar format)
> >
> > I'm sure that it can be done (in fact, I was expecting LyX to do
> > that with Insert->URL), but how?
>
> Put the following in the preamble:
>
> \usepackage{html}
> \usepackage{url}
> \latex{\renewcommand{\htmladdnormallink}[2]{#1 (\url{#2})}}

... wonderful, it works like a charm! 

Thanks a lot -- !!

- Joerg
 
 

joerg.hau(at)dplanet.ch * Lausanne, Switzerland
http://www.mysunrise.ch/users/joerg.hau/
"All standard disclaimers apply".



Re: Creating an URL

2001-10-04 Thread joerg . hau

>> Can anybody tell me what to do to create an URL when using document class
>> book (I really would like to avoid document class LinuxDoc) ?
>
> \usepackage{html}
>
> and in text in tex(red)
>
> \htmladdnormallink{the text for the link}{the url for the link}
> 
> for example:
> \htmladdnormallink{LaTeX Description}{file:///home/voss/brief.html}

... very very useful (as usual ;-), thanks Herbert!

One more "how-to" question on the same topic: 

I would like to have a link as "HTML link" (as above) upon export to HTML, 
but on the other hand the URL should be _printed_ when the document is 
converted to DVI/PS/PDF/... In other words:

HTML should give  
http://x.y.z>My Link

DVI/PS should give  
My Link (http://x.y.z)

(or a similar format)

I'm sure that it can be done (in fact, I was expecting LyX to do that with 
Insert->URL), but how?

Greetings from Switzerland!

-- Joerg




joerg.hau(at)dplanet.ch - Lausanne, Switzerland 
http://www.mysunrise.ch/users/joerg.hau/



Fax template?

2001-09-21 Thread joerg . hau

Dear All,

Does anyone have a "generic" fax template that can be used easily with 
LyX ? I've been searching this for a while, but all I found were some 
very "dedicated" LaTeX classes, mostly for universities.

What I would like to obtain is something like this:

   http://www.mysunrise.ch/users/joerg.hau/test/faxtemplate.pdf

... any ideas?

Thanks, 
and greetings from Switzerland!

-- Joerg


-
joerg.hau(at)dplanet.ch - Lausanne, Switzerland 
http://www.diax.ch/users/joerg.hau/



Redefining figure and table header fonts and placement

2001-08-29 Thread joerg . hau

Dear All,

I'm frequently using the "article" and "book" class to write technical 
documents, but I would like to change two things:

- redefine figure and table headers so that they still use the base font, 
  but in a slightly smaller size and in italic.

- redefine the spacing between a table header and the table itself 
  (is at present much too close).

How can I achieve this in LyX ? 

(For illustration, both "problems" are present in the pdf file at
http://www.mysunrise.ch/users/joerg.hau/sci/msgraph/msgman20.pdf)

Cheers & merci d'avance,

-- Joerg




joerg.hau(at)dplanet.ch - Lausanne, Switzerland 
http://www.diax.ch/users/joerg.hau/



Letter: Swiss layout?

2001-08-28 Thread joerg . hau

Dear All,

Sorry if this is a FAQ, but ... using the "dinbrief" or "g-brief" 
layout to write a letter, how can I change the indenting of the 
"send to" address? 

The reason is that Swiss envelopes (those with a transparent address 
window) need the address to be located at ca. 12 cm from the left 
edge of the paper, NOT left-aligned as in most other countries ...

(Usually we move the location/date to the left side of the paper, 
roughly at the same height as the address, but this is yet another 
question ;-)

Cheers & merci,

-- Joerg




joerg.hau(at)dplanet.ch - Lausanne, Switzerland 
http://www.diax.ch/users/joerg.hau/