Re: using native 'math macros' as 'text macros'

2014-01-23 Thread Guenter Milde
On 2014-01-22, Liviu Andronic wrote:

 So, is it a good or bad idea to use math macros to emulate text
 macros? Is there a nicer approach?

IMO, it is a bad idea. Math macros are for mathematical typesetting (and
even then not the cleanest LaTeX code results).

The text alternative to math macros are insets. You could define them
either in a custom layout, a module or a local layout.

Günter



Re: using native 'math macros' as 'text macros'

2014-01-23 Thread Liviu Andronic
On Thu, Jan 23, 2014 at 12:09 PM, Guenter Milde mi...@users.sf.net wrote:
 On 2014-01-22, Liviu Andronic wrote:

 So, is it a good or bad idea to use math macros to emulate text
 macros? Is there a nicer approach?

 IMO, it is a bad idea. Math macros are for mathematical typesetting (and
 even then not the cleanest LaTeX code results).

Thanks. I should drop this, then.


 The text alternative to math macros are insets. You could define them
 either in a custom layout, a module or a local layout.

For anyone interested, here's an example of how to do this:
http://tex.stackexchange.com/a/155442/15538 . However this is a bit
awkward to set up all the time.

I'm still curious though if it is easier now, given the custom inset
lift-up in 2.1, to fix http://www.lyx.org/trac/ticket/1704 ?

Liviu


Re: using native 'math macros' as 'text macros'

2014-01-23 Thread Guenter Milde
On 2014-01-22, Liviu Andronic wrote:

 So, is it a good or bad idea to use math macros to emulate text
 macros? Is there a nicer approach?

IMO, it is a bad idea. Math macros are for mathematical typesetting (and
even then not the cleanest LaTeX code results).

The text alternative to math macros are insets. You could define them
either in a custom layout, a module or a local layout.

Günter



Re: using native 'math macros' as 'text macros'

2014-01-23 Thread Liviu Andronic
On Thu, Jan 23, 2014 at 12:09 PM, Guenter Milde mi...@users.sf.net wrote:
 On 2014-01-22, Liviu Andronic wrote:

 So, is it a good or bad idea to use math macros to emulate text
 macros? Is there a nicer approach?

 IMO, it is a bad idea. Math macros are for mathematical typesetting (and
 even then not the cleanest LaTeX code results).

Thanks. I should drop this, then.


 The text alternative to math macros are insets. You could define them
 either in a custom layout, a module or a local layout.

For anyone interested, here's an example of how to do this:
http://tex.stackexchange.com/a/155442/15538 . However this is a bit
awkward to set up all the time.

I'm still curious though if it is easier now, given the custom inset
lift-up in 2.1, to fix http://www.lyx.org/trac/ticket/1704 ?

Liviu


Re: using native 'math macros' as 'text macros'

2014-01-23 Thread Guenter Milde
On 2014-01-22, Liviu Andronic wrote:

> So, is it a good or bad idea to use math macros to emulate text
> macros? Is there a nicer approach?

IMO, it is a bad idea. "Math macros" are for mathematical typesetting (and
even then not the cleanest LaTeX code results).

The text alternative to "math macros" are "insets". You could define them
either in a custom layout, a module or a local layout.

Günter



Re: using native 'math macros' as 'text macros'

2014-01-23 Thread Liviu Andronic
On Thu, Jan 23, 2014 at 12:09 PM, Guenter Milde  wrote:
> On 2014-01-22, Liviu Andronic wrote:
>
>> So, is it a good or bad idea to use math macros to emulate text
>> macros? Is there a nicer approach?
>
> IMO, it is a bad idea. "Math macros" are for mathematical typesetting (and
> even then not the cleanest LaTeX code results).
>
Thanks. I should drop this, then.


> The text alternative to "math macros" are "insets". You could define them
> either in a custom layout, a module or a local layout.
>
For anyone interested, here's an example of how to do this:
http://tex.stackexchange.com/a/155442/15538 . However this is a bit
awkward to set up all the time.

I'm still curious though if it is easier now, given the custom inset
lift-up in 2.1, to fix http://www.lyx.org/trac/ticket/1704 ?

Liviu


using native 'math macros' as 'text macros'

2014-01-22 Thread Liviu Andronic
Dear all,
I would like to use in my LyX documents something that would resemble
text macros. I'm aware of http://www.lyx.org/trac/ticket/1704 and of
solutions such as
http://tex.stackexchange.com/questions/12747/keeping-the-names-of-things-consistent-in-lyx
, but I'm wondering if the existing 'math macro' machinery can be used
for this.

For example, I am writing cover letters and the recipient is mentioned
at least in three different places in the letter. When writing to a
different recipient, I often simply change the name (in addition to
some other minor modifications). I want to avoid needing to change the
name three times, which is prone to errors and misspellings. (Another
similar use case is when writing technical documentation as described
here: 
http://tex.stackexchange.com/questions/12747/keeping-the-names-of-things-consistent-in-lyx
.)

Is there a straightforward, native way (i.e. non-ERT) to do this in
LyX? I tried to use 'math macros' for this job (see attached):
- insert  math  macro
- Name= '\myname'
- TeX = ctrl+m to put the text into an mbox, then type 'M. Simpson'

But sofar I identified two issues:
- hyphenation/line breaks. Since the text is within a math inset, I
assume that TeX treats it as a single block and fails to hyphenate it
in certain instances. I'm not sure how to solve this, as I cannot
insert a hyphenation point into the macro.
- formatting and on-screen rendering. If for example in one place of
the text the macro is emphasized, and in another it is noun-ed, LyX
won't recognize that and display the instant preview using regular,
default font. This is minor, of course, but distracting.

So, is it a good or bad idea to use math macros to emulate text
macros? Is there a nicer approach?

Regards,
Liviu

-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail


text macro.lyx
Description: Binary data


text macro.pdf
Description: Adobe PDF document


using native 'math macros' as 'text macros'

2014-01-22 Thread Liviu Andronic
Dear all,
I would like to use in my LyX documents something that would resemble
text macros. I'm aware of http://www.lyx.org/trac/ticket/1704 and of
solutions such as
http://tex.stackexchange.com/questions/12747/keeping-the-names-of-things-consistent-in-lyx
, but I'm wondering if the existing 'math macro' machinery can be used
for this.

For example, I am writing cover letters and the recipient is mentioned
at least in three different places in the letter. When writing to a
different recipient, I often simply change the name (in addition to
some other minor modifications). I want to avoid needing to change the
name three times, which is prone to errors and misspellings. (Another
similar use case is when writing technical documentation as described
here: 
http://tex.stackexchange.com/questions/12747/keeping-the-names-of-things-consistent-in-lyx
.)

Is there a straightforward, native way (i.e. non-ERT) to do this in
LyX? I tried to use 'math macros' for this job (see attached):
- insert  math  macro
- Name= '\myname'
- TeX = ctrl+m to put the text into an mbox, then type 'M. Simpson'

But sofar I identified two issues:
- hyphenation/line breaks. Since the text is within a math inset, I
assume that TeX treats it as a single block and fails to hyphenate it
in certain instances. I'm not sure how to solve this, as I cannot
insert a hyphenation point into the macro.
- formatting and on-screen rendering. If for example in one place of
the text the macro is emphasized, and in another it is noun-ed, LyX
won't recognize that and display the instant preview using regular,
default font. This is minor, of course, but distracting.

So, is it a good or bad idea to use math macros to emulate text
macros? Is there a nicer approach?

Regards,
Liviu

-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail


text macro.lyx
Description: Binary data


text macro.pdf
Description: Adobe PDF document


using native 'math macros' as 'text macros'

2014-01-22 Thread Liviu Andronic
Dear all,
I would like to use in my LyX documents something that would resemble
"text macros". I'm aware of http://www.lyx.org/trac/ticket/1704 and of
solutions such as
http://tex.stackexchange.com/questions/12747/keeping-the-names-of-things-consistent-in-lyx
, but I'm wondering if the existing 'math macro' machinery can be used
for this.

For example, I am writing cover letters and the recipient is mentioned
at least in three different places in the letter. When writing to a
different recipient, I often simply change the name (in addition to
some other minor modifications). I want to avoid needing to change the
name three times, which is prone to errors and misspellings. (Another
similar use case is when writing technical documentation as described
here: 
http://tex.stackexchange.com/questions/12747/keeping-the-names-of-things-consistent-in-lyx
.)

Is there a straightforward, native way (i.e. non-ERT) to do this in
LyX? I tried to use 'math macros' for this job (see attached):
- insert > math > macro
- Name= '\myname'
- TeX = ctrl+m to put the text into an mbox, then type 'M. Simpson'

But sofar I identified two issues:
- hyphenation/line breaks. Since the text is within a math inset, I
assume that TeX treats it as a single block and fails to hyphenate it
in certain instances. I'm not sure how to solve this, as I cannot
insert a hyphenation point into the macro.
- formatting and on-screen rendering. If for example in one place of
the text the macro is emphasized, and in another it is noun-ed, LyX
won't recognize that and display the instant preview using regular,
default font. This is minor, of course, but distracting.

So, is it a good or bad idea to use math macros to emulate text
macros? Is there a nicer approach?

Regards,
Liviu

-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail


text macro.lyx
Description: Binary data


text macro.pdf
Description: Adobe PDF document