Re: Custom layout inset without arguments

2020-04-20 Thread Andrew Parsloe

On 21/04/2020 8:47 am, Richard Kimberly Heck wrote:

On 4/19/20 2:23 PM, Gaston Gloesener wrote:


Riki wrote:

>This is bug #4066: https://www.lyx.org/trac/ticket/4066. There's at 
least some intention to try to figure it out before 2.4.0. For now, 
the workaround you mention is the only one available.


>

>Riki

Thank you for this pointer. I am a bit scared by this bug report 
having 13 years and last update being 12 months ago, but let’s stay 
positive it will happen 


I filed the report, too, and have always meant to do something about 
it. Really, that bug is more general, since the idea was for it to be 
possible to declare various options, as well, so the command could in 
effect have arguments (the way the label command does, e.g.).




Andrew wrote:

>But you can eliminate the red box from showing by closing the inset 
(click on the inset label to toggle open/closed).


Thanks for this workaround. I did actually notice this shortly after 
sending my email and must admit that it is already a big progress 
that I can at least get rid of the annoying  red box.


Would it be enough here if we could just have a "no text box" option? 
This would basically be a form of Decoration.


Riki

For appearance in LyX this would be helpful, but if the associated latex 
command has an empty argument  attached that might be confusing, for 
example if using the latex command in an ert inset where you will need 
to remember that it is not just the command that is required but also a 
following empty argument (otherwise the next token in the ert inset is 
going to be gobbled).


Andrew

-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Custom layout inset without arguments

2020-04-20 Thread Richard Kimberly Heck
On 4/19/20 2:23 PM, Gaston Gloesener wrote:
>
> Riki wrote:
>
> >This is bug #4066: https://www.lyx.org/trac/ticket/4066. There's at
> least some intention to try to figure it out before 2.4.0. For now,
> the workaround you mention is the only one available.
>
> > 
>
> >Riki
>
>  
>
> Thank you for this pointer. I am a bit scared by this bug report
> having 13 years and last update being 12 months ago, but let’s stay
> positive it will happen 
>
I filed the report, too, and have always meant to do something about it.
Really, that bug is more general, since the idea was for it to be
possible to declare various options, as well, so the command could in
effect have arguments (the way the label command does, e.g.).


>  Andrew wrote:
>
>  
>
> >But you can eliminate the red box from showing by closing the inset
> (click on the inset label to toggle open/closed).
>
>  
>
> Thanks for this workaround. I did actually notice this shortly after
> sending my email and must admit that it is already a big progress that
> I can at least get rid of the annoying  red box.
>
Would it be enough here if we could just have a "no text box" option?
This would basically be a form of Decoration.

Riki


-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Custom layout inset without arguments

2020-04-19 Thread Jean-Marc Lasgouttes

Le 19/04/2020 à 20:23, Gaston Gloesener a écrit :

Riki wrote:

 >This is bug #4066: https://www.lyx.org/trac/ticket/4066. There's at 
least some intention to try to figure it out before 2.4.0. For now, the 
workaround you mention is the only one available.


 >

 >Riki

Thank you for this pointer. I am a bit scared by this bug report having 
13 years and last update being 12 months ago, but let’s stay positive it 
will happen 


Sure, stay positive, I recently fixed this one:
https://www.lyx.org/trac/ticket/4451

More generally, 15 bugs older than yours will be fixed in 2.4.0 :)
https://www.lyx.org/trac/query?status=fixed=2.4.0=fixedinmaster=0=id=summary=severity=component=keywords=id

JMarc
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


RE: Custom layout inset without arguments

2020-04-19 Thread Gaston Gloesener
Riki wrote:

>This is bug #4066: https://www.lyx.org/trac/ticket/4066. There's at least some 
>intention to try to figure it out before 2.4.0. For now, the workaround you 
>mention is the only one available.

> 

>Riki

 

Thank you for this pointer. I am a bit scared by this bug report having 13 
years and last update being 12 months ago, but let’s stay positive it will 
happen  

 

Andrew wrote:

 

>But you can eliminate the red box from showing by closing the inset (click on 
>the inset label to toggle open/closed).

 

Thanks for this workaround. I did actually notice this shortly after sending my 
email and must admit that it is already a big progress that I can at least get 
rid of the annoying  red box.

 

>Alternatively, there is a hybrid Latex/LyX solution, that avoids going to the 
>menu to insert custom insets and uses keyboard shortcuts instead.

>1. Ensure instant preview is On (Tools > Preferences > Look & Feel >

>Display)

>2. Assign a keyboard shortcut to preview-insert (Tools > Preferences > Editing 
>> Shortcuts > Cursor, Mouse and Editing Functions). Now that printing directly 
>from LyX is no longer supported the shortcut Ctrl+P is available.

>3. Enter in the preamble (Document > Settings > Latex Preamble)

>   \newcommand*{\projectName}{ My Project Name }

>   and click OK.

> 

>To enter the project name in the document,

>4. insert a preview inset (Ctrl+P)

>5. insert an ert inset (Ctrl+L) inside the preview inset. On a QWERTY 
>keyboard, the P and L? keys are diagonal neighbours so steps 4 & 5 involve 
>holding the ctrl key down and tapping P and L in quick succession.

>6. enter \projectName in the ert inset

>7. move the cursor outside the insets. The preview does its magic and the 
>project name is shown.

 

Thanks for this workaround. I will give it a try but I fear that keyboard 
shortcuts will not be an option in my case because I will risk to have quite a 
number of such “name” macros.

 

Thanks to both of you, very much appreciated!

 

-- next part --

An HTML attachment was scrubbed...

URL: 


 

--

 

Message: 2

Date: Sun, 19 Apr 2020 03:00:09 +0200

From: Bernd mailto:bernd.kappenb...@gmx.de> >

To: LyX Users List mailto:lyx-users@lists.lyx.org> >

Subject: Archaic Greek?

Message-ID: <2a28dde0-706e-ae44-7e5b-1785073bb...@gmx.de 
 >

Content-Type: text/plain; charset=utf-8; format=flowed

 

I am looking for an archaic Greek font. (Not sure it is the right forum...)

 

I downloaded one from MiKTeX (https://ctan.org/pkg/greek6cbc) and the whole 
archaic bundle, but I cannot get it to work -- maybe incompatible with Unicode?

 

Any alternative suggestions are welcome!

 

Kind regards,

 

Bernd

 

-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Custom layout inset without arguments

2020-04-18 Thread Andrew Parsloe


On 19/04/2020 6:36 am, Richard Kimberly Heck wrote:

On 4/18/20 9:49 AM, Gaston Gloesener wrote:


InsetLayout "Flex:projectNameInset"

  LabelString “My Project Name"

  LatexType Command

  LaTexName projectName

  LyxType "custom"

  Decoration Classic

  Preamble

    \newcommand*{\projectName}{ My Project Name }

  EndPreamble

End

The problem with this InsetLayout is that LyX always displays a red 
parameter input box after the insert of the inset and this is quite 
annoying in this use case as such insets will be quite common in the 
document. Is there any method for removing this as this macro does 
not require any arguments. I tried to set LatexType to None with no 
success and did not identify any other potential solution. Also 
google did not show me any potential solutions for this.


After some research and looking up in files provided with LyX I seem 
to understand that basically insets are always expected to have some 
type of conments and the use I make of it here is more a work-a-round 
than a solution. At least I was unable to locate an inset where no 
content was excpected.


So the question remains:

  * Is there a way to prevent LyX from asking for some content (red box)
  * If not, is there another solutioin than the one used here to
achieve the same goals and avoid that input box ?
  * would it be possible to add an attribute to InsetLayout to
disable the contents box in the doc text in a future version ?
(like NoContent)

This is bug #4066: https://www.lyx.org/trac/ticket/4066. There's at 
least some intention to try to figure it out before 2.4.0. For now, 
the workaround you mention is the only one available.


Riki

But you can eliminate the red box from showing by closing the inset 
(click on the inset label to toggle open/closed).


Alternatively, there is a hybrid Latex/LyX solution, that avoids going 
to the menu to insert custom insets and uses keyboard shortcuts instead.


1. Ensure instant preview is On (Tools > Preferences > Look & Feel > 
Display)


2. Assign a keyboard shortcut to preview-insert (Tools > Preferences > 
Editing > Shortcuts > Cursor, Mouse and Editing Functions). Now that 
printing directly from LyX is no longer supported the shortcut Ctrl+P is 
available.


3. Enter in the preamble (Document > Settings > Latex Preamble)

\newcommand*{\projectName}{ My Project Name }

and click OK.

To enter the project name in the document,

4. insert a preview inset (Ctrl+P)

5. insert an ert inset (Ctrl+L) inside the preview inset. On a QWERTY 
keyboard, the P and L  keys are diagonal neighbours so steps 4 & 5 
involve holding the ctrl key down and tapping P and L in quick succession.


6. enter \projectName in the ert inset

7. move the cursor outside the insets. The preview does its magic and 
the project name is shown.


Andrew


-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Custom layout inset without arguments

2020-04-18 Thread Richard Kimberly Heck
On 4/18/20 9:49 AM, Gaston Gloesener wrote:
>
> Hello,
>
>  
>
> NOTE: if you are not interested in my history of TeX/LaTex and Lyx
> just jump to the question below :-D
>
>  
>
> I am very new to Lyx but a very “old” Tex/LaTeX user, while I was not
> using it for long time right now. I started using TeX/LaTeX back in
> the 1990’s where I used it for writing several project documents and
> even wrote a quite complex package for building figures of binary data
> structures.
>
>  
>
> So I did have some very deep TeX knowledge at that time, while I have
> to admit that now I have to lookup everything again like a noob  But
> due to the former use the bits come up and fit together quite easily
> again. When it comes to LaTeX my knowledge is also much smaller than
> at that time but still better then plain TeX “internals”.
>
>  
>
> This said, I decided to start a rather quite huge project
> documentation using LaTeX again for reasons of the target audience of
> the project. While I was used to write all my documents in plain LaTeX
> in ascii mode I decided to give a modern frontend a try this time.
> After some research and reading my choice did obviously fall on LyX.
> This was yesterday late evening  and I decided to start with MikTex
> after also some research on both options. I was not expecting LyX to
> trigger as many MikTex  package downloads which voided one advantage
> of MikTex and also hung at some point. So I went back and went with
> TexLive this time. Installation took a long time (as expected) but
> worked this time including LyX which I reinstalled just for not having
> to search on how to switch TeX instance and making sure it’s a clean
> installation as well.
>
>  
>
> _Question_
>
>  
>
> First I want to mention that I did RFM (LyX user and customization
> manuals relevant sections) and used google with no success
>
>  
>
> I was looking for a way to use macros for entity names which may
> change throughout the lifecycle of the documents (like the project
> name). I know how to do it using a TeX macro but I wanted it to be a
> LyX integrated solution. The solution was found via google  to be an
> InsetLayout in the local layout settings. I did quickly understand the
> main mechanics and attributes so that I got it to work and looked up
> the details in the LyX customization manual.
>
>  
>
>  
>
> InsetLayout "Flex:projectNameInset"
>
>   LabelString “My Project Name"
>
>   LatexType Command
>
>   LaTexName projectName
>
>   LyxType "custom"
>
>   Decoration Classic
>
>   Preamble
>
>     \newcommand*{\projectName}{ My Project Name }
>
>   EndPreamble
>
> End
>
>  
>
> The problem with this InsetLayout is that LyX always displays a red
> parameter input box after the insert of the inset and this is quite
> annoying in this use case as such insets will be quite common in the
> document. Is there any method for removing this as this macro does not
> require any arguments. I tried to set LatexType to None with no
> success and did not identify any other potential solution. Also google
> did not show me any potential solutions for this.
>
>  
>
> After some research and looking up in files provided with LyX I seem
> to understand that basically insets are always expected to have some
> type of conments and the use I make of it here is more a work-a-round
> than a solution. At least I was unable to locate an inset where no
> content was excpected.
>
>  
>
> So the question remains:
>
>  
>
>   * Is there a way to prevent LyX from asking for some content (red box)
>   * If not, is there another solutioin than the one used here to
> achieve the same goals and avoid that input box ?
>   * would it be possible to add an attribute to InsetLayout to disable
> the contents box in the doc text in a future version ? (like
> NoContent)
>
This is bug #4066: https://www.lyx.org/trac/ticket/4066. There's at
least some intention to try to figure it out before 2.4.0. For now, the
workaround you mention is the only one available.

Riki



-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Custom layout inset without arguments

2020-04-18 Thread Gaston Gloesener
Hello,

 

NOTE: if you are not interested in my history of TeX/LaTex and Lyx just jump to 
the question below :-D

 

I am very new to Lyx but a very “old” Tex/LaTeX user, while I was not using it 
for long time right now. I started using TeX/LaTeX back in the 1990’s where I 
used it for writing several project documents and even wrote a quite complex 
package for building figures of binary data structures.

 

So I did have some very deep TeX knowledge at that time, while I have to admit 
that now I have to lookup everything again like a noob  But due to the former 
use the bits come up and fit together quite easily again. When it comes to 
LaTeX my knowledge is also much smaller than at that time but still better then 
plain TeX “internals”.

 

This said, I decided to start a rather quite huge project documentation using 
LaTeX again for reasons of the target audience of the project. While I was used 
to write all my documents in plain LaTeX in ascii mode I decided to give a 
modern frontend a try this time. After some research and reading my choice did 
obviously fall on LyX. This was yesterday late evening  and I decided to start 
with MikTex after also some research on both options. I was not expecting LyX 
to trigger as many MikTex  package downloads which voided one advantage of 
MikTex and also hung at some point. So I went back and went with TexLive this 
time. Installation took a long time (as expected) but worked this time 
including LyX which I reinstalled just for not having to search on how to 
switch TeX instance and making sure it’s a clean installation as well.

 

Question

 

First I want to mention that I did RFM (LyX user and customization manuals 
relevant sections) and used google with no success

 

I was looking for a way to use macros for entity names which may change 
throughout the lifecycle of the documents (like the project name). I know how 
to do it using a TeX macro but I wanted it to be a LyX integrated solution. The 
solution was found via google  to be an InsetLayout in the local layout 
settings. I did quickly understand the main mechanics and attributes so that I 
got it to work and looked up the details in the LyX customization manual. 

 

 

InsetLayout "Flex:projectNameInset"

  LabelString “My Project Name"

  LatexType Command

  LaTexName projectName

  LyxType "custom"

  Decoration Classic

  Preamble

\newcommand*{\projectName}{ My Project Name }

  EndPreamble

End

 

The problem with this InsetLayout is that LyX always displays a red parameter 
input box after the insert of the inset and this is quite annoying in this use 
case as such insets will be quite common in the document. Is there any method 
for removing this as this macro does not require any arguments. I tried to set 
LatexType to None with no success and did not identify any other potential 
solution. Also google did not show me any potential solutions for this.

 

After some research and looking up in files provided with LyX I seem to 
understand that basically insets are always expected to have some type of 
conments and the use I make of it here is more a work-a-round than a solution. 
At least I was unable to locate an inset where no content was excpected.

 

So the question remains:

 

*   Is there a way to prevent LyX from asking for some content (red box)
*   If not, is there another solutioin than the one used here to achieve 
the same goals and avoid that input box ?
*   would it be possible to add an attribute to InsetLayout to disable the 
contents box in the doc text in a future version ? (like NoContent)

 

Many thanks for reading,

And more thanks for replying ,

Gatson

 

 

-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users