Re: preview of ert environment inside a table cell has weird bounds

2024-05-09 Thread Jean-Marc Lasgouttes

Le 08/05/2024 à 20:33, matan guedj a écrit :
In using the latest version of LyX (2.3.7) when I insert an ERT 
environment inside a preview, and all of that inside a table cell the 
output on the lyx file takes a huge part of the page-length preview of 
the ERT inside LyX file <https://i.sstatic.net/6H3KbJ6B.png> (I can't 
fit it all in the screen)


the code inside ERT environment <https://i.sstatic.net/2YZxulM6.png>

but the compiled file actually handles it correctly as you can see in 
the pic here the compiled output <https://i.sstatic.net/4axuAKZL.png>


is there a way to ensure that the preview inside the lyx document itself 
will also be bounded to a certain size. just for ease of readability 
inside the LyX document itself.


Matin,

Could you give us a minimal demo file, so that we can play with it? Do 
you use luatex like Tobias described?


JMarc

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


Re: preview of ert environment inside a table cell has weird bounds

2024-05-09 Thread Tobias Hilbricht
Am Mittwoch, dem 08.05.2024 um 21:33 +0300 schrieb matan guedj:
> In using the latest version of LyX (2.3.7) when I insert an ERT
> environment inside a preview, and all of that inside a table cell the
> output on the lyx file takes a huge part of the page-length preview
> of the ERT inside LyX file (I can't fit it all in the screen)
> the code inside ERT environment
> but the compiled file actually handles it correctly as you can see in
> the pic here the compiled output

I observe the very same with math insets when the preselected output is
with *PDF (luatex)*, but not with pdflatex or xetex. To reproduce, open
a document, document > settings > output > preselected output
PDF(luatex), insert some text and math, close document and open again.
Previews takes up huge space and make work uncomfortable. Remedy /
workaround: Choose output xetex or pdflatex. This is with LyX 2.3.7 and
2.4.0~RC4 on Ubuntu 22.04.4 with 

lualatex --version
This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)
Development id: 7611

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


preview of ert environment inside a table cell has weird bounds

2024-05-08 Thread matan guedj
In using the latest version of LyX (2.3.7) when I insert an ERT environment
inside a preview, and all of that inside a table cell the output on the lyx
file takes a huge part of the page-length preview of the ERT inside LyX file
<https://i.sstatic.net/6H3KbJ6B.png> (I can't fit it all in the screen)

the code inside ERT environment <https://i.sstatic.net/2YZxulM6.png>

but the compiled file actually handles it correctly as you can see in the
pic here the compiled output <https://i.sstatic.net/4axuAKZL.png>

is there a way to ensure that the preview inside the lyx document itself
will also be bounded to a certain size. just for ease of readability inside
the LyX document itself.

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


Re: Nesting in Standard environment---Dumb question

2023-07-19 Thread Hal Kierstead via lyx-users


> On Jul 19, 2023, at 11:18 AM, Hal Kierstead via lyx-users 
>  wrote:
> 
> 
> 
>> On Jul 19, 2023, at 9:57 AM, Axel Dessecker  wrote:
>> 
>> Am Mittwoch, 19. Juli 2023, 16:12:20 CEST schrieb Hal Kierstead via 
>> lyx-users:
>>> All -
>>> 
>>> I am trying to follow these instructions from the UserGuide, but the
>>> character I should enter is undefined. I expected it to be   which
>>> works to nest lists in lists, but this did not work. Can someone help me?
>>> 
>>> 0.0.0.1 Example 2: Inheritance
>>> This is the LyX-Code environment, at level #1, the outermost
>>> level.  Now we will enter Return, then undefined, after
>>> which, we will change to the Enumerate environment.
>>> This is the Enumerate environment, at level #2.
>>> Notice how the nested Enumerate not only inherits its margins from its
>>> parent environment (LyX-Code), but also inherits its font and spacing!
>>> 
>>> I am using LyX 2.3.7 on maxOS 13.7.1(c)
>>> 
>>> Thanks,
>>> 
>>> Hal
>> 
>> Hal,
>> 
>> This instruction is misleading indeed. My version says you should try 
>> Alt+Enter+Right.
>> 
>> Axel
> 
> Axel - 
> Thanks for trying, but this did not work.
> Hal

Sorry, I had forgotten how this works—the list is already indented.
Hal 

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


Re: Nesting in Standard environment

2023-07-19 Thread Hal Kierstead via lyx-users



> On Jul 19, 2023, at 9:57 AM, Axel Dessecker  wrote:
> 
> Am Mittwoch, 19. Juli 2023, 16:12:20 CEST schrieb Hal Kierstead via lyx-users:
>> All -
>> 
>> I am trying to follow these instructions from the UserGuide, but the
>> character I should enter is undefined. I expected it to be   which
>> works to nest lists in lists, but this did not work. Can someone help me?
>> 
>> 0.0.0.1 Example 2: Inheritance
>> This is the LyX-Code environment, at level #1, the outermost
>> level.  Now we will enter Return, then undefined, after
>> which, we will change to the Enumerate environment.
>> This is the Enumerate environment, at level #2.
>> Notice how the nested Enumerate not only inherits its margins from its
>> parent environment (LyX-Code), but also inherits its font and spacing!
>> 
>> I am using LyX 2.3.7 on maxOS 13.7.1(c)
>> 
>> Thanks,
>> 
>> Hal
> 
> Hal,
> 
> This instruction is misleading indeed. My version says you should try 
> Alt+Enter+Right.
> 
> Axel

Axel - 
Thanks for trying, but this did not work.
Hal

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


Re: Nesting in Standard environment

2023-07-19 Thread Axel Dessecker via lyx-users
Am Mittwoch, 19. Juli 2023, 16:12:20 CEST schrieb Hal Kierstead via lyx-users:
> All -
> 
> I am trying to follow these instructions from the UserGuide, but the
> character I should enter is undefined. I expected it to be   which
> works to nest lists in lists, but this did not work. Can someone help me?
> 
>  0.0.0.1 Example 2: Inheritance
> This is the LyX-Code environment, at level #1, the outermost
> level.  Now we will enter Return, then undefined, after
> which, we will change to the Enumerate environment.
> This is the Enumerate environment, at level #2.
> Notice how the nested Enumerate not only inherits its margins from its
> parent environment (LyX-Code), but also inherits its font and spacing!
> 
> I am using LyX 2.3.7 on maxOS 13.7.1(c)
> 
> Thanks,
> 
> Hal

Hal,

This instruction is misleading indeed. My version says you should try 
Alt+Enter+Right.

Axel




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


Nesting in Standard environment

2023-07-19 Thread Hal Kierstead via lyx-users
All -

I am trying to follow these instructions from the UserGuide, but the character 
I should enter is undefined. I expected it to be   which works to nest 
lists in lists, but this did not work. Can someone help me?

 0.0.0.1 Example 2: Inheritance
This is the LyX-Code environment, at level #1, the outermost
level.  Now we will enter Return, then undefined, after 
which, we will change to the Enumerate environment.
This is the Enumerate environment, at level #2.
Notice how the nested Enumerate not only inherits its margins from its parent 
environment (LyX-Code), but also inherits its font and spacing!

I am using LyX 2.3.7 on maxOS 13.7.1(c)

Thanks,

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


Re: Change to English on entering math environment

2023-03-01 Thread Yotam Ohad
Thanks, that's exactly what I wanted to do

On Mon, 27 Feb 2023 at 23:35, Udicoudco  wrote:

> On Sat, Feb 25, 2023 at 10:44 PM Richard Kimberly Heck
>  wrote:
> >
> > On 2/25/23 15:22, Yotam Ohad wrote:
> > > Hi all,
> > >
> > > I usually write in Hebrew on Lyx, and when I create a math environment
> > > with `ctrl+m` I need to manually change the language to english.
> > >
> > > I tried looking for how to add something like this and saw that there
> > > are custom insets I can add. But I couldn't find how to actually do it
> > > (only how the syntax of the definition of the custom inset should be)
> >
> > I'm not sure what you want to add. Do you want a special inset that will
> > automatically change to English?
> >
> > One thing you can do is set up a shortcut to do the language change.
> > That would at least save fussing with the mouse.
> >
> > Riki
> >
> > PS Posting to this list is restricted to subscribers, to fight spam. I
> > manually accpeted your post, but you may want to subscribe before
> > posting again.
> >
> >
>
> I suggest using keyboard mapping, I think this is disabled inside math
> insets.
> Go to Tools->Preferences->Editing->Keyboard/Mouse, check the
> "use keyboard map" box, then write in the primary field null, and in the
> secondary field hebrew.
>
> Now when you write outside of math insets it should be in Hebrew,
> even if your keyboard is in english (so you won't have to switch).
>
> But how will you be able to write in english? as Riki suggested, create
> a shortcut to switch between the languages. To do so, go to
> Tools->Preferences->Editing->Shortcuts, press on New, in the Function
> field write (without the quotation marks) "language hebrew", and in the
> shortcut field, well, press the keys you want for the short cut.
>
> Regards,
> Udi
>
> >
> > --
> > lyx-users mailing list
> > lyx-users@lists.lyx.org
> > http://lists.lyx.org/mailman/listinfo/lyx-users
>
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Change to English on entering math environment

2023-02-27 Thread Udicoudco
On Sat, Feb 25, 2023 at 10:44 PM Richard Kimberly Heck
 wrote:
>
> On 2/25/23 15:22, Yotam Ohad wrote:
> > Hi all,
> >
> > I usually write in Hebrew on Lyx, and when I create a math environment
> > with `ctrl+m` I need to manually change the language to english.
> >
> > I tried looking for how to add something like this and saw that there
> > are custom insets I can add. But I couldn't find how to actually do it
> > (only how the syntax of the definition of the custom inset should be)
>
> I'm not sure what you want to add. Do you want a special inset that will
> automatically change to English?
>
> One thing you can do is set up a shortcut to do the language change.
> That would at least save fussing with the mouse.
>
> Riki
>
> PS Posting to this list is restricted to subscribers, to fight spam. I
> manually accpeted your post, but you may want to subscribe before
> posting again.
>
>

I suggest using keyboard mapping, I think this is disabled inside math insets.
Go to Tools->Preferences->Editing->Keyboard/Mouse, check the
"use keyboard map" box, then write in the primary field null, and in the
secondary field hebrew.

Now when you write outside of math insets it should be in Hebrew,
even if your keyboard is in english (so you won't have to switch).

But how will you be able to write in english? as Riki suggested, create
a shortcut to switch between the languages. To do so, go to
Tools->Preferences->Editing->Shortcuts, press on New, in the Function
field write (without the quotation marks) "language hebrew", and in the
shortcut field, well, press the keys you want for the short cut.

Regards,
Udi

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


Re: Change to English on entering math environment

2023-02-25 Thread Richard Kimberly Heck

On 2/25/23 15:22, Yotam Ohad wrote:

Hi all,

I usually write in Hebrew on Lyx, and when I create a math environment 
with `ctrl+m` I need to manually change the language to english.


I tried looking for how to add something like this and saw that there 
are custom insets I can add. But I couldn't find how to actually do it 
(only how the syntax of the definition of the custom inset should be)


I'm not sure what you want to add. Do you want a special inset that will 
automatically change to English?


One thing you can do is set up a shortcut to do the language change. 
That would at least save fussing with the mouse.


Riki

PS Posting to this list is restricted to subscribers, to fight spam. I 
manually accpeted your post, but you may want to subscribe before 
posting again.



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


Change to English on entering math environment

2023-02-25 Thread Yotam Ohad
Hi all,

I usually write in Hebrew on Lyx, and when I create a math environment with
`ctrl+m` I need to manually change the language to english.
I tried looking for how to add something like this and saw that there are
custom insets I can add. But I couldn't find how to actually do it (only
how the syntax of the definition of the custom inset should be)

Thanks for your help,
Yotam
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Two body text type environment [UPDATE]

2022-08-08 Thread Rich Shepard

On Mon, 8 Aug 2022, Rich Shepard wrote:


I can mark cited regulations as unnumbered sections, subsections,
subsubsections, paragraphs, and subparagraphs. See mwe.pdf attached.


Sigh. Attached to this one.

Rich

mwe.pdf
Description: Adobe PDF document
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Two body text type environment [UPDATE]

2022-08-08 Thread Rich Shepard

On Mon, 8 Aug 2022, Rich Shepard wrote:


Is there a way to do this using a package that adds another environment to
the top-level set that includes Standard, Quotation, Quote, etc.? Or is
there a better way to do this?


I've found a pragmatic solution ... which has its own question.

I can mark cited regulations as unnumbered sections, subsections,
subsubsections, paragraphs, and subparagraphs. See mwe.pdf attached.

My question is whether I can indent the subsubparagraphs (a. through
whatever). The regulation is formatted that way and some agency staff insist
that submitted reports be formatted the same way. If there's not a way to
indent these sections and their compliance responses I'll go with what I
have and see what happens.

Regards,

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


Two body text type environment

2022-08-08 Thread Rich Shepard

I use the KOMA-Script classes. For regulatory compliance reports I need to
include each specific regulatory requirement followed by how the project
complies with it. I want the two sections to appear differently, perhaps the
regulatory requirement in an emphasized font and the compliance section in a
Roman font.

I've not found a package that allows me to do this. So far I'll set the
whole body text in the Standard environment, then change one section
(each piece separately) using Edit -> Type style -> Customized. It's a
rather inefficient PITA.

Is there a way to do this using a package that adds another environment to
the top-level set that includes Standard, Quotation, Quote, etc.? Or is
there a better way to do this?

Regards,

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


Custom environment with overset labels and cross-references

2022-04-18 Thread Riccardo
Dear all,
I'm trying to implement a module to allow labelling as oversets in
equations.
I have managed to use effectively the solution proposed here:
https://tex.stackexchange.com/a/40216/113780

And here is the result:
[image: image.png]

However it conceptually reverses labelling and referencing (see the
preamble and body in the attached LyX file).

Therefore I have two questions?
1. Does anyone know of a cleaner solution? It doesn't need to be compatible
with the amsmath package, but I wish it could be.
2. Is there any "getting started" page to write custom modules for LyX
(other than plain LateX code)? Even if the behaviour is reversed, I would
at least try to make it appear as if it is not. Any suggestion would be
appreciated.

Best regards,
Riccardo


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


Re: English environment is changed to textenglish

2022-02-21 Thread tush via lyx-users
Well done.
Thanks a lot!

--- Original Message ---
On Monday, February 21st, 2022 at 11:20 AM, tush via lyx-users 
 wrote:

> What do you mean "I have just fixed it"?
>
>  Original Message 
> On Feb 21, 2022, 10:55, Jürgen Spitzmüller via lyx-users < 
> lyx-users@lists.lyx.org> wrote:
>
>> Am Sonntag, dem 20.02.2022 um 18:00 + schrieb tush via lyx-users:
>>> Please consider the two lyx files attached.
>>> It is a MWE of a book that includes mainly Hebrew but also some
>>> English.
>>>
>>> The wrong thing here is that the last line is converted in LyX (via
>>> the Code Preview Pane) as
>>> \begin{english}
>>> Some text in English. This should be left aligned.
>>> \end{english}
>>>
>>> but when exporting `main.lyx` to tex (via XeTeX), this English
>>> sentence is formatted as
>>>
>>> \textenglish[variant=american]{Some text in English. This should
>>> be left aligned.}
>>>
>>> which causes the line to be right aligned.
>>>
>>> Why is it?
>>
>> This is a bug in LyX. I have just fixed it.
>>
>>> How to keep the English line of text to be inside an English
>>> environment?
>>
>> Workaround is to write \setLTR in TeX mode at the beginning of the
>> English paragraph, having the TeX mode inset itself in Hebrew. See
>> attached.
>>
>> Jürgen
>>
>> --
>> lyx-users mailing list
>> lyx-users@lists.lyx.org
>> http://lists.lyx.org/mailman/listinfo/lyx-users-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: English environment is changed to textenglish

2022-02-21 Thread Jürgen Spitzmüller via lyx-users
Am Montag, dem 21.02.2022 um 09:20 + schrieb tush via lyx-users:
> What do you mean "I have just fixed it"?

I mean that I have committed a fix to the LyX development repository
(what will become LyX 2.4.0). The fix might also be backported to the
next LyX 2.3 version, but this is not yet decided.

Jürgen



signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: English environment is changed to textenglish

2022-02-21 Thread tush via lyx-users
What do you mean "I have just fixed it"?

 Original Message 
On Feb 21, 2022, 10:55, Jürgen Spitzmüller via lyx-users wrote:

> Am Sonntag, dem 20.02.2022 um 18:00 + schrieb tush via lyx-users:
>> Please consider the two lyx files attached.
>> It is a MWE of a book that includes mainly Hebrew but also some
>> English.
>>
>> The wrong thing here is that the last line is converted in LyX (via
>> the Code Preview Pane) as
>> \begin{english}
>> Some text in English. This should be left aligned.
>> \end{english}
>>
>> but when exporting `main.lyx` to tex (via XeTeX), this English
>> sentence is formatted as
>>
>> \textenglish[variant=american]{Some text in English. This should
>> be left aligned.}
>>
>> which causes the line to be right aligned.
>>
>> Why is it?
>
> This is a bug in LyX. I have just fixed it.
>
>> How to keep the English line of text to be inside an English
>> environment?
>
> Workaround is to write \setLTR in TeX mode at the beginning of the
> English paragraph, having the TeX mode inset itself in Hebrew. See
> attached.
>
> Jürgen
>
> --
> lyx-users mailing list
> lyx-users@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: English environment is changed to textenglish

2022-02-21 Thread Jürgen Spitzmüller via lyx-users
Am Sonntag, dem 20.02.2022 um 18:00 + schrieb tush via lyx-users:
> Please consider the two lyx files attached.
> It is a MWE of a book that includes mainly Hebrew but also some
> English.
> 
> The wrong thing here is that the last line is converted in LyX (via
> the Code Preview Pane) as
>     \begin{english}
>     Some text in English. This should be left aligned.
>     \end{english}
> 
> but when exporting `main.lyx` to tex (via XeTeX), this English
> sentence is formatted as
> 
>     \textenglish[variant=american]{Some text in English. This should
> be left aligned.}
> 
> which causes the line to be right aligned.
> 
> Why is it? 

This is a bug in LyX. I have just fixed it.

> How to keep the English line of text to be inside an English
> environment?

Workaround is to write \setLTR in TeX mode at the beginning of the
English paragraph, having the TeX mode inset itself in Hebrew. See
attached.

Jürgen



ch01.lyx
Description: application/lyx


signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


English environment is changed to textenglish

2022-02-20 Thread tush via lyx-users
Please consider the two lyx files attached.
It is a MWE of a book that includes mainly Hebrew but also some English.

The wrong thing here is that the last line is converted in LyX (via the Code 
Preview Pane) as
\begin{english}
Some text in English. This should be left aligned.
\end{english}

but when exporting `main.lyx` to tex (via XeTeX), this English sentence is 
formatted as

\textenglish[variant=american]{Some text in English. This should be left 
aligned.}

which causes the line to be right aligned.

Why is it? How to keep the English line of text to be inside an English 
environment?<>
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Wrapping a long URL when in a URL environment [RESOLVED]

2021-12-09 Thread Rich Shepard via lyx-users

On Thu, 9 Dec 2021, Herbert Voss via lyx-users wrote:


\usepackage{xurl}


Herbert,

Thanks for writing that package. In the current document it split the word,
'water,' after the 'a' and without a hyphen. Looks good!

Regards,

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


Re: Wrapping a long URL when in a URL environment

2021-12-09 Thread Herbert Voss via lyx-users




Am 09.12.21 um 18:31 schrieb Rich Shepard via lyx-users:
In a URL environment the line extends past the right text area margin. 
Can I

use the regular ERT \- within the URL string to split it, or is there an
environment-specific way to so this?



\usepackage{xurl}


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


Wrapping a long URL when in a URL environment

2021-12-09 Thread Rich Shepard via lyx-users

In a URL environment the line extends past the right text area margin. Can I
use the regular ERT \- within the URL string to split it, or is there an
environment-specific way to so this?

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


Re: How to use the environment defined by \lstnewenvironment in LyX

2021-11-24 Thread Paul A. Rubin

On 11/24/21 2:00 AM, Guofeng Zhang wrote:

Hi,

I have created the new listing environment and use it in LyX by Tex 
Code well.Is there any way that I could configure LyX (for example,  
LyX's Programming Listings) to use this listing environment?


Searched by google, but no way to go , so I tried to create a LyX 
inset to use it. So another question: can I define an inset that 
always has full line width in the editor?


Thanks for your help!

Guofeng

I'm not sure this will help, but I have a couple of LyX modules in 
GitHub repositories that might give you some ideas.


The simpler module is "pseudolst" (https://github.com/prubin73/pseudolst 
<https://github.com/prubin73/pseudolst>). It adds some pseudocode 
capabilities by tweaking the standard LyX "listing" environment, 
effectively adding a new language for listings.


The more complex module is "pseudocode" 
(https://github.com/prubin73/algpseudocode 
<https://github.com/prubin73/algpseudocode>), which adds support for the 
algpseudocode style in the algorithmx LaTeX package. It provides new LyX 
paragraph styles for a gaggle of pseudocode commands. It could be that 
mimicking something like this but with one new style would be all you 
would need.


Both come with a LyX file containing instructions and demo code. To view 
the LyX files properly, you would need to install the required LaTeX 
package (listings.sty for the first, algorithmx for the second) if you 
don't already have it, install the module in your local modules 
directory, then reconfigure LyX. Before doing that, though, you might 
want to download the compiled versions of the documents (PDF files, one 
in each repo) and see if they resonate with you.


Paul

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


How to use the environment defined by \lstnewenvironment in LyX

2021-11-23 Thread Guofeng Zhang
Hi,

I have created the new listing environment and use it in LyX by Tex Code
well.Is there any way that I could configure LyX (for example,  LyX's
Programming Listings) to use this listing environment?

Searched by google, but no way to go , so I tried to create a LyX inset to
use it. So another question: can I define an inset that always has full
line width in the editor?

Thanks for your help!

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


Change spacing between aligned environment rows

2021-11-13 Thread Sanford Shieh
Using the aligned environment in LyX, is there a way of changing the spacing 
between rows by using, e.g., \\[2mm]? For example, can one, 
without ERT, have this:

\begin{equation}
\begin{aligned}
& \text{The fact that the entity whose name is to the \emph{right of} ‘\emph{is 
loved by}’}\\[-2mm]
& \text{loves the entity whose name is on the \emph{left of} ‘\emph{is loved 
by}’}
\end{aligned} \label{eq:m(y)-l2-m(x)}
\end{equation}

Sanford Shieh
Professor
Department  of Philosophy
Wesleyan University
谢舜虎
哲学系教授
维思理安大学
350 High Street
Middletown, CT 06459
USA
sanford.sh...@wesleyan.edu<mailto:sanford.sh...@wesleyan.edu>
+1 860 685 3646
[cid:image001.jpg@01D7D8AD.9150C350]
Most recent book: Necessity Lost: Modality and Logic in Early Analytic 
Philosophy, volume 
1<https://global.oup.com/academic/product/necessity-lost-9780199228645?cc=us=en;>
Reviews editor, Journal for the History of Analytical 
Philosophy<https://jhaponline.org/>
Secretary, Society for the Study of the History of Analytical 
Philosophy<http://sshap.org/>
Follow me on Academia<https://wesleyan.academia.edu/SanfordShieh> and 
ResearchGate<https://www.researchgate.net/profile/Sanford_Shieh>


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


SV: I need an environment similar to, but not identical to LyX-Code

2021-09-02 Thread Helge Hafting
> I need an environment similar to, but not identical to the LyX-Code
> environment. Specifically, I need the page margins to be the same as
> regular text, and I'd also like a smaller font.


LyX-code is defined in  /usr/share/lyx/layouts/lyxmacros.inc  (OSes other than 
Linux may use a different folder)

In this file, you find both the LyX layout specification, and the LaTeX code:


Style LyX-Code
Category  MainText
MarginStatic
LatexType Environment
LatexName lyxcode
NextNoIndent  1
LeftMarginMMM
RightMargin   MMM
TopSep0.5
BottomSep 0.5
Align Left
AlignPossible Block, Left, Right, Center
LabelType No_Label
FreeSpacing   1
Preamble
\newenvironment{lyxcode}
{\par\begin{list}{}{
\setlength{\rightmargin}{\leftmargin}
\setlength{\listparindent}{0pt}% needed for AMS 
classes
\raggedright
\setlength{\itemsep}{0pt}
\setlength{\parsep}{0pt}
\normalfont\ttfamily}%
 \item[]}
{\end{list}}
EndPreamble
Font
  Family  Typewriter
EndFont
End

LyX-Code is set using the LaTeX environment lyxcode, which is defined inside 
the style itself.



I happen to have a custom layout with with what you request; Code with smaller 
text and regular margins. The style looks like this:


Style Code-small
  CopyStyle LyX-Code
  LatexType Environment
  LatexName codesmall
  LeftMargin ""
  RightMargin ""
  Font
Size Scriptsize
Family Typewriter
  EndFont
  Spellcheck 0
  Preamble
 \newenvironment{codesmall}
 {\begin{scriptsize}\par\begin{list}{}{
 \setlength{\leftmargin}{0pt}
 \setlength{\rightmargin}{0pt}
 \setlength{\listparindent}{0pt}% needed for AMS classes
 \raggedright
 \setlength{\itemsep}{0pt}
 \setlength{\parsep}{0pt}
 \normalfont\ttfamily}%
 \item[]}
 {\end{list}\end{scriptsize}}
  EndPreamble
End

Feel free to adapt it to your needs.Perhaps you want another size instead of 
Scriptsize.


Helge Hafting


Fra: lyx-users  på vegne av Steve Litt 

Sendt: fredag 11. juni 2021 01:54:03
Til: lyx-users@lists.lyx.org
Emne: I need an environment similar to, but not identical to LyX-Code

I need an environment similar to, but not identical to the LyX-Code
environment. Specifically, I need the page margins to be the same as
regular text, and I'd also like a smaller font.

So I figured I'd find the LaTeX definition of LyX-Code and work from
there, possibly using CopyStyle. But I've searched for 1/2 hour and
cannot find the TeX definition of the latexname part of LyX-Code, nor
can I find the LyX user interface part of LyX-Code.

So where can I find the definition of LyX-Code?

SteveT

Steve Litt
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: How to superscript within a date environment

2021-07-29 Thread Daniel

On 2021-07-28 00:07, Steve Litt wrote:

Daniel said on Tue, 27 Jul 2021 07:34:05 +0200


On 2021-07-25 07:22, Daniel wrote:

On 2021-07-25 07:09, Steve Litt wrote:

Hi all,

On my book, I used the date environment to write "A
Troubleshooters.Com(R) book, except I used \textregistered. I wanted
the (R) superscripted, and couldn't find ways that didn't involve
math. So I finally put the following in ERT (TeX)

$^{\footnotesize\textregistered}$


This gave me a "Missing glyphs!" error.

Without using math, couldn't you insert a superscript (Insert >
Formatting > Superscript) and then \textregistered in ERT (Insert >
TeX Code)?

Daniel
   


I am still a little puzzled what the original problem was. But you can
even skip the use of ERT (in the second step I mentioned) and just
insert the (R) via Insert > Special Character > Symbol...


The original problem was that I didn't know how to do what you mention
in the preceding paragraph. One question remains: Will what you
reveal in the preceding paragraph also make the (R) smaller and raise
it to superscript? If so, I'll document it.


Indeed, it does make it smaller (script-size) ans raise it, i.e. set it 
in superscript.


Daniel

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


Re: How to superscript within a date environment

2021-07-27 Thread Steve Litt
Daniel said on Tue, 27 Jul 2021 07:34:05 +0200

>On 2021-07-25 07:22, Daniel wrote:
>> On 2021-07-25 07:09, Steve Litt wrote:  
>>> Hi all,
>>>
>>> On my book, I used the date environment to write "A
>>> Troubleshooters.Com(R) book, except I used \textregistered. I wanted
>>> the (R) superscripted, and couldn't find ways that didn't involve
>>> math. So I finally put the following in ERT (TeX)
>>>
>>> $^{\footnotesize\textregistered}$  
>> 
>> This gave me a "Missing glyphs!" error.
>> 
>> Without using math, couldn't you insert a superscript (Insert > 
>> Formatting > Superscript) and then \textregistered in ERT (Insert >
>> TeX Code)?
>> 
>> Daniel
>>   
>
>I am still a little puzzled what the original problem was. But you can 
>even skip the use of ERT (in the second step I mentioned) and just 
>insert the (R) via Insert > Special Character > Symbol...

The original problem was that I didn't know how to do what you mention
in the preceding paragraph. One question remains: Will what you
reveal in the preceding paragraph also make the (R) smaller and raise
it to superscript? If so, I'll document it. 

Thanks,

SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: How to superscript within a date environment

2021-07-26 Thread Daniel

On 2021-07-25 07:22, Daniel wrote:

On 2021-07-25 07:09, Steve Litt wrote:

Hi all,

On my book, I used the date environment to write "A
Troubleshooters.Com(R) book, except I used \textregistered. I wanted
the (R) superscripted, and couldn't find ways that didn't involve math.
So I finally put the following in ERT (TeX)

$^{\footnotesize\textregistered}$


This gave me a "Missing glyphs!" error.

Without using math, couldn't you insert a superscript (Insert > 
Formatting > Superscript) and then \textregistered in ERT (Insert > TeX 
Code)?


Daniel



I am still a little puzzled what the original problem was. But you can 
even skip the use of ERT (in the second step I mentioned) and just 
insert the (R) via Insert > Special Character > Symbol...


Daniel

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


Re: How to superscript within a date environment

2021-07-25 Thread Daniel

On 2021-07-25 08:46, Herbert Voss wrote:



Am 25.07.21 um 07:22 schrieb Daniel:

On 2021-07-25 07:09, Steve Litt wrote:

Hi all,

On my book, I used the date environment to write "A
Troubleshooters.Com(R) book, except I used \textregistered. I wanted
the (R) superscripted, and couldn't find ways that didn't involve math.
So I finally put the following in ERT (TeX)

$^{\footnotesize\textregistered}$


This gave me a "Missing glyphs!" error.


foo\textsuperscript\textregistered

Herbert


Yes, you can solve the error by using textsuperscript. However, entering 
math mode seems superfluous then. And outside of math mode, you can just 
use the LyX functionality to achieve the same result as suggested below.


Without using math, couldn't you insert a superscript (Insert > 
Formatting > Superscript) and then \textregistered in ERT (Insert > 
TeX Code)?


Daniel






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


Re: How to superscript within a date environment

2021-07-25 Thread Herbert Voss




Am 25.07.21 um 07:22 schrieb Daniel:

On 2021-07-25 07:09, Steve Litt wrote:

Hi all,

On my book, I used the date environment to write "A
Troubleshooters.Com(R) book, except I used \textregistered. I wanted
the (R) superscripted, and couldn't find ways that didn't involve math.
So I finally put the following in ERT (TeX)

$^{\footnotesize\textregistered}$


This gave me a "Missing glyphs!" error.


foo\textsuperscript\textregistered

Herbert



Without using math, couldn't you insert a superscript (Insert > 
Formatting > Superscript) and then \textregistered in ERT (Insert > 
TeX Code)?


Daniel



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


Re: How to superscript within a date environment

2021-07-24 Thread Daniel

On 2021-07-25 07:09, Steve Litt wrote:

Hi all,

On my book, I used the date environment to write "A
Troubleshooters.Com(R) book, except I used \textregistered. I wanted
the (R) superscripted, and couldn't find ways that didn't involve math.
So I finally put the following in ERT (TeX)

$^{\footnotesize\textregistered}$


This gave me a "Missing glyphs!" error.

Without using math, couldn't you insert a superscript (Insert > 
Formatting > Superscript) and then \textregistered in ERT (Insert > TeX 
Code)?


Daniel

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


How to superscript within a date environment

2021-07-24 Thread Steve Litt
Hi all,

On my book, I used the date environment to write "A
Troubleshooters.Com(R) book, except I used \textregistered. I wanted
the (R) superscripted, and couldn't find ways that didn't involve math.
So I finally put the following in ERT (TeX)

$^{\footnotesize\textregistered}$

I'm sure most of you know this already, but for anyone who doesn't,
this is how it's done.

SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Command to put string in both the LyX authoring environment and the finished PDF?

2021-06-22 Thread Steve Litt
Richard Kimberly Heck said on Tue, 22 Jun 2021 11:16:56 -0400


>>
>> I changed the [0] number of arguments in the LaTeX command to [1] in
>> order to consume the argument. Once I did that, whatever I put in the
>> character style does not show up in the PDF.  
>
>There's a long-standing request for non-math macros, which is exactly
>what's needed here. Someday when I have time to work on LyX again, I
>might take that on.

Nice!


SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Command to put string in both the LyX authoring environment and the finished PDF?

2021-06-22 Thread Richard Kimberly Heck
On 6/22/21 10:05 AM, Steve Litt wrote:
> Steve Litt said on Sun, 20 Jun 2021 17:39:52 -0400
>
>> Hi all,
>>
>> I have a local layout, based on Book-extsizes, for my new book. I have
>> no idea what the book's title will be yet, and I sure nuff don't want
>> to have to search all instances of that title and replace them every
>> time I get a better idea for the title.
>>
>> S, what I want to do is put something in my local layout to
>> articulate the title, both in the LyX authoring environment and in the
>> compiled PDF, showing the title in a specific appearance. I tried to do
>> it as a character style, as follows:
>>
>> 
>> \definecolor{titlebodytextcolor}{HTML}{cc}
>>
>> % ### Character style for book title within body text
>> \newcommand{\chartitlebodytextL}[0]{{\color{titlebodytextcolor}My
>> Current Title As Of Today}}%
>>
>> CharStyle CharTitleInBody
>> Font
>>  Series  Bold
>>  Color   Red
>> EndFont
>> LabelFont
>>  Series  Bold
>>  SizeLarger
>>  Color   Red
>> EndLabelFont
>> LatexNamechartitlebodytextL
>> LatexTypeCommand
>> LabelString "My Current Title As Of Today"
>> End
>> ========
>>
>> If I apply the character style CharTitleInBody to an empty string in
>> LyX, the exact right thing happens in the PDF, but in the LyX
>> authoring environment the title appears under the character style inset
>> and also under the following text, which is very disturbing if you're
>> trying to copy-edit your book in the LyX environment.
>>
>> Does anybody know what I can do to make the text appear inline, instead
>> of underneath, within the LyX authoring environment?
> My workaround is as follows:
>
> I changed the [0] number of arguments in the LaTeX command to [1] in
> order to consume the argument. Once I did that, whatever I put in the
> character style does not show up in the PDF.

There's a long-standing request for non-math macros, which is exactly
what's needed here. Someday when I have time to work on LyX again, I
might take that on.

Riki


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


Re: Command to put string in both the LyX authoring environment and the finished PDF?

2021-06-22 Thread Steve Litt
Steve Litt said on Sun, 20 Jun 2021 17:39:52 -0400

>Hi all,
>
>I have a local layout, based on Book-extsizes, for my new book. I have
>no idea what the book's title will be yet, and I sure nuff don't want
>to have to search all instances of that title and replace them every
>time I get a better idea for the title.
>
>S, what I want to do is put something in my local layout to
>articulate the title, both in the LyX authoring environment and in the
>compiled PDF, showing the title in a specific appearance. I tried to do
>it as a character style, as follows:
>
>
>\definecolor{titlebodytextcolor}{HTML}{cc}
>
>% ### Character style for book title within body text
>\newcommand{\chartitlebodytextL}[0]{{\color{titlebodytextcolor}My
>Current Title As Of Today}}%
>
>CharStyle CharTitleInBody
>Font
>   Series  Bold
>   Color   Red
>EndFont
>LabelFont
>   Series  Bold
>   SizeLarger
>   Color   Red
>EndLabelFont
>LatexName  chartitlebodytextL
>LatexType  Command
>LabelString "My Current Title As Of Today"
>End
>
>
>If I apply the character style CharTitleInBody to an empty string in
>LyX, the exact right thing happens in the PDF, but in the LyX
>authoring environment the title appears under the character style inset
>and also under the following text, which is very disturbing if you're
>trying to copy-edit your book in the LyX environment.
>
>Does anybody know what I can do to make the text appear inline, instead
>of underneath, within the LyX authoring environment?

My workaround is as follows:

I changed the [0] number of arguments in the LaTeX command to [1] in
order to consume the argument. Once I did that, whatever I put in the
character style does not show up in the PDF.

Next, I changed the LyX label font size from Larger to Small, so it
wouldn't take up as much line length. Finally, I put a bunch of z
characters in the inset, so the inset and the label would be
approximately the same length. What this accomplished is that the title
actually looks reasonable in a line in the LyX authoring environment,
and the correct title shows up in the PDF.

Several of you had excellent ideas, including ERT LaTeX command, a Perl
script, and some other ideas. Thanks for the great ideas. Ultimately, I
decided that my workaround best meets my workflow needs for this
project.

Thanks,

SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Command to put string in both the LyX authoring environment and the finished PDF?

2021-06-21 Thread Dr Eberhard Lisse



On 2021-06-21 01:44 , Paul A. Rubin wrote:

On 6/20/21 5:39 PM, Steve Litt wrote:

Hi all,

I have a local layout, based on Book-extsizes, for my new book. I have
no idea what the book's title will be yet, and I sure nuff don't want
to have to search all instances of that title and replace them every
time I get a better idea for the title.

[...]


This is not an answer to your question, but possibly something
simpler.  If you load the 'titling' package in the document preamble,
you can put anything you want in the document's title environment and
then just use \thetitle (or maybe \thetitle{}) in ERT any place you
want to repeat the title.  If you get the hots for a new title later,
you just have to change it in the title environment.  This doesn't
deal directly with the funky formatting of the title, but it does
eliminate the search-and-replace aspect.

Paul



This is not an answer to your question, but I use stuff like $$SURNAME$$
in a number of my LyX templates and then something like

$Surname = 'Doe';
s/\$\$SURNAME\$\$/$Surname/g';

in my Perl script to fill in the variables :-)-O

el

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


Re: Command to put string in both the LyX authoring environment and the finished PDF?

2021-06-21 Thread Andrew Parsloe


On 21/06/2021 9:39 am, Steve Litt wrote:

Hi all,

I have a local layout, based on Book-extsizes, for my new book. I have
no idea what the book's title will be yet, and I sure nuff don't want
to have to search all instances of that title and replace them every
time I get a better idea for the title.

S, what I want to do is put something in my local layout to
articulate the title, both in the LyX authoring environment and in the
compiled PDF, showing the title in a specific appearance. I tried to do
it as a character style, as follows:


\definecolor{titlebodytextcolor}{HTML}{cc}

% ### Character style for book title within body text
\newcommand{\chartitlebodytextL}[0]{{\color{titlebodytextcolor}My
Current Title As Of Today}}%

CharStyle CharTitleInBody
Font
Series  Bold
Color   Red
EndFont
LabelFont
Series  Bold
SizeLarger
Color   Red
EndLabelFont
LatexName   chartitlebodytextL
LatexType   Command
LabelString "My Current Title As Of Today"
End


If I apply the character style CharTitleInBody to an empty string in
LyX, the exact right thing happens in the PDF, but in the LyX
authoring environment the title appears under the character style inset
and also under the following text, which is very disturbing if you're
trying to copy-edit your book in the LyX environment.

Does anybody know what I can do to make the text appear inline, instead
of underneath, within the LyX authoring environment?

Thanks,

SteveT


Steve, does adding

Decoration  minimalistic

after CharStyle CharTitleInBody help? Or

Decoration  classic

if you prefer? Your current style uses the CharStyle default decoration  
called conglomerate.


Andrew

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


Re: Command to put string in both the LyX authoring environment and the finished PDF?

2021-06-20 Thread Paul A. Rubin

On 6/20/21 5:39 PM, Steve Litt wrote:

Hi all,

I have a local layout, based on Book-extsizes, for my new book. I have
no idea what the book's title will be yet, and I sure nuff don't want
to have to search all instances of that title and replace them every
time I get a better idea for the title.

S, what I want to do is put something in my local layout to
articulate the title, both in the LyX authoring environment and in the
compiled PDF, showing the title in a specific appearance. I tried to do
it as a character style, as follows:


\definecolor{titlebodytextcolor}{HTML}{cc}

% ### Character style for book title within body text
\newcommand{\chartitlebodytextL}[0]{{\color{titlebodytextcolor}My
Current Title As Of Today}}%

CharStyle CharTitleInBody
Font
Series  Bold
Color   Red
EndFont
LabelFont
Series  Bold
SizeLarger
Color   Red
EndLabelFont
LatexName   chartitlebodytextL
LatexType   Command
LabelString "My Current Title As Of Today"
End


If I apply the character style CharTitleInBody to an empty string in
LyX, the exact right thing happens in the PDF, but in the LyX
authoring environment the title appears under the character style inset
and also under the following text, which is very disturbing if you're
trying to copy-edit your book in the LyX environment.

Does anybody know what I can do to make the text appear inline, instead
of underneath, within the LyX authoring environment?

Thanks,

SteveT

Steve Litt
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques

Steve,

This is not an answer to your question, but possibly something simpler. 
If you load the 'titling' package in the document preamble, you can put 
anything you want in the document's title environment and then just use 
\thetitle (or maybe \thetitle{}) in ERT any place you want to repeat the 
title. If you get the hots for a new title later, you just have to 
change it in the title environment. This doesn't deal directly with the 
funky formatting of the title, but it does eliminate the 
search-and-replace aspect.


Paul

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


Command to put string in both the LyX authoring environment and the finished PDF?

2021-06-20 Thread Steve Litt
Hi all,

I have a local layout, based on Book-extsizes, for my new book. I have
no idea what the book's title will be yet, and I sure nuff don't want
to have to search all instances of that title and replace them every
time I get a better idea for the title.

S, what I want to do is put something in my local layout to
articulate the title, both in the LyX authoring environment and in the
compiled PDF, showing the title in a specific appearance. I tried to do
it as a character style, as follows:


\definecolor{titlebodytextcolor}{HTML}{cc}

% ### Character style for book title within body text
\newcommand{\chartitlebodytextL}[0]{{\color{titlebodytextcolor}My
Current Title As Of Today}}%

CharStyle CharTitleInBody
Font
Series  Bold
Color   Red
EndFont
LabelFont
Series  Bold
SizeLarger
Color   Red
EndLabelFont
LatexName   chartitlebodytextL
LatexType   Command
LabelString "My Current Title As Of Today"
End


If I apply the character style CharTitleInBody to an empty string in
LyX, the exact right thing happens in the PDF, but in the LyX
authoring environment the title appears under the character style inset
and also under the following text, which is very disturbing if you're
trying to copy-edit your book in the LyX environment.

Does anybody know what I can do to make the text appear inline, instead
of underneath, within the LyX authoring environment?

Thanks,

SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: I need an environment similar to, but not identical to LyX-Code

2021-06-10 Thread Paul A. Rubin

On 6/10/21 7:54 PM, Steve Litt wrote:

I need an environment similar to, but not identical to the LyX-Code
environment. Specifically, I need the page margins to be the same as
regular text, and I'd also like a smaller font.

So I figured I'd find the LaTeX definition of LyX-Code and work from
there, possibly using CopyStyle. But I've searched for 1/2 hour and
cannot find the TeX definition of the latexname part of LyX-Code, nor
can I find the LyX user interface part of LyX-Code.

So where can I find the definition of LyX-Code?

SteveT

Steve Litt
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques

Steve,

Create a file with one line of whatever in a LyX-Code environment. Turn 
on View > Code Preview Pane, and in the preview pane use an appropriate 
format (such as pdflatex) and set the drop down for what to show to 
Preamble Only. You'll find the \newenvironment{lyxcode}{...} stuff in 
the preview pane (after a little scrolling).


Paul

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


I need an environment similar to, but not identical to LyX-Code

2021-06-10 Thread Steve Litt
I need an environment similar to, but not identical to the LyX-Code
environment. Specifically, I need the page margins to be the same as
regular text, and I'd also like a smaller font.

So I figured I'd find the LaTeX definition of LyX-Code and work from
there, possibly using CopyStyle. But I've searched for 1/2 hour and
cannot find the TeX definition of the latexname part of LyX-Code, nor
can I find the LyX user interface part of LyX-Code.

So where can I find the definition of LyX-Code?

SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Adding an environment to the drop down menu

2021-01-19 Thread Richard Kimberly Heck

On 1/18/21 11:14 PM, Anthony Macks wrote:

Dear LyX users,

I have created a new environment by adding the following to my preamble.

\newcounter{YourTurn}[section]
\newenvironment{YourTurn}[1][]{\refstepcounter{YourTurn}\par\medskip
     \noindent \color{green}\textbf{Your Turn ~\theYourTurn. #1} 
\rmfamily\color{black}}{\medskip}


I would like to add this environment to the drop down list in the menu.

I know I have to edit a .layout file, but I am unsure as to what to do.


If this is just for one document, you can enter the necessary layout 
code under Document> Settings> Local Layout.


Something like this should work:

Format 66

Counter YourTurn
    Within Section
End

Style YourTurn
    LaTeXType Environment
    LaTeXName YourTurn
    LabelType Static
    LabelCounter YourTurn
    LabelString "Your Turn \theYourTurn"
    \newcounter{YourTurn}[section]
    Preamble
     \newcounter{YourTurn}[section]
\newenvironment{YourTurn}[1][]{\refstepcounter{YourTurn}\par\medskip
     \noindent \color{green}\textbf{Your Turn ~\theYourTurn. #1} 
\rmfamily\color{black}}{\medskip}

    EndPremable
End

That is pretty basic but should get you started.

The preamble code specified is just copied from yours: LyX will 
automatically insert it, so you now don't need it in your regular 
premable. The advantage is that LyX will insert it *only* if you use 
this environment.


See the Customization manual, section 5.2, for more details. Better yet, 
look at some of the modules and layout files that ship with LyX. The 
best say to understand the syntax is to see it in action.


If you might want to re-use this, you can put it into a module and put 
the module into the layouts/ folder of your user directory. You'll then 
need to reconfigure for it to show up. Modules also need a header, like:


#\DeclareLyXModule{Formula}
#DescriptionBegin
#An environment for numbered formulas.
#DescriptionEnd

Riki

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


Adding an environment to the drop down menu

2021-01-18 Thread Anthony Macks
Dear LyX users,

I have created a new environment by adding the following to my preamble.

\newcounter{YourTurn}[section]
\newenvironment{YourTurn}[1][]{\refstepcounter{YourTurn}\par\medskip
 \noindent \color{green}\textbf{Your Turn ~\theYourTurn. #1}
\rmfamily\color{black}}{\medskip}

I would like to add this environment to the drop down list in the menu.

I know I have to edit a .layout file, but I am unsure as to what to do.

I am using LyX 2.3.5.2 on a surface probook running windows 10.
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: picture environment

2021-01-16 Thread Joe Babb
Thanks for all the recommendations.  For what I want to do at this time,
which is very simple, I think the picture environment will work okay.
I tried the diagrams.net and it was very simple to draw my block diagram,
but when saved as pdf it did not want to import into Lyx.  I saved it as
svg and
looked at in my my Rhino3D drawing program and found it to be huge and had
to scale it way way down.  I think that eventually I'll want to try
Tikz/pgf and I looked into it and realize that there is a learning curve.
So I'll stick with simple for now.  In fact, I think I'm going to go back
to plain old Latex that I used several years ago.  I feel like I can know
what's going on better.
Incidentally, I don't have a good understanding of how this group works so
I hope I'm responding in a good way.  My apologies if not.  I seem to be
getting messages about other issues that I'm not interested in also.
Joe

On Sat, Jan 16, 2021 at 8:17 AM Baris Erkus  wrote:

> On 15-Jan-21 9:21 PM, Joe Babb wrote:
>
> I am trying to use Lyx to document some math and electronics and I need to
> place a block diagram into my document.  I can draw the diagram in a
> separate program and insert the jpg into Lyx, but what I'd rather do is
> draw it directly in Lyx and be able to place Greek characters in each box.
> I used to use Latex years ago and have the fourth edition of Guide to
> Latex which talks about the picture environment.  But I find no picture
> environment in Lyx.  I read on the Internet about typing an M-x somewhere
> to get to insert commands directly but can't get that to work.  I keep
> wanting to work in the code preview pane to insert Latex code directly but
> can't.  Is it possible at all in Lyx to to a block diagram?
> thanks,
> Joe
>
> Normally, you can insert any LaTeX code (including picture environment)
> using Ctrl-L  or Insert -> TeX Code. This is called "ERT" in LyX AFAIK.
>
> Since you want to write your code for graphics, I would recommend Tikz/pgf
> for general sketches, instead of the old-school picture environment. Of
> course, Some other WYSIWYG tools maybe more faster to generate some
> specific graphics (e.g. the type of diagrams you want in your document)
> without LaTeX coding, but I find Tikz quite powerful to invest in.
>
> CTAN says "PGF is a macro package for creating graphics. It is platform-
> and format-independent and works together with the most important TEX
> backend drivers, including pdfTEX and dvips. It comes with a user-friendly
> syntax layer called TikZ"
>
> So, inclusion of LaTeX  math is straightforward in Tikz, while other tools
> may need some tricks to get full benefits of LaTeX. Tikz has some many
> packages, maybe one of them is good for your diagrams. Please look at the
> Pgf/Tikz manual.
>
> One recommendation here tough: Do not write your graphics code in LyX.
> Generate it outside with regular LaTeX, and save your image as PDF. Then,
> include the PDF into the LyX as figure. The issue with including the
> graphics code in LyX is that, compilation times will get longer, and it
> would be difficult to find the errors in your code as you have more
> graphics and you have more text. Moreover, you will find out that the ERT
> coding environment is not very user friendly as your figure gets
> complicated, as it was not intended to develop code in there. I have done
> this before, and I have found myself testing the code with LaTeX outside
> LyX to find the errors. Therefore, LaTeX editors are better for this
> purpose (e.g. TeXmaker, TeXstudio, even Notepad++).
>
> If you want to give a try, I have attached two files: one for the figure
> and the other one is for the settings. Compile sample.tex with latex and
> you have your figure as PDF, ready to insert into LyX.
>
> --
> ↓↓
> Please bottom-post. Start your reply here:
>
> --
> lyx-users mailing list
> lyx-users@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users
>
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: picture environment

2021-01-16 Thread Baris Erkus

On 15-Jan-21 9:21 PM, Joe Babb wrote:
I am trying to use Lyx to document some math and electronics and I 
need to place a block diagram into my document.  I can draw the 
diagram in a separate program and insert the jpg into Lyx, but what 
I'd rather do is draw it directly in Lyx and be able to place Greek 
characters in each box.
I used to use Latex years ago and have the fourth edition of Guide to 
Latex which talks about the picture environment. But I find no picture 
environment in Lyx.  I read on the Internet about typing an M-x 
somewhere to get to insert commands directly but can't get that to 
work.  I keep wanting to work in the code preview pane to insert Latex 
code directly but can't.  Is it possible at all in Lyx to to a block 
diagram?

thanks,
Joe

Normally, you can insert any LaTeX code (including picture environment) 
using Ctrl-L  or Insert -> TeX Code. This is called "ERT" in LyX AFAIK.


Since you want to write your code for graphics, I would recommend 
Tikz/pgf for general sketches, instead of the old-school picture 
environment. Of course, Some other WYSIWYG tools maybe more faster to 
generate some specific graphics (e.g. the type of diagrams you want in 
your document) without LaTeX coding, but I find Tikz quite powerful to 
invest in.


CTAN says "PGF is a macro package for creating graphics. It is platform- 
and format-independent and works together with the most important TEX 
backend drivers, including pdfTEX and dvips. It comes with a 
user-friendly syntax layer called TikZ"


So, inclusion of LaTeX  math is straightforward in Tikz, while other 
tools may need some tricks to get full benefits of LaTeX. Tikz has some 
many packages, maybe one of them is good for your diagrams. Please look 
at the Pgf/Tikz manual.


One recommendation here tough: Do not write your graphics code in LyX. 
Generate it outside with regular LaTeX, and save your image as PDF. 
Then, include the PDF into the LyX as figure. The issue with including 
the graphics code in LyX is that, compilation times will get longer, and 
it would be difficult to find the errors in your code as you have more 
graphics and you have more text. Moreover, you will find out that the 
ERT coding environment is not very user friendly as your figure gets 
complicated, as it was not intended to develop code in there. I have 
done this before, and I have found myself testing the code with LaTeX 
outside LyX to find the errors. Therefore, LaTeX editors are better for 
this purpose (e.g. TeXmaker, TeXstudio, even Notepad++).


If you want to give a try, I have attached two files: one for the 
figure  and the other one is for the settings. Compile sample.tex with 
latex and you have your figure as PDF, ready to insert into LyX.


--
↓↓
Please bottom-post. Start your reply here:

%\usepackage{mathptmx}
%\renewcommand{\familydefault}{\rmdefault}
%\usepackage[T1]{fontenc}
%\usepackage[latin9]{inputenc}
\usepackage{siunitx}
\usepackage{array}
\usepackage{amsmath}
\usepackage{ifthen}
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}
\usepackage{titling, graphicx}
\usepackage{tikz}
\usepackage{upgreek}
\usepackage{amsmath,amsthm}
\usepackage{strtikz}
\usetikzlibrary{shapes,arrows.meta,intersections,graphs,graphs.standard}
\usetikzlibrary{math,fit}
\usetikzlibrary{calc,intersections,through,backgrounds,decorations.pathmorphing}
\usetikzlibrary{patterns}

\documentclass[]{standalone}

\input{figs_opts.tex}

\begin{document}



\begin{tikzpicture}[line join=round]
  
\draw [line width=2pt] (0,0) -- (1.5,1.5) -- (1.5,0);
\draw [line width=2pt, line cap=round] (1.5,1.5) -- (3.0,1.5) -- (3.0,0);
\filldraw [fill=white, line width=1.25pt] (0, 0) circle[radius=1.5pt];
\filldraw [fill=white, line width=1.25pt] (1.5, 0) circle[radius=1.5pt];

\end{tikzpicture}




\end{document}
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: picture environment

2021-01-15 Thread Daniel

On 2021-01-15 22:40, Neal Becker wrote:
I would recommend use diagrams.net .  You can use 
latex or asciimath.  Export as pdf.


Nice website. I didn't know about it. There is actually an option to 
export as svg and LyX supports the import of Inkscape/svg files via


Insert > File > External Materian ... > Inkscape figure

which in turn typesets the text of the svg via LaTeX. That might be a 
need option as well.


Best,
Daniel

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


Re: picture environment

2021-01-15 Thread Neal Becker
I would recommend use diagrams.net.  You can use latex or asciimath.
Export as pdf.

On Fri, Jan 15, 2021 at 1:35 PM Paul A. Rubin  wrote:

> On 1/15/21 1:21 PM, Joe Babb wrote:
>
> I am trying to use Lyx to document some math and electronics and I need to
> place a block diagram into my document.  I can draw the diagram in a
> separate program and insert the jpg into Lyx, but what I'd rather do is
> draw it directly in Lyx and be able to place Greek characters in each box.
> I used to use Latex years ago and have the fourth edition of Guide to
> Latex which talks about the picture environment.  But I find no picture
> environment in Lyx.  I read on the Internet about typing an M-x somewhere
> to get to insert commands directly but can't get that to work.  I keep
> wanting to work in the code preview pane to insert Latex code directly but
> can't.  Is it possible at all in Lyx to to a block diagram?
> thanks,
> Joe
>
> First, to insert "raw" LaTeX into a LyX document, use Insert > TeX Code,
> the default shortcut for which is Ctrl+L.
>
> As for drawing diagrams, if you want to use Xy-Pic, there is a manual on
> how to do that in LyX (Help > Specific Manuals > XY-Pic. Other
> possibilities (doubtless among many) are to use the pstricks or tikz LaTeX
> packages. Each comes with its own learning curve. I have directly embedded
> tikz commands in LyX documents to produce diagrams, including flowcharts.
>
> Paul
>
>
> --
> lyx-users mailing list
> lyx-users@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users
>


-- 
*Those who don't understand recursion are doomed to repeat it*
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: picture environment

2021-01-15 Thread Paul A. Rubin

On 1/15/21 1:21 PM, Joe Babb wrote:
I am trying to use Lyx to document some math and electronics and I 
need to place a block diagram into my document.  I can draw the 
diagram in a separate program and insert the jpg into Lyx, but what 
I'd rather do is draw it directly in Lyx and be able to place Greek 
characters in each box.
I used to use Latex years ago and have the fourth edition of Guide to 
Latex which talks about the picture environment. But I find no picture 
environment in Lyx.  I read on the Internet about typing an M-x 
somewhere to get to insert commands directly but can't get that to 
work.  I keep wanting to work in the code preview pane to insert Latex 
code directly but can't.  Is it possible at all in Lyx to to a block 
diagram?

thanks,
Joe

First, to insert "raw" LaTeX into a LyX document, use Insert > TeX Code, 
the default shortcut for which is Ctrl+L.


As for drawing diagrams, if you want to use Xy-Pic, there is a manual on 
how to do that in LyX (Help > Specific Manuals > XY-Pic. Other 
possibilities (doubtless among many) are to use the pstricks or tikz 
LaTeX packages. Each comes with its own learning curve. I have directly 
embedded tikz commands in LyX documents to produce diagrams, including 
flowcharts.


Paul


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


picture environment

2021-01-15 Thread Joe Babb
I am trying to use Lyx to document some math and electronics and I need to
place a block diagram into my document.  I can draw the diagram in a
separate program and insert the jpg into Lyx, but what I'd rather do is
draw it directly in Lyx and be able to place Greek characters in each box.
I used to use Latex years ago and have the fourth edition of Guide to Latex
which talks about the picture environment.  But I find no picture
environment in Lyx.  I read on the Internet about typing an M-x somewhere
to get to insert commands directly but can't get that to work.  I keep
wanting to work in the code preview pane to insert Latex code directly but
can't.  Is it possible at all in Lyx to to a block diagram?
thanks,
Joe
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


labeling environment + beamer

2020-11-18 Thread Neal Becker
I saw in the User's Manual the labeling environment as an enhanced
Description, and thought I'd try it.  In my beamer document I don't see
labeling as one of the choices under lists.  Is it not compatible with
beamer or am I missing something?

Thanks,
Neal

-- 
*Those who don't understand recursion are doomed to repeat it*
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: margin text and labelling environment generates a bug

2020-02-08 Thread Jürgen Spitzmüller
Am Samstag, den 08.02.2020, 07:08 + schrieb John Beattie:
> When I create a margin text on the same line as a labelling
> environment, the
> document will not compile.  This happens with lyx 2.3.3 on Windows
> and with lyx
> 2.3.1 on linux mint 18.2.  Details of the two environments are below.

You need to put the margin outside of the description label (the first
item of the line)

> 
> The mwe is attached and the picture shows the error which the
> compiler reports.
> 
> Should I raise a bug?

Thanks, but this is already tracked.

Jürgen


signature.asc
Description: This is a digitally signed message part
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


margin text and labelling environment generates a bug

2020-02-07 Thread John Beattie
Hi,

When I create a margin text on the same line as a labelling environment, the
document will not compile.  This happens with lyx 2.3.3 on Windows and with lyx
2.3.1 on linux mint 18.2.  Details of the two environments are below.

The mwe is attached and the picture shows the error which the compiler reports.

Should I raise a bug?

Thanks,
John



Windows 10
--

LyX help >> about:

LyX Version 2.3.3
(10 June 2019)

Library directory: C:\bin\lyx 2.3\Resources\
User directory: ~\AppData\Roaming\LyX2.3\
Qt Version (run-time): 5.11.3
Qt Version (compile-time): 5.11.3


> pdflatex --version
MiKTeX-pdfTeX  (MiKTeX 2.9.6300)

using bzip2 version 1.0.6, 6-Sept-2010
compiled with curl version 7.53.1; using libcurl/7.53.1 WinSSL
compiled with expat version 2.2; using expat_2.2.0
compiled with jpeg version 9.2
compiled with liblzma version 50020032; using 50020032
compiled with libpng version 1.6.29; using 1.6.29
compiled with libressl version LibreSSL 2.4.5; using LibreSSL 2.4.5
compiled with MiKTeX Application Framework version 1.6300; using 1.6300
compiled with MiKTeX Core version 1.6300; using 1.6300
compiled with MiKTeX Archive Extractor version 1.6300; using 1.6300
compiled with MiKTeX Package Manager version 1.6300; using 1.6300
compiled with poppler version 0.53.0
compiled with uriparser version 0.8.4
compiled with zlib version 1.2.11; using 1.2.11




Mint 18.2
-

> lsb_release -a
mint
Distributor ID: LinuxMint
Description:Linux Mint 18.2 Sonya
Release:18.2
Codename:   sonya


LyX help >> about:

LyX Version 2.3.1
(Monday, 27 August 2018)

Library directory: /usr/share/lyx/
User directory: ~/.lyx/
Qt Version (run-time): 4.8.7
Qt Version (compile-time): 4.8.7


> pdflatex --version
pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian)
kpathsea version 6.2.1
Copyright 2015 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.6.17; using libpng 1.6.17
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.41.0


ws.2a.lyx
Description: application/lyx
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Environment choice box > solved

2019-07-09 Thread Wolfgang Engelmann



On 03.07.19 20:48, Richard Kimberly Heck wrote:

On 7/3/19 9:49 AM, Wolfgang Engelmann wrote:

On 03.07.19 14:05, Richard Kimberly Heck wrote:

On 7/3/19 3:34 AM, Wolfgang Engelmann wrote:

On 02.07.19 17:59, Axel Dessecker wrote:

Am Dienstag, 2. Juli 2019, 17:38:43 CEST schrieb Wolfgang Engelmann:

On 02.07.19 17:26, Axel Dessecker wrote:

Wolfgang,

Have you enabled the standard toolbar to be shown? You may find
out by
right- clicking into the toolbar area.

Axel

yes, but the toolbar used to be at the top horizontally, now its
at the
left vertically

Wolfgang

Sorry for top-posting. If the toolbar is shown the environment choice
box
should be part of it and it should probably appear on top of the
vertical
toolbar. You can move the toolbar by dragging it using your mouse. It
will
change its shape according to the place where you insert it.

Axel



Thanks, Rich and Axel, but I tried this already. A left mouse click in
the vertical environment choice box  gives me a red point with 4
blades, but the only action is moving the whole Lyx display.

At least here, there are two lines just above a vertical toolbar. If I
put my mouse cursor over those lines, it turns into the four pointy
thing. Then I can click and move it. Clicking on empty space in the
toolbar does not work.

Riki

I include a snapshot with the mouse cursor position above the 2 lines
which you refer to, I guess. But I can't move the toolbar. I am using
Lyx 2.3.3dev and QT4.8.7, by the way

Not sure why it won't work, then.

I take it you are on Linux? If so, then look at the folder
~/.config/LyX/. This is (at least here) where these kinds of settings
are stored. I have two files there: lyx.conf and lyx2.4.conf. The former
is the one for 'released' LyX. If you open that file (or can find
lyx.conf in some other location), then you will see a bunch of stuff like:

[views]
0\citation\autofind=true
0\citation\casesensitive=false

Find the line beginning 0\layout. Delete that line. That should restore
the defaults. Alternatively, have a look at the 0\standard lines. It is
possible that 'movability' has somehow been disabled.

Riki


I finally managed to pull the left sided environment choice box to the 
horizontal position. Why it did not work before? Perhaps due to my age 
the hand and/or eyes were not precise enough. Would be nice if this 
shifting would be a bit less tricky.


Thanks for all the help and excuse the noice,

Wolfgang



Re: Environment choice box

2019-07-03 Thread Richard Kimberly Heck
On 7/3/19 9:49 AM, Wolfgang Engelmann wrote:
>
> On 03.07.19 14:05, Richard Kimberly Heck wrote:
>> On 7/3/19 3:34 AM, Wolfgang Engelmann wrote:
>>> On 02.07.19 17:59, Axel Dessecker wrote:
>>>> Am Dienstag, 2. Juli 2019, 17:38:43 CEST schrieb Wolfgang Engelmann:
>>>>> On 02.07.19 17:26, Axel Dessecker wrote:
>>>>>> Wolfgang,
>>>>>>
>>>>>> Have you enabled the standard toolbar to be shown? You may find
>>>>>> out by
>>>>>> right- clicking into the toolbar area.
>>>>>>
>>>>>> Axel
>>>>> yes, but the toolbar used to be at the top horizontally, now its
>>>>> at the
>>>>> left vertically
>>>>>
>>>>> Wolfgang
>>>> Sorry for top-posting. If the toolbar is shown the environment choice
>>>> box
>>>> should be part of it and it should probably appear on top of the
>>>> vertical
>>>> toolbar. You can move the toolbar by dragging it using your mouse. It
>>>> will
>>>> change its shape according to the place where you insert it.
>>>>
>>>> Axel
>>>>
>>>>    
>>> Thanks, Rich and Axel, but I tried this already. A left mouse click in
>>> the vertical environment choice box  gives me a red point with 4
>>> blades, but the only action is moving the whole Lyx display.
>> At least here, there are two lines just above a vertical toolbar. If I
>> put my mouse cursor over those lines, it turns into the four pointy
>> thing. Then I can click and move it. Clicking on empty space in the
>> toolbar does not work.
>>
>> Riki
>
> I include a snapshot with the mouse cursor position above the 2 lines
> which you refer to, I guess. But I can't move the toolbar. I am using
> Lyx 2.3.3dev and QT4.8.7, by the way

Not sure why it won't work, then.

I take it you are on Linux? If so, then look at the folder
~/.config/LyX/. This is (at least here) where these kinds of settings
are stored. I have two files there: lyx.conf and lyx2.4.conf. The former
is the one for 'released' LyX. If you open that file (or can find
lyx.conf in some other location), then you will see a bunch of stuff like:

[views]
0\citation\autofind=true
0\citation\casesensitive=false

Find the line beginning 0\layout. Delete that line. That should restore
the defaults. Alternatively, have a look at the 0\standard lines. It is
possible that 'movability' has somehow been disabled.

Riki




Re: Environment choice box

2019-07-03 Thread Richard Kimberly Heck
On 7/3/19 3:34 AM, Wolfgang Engelmann wrote:
>
> On 02.07.19 17:59, Axel Dessecker wrote:
>> Am Dienstag, 2. Juli 2019, 17:38:43 CEST schrieb Wolfgang Engelmann:
>>> On 02.07.19 17:26, Axel Dessecker wrote:
>>>> Wolfgang,
>>>>
>>>> Have you enabled the standard toolbar to be shown? You may find out by
>>>> right- clicking into the toolbar area.
>>>>
>>>> Axel
>>> yes, but the toolbar used to be at the top horizontally, now its at the
>>> left vertically
>>>
>>> Wolfgang
>> Sorry for top-posting. If the toolbar is shown the environment choice
>> box
>> should be part of it and it should probably appear on top of the
>> vertical
>> toolbar. You can move the toolbar by dragging it using your mouse. It
>> will
>> change its shape according to the place where you insert it.
>>
>> Axel
>>
>>   
>
> Thanks, Rich and Axel, but I tried this already. A left mouse click in
> the vertical environment choice box  gives me a red point with 4
> blades, but the only action is moving the whole Lyx display.

At least here, there are two lines just above a vertical toolbar. If I
put my mouse cursor over those lines, it turns into the four pointy
thing. Then I can click and move it. Clicking on empty space in the
toolbar does not work.

Riki




Re: Environment choice box

2019-07-03 Thread Wolfgang Engelmann



On 02.07.19 17:59, Axel Dessecker wrote:

Am Dienstag, 2. Juli 2019, 17:38:43 CEST schrieb Wolfgang Engelmann:

On 02.07.19 17:26, Axel Dessecker wrote:

Wolfgang,

Have you enabled the standard toolbar to be shown? You may find out by
right- clicking into the toolbar area.

Axel

yes, but the toolbar used to be at the top horizontally, now its at the
left vertically

Wolfgang

Sorry for top-posting. If the toolbar is shown the environment choice box
should be part of it and it should probably appear on top of the vertical
toolbar. You can move the toolbar by dragging it using your mouse. It will
change its shape according to the place where you insert it.

Axel

  


Thanks, Rich and Axel, but I tried this already. A left mouse click in 
the vertical environment choice box  gives me a red point with 4 blades, 
but the only action is moving the whole Lyx display.


Wolfgang



Re: Environment choice box

2019-07-02 Thread Axel Dessecker
Am Dienstag, 2. Juli 2019, 17:38:43 CEST schrieb Wolfgang Engelmann:
> On 02.07.19 17:26, Axel Dessecker wrote:
> > Wolfgang,
> > 
> > Have you enabled the standard toolbar to be shown? You may find out by
> > right- clicking into the toolbar area.
> > 
> > Axel
> 
> yes, but the toolbar used to be at the top horizontally, now its at the
> left vertically
> 
> Wolfgang

Sorry for top-posting. If the toolbar is shown the environment choice box 
should be part of it and it should probably appear on top of the vertical 
toolbar. You can move the toolbar by dragging it using your mouse. It will 
change its shape according to the place where you insert it.

Axel

 
> > Am Dienstag, 2. Juli 2019, 16:04:43 CEST schrieb Wolfgang Engelmann:
> >> I somehow managed to loose the Environment choice box and don't know how
> >> to get it back. The only place where it is mentioned in the help files
> >> is 2.2 of the tutorial where it says:
> >> 
> >> The Environment choice box is located on the left end of the toolbar and
> >> looks like this: /standard/. It indicates in which environment you are
> >> currently writing. While you were writing your first document, it said
> >> “Standard,” which is the default environment for text. Now you will put
> >> a number of environments in your new document so that you can see how
> >> they work...
> >> What do I have to do?
> >> Wolfgang






Re: Environment choice box

2019-07-02 Thread Richard Kimberly Heck
On 7/2/19 11:38 AM, Wolfgang Engelmann wrote:
>
> On 02.07.19 17:26, Axel Dessecker wrote:
>> Wolfgang,
>>
>> Have you enabled the standard toolbar to be shown? You may find out
>> by right-
>> clicking into the toolbar area.
>>
>> Axel
>
> yes, but the toolbar used to be at the top horizontally, now its at
> the left vertically

You should be able to grab it and move it.

Riki




Re: Environment choice box

2019-07-02 Thread Wolfgang Engelmann



On 02.07.19 17:26, Axel Dessecker wrote:

Wolfgang,

Have you enabled the standard toolbar to be shown? You may find out by right-
clicking into the toolbar area.

Axel


yes, but the toolbar used to be at the top horizontally, now its at the 
left vertically


Wolfgang




Am Dienstag, 2. Juli 2019, 16:04:43 CEST schrieb Wolfgang Engelmann:

I somehow managed to loose the Environment choice box and don't know how
to get it back. The only place where it is mentioned in the help files
is 2.2 of the tutorial where it says:

The Environment choice box is located on the left end of the toolbar and
looks like this: /standard/. It indicates in which environment you are
currently writing. While you were writing your first document, it said
“Standard,” which is the default environment for text. Now you will put
a number of environments in your new document so that you can see how
they work...
What do I have to do?
Wolfgang








Re: Environment choice box

2019-07-02 Thread Axel Dessecker
Wolfgang,

Have you enabled the standard toolbar to be shown? You may find out by right-
clicking into the toolbar area.

Axel


Am Dienstag, 2. Juli 2019, 16:04:43 CEST schrieb Wolfgang Engelmann:
> I somehow managed to loose the Environment choice box and don't know how
> to get it back. The only place where it is mentioned in the help files
> is 2.2 of the tutorial where it says:
> 
> The Environment choice box is located on the left end of the toolbar and
> looks like this: /standard/. It indicates in which environment you are
> currently writing. While you were writing your first document, it said
> “Standard,” which is the default environment for text. Now you will put
> a number of environments in your new document so that you can see how
> they work...
> What do I have to do?
> Wolfgang






Environment choice box

2019-07-02 Thread Wolfgang Engelmann
I somehow managed to loose the Environment choice box and don't know how 
to get it back. The only place where it is mentioned in the help files 
is 2.2 of the tutorial where it says:


The Environment choice box is located on the left end of the toolbar and 
looks like this: /standard/. It indicates in which environment you are 
currently writing. While you were writing your first document, it said 
“Standard,” which is the default environment for text. Now you will put 
a number of environments in your new document so that you can see how 
they work...

What do I have to do?
Wolfgang



Re: Using new enumerate environment without ERT

2019-04-30 Thread Paul Smith
On Sat, Apr 27, 2019 at 2:42 PM Guenter Milde  wrote:
>
> >> Dear All,
>
> >> Suppose that I have created a new enumerate-like enumerate, say
> >> xenumerate. How can I use it from inside LyX without recourse to ERT?
>
> > A couple of possibilities come to mind. If you want to use the new
> > version exclusively (and not use good old "enumerate"), you could
> > redefine the enumerate environment itself. Assuming you want xenumerate
> > to coexist with enumerate, you can define a layout for it, either in the
> > Local Layout portion of the document settings (if you only want it for
> > one document) or in a module file installed in your local layouts directory.
>
> > Guessing that you want the last one (i.e., add this along side regular
> > enumerations and make it available to any document that wants it), I
> > would suggest looking at /usr/share/lyx/layouts/stdlists.inc for
> > inspiration. (That's the Linux path; on other OSes, your path may
> > differ.) Look for the section that begins "Style Enumerate" and copy it
> > to your local module file (which will also need the proper header
> > stuff). Change the first line of the style to "Style Xenumerate" (or
> > whatever), change the LatexName entry to "xenumerate", and see if
> > anything else needs tweaking (quite possibly not).
>
> It may help to have a look a the "enumitem" module that enhances enumeration
> environments.
>
> The appended gm-lists.module requires and uses enumitem to define
> additional list types. It is a bit dated, though.
>
>
> > Help > Customization has lots of details about creating your own modules
> > and paragraph styles. Note that you will have to expressly include the
> > module in any document where you want to use the style. (You could hack
> > stdlists.inc itself, but then you would need to repeat the hack any time
> > an upgrade/reinstallation overwrote /usr/share/lyx/layouts.)

Thanks, Günter, I will have a look at that.

Paul


Re: Using new enumerate environment without ERT

2019-04-27 Thread Guenter Milde
On 2019-04-26, Paul A. Rubin wrote:
> On 4/26/19 4:16 PM, Paul Smith wrote:
>> Dear All,

>> Suppose that I have created a new enumerate-like enumerate, say
>> xenumerate. How can I use it from inside LyX without recourse to ERT?

>> Thanks in advance,

>> Paul
> A couple of possibilities come to mind. If you want to use the new 
> version exclusively (and not use good old "enumerate"), you could 
> redefine the enumerate environment itself. Assuming you want xenumerate 
> to coexist with enumerate, you can define a layout for it, either in the 
> Local Layout portion of the document settings (if you only want it for 
> one document) or in a module file installed in your local layouts directory.

> Guessing that you want the last one (i.e., add this along side regular 
> enumerations and make it available to any document that wants it), I 
> would suggest looking at /usr/share/lyx/layouts/stdlists.inc for 
> inspiration. (That's the Linux path; on other OSes, your path may 
> differ.) Look for the section that begins "Style Enumerate" and copy it 
> to your local module file (which will also need the proper header 
> stuff). Change the first line of the style to "Style Xenumerate" (or 
> whatever), change the LatexName entry to "xenumerate", and see if 
> anything else needs tweaking (quite possibly not).

It may help to have a look a the "enumitem" module that enhances enumeration
environments. 

The appended gm-lists.module requires and uses enumitem to define
additional list types. It is a bit dated, though.


> Help > Customization has lots of details about creating your own modules 
> and paragraph styles. Note that you will have to expressly include the 
> module in any document where you want to use the style. (You could hack 
> stdlists.inc itself, but then you would need to repeat the hack any time 
> an upgrade/reinstallation overwrote /usr/share/lyx/layouts.)


Günter


#\DeclareLyXModule{gmlists}
#DescriptionBegin
# Adds quoted-list and condensed list environments.
#DescriptionEnd
#Requires: enumitem
#Author: Günter Milde 

# date: 2008-12-04
# last update: 2016-07-21

Format 49

# Style Variants
# ==


Style Enumerate-Alpha
  CopyStyleEnumerate
  LatexParam   "[label=\emph{\alph*}),ref=\emph{\alph*},fullwidth,itemsep=1ex]"
  Margin   First_Dynamic
  LeftMargin   
  LabelCounter enumi
  LabelString  "\alph{enumi})"
  LabelFont
Series  Medium
Shape   Italic
  EndFont
End


# Dense (condensed/compact) list environments
# ===

Style Itemize-Compact
CopyStyle Itemize
Argument 1
LabelString   "Enumerate Options"
Tooltip   "Optional arguments for this list (see enumitem 
manual)"
PresetArg noitemsep
EndArgument
ParSep0
TopSep0.4
BottomSep 0.4
End 

Style Enumerate-Compact
CopyStyle Enumerate
Argument 1
LabelString   "Enumerate Options"
Tooltip   "Optional arguments for this list (see enumitem 
manual)"
PresetArg noitemsep
EndArgument
ParSep0
TopSep0.4
BottomSep 0.4
End 

Style Description-Compact
CopyStyle Description
Argument 1
LabelString   "Enumerate Options"
Tooltip   "Optional arguments for this list (see enumitem 
manual)"
PresetArg noitemsep
EndArgument
ParSep0
TopSep0.4
BottomSep 0.4
End

# Indented compact LyX-List environment
Style Quoted-Labeling
CopyStyle   Labeling
LatexName   qlyxlist
ItemSep 0
ParSep  0
LabelIndent MMM
Preamble
% labeling-like list based on enumitem's description list with
% mandatory second argument (label-pattern) and indent of 2em:
\newenvironment{qlyxlist}[2][]%
  {\settowidth{\lyxlabelwidth}{#2}
   \addtolength{\lyxlabelwidth}{1.5em}
   \description[font=,style=sameline,
 leftmargin=\lyxlabelwidth,
 noitemsep, labelindent=1.5em,
 #1]}
  {\enddescription}
EndPreamble

End

# Backwards compatibility aliases:

Style Compact-Itemize
  ObsoletedByItemize-Compact
End  

Style Itemize-Dense
  ObsoletedByItemize-Compact
End

Style Compact-Enumerate
  ObsoletedBy   Enumerate-Compact
End

Style Enumerate-Dense
  ObsoletedBy   Enumerate-

Re: Using new enumerate environment without ERT

2019-04-26 Thread Paul Smith
On Fri, Apr 26, 2019 at 9:39 PM Paul A. Rubin  wrote:
>
> > Suppose that I have created a new enumerate-like enumerate, say
> > xenumerate. How can I use it from inside LyX without recourse to ERT?
> >
> A couple of possibilities come to mind. If you want to use the new
> version exclusively (and not use good old "enumerate"), you could
> redefine the enumerate environment itself. Assuming you want xenumerate
> to coexist with enumerate, you can define a layout for it, either in the
> Local Layout portion of the document settings (if you only want it for
> one document) or in a module file installed in your local layouts directory.
>
> Guessing that you want the last one (i.e., add this along side regular
> enumerations and make it available to any document that wants it), I
> would suggest looking at /usr/share/lyx/layouts/stdlists.inc for
> inspiration. (That's the Linux path; on other OSes, your path may
> differ.) Look for the section that begins "Style Enumerate" and copy it
> to your local module file (which will also need the proper header
> stuff). Change the first line of the style to "Style Xenumerate" (or
> whatever), change the LatexName entry to "xenumerate", and see if
> anything else needs tweaking (quite possibly not).
>
> Help > Customization has lots of details about creating your own modules
> and paragraph styles. Note that you will have to expressly include the
> module in any document where you want to use the style. (You could hack
> stdlists.inc itself, but then you would need to repeat the hack any time
> an upgrade/reinstallation overwrote /usr/share/lyx/layouts.)

Thanks, Paul, for your very valuable help! I am going now to ponder
about your suggestions and choose the one that fits best my needs.

Paul


Re: Using new enumerate environment without ERT

2019-04-26 Thread Paul A. Rubin

On 4/26/19 4:16 PM, Paul Smith wrote:

Dear All,

Suppose that I have created a new enumerate-like enumerate, say
xenumerate. How can I use it from inside LyX without recourse to ERT?

Thanks in advance,

Paul
A couple of possibilities come to mind. If you want to use the new 
version exclusively (and not use good old "enumerate"), you could 
redefine the enumerate environment itself. Assuming you want xenumerate 
to coexist with enumerate, you can define a layout for it, either in the 
Local Layout portion of the document settings (if you only want it for 
one document) or in a module file installed in your local layouts directory.


Guessing that you want the last one (i.e., add this along side regular 
enumerations and make it available to any document that wants it), I 
would suggest looking at /usr/share/lyx/layouts/stdlists.inc for 
inspiration. (That's the Linux path; on other OSes, your path may 
differ.) Look for the section that begins "Style Enumerate" and copy it 
to your local module file (which will also need the proper header 
stuff). Change the first line of the style to "Style Xenumerate" (or 
whatever), change the LatexName entry to "xenumerate", and see if 
anything else needs tweaking (quite possibly not).


Help > Customization has lots of details about creating your own modules 
and paragraph styles. Note that you will have to expressly include the 
module in any document where you want to use the style. (You could hack 
stdlists.inc itself, but then you would need to repeat the hack any time 
an upgrade/reinstallation overwrote /usr/share/lyx/layouts.)


Paul (the original one)



Using new enumerate environment without ERT

2019-04-26 Thread Paul Smith
Dear All,

Suppose that I have created a new enumerate-like enumerate, say
xenumerate. How can I use it from inside LyX without recourse to ERT?

Thanks in advance,

Paul


Re: Counters of custom list environment

2019-04-04 Thread Dr Eberhard Lisse
Daniel,

to be honest, I'll probably figure this out and install it anyway.

Eventually :-)-O

Even though in my daily use I usuallyhave Enumerate-Resume on the outer
level and Enumerate on the indented one(s).  So this may or may not work
:-)-O


el

On 03/04/2019 16:34, Daniel wrote:
> On 03/04/2019 13:35, Dr Eberhard Lisse wrote:
>> I have noticed same, but it bothered me for about 27 seconds and I am
>> now used to it.
> 
> With Jean-Marc's comment, there is no need to get used to it any more.
> Though I admire your ability to adapt.  :)
> 
> Daniel
> 
> 




Re: Counters of custom list environment

2019-04-04 Thread Daniel

On 2019-04-04 08:01, Baris Erkus wrote:

On 03-Apr-19 5:34 PM, Daniel wrote:

On 03/04/2019 13:35, Dr Eberhard Lisse wrote:

I have noticed same, but it bothered me for about 27 seconds and I am
now used to it.


With Jean-Marc's comment, there is no need to get used to it any more.
Though I admire your ability to adapt. :)

Daniel


Well, what I meant was exactly this solution.  You can place these
options in the preamble to be valid for whole document, or you can place
it in the Enumerate Options of LyX to be valid only for that particular
list. I use both. LyX does not have a tool that set these for you.


I think this is still a misunderstanding.

You suggest to change the LaTeX output by manipulating the preamble or 
setting Enumerate Options.


In contrast, Jean-Marc's suggestion had nothing to do with LaTeX. It's 
aim was to change the appearance in LyX' work area by modifying the 
Local Layout.


Daniel



Re: Counters of custom list environment

2019-04-04 Thread Baris Erkus
On 03-Apr-19 5:34 PM, Daniel wrote:
> On 03/04/2019 13:35, Dr Eberhard Lisse wrote:
>> I have noticed same, but it bothered me for about 27 seconds and I am
>> now used to it.
>
> With Jean-Marc's comment, there is no need to get used to it any more. 
> Though I admire your ability to adapt. :)
>
> Daniel
>
Well, what I meant was exactly this solution.  You can place these 
options in the preamble to be valid for whole document, or you can place 
it in the Enumerate Options of LyX to be valid only for that particular 
list. I use both. LyX does not have a tool that set these for you.

-- 
↓↓
Please bottom-post. Start your reply here:



Re: Counters of custom list environment

2019-04-03 Thread Jean-Marc Lasgouttes

Le 03/04/2019 à 17:21, Daniel a écrit :
What the labeltype Enumerate does is to count nesting of enumerate 
items to know whether the counter will be enumi, enumii, enumiii or 
enumiv. Your own enumerate layout is not supposed to do that.


I see. That was just an oversimplification on my side. Attached is a 
variant. If I understand you correctly your solution cannot be used for it.


Currently, itemize and enumerate are handled in a hard-coded way. It is 
thus not possible to add a new layout that acts like that. However, it 
would be possible to generalize enumerate/itemize support to get rid of 
any hard-coding (in theory at least).


JMarc



Re: Counters of custom list environment

2019-04-03 Thread Daniel

On 03/04/2019 16:58, Jean-Marc Lasgouttes wrote:

Le 03/04/2019 à 14:55, Daniel a écrit :
Yes, that does the trick. But I am wondering why the default Enumerate 
doesn't have LabelType Static. What's the difference?


What the labeltype Enumerate does is to count nesting of enumerate items 
to know whether the counter will be enumi, enumii, enumiii or enumiv. 
Your own enumerate layout is not supposed to do that.


I see. That was just an oversimplification on my side. Attached is a 
variant. If I understand you correctly your solution cannot be used for it.


Daniel


myenumerate.lyx
Description: application/lyx


Re: Counters of custom list environment

2019-04-03 Thread Jean-Marc Lasgouttes

Le 03/04/2019 à 14:55, Daniel a écrit :
Yes, that does the trick. But I am wondering why the default Enumerate 
doesn't have LabelType Static. What's the difference?


What the labeltype Enumerate does is to count nesting of enumerate items 
to know whether the counter will be enumi, enumii, enumiii or enumiv. 
Your own enumerate layout is not supposed to do that.


JMarc



Re: Counters of custom list environment

2019-04-03 Thread Daniel

On 03/04/2019 13:35, Dr Eberhard Lisse wrote:

I have noticed same, but it bothered me for about 27 seconds and I am
now used to it.


With Jean-Marc's comment, there is no need to get used to it any more. 
Though I admire your ability to adapt. :)


Daniel



Re: Counters of custom list environment

2019-04-03 Thread Daniel

On 03/04/2019 12:36, Jean-Marc Lasgouttes wrote:

Le 02/04/2019 à 12:45, Daniel a écrit :

Hi,

In the attached document the list structure in the work area is shown as

i. MyEnumerate
 (a) Enumerate

but the output is actually

i. MyEnumerate
 1. Enumerate


Try the one attached. I changed LabelType to Static and set the format 
(because otherwise labeltype was reset to Itemize). Does it do what you 
want?


JMarc


Yes, that does the trick. But I am wondering why the default Enumerate 
doesn't have LabelType Static. What's the difference?


Daniel



Re: Counters of custom list environment

2019-04-03 Thread Dr Eberhard Lisse
I have noticed same, but it bothered me for about 27 seconds and I am 
now used to it.


el

On 02/04/2019 12:45, Daniel wrote:
> Hi,
> 
> In the attached document the list structure in the work area is shown
> as
> 
> i. MyEnumerate
> (a) Enumerate
> 
> but the output is actually
> 
> i. MyEnumerate
> 1. Enumerate
> 
> I seem unable to figure out how to tell LyX that my custom enumerate
> (as set in the Local Layout and Preamble) is different from the
> standard one and hence the counting should restart when changing
> environments.
> 
> I thought LyX would figure out what I want by seeing that the
> LatexName or LabelCounter differs from the standard enumerate
> environment but that does not do the trick.
> 
> Is there an additional setting I miss, or is it a shortcoming of LyX?
> 
> Best,
> Daniel




Re: Counters of custom list environment

2019-04-03 Thread Jean-Marc Lasgouttes

Le 02/04/2019 à 12:45, Daniel a écrit :

Hi,

In the attached document the list structure in the work area is shown as

i. MyEnumerate
 (a) Enumerate

but the output is actually

i. MyEnumerate
 1. Enumerate


Try the one attached. I changed LabelType to Static and set the format 
(because otherwise labeltype was reset to Itemize). Does it do what you 
want?


JMarc


myenumerate.lyx
Description: application/lyx


Re: Counters of custom list environment

2019-04-03 Thread Daniel

On 03/04/2019 08:53, Baris Erkus wrote:

On 02-Apr-19 1:45 PM, Daniel wrote:

Hi,

In the attached document the list structure in the work area is shown as

i. MyEnumerate
 (a) Enumerate

but the output is actually

i. MyEnumerate
 1. Enumerate

I seem unable to figure out how to tell LyX that my custom enumerate
(as set in the Local Layout and Preamble) is different from the
standard one and hence the counting should restart when changing
environments.

I thought LyX would figure out what I want by seeing that the
LatexName or LabelCounter differs from the standard enumerate
environment but that does not do the trick.

Is there an additional setting I miss, or is it a shortcoming of LyX?

Best,
Daniel


AFAIK:{You need to use ERT in the "Enumarate Opitons" of LyX, and tell
LaTeX to restart or resume numbering by yourself. Otherwise LyX does not
have a direct option to do that.}


I guess that is a misunderstanding. I want LyX to show what LaTeX does 
not the other way around. (See my answer to Paul.)


Daniel



Re: Counters of custom list environment

2019-04-03 Thread Baris Erkus
On 02-Apr-19 1:45 PM, Daniel wrote:
> Hi,
>
> In the attached document the list structure in the work area is shown as
>
> i. MyEnumerate
> (a) Enumerate
>
> but the output is actually
>
> i. MyEnumerate
> 1. Enumerate
>
> I seem unable to figure out how to tell LyX that my custom enumerate 
> (as set in the Local Layout and Preamble) is different from the 
> standard one and hence the counting should restart when changing 
> environments.
>
> I thought LyX would figure out what I want by seeing that the 
> LatexName or LabelCounter differs from the standard enumerate 
> environment but that does not do the trick.
>
> Is there an additional setting I miss, or is it a shortcoming of LyX?
>
> Best,
> Daniel

AFAIK:{You need to use ERT in the "Enumarate Opitons" of LyX, and tell 
LaTeX to restart or resume numbering by yourself. Otherwise LyX does not 
have a direct option to do that.}

Baris

-- 
↓↓
Please bottom-post. Start your reply here:



Re: Counters of custom list environment

2019-04-02 Thread Daniel

On 02/04/2019 20:20, Paul A. Rubin wrote:

On 4/2/19 6:45 AM, Daniel wrote:

Hi,

In the attached document the list structure in the work area is shown as

i. MyEnumerate
(a) Enumerate

but the output is actually

i. MyEnumerate
1. Enumerate

I seem unable to figure out how to tell LyX that my custom enumerate 
(as set in the Local Layout and Preamble) is different from the 
standard one and hence the counting should restart when changing 
environments.


I thought LyX would figure out what I want by seeing that the 
LatexName or LabelCounter differs from the standard enumerate 
environment but that does not do the trick.


Is there an additional setting I miss, or is it a shortcoming of LyX?

Best,
Daniel
Are you saying that you want the LaTeX output to match what you see in 
LyX ("(a)" in PDF), or that you want what you see in LyX to match the 
LaTeX output ("1." in LyX)?


The latter.

Daniel



Re: Counters of custom list environment

2019-04-02 Thread Paul A. Rubin

On 4/2/19 6:45 AM, Daniel wrote:

Hi,

In the attached document the list structure in the work area is shown as

i. MyEnumerate
(a) Enumerate

but the output is actually

i. MyEnumerate
1. Enumerate

I seem unable to figure out how to tell LyX that my custom enumerate 
(as set in the Local Layout and Preamble) is different from the 
standard one and hence the counting should restart when changing 
environments.


I thought LyX would figure out what I want by seeing that the 
LatexName or LabelCounter differs from the standard enumerate 
environment but that does not do the trick.


Is there an additional setting I miss, or is it a shortcoming of LyX?

Best,
Daniel
Are you saying that you want the LaTeX output to match what you see in 
LyX ("(a)" in PDF), or that you want what you see in LyX to match the 
LaTeX output ("1." in LyX)?


Paul



Counters of custom list environment

2019-04-02 Thread Daniel

Hi,

In the attached document the list structure in the work area is shown as

i. MyEnumerate
(a) Enumerate

but the output is actually

i. MyEnumerate
1. Enumerate

I seem unable to figure out how to tell LyX that my custom enumerate (as 
set in the Local Layout and Preamble) is different from the standard one 
and hence the counting should restart when changing environments.


I thought LyX would figure out what I want by seeing that the LatexName 
or LabelCounter differs from the standard enumerate environment but that 
does not do the trick.


Is there an additional setting I miss, or is it a shortcoming of LyX?

Best,
Daniel


myenumerate.lyx
Description: application/lyx


Re: Passing arguments to an environment in Lyx modules?

2018-12-30 Thread Richard Kimberly Heck
On 12/30/18 4:15 PM, Jay Reinhard wrote:
> I am trying to create a module for a special environment but would
> like to pass the environment parameters directly instead of
> using ModifyStyle (as done in enumitem.module). Somehow I have been
> failing at that...is that even possible?
>
> I have described the problem in detail on
>
> https://tex.stackexchange.com/questions/467929/passing-arguments-to-an-environment-in-lyx-modules
>
> but can't find anybody who can help me there.

Can you post a small example LyX file, with the layout info included as
local layout and example text that shows the problem? If there are
multiple versions of what you are trying to do, then include them all as
Goal-1, Goal-2, whatever. Then we can try to debug.

Riki




Passing arguments to an environment in Lyx modules?

2018-12-30 Thread Jay Reinhard
I am trying to create a module for a special environment but would like to
pass the environment parameters directly instead of using ModifyStyle (as
done in enumitem.module). Somehow I have been failing at that...is that
even possible?

I have described the problem in detail on

https://tex.stackexchange.com/questions/467929/passing-arguments-to-an-environment-in-lyx-modules

but can't find anybody who can help me there.

Can any of you?

Many thanks!
-Jan


LaTeX Error: Environment cBoxD undefined.

2018-02-21 Thread Lloyd R. Prentice

Hello,

I'm attempting to format code listings in a shaded box.  The heading 
would look like "Listing CN.LN Example code," CN is chapter number, LN 
is listing number, and "Example code" is in italic. I also need to 
highlight code fragments in bold.


It looks like the tcolorbox package can do what I need. But when I 
attempt to use it and compile to PDF I get an error.


Can some kind soul show the way to success?

Here's what I have so far:

Document class: KOMA Script Book
Module: Fancy Colored Boxes

Lyx source code:

% Preview source code

%% LyX 2.2.3 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[oneside,english]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[latin9]{luainputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{tcolorbox}
\usepackage{babel}
\begin{document}
\begin{cBoxD}{}
The quick brown fox
\end{cBoxD}

\end{document}

Error:

 \begin{cBoxD}
  {}
Your command was ignored.
Type  Ito replace it with another command,
orto continue without it.

All the best,

Lloyd R. Prentice
Writersglen Publications





Re: how to add new environment to LyX

2017-06-16 Thread Kornel Benko
Am Freitag, 16. Juni 2017 um 23:30:15, schrieb caoke...@163.com
> Dear all
> 
> I like using LyX in preparing my manuscript.
> 
> But I did not know how to add new environment to the UI of LyX. 
> 
> For example, It is easy to use  the environment of theorem by clicking of
> mouse on the upper left corner of LyX. But how to add a new environment such
> as Assumption to the UI of Lyx. 
> 
> Thank you so much.
> 
> Sincerely,
> 
> kc cao

FWIW, assumption exist in module 'Theorems (AMS-Extended)'.

Goto Document->Settings->Modules
Select Theorems (AMS)
push Add
Select Theorems (AMS-Extended)
push Add
push OK
and you should be done.

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: how to add new environment to LyX

2017-06-16 Thread Paul A. Rubin

On 06/16/2017 12:01 PM, Steve Litt wrote:


Yes! This is a newer way that what I suggested, creating a layout file.
I've never used modules so I can't speak to which is better.

If you are working with a new document class that does not have an 
existing layout, you need to write a layout file (or copy and hack an 
existing layout for a document class similar to the new one). A single 
module probably won't cut it, and a gaggle of modules will be at least 
as much work.


If you are trying to implement an environment that you'll likely use in 
documents of more than one type, you want to create a module, which can 
be dropped into any document. The alternative would be to hack the 
layout files for each of the document classes where you might want that 
environment.


Before doing either, it's worth searching the LyX wiki (and Google) to 
see if that particular wheel has already been invented.


My $0.02 (before taxes),
Paul



Re: how to add new environment to LyX

2017-06-16 Thread Steve Litt
On Fri, 16 Jun 2017 11:53:22 -0400
"Paul A. Rubin" <parubi...@gmail.com> wrote:

> On 06/16/2017 11:30 AM, caoke...@163.com wrote:
> >
> > Dear all
> >
> > I like using LyX in preparing my manuscript.
> >
> > But I did not know how to add new environment to the UI of LyX.
> >
> > For example, It is easy to use  the environment of theorem by
> > clicking of mouse on the upper left corner of LyX. But how to add a
> > new environment such as Assumption to the UI of Lyx.
> >
> > Thank you so much.
> >
> > Sincerely,
> >
> > kc cao
> >  
> Take a look at the Customization document (Help > Customization), 
> section 5.2 (layouts), and particularly the portions on modules.
> You'll want to create a module file (stored in the layouts folder of
> your user directory) and then include it from the Document >
> Settings... > Modules menu.
> 
> Paul
> 

Yes! This is a newer way that what I suggested, creating a layout file.
I've never used modules so I can't speak to which is better.

SteveT

Steve Litt 
June 2017 featured book: The Key to Everyday Excellence
http://www.troubleshooters.com/key


Re: how to add new environment to LyX

2017-06-16 Thread Steve Litt
On Fri, 16 Jun 2017 23:30:15 +0800
<caoke...@163.com> wrote:

> Dear all
> 
> I like using LyX in preparing my manuscript.
> 
> But I did not know how to add new environment to the UI of LyX. 
> 
> For example, It is easy to use  the environment of theorem by
> clicking of mouse on the upper left corner of LyX. But how to add a
> new environment such as Assumption to the UI of Lyx. 
> 
> Thank you so much.
> 
> Sincerely,
> 
> kc cao

Hi kc cao,

I don't know exactly what you meant by "to the UI of LyX", but if you
want to add a new environment, to a document, that will be given your
specified appearance both in the PDF output and the LyX user interface,
the way I do it is to create a layout file if none exists,  and add the
environment to the layout file. 

I've written extensively on this process, but using layout files was
much more difficult back then. Now you just put the layout file in the
same directory as the document, and import it as a local layout
file, and BANG, it gets recognized, without all the mumbo-jumbo and
hocus-pocus I used to have to recommend.


Here are some docs I've written about this:

http://troubleshooters.com/lpm/200210/200210.htm#_MakingYourOwnLayout

http://troubleshooters.com/lpm/200210/200210.htm#_ExpandingYourLayoutFile

http://troubleshooters.com/lpm/200210/200210.htm#_MakingaNoteEnvironment

Being able to create your own environments and character styles makes
LyX a desktop-publishing giant: Appearances exactly to your choice, but
during authoring time you never make an appearance choice nor tweak
appearance. You'll love it.

Now, if only somebody would either finish the conversion of LyX native
code to well formed and validated XML, or create a LyX to Xhtml
converter that doesn't prematurely convert styles to appearance and
create different paragraph types (class=) just to specify which body
text doesn't get indented, LyX would be the perfect overall authoring
machine.

HTH,

SteveT

Steve Litt 
June 2017 featured book: The Key to Everyday Excellence
http://www.troubleshooters.com/key


Re: how to add new environment to LyX

2017-06-16 Thread Paul A. Rubin

On 06/16/2017 11:30 AM, caoke...@163.com wrote:


Dear all

I like using LyX in preparing my manuscript.

But I did not know how to add new environment to the UI of LyX.

For example, It is easy to use  the environment of theorem by clicking 
of mouse on the upper left corner of LyX. But how to add a new 
environment such as Assumption to the UI of Lyx.


Thank you so much.

Sincerely,

kc cao

Take a look at the Customization document (Help > Customization), 
section 5.2 (layouts), and particularly the portions on modules. You'll 
want to create a module file (stored in the layouts folder of your user 
directory) and then include it from the Document > Settings... > Modules 
menu.


Paul



how to add new environment to LyX

2017-06-16 Thread caokecai
Dear all

I like using LyX in preparing my manuscript.

But I did not know how to add new environment to the UI of LyX. 

For example, It is easy to use  the environment of theorem by clicking of
mouse on the upper left corner of LyX. But how to add a new environment such
as Assumption to the UI of Lyx. 

Thank you so much.

Sincerely,

kc cao



Re: Using esint package within Lyx environment

2017-04-19 Thread Paul A. Rubin

On 04/19/2017 02:16 PM, Jim Rockford wrote:
Can somebody explain how to implement the esint package style integral 
symbols within Lyx?  In particular, I'd like to be able to use 
keyboard shortcuts to create these nicer looking integration symbols 
with nicer looking bounds of integration.


I have the Math Options set to automatically load the esint package.  
However, I cannot find any documentation about how to implement 
something like esint within Lyx.  For example, how does one write a 
double integral with a "D" (i.e. a generic 2D domain) centered beneath 
both integral signs?  Is there any non-opaque documentation anywhere 
that spells it out?


Much thanks,
Jim
To insert the \iint symbol, for example, you can either type \iint 
followed by a space in a math inset or select it from the math toolbar. 
It's in the "Big operators" group; the icon for the group is an integral 
sign, and it's on the upper of the two math toolbars in the default 
configuration.


To center a "D" beneath a double integral, start by clicking the "Frame 
decorations" group button (immediate left of "Big operators") and select 
the outline of a box with a smaller box underneath it (or just type 
\underset followed by a space in the math inset). Put the \iint symbol 
in the top box and the D in the bottom box.


Paul



Using esint package within Lyx environment

2017-04-19 Thread Jim Rockford
Can somebody explain how to implement the esint package style integral
symbols within Lyx?  In particular, I'd like to be able to use keyboard
shortcuts to create these nicer looking integration symbols with nicer
looking bounds of integration.

I have the Math Options set to automatically load the esint package.
However, I cannot find any documentation about how to implement something
like esint within Lyx.  For example, how does one write a double integral
with a "D" (i.e. a generic 2D domain) centered beneath both integral
signs?  Is there any non-opaque documentation anywhere that spells it out?

Much thanks,
Jim


Re: Changing GUI color of environment labels

2017-02-13 Thread Jürgen Spitzmüller
Am Sonntag, den 12.02.2017, 17:55 +0100 schrieb Matthias Wirtz:
> Hello,
> 
> for changing GUI colors one can use Tools->Preferences-
> >Look/Colors.
> 
> Unfortunately I can not identify the entry responsible for the 
> text/background color of environment labels.
> 
> In classes like beamer or letter you have environment names "Sent to 
> Address" or "Opening" which appear on the screen in order to specify
> the 
> corresponding values. The color of these labels is dark blue by
> default.
> 
> I want to change the color but can't identify which entry in the list
> of 
> color labels is responsible.

These colors are not semantic (and thus not changeable in the prefs)
but hardcoded in the layout file. You have to change the layout file or
make adjustments in Document > Settings > Local Layout, e.g.

Style Address
LabelFont
  Color   Blue
EndFont
End

Jürgen

> 
> Thx for the help.
> 

signature.asc
Description: This is a digitally signed message part


Changing GUI color of environment labels

2017-02-13 Thread Matthias Wirtz

Hello,

for changing GUI colors one can use Tools->Preferences->Look/Colors.

Unfortunately I can not identify the entry responsible for the 
text/background color of environment labels.


In classes like beamer or letter you have environment names "Sent to 
Address" or "Opening" which appear on the screen in order to specify the 
corresponding values. The color of these labels is dark blue by default.


I want to change the color but can't identify which entry in the list of 
color labels is responsible.


Thx for the help.

--
Matthias Wirtz, Mannheim, DE


RE: Centering in uncover environment in Beamer

2017-01-08 Thread Shieh, Sanford
Great, works fine.  Thanks.

Sanford Shieh
Associate Professor
Department of Philosophy
Wesleyan University
350 High Street
Middletown, CT 06459
USA
+1 (860) 685-3646 (office)
+1 (860) 685-3861 (fax)
<sanford.sh...@wesleyan.edu<mailto:sanford.sh...@wesleyan.edu>>
Follow me on Academia.edu<https://wesleyan.academia.edu/SanfordShieh>

From: Paul A. Rubin [mailto:parubi...@gmail.com]
Sent: Saturday, January 07, 2017 5:00 PM
To: Shieh, Sanford <ssh...@wesleyan.edu>; lyx-users@lists.lyx.org
Subject: Re: Centering in uncover environment in Beamer

On 01/07/2017 03:53 PM, Shieh, Sanford wrote:
Attached MWE0.lyx shows an attempt to have a frame with 3 slides, each a  plain 
text line, using the uncover environment on lines 2 and 3, but with line 2 
centered.  I couldn't get LyX to do this without ERT, as in MWE1.lyx; it always 
forces the default alignment.  Is there a way without ERT?


Just insert a box (Insert > Box > Frameless) in the Uncover environment, put 
the text in it, and use the paragraph settings inside the box to center it. 
I've attached the result.

Paul


Re: Centering in uncover environment in Beamer

2017-01-07 Thread Paul A. Rubin

On 01/07/2017 03:53 PM, Shieh, Sanford wrote:


Attached MWE0.lyx shows an attempt to have a frame with 3 slides, each 
a  plain text line, using the uncover environment on lines 2 and 3, 
but with line 2 centered.  I couldn’t get LyX to do this without ERT, 
as in MWE1.lyx; it always forces the default alignment.  Is there a 
way without ERT?



Just insert a box (Insert > Box > Frameless) in the Uncover environment, 
put the text in it, and use the paragraph settings inside the box to 
center it. I've attached the result.


Paul



MWE3.lyx
Description: application/lyx


Centering in uncover environment in Beamer

2017-01-07 Thread Shieh, Sanford
Attached MWE0.lyx shows an attempt to have a frame with 3 slides, each a  plain 
text line, using the uncover environment on lines 2 and 3, but with line 2 
centered.  I couldn't get LyX to do this without ERT, as in MWE1.lyx; it always 
forces the default alignment.  Is there a way without ERT?

Best,
Sanford

Sanford Shieh
Associate Professor
Department of Philosophy
Wesleyan University
350 High Street
Middletown, CT 06459
USA
+1 (860) 685-3646 (office)
+1 (860) 685-3861 (fax)
<sanford.sh...@wesleyan.edu<mailto:sanford.sh...@wesleyan.edu>>
Follow me on Academia.edu<https://wesleyan.academia.edu/SanfordShieh>



MWE1.lyx
Description: MWE1.lyx


MWE0.lyx
Description: MWE0.lyx


Re: Enumerate inside other environment

2016-10-04 Thread Richard Heck
On 10/04/2016 03:18 PM, Mario D wrote:
> I know how to nest environments so that I can use enumerate inside
> another environment in order to produce something looking like:
>
> -
> Theorem. The following are equivalent:
>1. First statement.
>2. Second statement.
> -
>
> My question is: how can I produce
>  
> -
> Theorem.   1. First statement.
>2. Second statement.
> -
>
> The only way//I could get it was to insert an empty note after the
> "Theorem", then newline, start the enumerate and finally nest it.
> Is there a "cleaner" way?

Empty TeX code works, too. Either is a hack to make LyX think the first
line is not empty, since otherwise it will delete it.

If you do this a lot, you can do something like:

Format 60

Style Theorem*
KeepEmpty 1
End

in Local Layout. This tells LyX to allow empty lines in unnumbered
theorems. Then you do not have to do anything special.

> Moreover, how can I produce the following?
>
> -
> Theorem.
>1. First statement.
>2. Second statement.
> -
>
> For this I couldn't find a workaround.

Put a "protected space" on the first line. (Insert> Formatting>
Protected Space) This makes there by something on that line, but it's
invisible.

Richard



  1   2   3   4   5   6   7   8   9   10   >