[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [eLyXer-users] Indented, color-coded Code Samples with eLyXer

From: Jack Desert
Subject: Re: [eLyXer-users] Indented, color-coded Code Samples with eLyXer
Date: Sat, 19 May 2012 09:45:17 -0400


Thanks for your help in figuring this out. Had I known that browsers
normally interpret <pre> tags as "whitespace: pre;", I might have
realized my blunder sooner.

(Enter embarrassing moment)...I was actually using the LyXHtml
converter instead of eLyXer and I didn't know it. (LyXHtml wraps
LyX-Code in <div class="lyx_code_item">, whereas eLyXer wraps it in
<pre class='LyX-Code'>.)

 Once I swapped over to eLyXer (which I thought I was already using),
Firefox displayed the indentation beautifully. My apologies for the
mixup on my end.

So I spent a few minutes to get all my LyX converter paths set up and
clearly labeled in my LyX export menu:

  Export as:
    - LyXHtml
    - Html (eLyXer)
    - LyXBlogger (via LyXHtml)
    - LyXBlogger (via eLyXer)

And for now I'm leaving in the footers that say:

  Document generated by eLyXer 1.2.3 (2011-08-31) on 2012-05-19T08:36:46.660515


On Fri, May 18, 2012 at 5:44 PM, Alex Fernandez <address@hidden> wrote:
> Hi Jack,
> On Fri, May 18, 2012 at 5:21 AM, Jack Desert <address@hidden> wrote:
>> How do I get mine to do that? I write some code as a LyXCode block,
>> but this is the result:
>> <pre class="LyX-Code">
>> def something
>>  if something_else
>>    play_ball
>>  end
>> end
>> </pre>
>> Note they are just regular spaces (not non-breaking ones), so when I
>> view this through the browser they show up as just a single space
>> instead of several in a row.
> No problem, your browser should treat spaces inside a <pre> tag as
> non-breaking spaces. Just let the <pre> element have: white-space: pre.
>   http://www.quirksmode.org/css/whitespace.html
> Anyway, take a look at the dev guide LyX doc inside the eLyXer distribution.
> There are two ways: LyX-Code and an algorithm (code listing) which is
> slightly different.
> Alex.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]