Re: Spaces in math formulae

2019-07-01 Thread Steve Hnizdur




On 01/07/2019 18:50, Paul A. Rubin wrote:

On 7/1/19 2:43 AM, Steve Hnizdur wrote:

On 01/07/2019 00:58, Paul A. Rubin wrote:

On 6/30/19 3:55 AM, Steve Hnizdur wrote:

On 29/06/2019 17:24, Paul A. Rubin wrote:

On 6/29/19 7:43 AM, Steve Hnizdur wrote:

Hi

I need to use this code

\[\newdir{ >}{{}*!/-10pt/@{>}}\xymatrix{X\ar[r]\ar@{ >->}[d]  & 
Y\ar@{ >->}[d]\\Z \ar[r]  & W}\]


in order to move the tail of the vertical arrows away from the 
entries X and Y. This works in an ERT but when inputting in native 
LYX it strips out the important spaces in \newdir{ >} and @{ >->}. 
Is there any way to force LYX to accept these spaces.


Many thanks
I think the problem is that you named your new arrowhead " >" 
(meaning the name contains a space). Changing that to something 
else seems to fix the problem. Based on an example in the LyX 
xy-pic help file, I used a vertical bar (so the first argument to 
\newdir is "|>"). I've attached a working (for me at least) LyX file.


Paul >


Hi

Thanks for that. I had taken the code directly from the XY-pic 
User’s Guide. Now, having played with it ANY allowable LYX character 
seems to work e.g. x.


There have been other instances where LYX will not allow input of 
characters, for instance the tilde ~. I needed this in \ar@{~>}[r] 
in xy-pic to produce a squiggly arrow. I eventually forced it in by 
pasting into the maths environment. The screen shows LYX thinks 
there is a space, the code view shows a tilde, but when trying to 
input tilde from the keyboard LYX converts it to \sim which then 
throws a compile error.


Cheers


What happens if you escape the tilde (with a backslash)?



I get this

"Xy-pic error: illegal : macro:->\T1-cmd \~\T1\~ not valid."


Yeah, that one's definitely weird. I had to reverse engineer the wiggly 
arrow in the LyX xy-pic manual. It turns out that you need to use Insert 
 > Formatting > Protected Space where you want the tilde. In the math 
inset, you'll see the marker for a space, but if you look at the LyX 
code in the Code Preview pane, it will be a tilde ... plus, when you 
compile you'll see that it worked.


Paul



Yes its annoying. I achieved the right code by cutting ~> from normal 
text and pasting it into the maths environment. This seems to stop the 
shortcut mechanism changing the tilde to \sim.


--

Steve Hnizdur


Re: Spaces in math formulae

2019-07-01 Thread Paul A. Rubin

On 7/1/19 2:43 AM, Steve Hnizdur wrote:

On 01/07/2019 00:58, Paul A. Rubin wrote:

On 6/30/19 3:55 AM, Steve Hnizdur wrote:

On 29/06/2019 17:24, Paul A. Rubin wrote:

On 6/29/19 7:43 AM, Steve Hnizdur wrote:

Hi

I need to use this code

\[\newdir{ >}{{}*!/-10pt/@{>}}\xymatrix{X\ar[r]\ar@{ >->}[d]  & 
Y\ar@{ >->}[d]\\Z \ar[r]  & W}\]


in order to move the tail of the vertical arrows away from the 
entries X and Y. This works in an ERT but when inputting in native 
LYX it strips out the important spaces in \newdir{ >} and @{ >->}. 
Is there any way to force LYX to accept these spaces.


Many thanks
I think the problem is that you named your new arrowhead " >" 
(meaning the name contains a space). Changing that to something 
else seems to fix the problem. Based on an example in the LyX 
xy-pic help file, I used a vertical bar (so the first argument to 
\newdir is "|>"). I've attached a working (for me at least) LyX file.


Paul >


Hi

Thanks for that. I had taken the code directly from the XY-pic 
User’s Guide. Now, having played with it ANY allowable LYX character 
seems to work e.g. x.


There have been other instances where LYX will not allow input of 
characters, for instance the tilde ~. I needed this in \ar@{~>}[r] 
in xy-pic to produce a squiggly arrow. I eventually forced it in by 
pasting into the maths environment. The screen shows LYX thinks 
there is a space, the code view shows a tilde, but when trying to 
input tilde from the keyboard LYX converts it to \sim which then 
throws a compile error.


Cheers


What happens if you escape the tilde (with a backslash)?



I get this

"Xy-pic error: illegal : macro:->\T1-cmd \~\T1\~ not valid."


Yeah, that one's definitely weird. I had to reverse engineer the wiggly 
arrow in the LyX xy-pic manual. It turns out that you need to use Insert 
> Formatting > Protected Space where you want the tilde. In the math 
inset, you'll see the marker for a space, but if you look at the LyX 
code in the Code Preview pane, it will be a tilde ... plus, when you 
compile you'll see that it worked.


Paul



Re: Spaces in math formulae

2019-07-01 Thread Steve Hnizdur

On 01/07/2019 00:58, Paul A. Rubin wrote:

On 6/30/19 3:55 AM, Steve Hnizdur wrote:

On 29/06/2019 17:24, Paul A. Rubin wrote:

On 6/29/19 7:43 AM, Steve Hnizdur wrote:

Hi

I need to use this code

\[\newdir{ >}{{}*!/-10pt/@{>}}\xymatrix{X\ar[r]\ar@{ >->}[d]  & 
Y\ar@{ >->}[d]\\Z \ar[r]  & W}\]


in order to move the tail of the vertical arrows away from the 
entries X and Y. This works in an ERT but when inputting in native 
LYX it strips out the important spaces in \newdir{ >} and @{ >->}. 
Is there any way to force LYX to accept these spaces.


Many thanks
I think the problem is that you named your new arrowhead " >" 
(meaning the name contains a space). Changing that to something else 
seems to fix the problem. Based on an example in the LyX xy-pic help 
file, I used a vertical bar (so the first argument to \newdir is 
"|>"). I've attached a working (for me at least) LyX file.


Paul >


Hi

Thanks for that. I had taken the code directly from the XY-pic User’s 
Guide. Now, having played with it ANY allowable LYX character seems to 
work e.g. x.


There have been other instances where LYX will not allow input of 
characters, for instance the tilde ~. I needed this in \ar@{~>}[r] in 
xy-pic to produce a squiggly arrow. I eventually forced it in by 
pasting into the maths environment. The screen shows LYX thinks there 
is a space, the code view shows a tilde, but when trying to input 
tilde from the keyboard LYX converts it to \sim which then throws a 
compile error.


Cheers


What happens if you escape the tilde (with a backslash)?



I get this

"Xy-pic error: illegal : macro:->\T1-cmd \~\T1\~  not valid."


--

Steve Hnizdur


Re: Spaces in math formulae

2019-06-30 Thread Paul A. Rubin

On 6/30/19 3:55 AM, Steve Hnizdur wrote:

On 29/06/2019 17:24, Paul A. Rubin wrote:

On 6/29/19 7:43 AM, Steve Hnizdur wrote:

Hi

I need to use this code

\[\newdir{ >}{{}*!/-10pt/@{>}}\xymatrix{X\ar[r]\ar@{ >->}[d]  & 
Y\ar@{ >->}[d]\\Z \ar[r]  & W}\]


in order to move the tail of the vertical arrows away from the 
entries X and Y. This works in an ERT but when inputting in native 
LYX it strips out the important spaces in \newdir{ >} and @{ >->}. 
Is there any way to force LYX to accept these spaces.


Many thanks
I think the problem is that you named your new arrowhead " >" 
(meaning the name contains a space). Changing that to something else 
seems to fix the problem. Based on an example in the LyX xy-pic help 
file, I used a vertical bar (so the first argument to \newdir is 
"|>"). I've attached a working (for me at least) LyX file.


Paul >


Hi

Thanks for that. I had taken the code directly from the XY-pic User’s 
Guide. Now, having played with it ANY allowable LYX character seems to 
work e.g. x.


There have been other instances where LYX will not allow input of 
characters, for instance the tilde ~. I needed this in \ar@{~>}[r] in 
xy-pic to produce a squiggly arrow. I eventually forced it in by 
pasting into the maths environment. The screen shows LYX thinks there 
is a space, the code view shows a tilde, but when trying to input 
tilde from the keyboard LYX converts it to \sim which then throws a 
compile error.


Cheers


What happens if you escape the tilde (with a backslash)?



Re: Spaces in math formulae

2019-06-30 Thread Steve Hnizdur

On 29/06/2019 17:24, Paul A. Rubin wrote:

On 6/29/19 7:43 AM, Steve Hnizdur wrote:

Hi

I need to use this code

\[\newdir{ >}{{}*!/-10pt/@{>}}\xymatrix{X\ar[r]\ar@{ >->}[d]  & Y\ar@{ 
>->}[d]\\Z \ar[r]  & W}\]


in order to move the tail of the vertical arrows away from the entries 
X and Y. This works in an ERT but when inputting in native LYX it 
strips out the important spaces in \newdir{ >} and @{ >->}. Is there 
any way to force LYX to accept these spaces.


Many thanks
I think the problem is that you named your new arrowhead " >" (meaning 
the name contains a space). Changing that to something else seems to fix 
the problem. Based on an example in the LyX xy-pic help file, I used a 
vertical bar (so the first argument to \newdir is "|>"). I've attached a 
working (for me at least) LyX file.


Paul >


Hi

Thanks for that. I had taken the code directly from the XY-pic User’s 
Guide. Now, having played with it ANY allowable LYX character seems to 
work e.g. x.


There have been other instances where LYX will not allow input of 
characters, for instance the tilde ~. I needed this in \ar@{~>}[r] in 
xy-pic to produce a squiggly arrow. I eventually forced it in by pasting 
into the maths environment. The screen shows LYX thinks there is a 
space, the code view shows a tilde, but when trying to input tilde from 
the keyboard LYX converts it to \sim which then throws a compile error.


Cheers

--

Steve Hnizdur


Re: Spaces in math formulae

2019-06-29 Thread Paul A. Rubin

On 6/29/19 7:43 AM, Steve Hnizdur wrote:

Hi

I need to use this code

\[\newdir{ >}{{}*!/-10pt/@{>}}\xymatrix{X\ar[r]\ar@{ >->}[d]  & Y\ar@{ 
>->}[d]\\Z \ar[r]  & W}\]


in order to move the tail of the vertical arrows away from the entries 
X and Y. This works in an ERT but when inputting in native LYX it 
strips out the important spaces in \newdir{ >} and @{ >->}. Is there 
any way to force LYX to accept these spaces.


Many thanks
I think the problem is that you named your new arrowhead " >" (meaning 
the name contains a space). Changing that to something else seems to fix 
the problem. Based on an example in the LyX xy-pic help file, I used a 
vertical bar (so the first argument to \newdir is "|>"). I've attached a 
working (for me at least) LyX file.


Paul



newfile1.lyx
Description: application/lyx


Spaces in math formulae

2019-06-29 Thread Steve Hnizdur

Hi

I need to use this code

\[\newdir{ >}{{}*!/-10pt/@{>}}\xymatrix{X\ar[r]\ar@{ >->}[d]  & Y\ar@{ 
>->}[d]\\Z \ar[r]  & W}\]


in order to move the tail of the vertical arrows away from the entries X 
and Y. This works in an ERT but when inputting in native LYX it strips 
out the important spaces in \newdir{ >} and @{ >->}. Is there any way to 
force LYX to accept these spaces.


Many thanks
--

Steve Hnizdur