Re: Using Noun Style for SGML tags

2002-12-12 Thread Chris Lale
José Matos wrote:


  This trick will only work with latex, I was proposing a similar hack but for 
docbook, we would need to output the colour changes, something that we don't 
do now. This is the part that needs coding.

Thanks for the information. Sorry I cannot help with the coding but I am 
not proficient in C or C++. Perhaps in the future ...? Meanwhile, I will 
stick with ERT!

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   :



Re: Using Noun Style for SGML tags

2002-12-12 Thread Chris Lale
José Matos wrote:


  This trick will only work with latex, I was proposing a similar hack but for 
docbook, we would need to output the colour changes, something that we don't 
do now. This is the part that needs coding.

Thanks for the information. Sorry I cannot help with the coding but I am 
not proficient in C or C++. Perhaps in the future ...? Meanwhile, I will 
stick with ERT!

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   :



Re: Using Noun Style for SGML tags

2002-12-12 Thread Chris Lale
José Matos wrote:


  This trick will only work with latex, I was proposing a similar hack but for 
docbook, we would need to output the colour changes, something that we don't 
do now. This is the part that needs coding.

Thanks for the information. Sorry I cannot help with the coding but I am 
not proficient in C or C++. Perhaps in the future ...? Meanwhile, I will 
stick with ERT!

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   :



Re: Using Noun Style for SGML tags

2002-12-10 Thread Chris Lale
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 filenamesome 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   :



Re: Using Noun Style for SGML tags

2002-12-10 Thread José Matos
On Tuesday 10 December 2002 10:26, Chris Lale wrote:
 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.

  I was speaking of a C++ function, Buffer::simpleDocBookOnePar in 
src/buffer.C

 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
 }

  This trick will only work with latex, I was proposing a similar hack but for 
docbook, we would need to output the colour changes, something that we don't 
do now. This is the part that needs coding.

[...]
 Any ideas?

 Cheers,

 Chris.

-- 
José Abílio



Re: Using Noun Style for SGML tags

2002-12-10 Thread Chris Lale
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 filenamesome 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   :



Re: Using Noun Style for SGML tags

2002-12-10 Thread José Matos
On Tuesday 10 December 2002 10:26, Chris Lale wrote:
 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.

  I was speaking of a C++ function, Buffer::simpleDocBookOnePar in 
src/buffer.C

 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
 }

  This trick will only work with latex, I was proposing a similar hack but for 
docbook, we would need to output the colour changes, something that we don't 
do now. This is the part that needs coding.

[...]
 Any ideas?

 Cheers,

 Chris.

-- 
José Abílio



Re: Using Noun Style for SGML tags

2002-12-10 Thread Chris Lale
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 some text.
>
>   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}}{{{#2}}}{}%  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  tags:
	
	 newbie test myfile
	
	
	 Large text
	


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   :



Re: Using Noun Style for SGML tags

2002-12-10 Thread José Matos
On Tuesday 10 December 2002 10:26, Chris Lale wrote:
>> 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.

  I was speaking of a C++ function, Buffer::simpleDocBookOnePar in 
src/buffer.C

> 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}}{{{#2}}}{}%  SGML
> filename tags
> \ifthenelse{\equal{#1}{magenta}}{{\large{\texttt{#2{}%Large text
> \ifthenelse{\equal{#1}{magenta}\or\equal{#1}{blue}}{}{#2}%fallthrough
> }

  This trick will only work with latex, I was proposing a similar hack but for 
docbook, we would need to output the colour changes, something that we don't 
do now. This is the part that needs coding.

[...]
> Any ideas?

> Cheers,
>
> Chris.

-- 
José Abílio



Using Noun Style for SGML tags

2002-12-06 Thread Chris Lale
I am using DocBook article (SGML)in Lyx 1.1.6fix4. I make much use of a 
few inline SGML tags eg filenamesome text/filename. The  ...  tags 
are in red text. I would like to avoid using the red tags by redefining 
Styles in the preamble. Here is the most complex change I wish to make:

Layout  Noun Style
Render as Bold and Typewriter (without Small Caps) in Lyx, DVI, PDF.
Render as filenamesome text/filename when exported to DocBook.

If I can find out how do this, I should be able to redefine other Styles 
to render other SGML tags.

I would be grateful for any suggestions.

Thanks,

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   :



Re: Using Noun Style for SGML tags

2002-12-06 Thread José Matos
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 filenamesome text/filename. The  ...  tags
 are in red text. I would like to avoid using the red tags by redefining
 Styles in the preamble. Here is the most complex change I wish to make:

 Layout  Noun Style
 Render as Bold and Typewriter (without Small Caps) in Lyx, DVI, PDF.
 Render as filenamesome text/filename when exported to DocBook.

 If I can find out how do this, I should be able to redefine other Styles
 to render other SGML tags.

  Similar to that I planned to redirect typewriter font to literal. But where 
the meaning seems obvious.
  Certainly we can define Small Caps to mean filename, but this would be only 
a hack.

  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.

  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 would be grateful for any suggestions.

  I hope this helps,

 Thanks,

 Chris.

-- 
José Abílio



Using Noun Style for SGML tags

2002-12-06 Thread Chris Lale
I am using DocBook article (SGML)in Lyx 1.1.6fix4. I make much use of a 
few inline SGML tags eg filenamesome text/filename. The  ...  tags 
are in red text. I would like to avoid using the red tags by redefining 
Styles in the preamble. Here is the most complex change I wish to make:

Layout  Noun Style
Render as Bold and Typewriter (without Small Caps) in Lyx, DVI, PDF.
Render as filenamesome text/filename when exported to DocBook.

If I can find out how do this, I should be able to redefine other Styles 
to render other SGML tags.

I would be grateful for any suggestions.

Thanks,

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   :



Re: Using Noun Style for SGML tags

2002-12-06 Thread José Matos
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 filenamesome text/filename. The  ...  tags
 are in red text. I would like to avoid using the red tags by redefining
 Styles in the preamble. Here is the most complex change I wish to make:

 Layout  Noun Style
 Render as Bold and Typewriter (without Small Caps) in Lyx, DVI, PDF.
 Render as filenamesome text/filename when exported to DocBook.

 If I can find out how do this, I should be able to redefine other Styles
 to render other SGML tags.

  Similar to that I planned to redirect typewriter font to literal. But where 
the meaning seems obvious.
  Certainly we can define Small Caps to mean filename, but this would be only 
a hack.

  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.

  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 would be grateful for any suggestions.

  I hope this helps,

 Thanks,

 Chris.

-- 
José Abílio



Using Noun Style for SGML tags

2002-12-06 Thread Chris Lale
I am using DocBook article (SGML)in Lyx 1.1.6fix4. I make much use of a 
few inline SGML tags eg some text. The < ... > tags 
are in red text. I would like to avoid using the red tags by redefining 
Styles in the preamble. Here is the most complex change I wish to make:

Layout > Noun Style
Render as Bold and Typewriter (without Small Caps) in Lyx, DVI, PDF.
Render as some text when exported to DocBook.

If I can find out how do this, I should be able to redefine other Styles 
to render other SGML tags.

I would be grateful for any suggestions.

Thanks,

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   :



Re: Using Noun Style for SGML tags

2002-12-06 Thread José Matos
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 some text. The < ... > tags
> are in red text. I would like to avoid using the red tags by redefining
> Styles in the preamble. Here is the most complex change I wish to make:
>
> Layout > Noun Style
> Render as Bold and Typewriter (without Small Caps) in Lyx, DVI, PDF.
> Render as some text when exported to DocBook.
>
> If I can find out how do this, I should be able to redefine other Styles
> to render other SGML tags.

  Similar to that I planned to redirect typewriter font to literal. But where 
the meaning seems obvious.
  Certainly we can define Small Caps to mean filename, but this would be only 
a hack.

  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.

  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 would be grateful for any suggestions.

  I hope this helps,

> Thanks,
>
> Chris.

-- 
José Abílio