Re: Preventing newline after a LatexType = Command line
Hmm... In the meanwhile is it at least possible to allow the Insert Short title command even in LyX environments set as PassThru? IMHO one should still be able to insert arguments in this case. Right now I have to hack it by copying and pasting an opt field from somewhere else. Sue Ann Koay sueannk...@gmail.com On Mon, Jun 20, 2011 at 11:14 PM, Jean-Marc Lasgouttes lasgout...@lyx.org wrote: Le 20/06/11 18:53, Richard Heck a écrit : On 06/20/2011 12:40 PM, Jean-Marc Lasgouttes wrote: Le 20/06/2011 18:03, Richard Heck a écrit : On 06/20/2011 11:02 AM, Sue Ann Koay wrote: I tried that already, but it doesn't seem to work in Lyx v2.0.0. OK. I will try to have a look as, it really should work, I think. (I.e., it's a bug.) It has not been implemented like that, and I do not know how difficult it would be actually. Was there a reason that ParBreakIsNewline effectively presupposed PassThru? I.e., if I did try to change this behavior, is there something I'm likely to break? Just that the code is too complicated for my taste. Several code paths for different things, and I wanted to stay close to what was used for ERT. JMarc
Re: Preventing newline after a LatexType = Command line
Actually I did not mean this as a patch, but as something that I don't quite understand why it should not work. For example I the following environment declared in my layout file: Style Entry LatexType Command LatexName cventry LabelString (years; title; institution; location; grade; description): ParbreakIsNewline 1 PassThru1 RequiredArgs5 End However in the Lyx editor I am unable to insert the 5 arguments because the Insert Short title command is disabled. It's not enough for me to type for example the line {a}{b}{c}{d}{e}rest in Lyx, because this then generates the Latex output: \cventry{}{}{}{}{}{{a}{b}{c}{d}{e}rest} which is not what I want. Or am I doing something wrong? Sue Ann Koay sueannk...@gmail.com On Wed, Jun 22, 2011 at 11:09 AM, Jean-Marc Lasgouttes lasgout...@lyx.org wrote: Le 22/06/2011 11:04, Sue Ann Koay a écrit : Hmm... In the meanwhile is it at least possible to allow the Insert Short title command even in LyX environments set as PassThru? IMHO one should still be able to insert arguments in this case. Right now I have to hack it by copying and pasting an opt field from somewhere else. I do not think it should be possible to insert arguments in this case :) PassThru is for verbatim text that is not evaluated by LaTeX. Passing macros or arguments there does not make much sense... Of course, when the layout file specifies it explicitly, it may be argued that it should work. I am reluctant to add this feature just to work around an unrelated bug. JMarc
Re: Preventing newline after a LatexType = Command line
Hmm... In the meanwhile is it at least possible to allow the Insert Short title command even in LyX environments set as PassThru? IMHO one should still be able to insert arguments in this case. Right now I have to hack it by copying and pasting an opt field from somewhere else. Sue Ann Koay sueannk...@gmail.com On Mon, Jun 20, 2011 at 11:14 PM, Jean-Marc Lasgouttes lasgout...@lyx.org wrote: Le 20/06/11 18:53, Richard Heck a écrit : On 06/20/2011 12:40 PM, Jean-Marc Lasgouttes wrote: Le 20/06/2011 18:03, Richard Heck a écrit : On 06/20/2011 11:02 AM, Sue Ann Koay wrote: I tried that already, but it doesn't seem to work in Lyx v2.0.0. OK. I will try to have a look as, it really should work, I think. (I.e., it's a bug.) It has not been implemented like that, and I do not know how difficult it would be actually. Was there a reason that ParBreakIsNewline effectively presupposed PassThru? I.e., if I did try to change this behavior, is there something I'm likely to break? Just that the code is too complicated for my taste. Several code paths for different things, and I wanted to stay close to what was used for ERT. JMarc
Re: Preventing newline after a LatexType = Command line
Actually I did not mean this as a patch, but as something that I don't quite understand why it should not work. For example I the following environment declared in my layout file: Style Entry LatexType Command LatexName cventry LabelString (years; title; institution; location; grade; description): ParbreakIsNewline 1 PassThru1 RequiredArgs5 End However in the Lyx editor I am unable to insert the 5 arguments because the Insert Short title command is disabled. It's not enough for me to type for example the line {a}{b}{c}{d}{e}rest in Lyx, because this then generates the Latex output: \cventry{}{}{}{}{}{{a}{b}{c}{d}{e}rest} which is not what I want. Or am I doing something wrong? Sue Ann Koay sueannk...@gmail.com On Wed, Jun 22, 2011 at 11:09 AM, Jean-Marc Lasgouttes lasgout...@lyx.org wrote: Le 22/06/2011 11:04, Sue Ann Koay a écrit : Hmm... In the meanwhile is it at least possible to allow the Insert Short title command even in LyX environments set as PassThru? IMHO one should still be able to insert arguments in this case. Right now I have to hack it by copying and pasting an opt field from somewhere else. I do not think it should be possible to insert arguments in this case :) PassThru is for verbatim text that is not evaluated by LaTeX. Passing macros or arguments there does not make much sense... Of course, when the layout file specifies it explicitly, it may be argued that it should work. I am reluctant to add this feature just to work around an unrelated bug. JMarc
Re: Preventing newline after a LatexType = Command line
Hmm... In the meanwhile is it at least possible to allow the "Insert > Short title" command even in LyX environments set as PassThru? IMHO one should still be able to insert arguments in this case. Right now I have to hack it by copying and pasting an opt field from somewhere else. Sue Ann Koay sueannk...@gmail.com On Mon, Jun 20, 2011 at 11:14 PM, Jean-Marc Lasgouttes <lasgout...@lyx.org> wrote: > Le 20/06/11 18:53, Richard Heck a écrit : >> >> On 06/20/2011 12:40 PM, Jean-Marc Lasgouttes wrote: >>> >>> Le 20/06/2011 18:03, Richard Heck a écrit : >>>> >>>> On 06/20/2011 11:02 AM, Sue Ann Koay wrote: >>>>> >>>>> I tried that already, but it doesn't seem to work in Lyx v2.0.0. >>>>> >>>> OK. I will try to have a look as, it really should work, I think. (I.e., >>>> it's a bug.) >>> >>> It has not been implemented like that, and I do not know how difficult >>> it would be actually. >>> >> Was there a reason that ParBreakIsNewline effectively presupposed >> PassThru? I.e., if I did try to change this behavior, is there something >> I'm likely to break? > > Just that the code is too complicated for my taste. Several code paths for > different things, and I wanted to stay close to what was used for ERT. > > > JMarc > > >
Re: Preventing newline after a LatexType = Command line
Actually I did not mean this as a patch, but as something that I don't quite understand why it should not work. For example I the following environment declared in my layout file: Style Entry LatexType Command LatexName cventry LabelString "(years; title; institution; location; grade; description):" ParbreakIsNewline 1 PassThru1 RequiredArgs5 End However in the Lyx editor I am unable to insert the 5 arguments because the "Insert > Short title" command is disabled. It's not enough for me to type for example the line "{a}{b}{c}{d}{e}rest" in Lyx, because this then generates the Latex output: \cventry{}{}{}{}{}{{a}{b}{c}{d}{e}rest} which is not what I want. Or am I doing something wrong? Sue Ann Koay sueannk...@gmail.com On Wed, Jun 22, 2011 at 11:09 AM, Jean-Marc Lasgouttes <lasgout...@lyx.org> wrote: > Le 22/06/2011 11:04, Sue Ann Koay a écrit : >> >> Hmm... In the meanwhile is it at least possible to allow the "Insert> >> Short title" command even in LyX environments set as PassThru? IMHO >> one should still be able to insert arguments in this case. Right now I >> have to hack it by copying and pasting an opt field from somewhere >> else. > > I do not think it should be possible to insert arguments in this case :) > PassThru is for verbatim text that is not evaluated by LaTeX. Passing macros > or arguments there does not make much sense... > > Of course, when the layout file specifies it explicitly, it may be argued > that it should work. > > I am reluctant to add this feature just to work around an unrelated bug. > > JMarc > >
Re: Preventing newline after a LatexType = Command line
I tried that already, but it doesn't seem to work in Lyx v2.0.0. Sue Ann Koay sueannk...@gmail.com On Mon, Jun 20, 2011 at 4:25 PM, Richard Heck rgh...@comcast.net wrote: On 06/19/2011 09:26 AM, Sue Ann Koay wrote: Hello, I'm trying to create a layout file with a paragraph style that outputs something like: \mycommand{arg1}{arg2} \mycommand{arg3}{arg4} Something like the following almost works: Style MyCommand LatexType Command LatexName mycommand LabelString Test: RequiredArgs 2 End However it likes to separate the MyCommand lines by newlines in the latex output, e.g.: \mycommand{arg1}{arg2} \mycommand{arg3}{arg4} I'd like to be able to prevent the extra newlines in between the output, because this causes undesirable separation between lines in the final display. Might someone know how this can be achieved? The only thing I've been able to do is to turn on the ParbreakIsNewline and PassThru options, but this is a rather annoying hack because it also turns off the ability to use any of the LyX formatting commands when inside this style. :-( Is it possible to use just ParBreakIsNewline, without PassThru? If not, then that is a bug, I think. Richard
Re: Preventing newline after a LatexType = Command line
I tried that already, but it doesn't seem to work in Lyx v2.0.0. Sue Ann Koay sueannk...@gmail.com On Mon, Jun 20, 2011 at 4:25 PM, Richard Heck rgh...@comcast.net wrote: On 06/19/2011 09:26 AM, Sue Ann Koay wrote: Hello, I'm trying to create a layout file with a paragraph style that outputs something like: \mycommand{arg1}{arg2} \mycommand{arg3}{arg4} Something like the following almost works: Style MyCommand LatexType Command LatexName mycommand LabelString Test: RequiredArgs 2 End However it likes to separate the MyCommand lines by newlines in the latex output, e.g.: \mycommand{arg1}{arg2} \mycommand{arg3}{arg4} I'd like to be able to prevent the extra newlines in between the output, because this causes undesirable separation between lines in the final display. Might someone know how this can be achieved? The only thing I've been able to do is to turn on the ParbreakIsNewline and PassThru options, but this is a rather annoying hack because it also turns off the ability to use any of the LyX formatting commands when inside this style. :-( Is it possible to use just ParBreakIsNewline, without PassThru? If not, then that is a bug, I think. Richard
Re: Preventing newline after a LatexType = Command line
I tried that already, but it doesn't seem to work in Lyx v2.0.0. Sue Ann Koay sueannk...@gmail.com On Mon, Jun 20, 2011 at 4:25 PM, Richard Heck <rgh...@comcast.net> wrote: > On 06/19/2011 09:26 AM, Sue Ann Koay wrote: >> Hello, >> >> I'm trying to create a layout file with a paragraph style that outputs >> something like: >> >> \mycommand{arg1}{arg2} >> \mycommand{arg3}{arg4} >> >> Something like the following almost works: >> >> Style MyCommand >> LatexType Command >> LatexName mycommand >> LabelString "Test:" >> RequiredArgs 2 >> End >> >> However it likes to separate the MyCommand lines by newlines in the >> latex output, e.g.: >> >> \mycommand{arg1}{arg2} >> >> >> \mycommand{arg3}{arg4} >> >> I'd like to be able to prevent the extra newlines in between the >> output, because this causes undesirable separation between lines in >> the final display. Might someone know how this can be achieved? The >> only thing I've been able to do is to turn on the ParbreakIsNewline >> and PassThru options, but this is a rather annoying hack because it >> also turns off the ability to use any of the LyX formatting commands >> when inside this style. :-( >> > Is it possible to use just ParBreakIsNewline, without PassThru? If not, > then that is a bug, I think. > > Richard > >
Preventing newline after a LatexType = Command line
Hello, I'm trying to create a layout file with a paragraph style that outputs something like: \mycommand{arg1}{arg2} \mycommand{arg3}{arg4} Something like the following almost works: Style MyCommand LatexType Command LatexName mycommand LabelString Test: RequiredArgs2 End However it likes to separate the MyCommand lines by newlines in the latex output, e.g.: \mycommand{arg1}{arg2} \mycommand{arg3}{arg4} I'd like to be able to prevent the extra newlines in between the output, because this causes undesirable separation between lines in the final display. Might someone know how this can be achieved? The only thing I've been able to do is to turn on the ParbreakIsNewline and PassThru options, but this is a rather annoying hack because it also turns off the ability to use any of the LyX formatting commands when inside this style. :-( Help would very much be appreciated, Sue Ann Koay sueannk...@gmail.com
Preventing newline after a LatexType = Command line
Hello, I'm trying to create a layout file with a paragraph style that outputs something like: \mycommand{arg1}{arg2} \mycommand{arg3}{arg4} Something like the following almost works: Style MyCommand LatexType Command LatexName mycommand LabelString Test: RequiredArgs2 End However it likes to separate the MyCommand lines by newlines in the latex output, e.g.: \mycommand{arg1}{arg2} \mycommand{arg3}{arg4} I'd like to be able to prevent the extra newlines in between the output, because this causes undesirable separation between lines in the final display. Might someone know how this can be achieved? The only thing I've been able to do is to turn on the ParbreakIsNewline and PassThru options, but this is a rather annoying hack because it also turns off the ability to use any of the LyX formatting commands when inside this style. :-( Help would very much be appreciated, Sue Ann Koay sueannk...@gmail.com
Preventing newline after a LatexType = Command line
Hello, I'm trying to create a layout file with a paragraph style that outputs something like: \mycommand{arg1}{arg2} \mycommand{arg3}{arg4} Something like the following almost works: Style MyCommand LatexType Command LatexName mycommand LabelString "Test:" RequiredArgs2 End However it likes to separate the MyCommand lines by newlines in the latex output, e.g.: \mycommand{arg1}{arg2} \mycommand{arg3}{arg4} I'd like to be able to prevent the extra newlines in between the output, because this causes undesirable separation between lines in the final display. Might someone know how this can be achieved? The only thing I've been able to do is to turn on the ParbreakIsNewline and PassThru options, but this is a rather annoying hack because it also turns off the ability to use any of the LyX formatting commands when inside this style. :-( Help would very much be appreciated, Sue Ann Koay sueannk...@gmail.com