José Matos wrote:
> On Friday 06 December 2002 10:04, Chris Lale wrote:
>
>>I am using DocBook article (SGML)in Lyx 1.1.6fix4. I make much use of a
>>few inline SGML tags eg <filename>some text</filename>.
>
> Instead of adding this kind of hacks I would prefer to work in the full
> solution, as it is easier to maintain in the long term. And the proper fix is
> to add support for styles in lyx.
>
> If you still want to make this work, I can give some tips where to look for.
> Actually you only need to change the code in one function, so it shouldn't be
> too hard.

If this means modifying text configuration files, yes please - I will
have a go. I am not proficient in C though.

>
> Now if you want to fake some styles we can use the colours, that clearly
> don't have any counterparts in docbook and use them for different styles. But
> this only shows how much we need real user defined styles in lyx.

I did try this (modified from the troubleshooters.com Linux Productivity
Magazine), but it did not work in 'DocBook article (SGML)':

------------------------------------------------
Layout > LaTex Preamble...

% %%% Pseudo character styles indexed by color %%%
\usepackage{ifthen}
\providecommand{\textcolor}[2]{#2}
\renewcommand{\textcolor}[2]{%
\ifthenelse{\equal{#1}{blue}}{{<filename>{#2}</filename>}}{}% SGML
filename tags
\ifthenelse{\equal{#1}{magenta}}{{\large{\texttt{#2}}}}{}% Large text
\ifthenelse{\equal{#1}{magenta}\or\equal{#1}{blue}}{}{#2}% fallthrough
}

------------------------------------------------
Here is the text in Lyx ('myfile' is blue and 'Large' is magenta):

newbie test myfile
Large text

------------------------------------------------
This produced unaltered text when viewed in DVI.
With Export > DocBook, the SGML file contained no <filename> tags:
<para>
newbie test myfile
</para>
<para>
Large text
</para>


Also, the preamble was printed at the top of both the DVI and the SGML
documents.

If I change the document from 'DocBook article (SGML)' to 'article' and
view in DVI, the magenta text is in large type, and the preamble is not
printed at the top.

Any ideas?

Cheers,

Chris.
--
: ___ Chris Lale <[EMAIL PROTECTED]> :
: / \ :
: | <_/ My PC runs Debian GNU/Linux 3.0. :
: \ Robust, secure and free operating system + applications. :
: \ Available at http://www.debian.org :

Reply via email to