Re: text styles

2009-05-05 Thread Helge Hafting

Drew Kime wrote:


Does anyone know of a tool that helps in the building of new styles? I've
learned enough Latex to tweak existing styles, etc. but I'm a writer, not a
typesetter. I know my book looks better when I use Lyx/Latex than with
something like OpenOffice, so I'll keep using it. Still, every time I have
to dig into Latex code to change a style, I think about how easy that is to
do in OOo.



Even if a good style editor is made, it won't save you from needing 
some latex knowledge. Such a thing can easily save you from having to 
know the format of .layout files though, they  are LyX constructs.


But once you need some special latex command, you still have to know 
that command. Unless someone makes a style editor that knows all of 
latex, which isn't realistic.


Helge Hafting



Re: text styles

2009-05-05 Thread Helge Hafting

Drew Kime wrote:


Does anyone know of a tool that helps in the building of new styles? I've
learned enough Latex to tweak existing styles, etc. but I'm a writer, not a
typesetter. I know my book looks better when I use Lyx/Latex than with
something like OpenOffice, so I'll keep using it. Still, every time I have
to dig into Latex code to change a style, I think about how easy that is to
do in OOo.



Even if a good style editor is made, it won't save you from needing 
some latex knowledge. Such a thing can easily save you from having to 
know the format of .layout files though, they  are LyX constructs.


But once you need some special latex command, you still have to know 
that command. Unless someone makes a style editor that knows all of 
latex, which isn't realistic.


Helge Hafting



Re: text styles

2009-05-05 Thread Helge Hafting

Drew Kime wrote:


Does anyone know of a tool that helps in the building of new styles? I've
learned enough Latex to tweak existing styles, etc. but I'm a writer, not a
typesetter. I know my book looks better when I use Lyx/Latex than with
something like OpenOffice, so I'll keep using it. Still, every time I have
to dig into Latex code to change a style, I think about how easy that is to
do in OOo.



Even if a good "style editor" is made, it won't save you from needing 
some latex knowledge. Such a thing can easily save you from having to 
know the format of .layout files though, they  are LyX constructs.


But once you need some special latex command, you still have to know 
that command. Unless someone makes a style editor that knows all of 
latex, which isn't realistic.


Helge Hafting



Re: text styles

2009-04-30 Thread Helge Hafting

Drew Kime wrote:

2009/4/28 Steve Litt sl...@troubleshooters.com


Lyx has an option to specify a typewriter face. Simply highlight the

text,

click on Edit-Text Style-Customized, and under Family select
Typewriter. Then check what it does to the code, and do a global replace

to

get all occurrences.

You can do that, but in my opinion it's a bad idea because the text should
be
Typewriter for some specific reason. There could be several parts that are
Typewriter faced for different reasons, and once you say typewriter face,
you've put them all in one bucket. If you use character styles instead,
then
if later you decide a certain category should also be boldface, you can do
that.



In principle I agree with you. But I've found designing my own type styles
somewhat less than user friendly. I'm sure it's one of those things that,
once learned, seems second nature. But the learning curve is pretty steep.


Indeed, but it might be worth it for an entire book.
Now while lyx styles may be hard to make for the average word processor 
user. I don't think it is so hard for someone who already understands 
and can deal with latex.


Helge Hafting


Re: text styles

2009-04-30 Thread Guenter Milde
On 2009-04-30, Helge Hafting wrote:
 Drew Kime wrote:

 ... I've found designing my own type styles somewhat less than user
 friendly. I'm sure it's one of those things that, once learned, seems
 second nature. But the learning curve is pretty steep.

 Indeed, but it might be worth it for an entire book.
 Now while lyx styles may be hard to make for the average word processor 
 user. I don't think it is so hard for someone who already understands 
 and can deal with latex.

My advice is to use an existing module (e.g. logicalmkup.module) as
starting point. There is a whole selection under LYXDIR/layout/ (where
LYXDIR is a system/installation dependent location, e.g.
/usr/share/lyx/).

Günter



Re: text styles

2009-04-30 Thread Drew Kime
On Thu, Apr 30, 2009 at 8:50 AM, Guenter Milde mi...@users.berlios.dewrote:

 My advice is to use an existing module (e.g. logicalmkup.module) as
 starting point. There is a whole selection under LYXDIR/layout/ (where
 LYXDIR is a system/installation dependent location, e.g.
 /usr/share/lyx/).


Does anyone know of a tool that helps in the building of new styles? I've
learned enough Latex to tweak existing styles, etc. but I'm a writer, not a
typesetter. I know my book looks better when I use Lyx/Latex than with
something like OpenOffice, so I'll keep using it. Still, every time I have
to dig into Latex code to change a style, I think about how easy that is to
do in OOo.

Thanks in advance for any pointers.

Drew


Re: text styles

2009-04-30 Thread Richard Heck

Drew Kime wrote:

On Thu, Apr 30, 2009 at 8:50 AM, Guenter Milde mi...@users.berlios.dewrote:

  

My advice is to use an existing module (e.g. logicalmkup.module) as
starting point. There is a whole selection under LYXDIR/layout/ (where
LYXDIR is a system/installation dependent location, e.g.
/usr/share/lyx/).




Does anyone know of a tool that helps in the building of new styles? I've
learned enough Latex to tweak existing styles, etc. but I'm a writer, not a
typesetter. I know my book looks better when I use Lyx/Latex than with
something like OpenOffice, so I'll keep using it. Still, every time I have
to dig into Latex code to change a style, I think about how easy that is to
do in OOo.

  
This is an often requested new feature. At the moment, the best tool is 
this mailing list. Ask away.


rh



Re: text styles

2009-04-30 Thread Helge Hafting

Drew Kime wrote:

2009/4/28 Steve Litt sl...@troubleshooters.com


Lyx has an option to specify a typewriter face. Simply highlight the

text,

click on Edit-Text Style-Customized, and under Family select
Typewriter. Then check what it does to the code, and do a global replace

to

get all occurrences.

You can do that, but in my opinion it's a bad idea because the text should
be
Typewriter for some specific reason. There could be several parts that are
Typewriter faced for different reasons, and once you say typewriter face,
you've put them all in one bucket. If you use character styles instead,
then
if later you decide a certain category should also be boldface, you can do
that.



In principle I agree with you. But I've found designing my own type styles
somewhat less than user friendly. I'm sure it's one of those things that,
once learned, seems second nature. But the learning curve is pretty steep.


Indeed, but it might be worth it for an entire book.
Now while lyx styles may be hard to make for the average word processor 
user. I don't think it is so hard for someone who already understands 
and can deal with latex.


Helge Hafting


Re: text styles

2009-04-30 Thread Guenter Milde
On 2009-04-30, Helge Hafting wrote:
 Drew Kime wrote:

 ... I've found designing my own type styles somewhat less than user
 friendly. I'm sure it's one of those things that, once learned, seems
 second nature. But the learning curve is pretty steep.

 Indeed, but it might be worth it for an entire book.
 Now while lyx styles may be hard to make for the average word processor 
 user. I don't think it is so hard for someone who already understands 
 and can deal with latex.

My advice is to use an existing module (e.g. logicalmkup.module) as
starting point. There is a whole selection under LYXDIR/layout/ (where
LYXDIR is a system/installation dependent location, e.g.
/usr/share/lyx/).

Günter



Re: text styles

2009-04-30 Thread Drew Kime
On Thu, Apr 30, 2009 at 8:50 AM, Guenter Milde mi...@users.berlios.dewrote:

 My advice is to use an existing module (e.g. logicalmkup.module) as
 starting point. There is a whole selection under LYXDIR/layout/ (where
 LYXDIR is a system/installation dependent location, e.g.
 /usr/share/lyx/).


Does anyone know of a tool that helps in the building of new styles? I've
learned enough Latex to tweak existing styles, etc. but I'm a writer, not a
typesetter. I know my book looks better when I use Lyx/Latex than with
something like OpenOffice, so I'll keep using it. Still, every time I have
to dig into Latex code to change a style, I think about how easy that is to
do in OOo.

Thanks in advance for any pointers.

Drew


Re: text styles

2009-04-30 Thread Richard Heck

Drew Kime wrote:

On Thu, Apr 30, 2009 at 8:50 AM, Guenter Milde mi...@users.berlios.dewrote:

  

My advice is to use an existing module (e.g. logicalmkup.module) as
starting point. There is a whole selection under LYXDIR/layout/ (where
LYXDIR is a system/installation dependent location, e.g.
/usr/share/lyx/).




Does anyone know of a tool that helps in the building of new styles? I've
learned enough Latex to tweak existing styles, etc. but I'm a writer, not a
typesetter. I know my book looks better when I use Lyx/Latex than with
something like OpenOffice, so I'll keep using it. Still, every time I have
to dig into Latex code to change a style, I think about how easy that is to
do in OOo.

  
This is an often requested new feature. At the moment, the best tool is 
this mailing list. Ask away.


rh



Re: text styles

2009-04-30 Thread Helge Hafting

Drew Kime wrote:

2009/4/28 Steve Litt 


Lyx has an option to specify a typewriter face. Simply highlight the

text,

click on Edit->Text Style->Customized, and under "Family" select
Typewriter. Then check what it does to the code, and do a global replace

to

get all occurrences.

You can do that, but in my opinion it's a bad idea because the text should
be
Typewriter for some specific reason. There could be several parts that are
Typewriter faced for different reasons, and once you say "typewriter face",
you've put them all in one bucket. If you use character styles instead,
then
if later you decide a certain category should also be boldface, you can do
that.



In principle I agree with you. But I've found designing my own type styles
somewhat less than user friendly. I'm sure it's one of those things that,
once learned, seems second nature. But the learning curve is pretty steep.


Indeed, but it might be worth it for an entire book.
Now while lyx styles may be hard to make for the average word processor 
user. I don't think it is so hard for someone who already understands 
and can deal with latex.


Helge Hafting


Re: text styles

2009-04-30 Thread Guenter Milde
On 2009-04-30, Helge Hafting wrote:
> Drew Kime wrote:

>> ... I've found designing my own type styles somewhat less than user
>> friendly. I'm sure it's one of those things that, once learned, seems
>> second nature. But the learning curve is pretty steep.

> Indeed, but it might be worth it for an entire book.
> Now while lyx styles may be hard to make for the average word processor 
> user. I don't think it is so hard for someone who already understands 
> and can deal with latex.

My advice is to use an existing module (e.g. logicalmkup.module) as
starting point. There is a whole selection under LYXDIR/layout/ (where
LYXDIR is a system/installation dependent location, e.g.
/usr/share/lyx/).

Günter



Re: text styles

2009-04-30 Thread Drew Kime
On Thu, Apr 30, 2009 at 8:50 AM, Guenter Milde wrote:

> My advice is to use an existing module (e.g. logicalmkup.module) as
> starting point. There is a whole selection under LYXDIR/layout/ (where
> LYXDIR is a system/installation dependent location, e.g.
> /usr/share/lyx/).
>

Does anyone know of a tool that helps in the building of new styles? I've
learned enough Latex to tweak existing styles, etc. but I'm a writer, not a
typesetter. I know my book looks better when I use Lyx/Latex than with
something like OpenOffice, so I'll keep using it. Still, every time I have
to dig into Latex code to change a style, I think about how easy that is to
do in OOo.

Thanks in advance for any pointers.

Drew


Re: text styles

2009-04-30 Thread Richard Heck

Drew Kime wrote:

On Thu, Apr 30, 2009 at 8:50 AM, Guenter Milde wrote:

  

My advice is to use an existing module (e.g. logicalmkup.module) as
starting point. There is a whole selection under LYXDIR/layout/ (where
LYXDIR is a system/installation dependent location, e.g.
/usr/share/lyx/).




Does anyone know of a tool that helps in the building of new styles? I've
learned enough Latex to tweak existing styles, etc. but I'm a writer, not a
typesetter. I know my book looks better when I use Lyx/Latex than with
something like OpenOffice, so I'll keep using it. Still, every time I have
to dig into Latex code to change a style, I think about how easy that is to
do in OOo.

  
This is an often requested new feature. At the moment, the best tool is 
this mailing list. Ask away.


rh



Re: text styles

2009-04-28 Thread Paul A. Rubin

tedc wrote:



I do have one question, though. The OO file used text styles to specify
the formatting of inline source code, names of GUI tools, and chapter
crossreferences. In LyX these show up as ERT, like the boldfaced bit here:
\textstyleInlinecode{for i=0,n-1}
When I click on View DVI, these generate Undefined control sequence
errors.

I could, of course, use sed or awk to replace these with LyX markup that
would force the correct typeface (in this case, the typewriter family),
but I'd rather leave the markup unchanged, and have LyX or LaTeX figure out
what to do.

So my question is: how do I tell LyX or LaTeX that
\textstyleInlinecode{for i=0,n-1}
means to render
for i=0,n-1
with a specified typeface? or at least as typewriter?


Early in the TeX file that OO emitted, there should be a definition of 
the \textstyleInlinecode command, something like 
\newcommand{\textstyleInlinecode}{...} (or possibly \providecommand 
rather than \newcommand).  If you copy that and paste it into the 
preamble of your LyX document, it should do the job.  For long-term 
document maintenance I'd be inclined to go the route Richard suggests, 
but the above should work as a short term hack.  The one catch is that 
it will (hopefully) display the text correctly in the PDF (or whatever) 
output, but in the LyX GUI I believe you'll get the LyX commands and not 
the formatted text.


/Paul




Re: text styles

2009-04-28 Thread Steve Litt
On Monday 27 April 2009 11:51:38 pm Drew Kime wrote:
 On Mon, Apr 27, 2009 at 8:02 PM, tedc carneva...@sbcglobal.net wrote:
  So my question is: how do I tell LyX or LaTeX that
  \textstyleInlinecode{for i=0,n-1}
  means to render
  for i=0,n-1
  with a specified typeface? or at least as typewriter?
  --

 Lyx has an option to specify a typewriter face. Simply highlight the text,
 click on Edit-Text Style-Customized, and under Family select
 Typewriter. Then check what it does to the code, and do a global replace to
 get all occurrences.

 Drew

You can do that, but in my opinion it's a bad idea because the text should be 
Typewriter for some specific reason. There could be several parts that are 
Typewriter faced for different reasons, and once you say typewriter face, 
you've put them all in one bucket. If you use character styles instead, then 
if later you decide a certain category should also be boldface, you can do 
that.

STevET

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt



Re: text styles

2009-04-28 Thread Drew Kime
2009/4/28 Steve Litt sl...@troubleshooters.com

  Lyx has an option to specify a typewriter face. Simply highlight the
 text,
  click on Edit-Text Style-Customized, and under Family select
  Typewriter. Then check what it does to the code, and do a global replace
 to
  get all occurrences.

 You can do that, but in my opinion it's a bad idea because the text should
 be
 Typewriter for some specific reason. There could be several parts that are
 Typewriter faced for different reasons, and once you say typewriter face,
 you've put them all in one bucket. If you use character styles instead,
 then
 if later you decide a certain category should also be boldface, you can do
 that.


In principle I agree with you. But I've found designing my own type styles
somewhat less than user friendly. I'm sure it's one of those things that,
once learned, seems second nature. But the learning curve is pretty steep.

Drew


Re: text styles

2009-04-28 Thread rgheck

Drew Kime wrote:

2009/4/28 Steve Litt sl...@troubleshooters.com

  

Lyx has an option to specify a typewriter face. Simply highlight the
  

text,


click on Edit-Text Style-Customized, and under Family select
Typewriter. Then check what it does to the code, and do a global replace
  

to


get all occurrences.
  

You can do that, but in my opinion it's a bad idea because the text should
be
Typewriter for some specific reason. There could be several parts that are
Typewriter faced for different reasons, and once you say typewriter face,
you've put them all in one bucket. If you use character styles instead,
then
if later you decide a certain category should also be boldface, you can do
that.


In principle I agree with you. But I've found designing my own type styles
somewhat less than user friendly. I'm sure it's one of those things that,
once learned, seems second nature. But the learning curve is pretty steep.

  

Try using the pre-defined Code style. You can get used to that very fast.

rh



Re: text styles

2009-04-28 Thread Paul A. Rubin

tedc wrote:



I do have one question, though. The OO file used text styles to specify
the formatting of inline source code, names of GUI tools, and chapter
crossreferences. In LyX these show up as ERT, like the boldfaced bit here:
\textstyleInlinecode{for i=0,n-1}
When I click on View DVI, these generate Undefined control sequence
errors.

I could, of course, use sed or awk to replace these with LyX markup that
would force the correct typeface (in this case, the typewriter family),
but I'd rather leave the markup unchanged, and have LyX or LaTeX figure out
what to do.

So my question is: how do I tell LyX or LaTeX that
\textstyleInlinecode{for i=0,n-1}
means to render
for i=0,n-1
with a specified typeface? or at least as typewriter?


Early in the TeX file that OO emitted, there should be a definition of 
the \textstyleInlinecode command, something like 
\newcommand{\textstyleInlinecode}{...} (or possibly \providecommand 
rather than \newcommand).  If you copy that and paste it into the 
preamble of your LyX document, it should do the job.  For long-term 
document maintenance I'd be inclined to go the route Richard suggests, 
but the above should work as a short term hack.  The one catch is that 
it will (hopefully) display the text correctly in the PDF (or whatever) 
output, but in the LyX GUI I believe you'll get the LyX commands and not 
the formatted text.


/Paul




Re: text styles

2009-04-28 Thread Steve Litt
On Monday 27 April 2009 11:51:38 pm Drew Kime wrote:
 On Mon, Apr 27, 2009 at 8:02 PM, tedc carneva...@sbcglobal.net wrote:
  So my question is: how do I tell LyX or LaTeX that
  \textstyleInlinecode{for i=0,n-1}
  means to render
  for i=0,n-1
  with a specified typeface? or at least as typewriter?
  --

 Lyx has an option to specify a typewriter face. Simply highlight the text,
 click on Edit-Text Style-Customized, and under Family select
 Typewriter. Then check what it does to the code, and do a global replace to
 get all occurrences.

 Drew

You can do that, but in my opinion it's a bad idea because the text should be 
Typewriter for some specific reason. There could be several parts that are 
Typewriter faced for different reasons, and once you say typewriter face, 
you've put them all in one bucket. If you use character styles instead, then 
if later you decide a certain category should also be boldface, you can do 
that.

STevET

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt



Re: text styles

2009-04-28 Thread Drew Kime
2009/4/28 Steve Litt sl...@troubleshooters.com

  Lyx has an option to specify a typewriter face. Simply highlight the
 text,
  click on Edit-Text Style-Customized, and under Family select
  Typewriter. Then check what it does to the code, and do a global replace
 to
  get all occurrences.

 You can do that, but in my opinion it's a bad idea because the text should
 be
 Typewriter for some specific reason. There could be several parts that are
 Typewriter faced for different reasons, and once you say typewriter face,
 you've put them all in one bucket. If you use character styles instead,
 then
 if later you decide a certain category should also be boldface, you can do
 that.


In principle I agree with you. But I've found designing my own type styles
somewhat less than user friendly. I'm sure it's one of those things that,
once learned, seems second nature. But the learning curve is pretty steep.

Drew


Re: text styles

2009-04-28 Thread rgheck

Drew Kime wrote:

2009/4/28 Steve Litt sl...@troubleshooters.com

  

Lyx has an option to specify a typewriter face. Simply highlight the
  

text,


click on Edit-Text Style-Customized, and under Family select
Typewriter. Then check what it does to the code, and do a global replace
  

to


get all occurrences.
  

You can do that, but in my opinion it's a bad idea because the text should
be
Typewriter for some specific reason. There could be several parts that are
Typewriter faced for different reasons, and once you say typewriter face,
you've put them all in one bucket. If you use character styles instead,
then
if later you decide a certain category should also be boldface, you can do
that.


In principle I agree with you. But I've found designing my own type styles
somewhat less than user friendly. I'm sure it's one of those things that,
once learned, seems second nature. But the learning curve is pretty steep.

  

Try using the pre-defined Code style. You can get used to that very fast.

rh



Re: text styles

2009-04-28 Thread Paul A. Rubin

tedc wrote:



I do have one question, though. The OO file used "text styles" to specify
the formatting of inline source code, names of GUI tools, and chapter
crossreferences. In LyX these show up as ERT, like the boldfaced bit here:
\textstyleInlinecode{for i=0,n-1}
When I click on View DVI, these generate "Undefined control sequence"
errors.

I could, of course, use sed or awk to replace these with LyX markup that
would force the "correct" typeface (in this case, the typewriter family),
but I'd rather leave the markup unchanged, and have LyX or LaTeX figure out
what to do.

So my question is: how do I tell LyX or LaTeX that
\textstyleInlinecode{for i=0,n-1}
means to render
for i=0,n-1
with a specified typeface? or at least as "typewriter"?


Early in the TeX file that OO emitted, there should be a definition of 
the \textstyleInlinecode command, something like 
\newcommand{\textstyleInlinecode}{...} (or possibly \providecommand 
rather than \newcommand).  If you copy that and paste it into the 
preamble of your LyX document, it should do the job.  For long-term 
document maintenance I'd be inclined to go the route Richard suggests, 
but the above should work as a short term hack.  The one catch is that 
it will (hopefully) display the text correctly in the PDF (or whatever) 
output, but in the LyX GUI I believe you'll get the LyX commands and not 
the formatted text.


/Paul




Re: text styles

2009-04-28 Thread Steve Litt
On Monday 27 April 2009 11:51:38 pm Drew Kime wrote:
> On Mon, Apr 27, 2009 at 8:02 PM, tedc  wrote:
> > So my question is: how do I tell LyX or LaTeX that
> > \textstyleInlinecode{for i=0,n-1}
> > means to render
> > for i=0,n-1
> > with a specified typeface? or at least as "typewriter"?
> > --
>
> Lyx has an option to specify a typewriter face. Simply highlight the text,
> click on Edit->Text Style->Customized, and under "Family" select
> Typewriter. Then check what it does to the code, and do a global replace to
> get all occurrences.
>
> Drew

You can do that, but in my opinion it's a bad idea because the text should be 
Typewriter for some specific reason. There could be several parts that are 
Typewriter faced for different reasons, and once you say "typewriter face", 
you've put them all in one bucket. If you use character styles instead, then 
if later you decide a certain category should also be boldface, you can do 
that.

STevET

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt



Re: text styles

2009-04-28 Thread Drew Kime
2009/4/28 Steve Litt 

> > Lyx has an option to specify a typewriter face. Simply highlight the
> text,
> > click on Edit->Text Style->Customized, and under "Family" select
> > Typewriter. Then check what it does to the code, and do a global replace
> to
> > get all occurrences.
>
> You can do that, but in my opinion it's a bad idea because the text should
> be
> Typewriter for some specific reason. There could be several parts that are
> Typewriter faced for different reasons, and once you say "typewriter face",
> you've put them all in one bucket. If you use character styles instead,
> then
> if later you decide a certain category should also be boldface, you can do
> that.


In principle I agree with you. But I've found designing my own type styles
somewhat less than user friendly. I'm sure it's one of those things that,
once learned, seems second nature. But the learning curve is pretty steep.

Drew


Re: text styles

2009-04-28 Thread rgheck

Drew Kime wrote:

2009/4/28 Steve Litt 

  

Lyx has an option to specify a typewriter face. Simply highlight the
  

text,


click on Edit->Text Style->Customized, and under "Family" select
Typewriter. Then check what it does to the code, and do a global replace
  

to


get all occurrences.
  

You can do that, but in my opinion it's a bad idea because the text should
be
Typewriter for some specific reason. There could be several parts that are
Typewriter faced for different reasons, and once you say "typewriter face",
you've put them all in one bucket. If you use character styles instead,
then
if later you decide a certain category should also be boldface, you can do
that.


In principle I agree with you. But I've found designing my own type styles
somewhat less than user friendly. I'm sure it's one of those things that,
once learned, seems second nature. But the learning curve is pretty steep.

  

Try using the pre-defined Code style. You can get used to that very fast.

rh



text styles

2009-04-27 Thread tedc

I'm thinking of using LyX to write the 2nd edition of a book. The 1st edition
was done with OpenOffice, but production was a nightmare because OO didn't
fit with the publisher's workflow. The publisher had the whole thing
retyped, which introduced countless errors and generally broke formatting--a
major concern in this book which contains lots of source code, mathematical
symbols, chemical reaction notation etc.. 

The publisher will accept LaTeX, which gives LyX a tremendous potential
advantage. Exporting from OO to tex does damage some of the formatting, but
it does preserve many essentials such as index tags. The resulting files
import into LyX, seem to work more or less with the publisher's cls file,
and it looks like I can repair the broken formatting with LyX.

I do have one question, though. The OO file used text styles to specify
the formatting of inline source code, names of GUI tools, and chapter
crossreferences. In LyX these show up as ERT, like the boldfaced bit here:
\textstyleInlinecode{for i=0,n-1}
When I click on View DVI, these generate Undefined control sequence
errors.

I could, of course, use sed or awk to replace these with LyX markup that
would force the correct typeface (in this case, the typewriter family),
but I'd rather leave the markup unchanged, and have LyX or LaTeX figure out
what to do.

So my question is: how do I tell LyX or LaTeX that
\textstyleInlinecode{for i=0,n-1}
means to render
for i=0,n-1
with a specified typeface? or at least as typewriter?
-- 
View this message in context: 
http://n2.nabble.com/text-styles-tp2729258p2729258.html
Sent from the LyX - Users mailing list archive at Nabble.com.



Re: text styles

2009-04-27 Thread rgheck

tedc wrote:

I'm thinking of using LyX to write the 2nd edition of a book. The 1st edition
was done with OpenOffice, but production was a nightmare because OO didn't
fit with the publisher's workflow. The publisher had the whole thing
retyped, which introduced countless errors and generally broke formatting--a
major concern in this book which contains lots of source code, mathematical
symbols, chemical reaction notation etc.. 


The publisher will accept LaTeX, which gives LyX a tremendous potential
advantage. Exporting from OO to tex does damage some of the formatting, but
it does preserve many essentials such as index tags. The resulting files
import into LyX, seem to work more or less with the publisher's cls file,
and it looks like I can repair the broken formatting with LyX.

I do have one question, though. The OO file used text styles to specify
the formatting of inline source code, names of GUI tools, and chapter
crossreferences. In LyX these show up as ERT, like the boldfaced bit here:
\textstyleInlinecode{for i=0,n-1}
When I click on View DVI, these generate Undefined control sequence
errors.

I could, of course, use sed or awk to replace these with LyX markup that
would force the correct typeface (in this case, the typewriter family),
but I'd rather leave the markup unchanged, and have LyX or LaTeX figure out
what to do.

So my question is: how do I tell LyX or LaTeX that
\textstyleInlinecode{for i=0,n-1}
means to render
for i=0,n-1
with a specified typeface? or at least as typewriter?

  
There are going to be a lot of ways to do this. But I think all of them 
will involve using sed or whatever to replace this kind of command with 
something more sensible, preferably, a LyX character style. I think the 
way to go here would be to do the import into LyX and then write a 
script to convert things that will look more or less like this:


\begin_inset ERT
\begin_layout Plain Layout

\textstyleInlinecode{for i=0,n-1}
\end_layout
\end_inset

with something more like this:

\begin_layout Flex CharStyle:Code
status closed

\begin_layout Plain Layout

for i=0,n=1
\end_layout
\end_inset

This is easy, eventually, though fiddly.

In this case, you can use the Logical Markup module, which already 
defines the Code charstyle. In other cases, you may want to roll your own.


rh



Re: text styles

2009-04-27 Thread Drew Kime
On Mon, Apr 27, 2009 at 8:02 PM, tedc carneva...@sbcglobal.net wrote:

 So my question is: how do I tell LyX or LaTeX that
 \textstyleInlinecode{for i=0,n-1}
 means to render
 for i=0,n-1
 with a specified typeface? or at least as typewriter?
 --


Lyx has an option to specify a typewriter face. Simply highlight the text,
click on Edit-Text Style-Customized, and under Family select Typewriter.
Then check what it does to the code, and do a global replace to get all
occurrences.

Drew


text styles

2009-04-27 Thread tedc

I'm thinking of using LyX to write the 2nd edition of a book. The 1st edition
was done with OpenOffice, but production was a nightmare because OO didn't
fit with the publisher's workflow. The publisher had the whole thing
retyped, which introduced countless errors and generally broke formatting--a
major concern in this book which contains lots of source code, mathematical
symbols, chemical reaction notation etc.. 

The publisher will accept LaTeX, which gives LyX a tremendous potential
advantage. Exporting from OO to tex does damage some of the formatting, but
it does preserve many essentials such as index tags. The resulting files
import into LyX, seem to work more or less with the publisher's cls file,
and it looks like I can repair the broken formatting with LyX.

I do have one question, though. The OO file used text styles to specify
the formatting of inline source code, names of GUI tools, and chapter
crossreferences. In LyX these show up as ERT, like the boldfaced bit here:
\textstyleInlinecode{for i=0,n-1}
When I click on View DVI, these generate Undefined control sequence
errors.

I could, of course, use sed or awk to replace these with LyX markup that
would force the correct typeface (in this case, the typewriter family),
but I'd rather leave the markup unchanged, and have LyX or LaTeX figure out
what to do.

So my question is: how do I tell LyX or LaTeX that
\textstyleInlinecode{for i=0,n-1}
means to render
for i=0,n-1
with a specified typeface? or at least as typewriter?
-- 
View this message in context: 
http://n2.nabble.com/text-styles-tp2729258p2729258.html
Sent from the LyX - Users mailing list archive at Nabble.com.



Re: text styles

2009-04-27 Thread rgheck

tedc wrote:

I'm thinking of using LyX to write the 2nd edition of a book. The 1st edition
was done with OpenOffice, but production was a nightmare because OO didn't
fit with the publisher's workflow. The publisher had the whole thing
retyped, which introduced countless errors and generally broke formatting--a
major concern in this book which contains lots of source code, mathematical
symbols, chemical reaction notation etc.. 


The publisher will accept LaTeX, which gives LyX a tremendous potential
advantage. Exporting from OO to tex does damage some of the formatting, but
it does preserve many essentials such as index tags. The resulting files
import into LyX, seem to work more or less with the publisher's cls file,
and it looks like I can repair the broken formatting with LyX.

I do have one question, though. The OO file used text styles to specify
the formatting of inline source code, names of GUI tools, and chapter
crossreferences. In LyX these show up as ERT, like the boldfaced bit here:
\textstyleInlinecode{for i=0,n-1}
When I click on View DVI, these generate Undefined control sequence
errors.

I could, of course, use sed or awk to replace these with LyX markup that
would force the correct typeface (in this case, the typewriter family),
but I'd rather leave the markup unchanged, and have LyX or LaTeX figure out
what to do.

So my question is: how do I tell LyX or LaTeX that
\textstyleInlinecode{for i=0,n-1}
means to render
for i=0,n-1
with a specified typeface? or at least as typewriter?

  
There are going to be a lot of ways to do this. But I think all of them 
will involve using sed or whatever to replace this kind of command with 
something more sensible, preferably, a LyX character style. I think the 
way to go here would be to do the import into LyX and then write a 
script to convert things that will look more or less like this:


\begin_inset ERT
\begin_layout Plain Layout

\textstyleInlinecode{for i=0,n-1}
\end_layout
\end_inset

with something more like this:

\begin_layout Flex CharStyle:Code
status closed

\begin_layout Plain Layout

for i=0,n=1
\end_layout
\end_inset

This is easy, eventually, though fiddly.

In this case, you can use the Logical Markup module, which already 
defines the Code charstyle. In other cases, you may want to roll your own.


rh



Re: text styles

2009-04-27 Thread Drew Kime
On Mon, Apr 27, 2009 at 8:02 PM, tedc carneva...@sbcglobal.net wrote:

 So my question is: how do I tell LyX or LaTeX that
 \textstyleInlinecode{for i=0,n-1}
 means to render
 for i=0,n-1
 with a specified typeface? or at least as typewriter?
 --


Lyx has an option to specify a typewriter face. Simply highlight the text,
click on Edit-Text Style-Customized, and under Family select Typewriter.
Then check what it does to the code, and do a global replace to get all
occurrences.

Drew


text styles

2009-04-27 Thread tedc

I'm thinking of using LyX to write the 2nd edition of a book. The 1st edition
was done with OpenOffice, but production was a nightmare because OO didn't
fit with the publisher's workflow. The publisher had the whole thing
retyped, which introduced countless errors and generally broke formatting--a
major concern in this book which contains lots of source code, mathematical
symbols, chemical reaction notation etc.. 

The publisher will accept LaTeX, which gives LyX a tremendous potential
advantage. Exporting from OO to tex does damage some of the formatting, but
it does preserve many essentials such as index tags. The resulting files
import into LyX, seem to work more or less with the publisher's cls file,
and it looks like I can repair the broken formatting with LyX.

I do have one question, though. The OO file used "text styles" to specify
the formatting of inline source code, names of GUI tools, and chapter
crossreferences. In LyX these show up as ERT, like the boldfaced bit here:
\textstyleInlinecode{for i=0,n-1}
When I click on View DVI, these generate "Undefined control sequence"
errors.

I could, of course, use sed or awk to replace these with LyX markup that
would force the "correct" typeface (in this case, the typewriter family),
but I'd rather leave the markup unchanged, and have LyX or LaTeX figure out
what to do.

So my question is: how do I tell LyX or LaTeX that
\textstyleInlinecode{for i=0,n-1}
means to render
for i=0,n-1
with a specified typeface? or at least as "typewriter"?
-- 
View this message in context: 
http://n2.nabble.com/text-styles-tp2729258p2729258.html
Sent from the LyX - Users mailing list archive at Nabble.com.



Re: text styles

2009-04-27 Thread rgheck

tedc wrote:

I'm thinking of using LyX to write the 2nd edition of a book. The 1st edition
was done with OpenOffice, but production was a nightmare because OO didn't
fit with the publisher's workflow. The publisher had the whole thing
retyped, which introduced countless errors and generally broke formatting--a
major concern in this book which contains lots of source code, mathematical
symbols, chemical reaction notation etc.. 


The publisher will accept LaTeX, which gives LyX a tremendous potential
advantage. Exporting from OO to tex does damage some of the formatting, but
it does preserve many essentials such as index tags. The resulting files
import into LyX, seem to work more or less with the publisher's cls file,
and it looks like I can repair the broken formatting with LyX.

I do have one question, though. The OO file used "text styles" to specify
the formatting of inline source code, names of GUI tools, and chapter
crossreferences. In LyX these show up as ERT, like the boldfaced bit here:
\textstyleInlinecode{for i=0,n-1}
When I click on View DVI, these generate "Undefined control sequence"
errors.

I could, of course, use sed or awk to replace these with LyX markup that
would force the "correct" typeface (in this case, the typewriter family),
but I'd rather leave the markup unchanged, and have LyX or LaTeX figure out
what to do.

So my question is: how do I tell LyX or LaTeX that
\textstyleInlinecode{for i=0,n-1}
means to render
for i=0,n-1
with a specified typeface? or at least as "typewriter"?

  
There are going to be a lot of ways to do this. But I think all of them 
will involve using sed or whatever to replace this kind of command with 
something more sensible, preferably, a LyX character style. I think the 
way to go here would be to do the import into LyX and then write a 
script to convert things that will look more or less like this:


\begin_inset ERT
\begin_layout Plain Layout

\textstyleInlinecode{for i=0,n-1}
\end_layout
\end_inset

with something more like this:

\begin_layout Flex CharStyle:Code
status closed

\begin_layout Plain Layout

for i=0,n=1
\end_layout
\end_inset

This is easy, eventually, though fiddly.

In this case, you can use the Logical Markup module, which already 
defines the Code charstyle. In other cases, you may want to roll your own.


rh



Re: text styles

2009-04-27 Thread Drew Kime
On Mon, Apr 27, 2009 at 8:02 PM, tedc  wrote:

> So my question is: how do I tell LyX or LaTeX that
> \textstyleInlinecode{for i=0,n-1}
> means to render
> for i=0,n-1
> with a specified typeface? or at least as "typewriter"?
> --
>

Lyx has an option to specify a typewriter face. Simply highlight the text,
click on Edit->Text Style->Customized, and under "Family" select Typewriter.
Then check what it does to the code, and do a global replace to get all
occurrences.

Drew