Re: Creating a tree with math in LyX

2018-03-30 Thread Scott Kostyshak
On Fri, Mar 30, 2018 at 11:51:54PM +, Paul A. Rubin wrote:
> On 03/30/2018 06:35 PM, Scott Kostyshak wrote:
> > I would like to make a simple tree that uses math. The current way I do
> > it is to use the linguistics module, which gives access to the forest
> > package. Then I go to Insert > custom insets > Structure tree. I then
> > wrap the math I want to write in \protect. Attached is an example of
> > what I'm currently doing. It works, but I don't like writing out
> > \protect, and I have the feeling I'm asking the forest package to do
> > something it was not meant to do (include math).
> > 
> > Does someone recommend a different way?
> > 
> > Thanks,
> > 
> > Scott
> I'm also a fan of PGF/TiKZ. If you want to draw the diagrams using a drawing
> program, Inkscape can export a .tikz file, which you can then include in
> your LyX document. So can several other programs (Wikipedia page
> ).

Thanks. Perhaps then I would create a simple macro based on TiKZ. The
reason I want a simple macro is that it is for lecture notes and I use
these trees a lot, so want to easily create them.

> If by any chance you're an R user, you might consider using something like
> the DiagrammeR package to generate the diagrams and the tikzDevice package
> to output the diagram to a .tikz file.

I am and did not know about that package. Cool!

Thanks, Paul.

Scott


signature.asc
Description: PGP signature


Re: Creating a tree with math in LyX

2018-03-30 Thread Scott Kostyshak
On Fri, Mar 30, 2018 at 11:21:29PM +, Joel Kulesza wrote:

> also \usepackage{standalone} so that they inherit the parent document
> style, font, etc. settings when rendered out via LyX.

Cool package. I didn't know about that one.

> I find this approach gives me the fine-grained control I need/want while
> reducing repetition in the preamble.  Note that the preamble can also be
> included in the individual standalone .tikz.tex files to make sure
> everything is kept synchronized.
> 
> Crude demonstration attached.

Nice approach. I will take a look at this.

Thank you for your neat example.

Scott


signature.asc
Description: PGP signature


Re: LyX--Knitr warnings.

2018-03-30 Thread Scott Kostyshak
On Fri, Mar 30, 2018 at 11:44:12PM +, John Kane wrote:
> Thanks Scott,
> Nice to know I have the option of getting rid of it. I, probably will leave
> it on once I get over the annoyance of it flashing up on every new file.

Good choice :)
I do agree it's annoying, but I think the annoyance is worth it.

> Have you ever downloaded and compiled a .lyx file
> from the internet from a place you are not sure you could trust?
> 
> I suppose I have but so rarely that I cannot recall don't recall doing so
> in the last three or four years, at least. Unless downloading from here
> counts :)

I would claim that it does count. Anyone can send an arbitrary .lyx file
to the list. And not many people use signatures so it would not be hard
to send an email pretending to be someone else.

Scott


signature.asc
Description: PGP signature


Re: Creating a tree with math in LyX

2018-03-30 Thread Paul A. Rubin

On 03/30/2018 06:35 PM, Scott Kostyshak wrote:

I would like to make a simple tree that uses math. The current way I do
it is to use the linguistics module, which gives access to the forest
package. Then I go to Insert > custom insets > Structure tree. I then
wrap the math I want to write in \protect. Attached is an example of
what I'm currently doing. It works, but I don't like writing out
\protect, and I have the feeling I'm asking the forest package to do
something it was not meant to do (include math).

Does someone recommend a different way?

Thanks,

Scott
I'm also a fan of PGF/TiKZ. If you want to draw the diagrams using a 
drawing program, Inkscape can export a .tikz file, which you can then 
include in your LyX document. So can several other programs (Wikipedia 
page ).


If by any chance you're an R user, you might consider using something 
like the DiagrammeR package to generate the diagrams and the tikzDevice 
package to output the diagram to a .tikz file.


Paul



Re: LyX--Knitr warnings.

2018-03-30 Thread John Kane
Thanks Scott,
Nice to know I have the option of getting rid of it. I, probably will leave
it on once I get over the annoyance of it flashing up on every new file.

Have you ever downloaded and compiled a .lyx file
from the internet from a place you are not sure you could trust?

I suppose I have but so rarely that I cannot recall don't recall doing so
in the last three or four years, at least. Unless downloading from here
counts :)

On 30 March 2018 at 18:02, Scott Kostyshak  wrote:

> On Fri, Mar 30, 2018 at 09:00:34PM +, John Kane wrote:
> > Ah, not a bug, a feature. I guess I will learn to live with it.
> > Thanks very much. It's good to know I don't have a potentially serious
> > problem in my configuration.
>
> You do not have to live with it (instructions below), but think hard
> before you remove it. Have you ever downloaded and compiled a .lyx file
> from the internet from a place you are not sure you could trust? It
> would be extremely easy to make a .lyx file that would upload/delete all
> of your files (because in R this is easy to write). And for that to
> happen, all you would have to do is open the LyX file and compile it.
>
> That said, if clicking on "Always run for this document" is too much of
> a pain, you can go to Tools > Preferences > Converters and uncheck the
> option "Use needauth option".
>
> Scott
>



-- 
John Kane
Kingston ON Canada


Re: Creating a tree with math in LyX

2018-03-30 Thread Joel Kulesza
On Fri, Mar 30, 2018 at 5:02 PM, Scott Kostyshak  wrote:

> On Fri, Mar 30, 2018 at 04:55:10PM -0600, Joel Kulesza wrote:
> > On Fri, Mar 30, 2018 at 4:35 PM, Scott Kostyshak 
> wrote:
> >
> > > I would like to make a simple tree that uses math. The current way I do
> > > it is to use the linguistics module, which gives access to the forest
> > > package. Then I go to Insert > custom insets > Structure tree. I then
> > > wrap the math I want to write in \protect. Attached is an example of
> > > what I'm currently doing. It works, but I don't like writing out
> > > \protect, and I have the feeling I'm asking the forest package to do
> > > something it was not meant to do (include math).
> > >
> > > Does someone recommend a different way?
> > >
> >
> > I'm a fan of TikZ.
> >
> > http://www.texample.net/tikz/examples/feature/trees/
>
> Do you write out the TikZ each time? Or did you make an inset or macro
> that makes it quicker?
>
> I will be making several of these small trees. I can just copy paste the
> code each time and it is not so much trouble, but I'm curious if you
> have a smoother setup than that.


My workflow is to put global style definitions, etc. into a preamble.tex
file that I \input within LyX's Document Settings.  Or, if minimal, I
include them directly in the LyX file.

I then create the graphics as individual .tex files (usually
image_name.tikz.tex) that I then include as a Child Document in LyX.
The image_name.tikz.tex
are fully renderable files that I work with independently (these days, with
vimtex and Skim) while I tweak everything to my liking.  Because of this, I
also \usepackage{standalone} so that they inherit the parent document
style, font, etc. settings when rendered out via LyX.

I find this approach gives me the fine-grained control I need/want while
reducing repetition in the preamble.  Note that the preamble can also be
included in the individual standalone .tikz.tex files to make sure
everything is kept synchronized.

Crude demonstration attached.

- Joel


tikz_mwe.lyx
Description: Binary data


icon_magnifying_glass.tikz.tex
Description: Binary data


test1.tikz.tex
Description: Binary data


Re: Creating a tree with math in LyX

2018-03-30 Thread Scott Kostyshak
On Fri, Mar 30, 2018 at 04:55:10PM -0600, Joel Kulesza wrote:
> On Fri, Mar 30, 2018 at 4:35 PM, Scott Kostyshak  wrote:
> 
> > I would like to make a simple tree that uses math. The current way I do
> > it is to use the linguistics module, which gives access to the forest
> > package. Then I go to Insert > custom insets > Structure tree. I then
> > wrap the math I want to write in \protect. Attached is an example of
> > what I'm currently doing. It works, but I don't like writing out
> > \protect, and I have the feeling I'm asking the forest package to do
> > something it was not meant to do (include math).
> >
> > Does someone recommend a different way?
> >
> 
> I'm a fan of TikZ.
> 
> http://www.texample.net/tikz/examples/feature/trees/

Do you write out the TikZ each time? Or did you make an inset or macro
that makes it quicker?

I will be making several of these small trees. I can just copy paste the
code each time and it is not so much trouble, but I'm curious if you
have a smoother setup than that.

Scott


signature.asc
Description: PGP signature


Re: Creating a tree with math in LyX

2018-03-30 Thread Joel Kulesza
On Fri, Mar 30, 2018 at 4:35 PM, Scott Kostyshak  wrote:

> I would like to make a simple tree that uses math. The current way I do
> it is to use the linguistics module, which gives access to the forest
> package. Then I go to Insert > custom insets > Structure tree. I then
> wrap the math I want to write in \protect. Attached is an example of
> what I'm currently doing. It works, but I don't like writing out
> \protect, and I have the feeling I'm asking the forest package to do
> something it was not meant to do (include math).
>
> Does someone recommend a different way?
>

I'm a fan of TikZ.

http://www.texample.net/tikz/examples/feature/trees/

- Joel


Re: Document class Modern CV: extra full stops [RESOLVED]

2018-03-30 Thread Rich Shepard

On Fri, 30 Mar 2018, Richard Kimberly Heck wrote:


The definition of \cventry is in the moderncvbody?.sty files. There are
five of these, which I guess are used with various options. Anyway, they
all contain code like:


Riki,

  Thanks for the pointer; I didn't know to grep for cventry. The .sty files
with the extra period are in moderncvbodyi.sty and moderncvbodyii.sty.

  I commented out those lines and replaced them without the leading period.
This did the trick. It put a comma after each paper and presentation title,
including a couple that end with question marks, but I can live with that. I
doubt anyone reading my CV will notice or comment on it. After all, no one's
commented on the double periods, either. :-)

Much appreciated,

Rich


Creating a tree with math in LyX

2018-03-30 Thread Scott Kostyshak
I would like to make a simple tree that uses math. The current way I do
it is to use the linguistics module, which gives access to the forest
package. Then I go to Insert > custom insets > Structure tree. I then
wrap the math I want to write in \protect. Attached is an example of
what I'm currently doing. It works, but I don't like writing out
\protect, and I have the feeling I'm asking the forest package to do
something it was not meant to do (include math).

Does someone recommend a different way?

Thanks,

Scott


tree_math.22.lyx
Description: application/lyx


signature.asc
Description: PGP signature


Re: LyX--Knitr warnings.

2018-03-30 Thread Scott Kostyshak
On Fri, Mar 30, 2018 at 09:00:34PM +, John Kane wrote:
> Ah, not a bug, a feature. I guess I will learn to live with it.
> Thanks very much. It's good to know I don't have a potentially serious
> problem in my configuration.

You do not have to live with it (instructions below), but think hard
before you remove it. Have you ever downloaded and compiled a .lyx file
from the internet from a place you are not sure you could trust? It
would be extremely easy to make a .lyx file that would upload/delete all
of your files (because in R this is easy to write). And for that to
happen, all you would have to do is open the LyX file and compile it.

That said, if clicking on "Always run for this document" is too much of
a pain, you can go to Tools > Preferences > Converters and uncheck the
option "Use needauth option".

Scott


signature.asc
Description: PGP signature


Re: LyX--Knitr warnings.

2018-03-30 Thread John Kane
Ah, not a bug, a feature. I guess I will learn to live with it.
Thanks very much. It's good to know I don't have a potentially serious
problem in my configuration.

On 30 March 2018 at 16:58, Kornel Benko  wrote:

> Am Freitag, 30. März 2018 16:49:49 CEST schrieb John Kane
> :
> > I forgot to try it! Yes it is working.
> > I just wonder why the blasted warning is appearing in the first place. It
> > seems unlikely that I have a virus but possible. I did a major update on
> my
> > R packages and upgraded from knitr 1.18 to knutr 1.20 today so if it is a
> > virus it is migrating.
>
> This warning is new. It is displayed on all scripts which are processed be
> an
> external program.
>
> > Now if I can remember how to update ClamAV signatures, I'll run a scan.
> >
> > Forgot my info
> > OS Ubuntu 16.04
> > Lyx 2.3.0
> > knitr 1.20
> > R version 3.4.4 (2018-03-15)
>
> OK.
> This affects all platforms and probably also all future lyx versions.
>
>  Kornel
>
>


-- 
John Kane
Kingston ON Canada


Re: LyX--Knitr warnings.

2018-03-30 Thread Kornel Benko
Am Freitag, 30. März 2018 16:49:49 CEST schrieb John Kane 
:
> I forgot to try it! Yes it is working.
> I just wonder why the blasted warning is appearing in the first place. It
> seems unlikely that I have a virus but possible. I did a major update on my
> R packages and upgraded from knitr 1.18 to knutr 1.20 today so if it is a
> virus it is migrating.

This warning is new. It is displayed on all scripts which are processed be an 
external program.

> Now if I can remember how to update ClamAV signatures, I'll run a scan.
> 
> Forgot my info
> OS Ubuntu 16.04
> Lyx 2.3.0
> knitr 1.20
> R version 3.4.4 (2018-03-15)

OK.
This affects all platforms and probably also all future lyx versions.

 Kornel



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


Re: LyX--Knitr warnings.

2018-03-30 Thread John Kane
ClamAV reports the R folder is clean, for what's that's worth.

On 30 March 2018 at 16:49, John Kane  wrote:

> I forgot to try it! Yes it is working.
> I just wonder why the blasted warning is appearing in the first place. It
> seems unlikely that I have a virus but possible. I did a major update on my
> R packages and upgraded from knitr 1.18 to knutr 1.20 today so if it is a
> virus it is migrating.
>
> Now if I can remember how to update ClamAV signatures, I'll run a scan.
>
> Forgot my info
> OS Ubuntu 16.04
> Lyx 2.3.0
> knitr 1.20
> R version 3.4.4 (2018-03-15)
>
> On 30 March 2018 at 16:41, Kornel Benko  wrote:
>
>> Am Freitag, 30. März 2018 16:36:23 CEST schrieb John Kane
>> :
>> >  I have the Rnw(knitr) module permanently loaded in my default template.
>> > Ever time I compile I get a warning message (see attached screenshot).
>> The
>> > document compiles with no problem but this is getting on my nerves. If I
>> > remove the module, the warning does not appear.
>> > This seems to have appeared after an upgrade to LyX 2.3.0 on 2018-02-24.
>> > Can anyone hazard a guess what is going on? This does not look like a
>> bug,
>> > much more likely a problem in my configuration but I don't have a clue
>> on
>> > how to diagnose the problem.
>> > MWE attached.
>> >
>> > Any suggestions gratefully received.
>>
>> Is 'Always run for this document' not working?
>> This is a warning that you _may_ have a virus in this external script.
>> If you are sure that it is OK, you can check this button.
>>
>> Kornel
>>
>
>
>
> --
> John Kane
> Kingston ON Canada
>



-- 
John Kane
Kingston ON Canada


Re: LyX--Knitr warnings.

2018-03-30 Thread John Kane
I forgot to try it! Yes it is working.
I just wonder why the blasted warning is appearing in the first place. It
seems unlikely that I have a virus but possible. I did a major update on my
R packages and upgraded from knitr 1.18 to knutr 1.20 today so if it is a
virus it is migrating.

Now if I can remember how to update ClamAV signatures, I'll run a scan.

Forgot my info
OS Ubuntu 16.04
Lyx 2.3.0
knitr 1.20
R version 3.4.4 (2018-03-15)

On 30 March 2018 at 16:41, Kornel Benko  wrote:

> Am Freitag, 30. März 2018 16:36:23 CEST schrieb John Kane
> :
> >  I have the Rnw(knitr) module permanently loaded in my default template.
> > Ever time I compile I get a warning message (see attached screenshot).
> The
> > document compiles with no problem but this is getting on my nerves. If I
> > remove the module, the warning does not appear.
> > This seems to have appeared after an upgrade to LyX 2.3.0 on 2018-02-24.
> > Can anyone hazard a guess what is going on? This does not look like a
> bug,
> > much more likely a problem in my configuration but I don't have a clue on
> > how to diagnose the problem.
> > MWE attached.
> >
> > Any suggestions gratefully received.
>
> Is 'Always run for this document' not working?
> This is a warning that you _may_ have a virus in this external script.
> If you are sure that it is OK, you can check this button.
>
> Kornel
>



-- 
John Kane
Kingston ON Canada


Re: LyX--Knitr warnings.

2018-03-30 Thread Kornel Benko
Am Freitag, 30. März 2018 16:36:23 CEST schrieb John Kane 
:
>  I have the Rnw(knitr) module permanently loaded in my default template.
> Ever time I compile I get a warning message (see attached screenshot). The
> document compiles with no problem but this is getting on my nerves. If I
> remove the module, the warning does not appear.
> This seems to have appeared after an upgrade to LyX 2.3.0 on 2018-02-24.
> Can anyone hazard a guess what is going on? This does not look like a bug,
> much more likely a problem in my configuration but I don't have a clue on
> how to diagnose the problem.
> MWE attached.
> 
> Any suggestions gratefully received.

Is 'Always run for this document' not working?
This is a warning that you _may_ have a virus in this external script.
If you are sure that it is OK, you can check this button.

Kornel


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


LyX--Knitr warnings.

2018-03-30 Thread John Kane
 I have the Rnw(knitr) module permanently loaded in my default template.
Ever time I compile I get a warning message (see attached screenshot). The
document compiles with no problem but this is getting on my nerves. If I
remove the module, the warning does not appear.
This seems to have appeared after an upgrade to LyX 2.3.0 on 2018-02-24.
Can anyone hazard a guess what is going on? This does not look like a bug,
much more likely a problem in my configuration but I don't have a clue on
how to diagnose the problem.
MWE attached.

Any suggestions gratefully received.
-- 
John Kane
Kingston ON Canada


MWE1.lyx
Description: application/lyx


Re: Document class Modern CV: extra full stops

2018-03-30 Thread Richard Kimberly Heck
On 03/30/2018 12:11 PM, Rich Shepard wrote:
>   Just noticed that the Modern CV class appends a period (full stop)
> at the
> end of each entry's What? box. This is fine when that's the
> appropriate end
> of the title, but not when the title ends in a question mark or closing
> quotation mark. After all do we want to present a sentence that ends like
> this?.
>
>   I'd appreciate suggestions on how to fix this. In
> /usr/share/texmf-dist/tex
> /latex/moderncv/ I find many .sty files and a few .cls files and
> haven't a
> clue which one, if any, controls insertion of full-stops. Nothing is
> /immediately obvious to me as relevant.

The definition of \cventry is in the moderncvbody?.sty files. There are
five of
these, which I guess are used with various options. Anyway, they all contain
code like:

\renewcommand*{\cventry}[7][.25em]{%
  \cvitem[#1]{#2}{%
    {\bfseries#3}%
    \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
    \ifthenelse{\equal{#5}{}}{}{, #5}%
    \ifthenelse{\equal{#6}{}}{}{, #6}%
    .\strut%
    \ifx&%
   
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}

The What? argument is #3 here, so this one sets it as boldface.
Affiliation, City, and Country are #4, #5, and #6, and what the code
does is insert a comma between arguments and a period at the end of the
whole thing. I'm guessing your other arguments are empty, so you get the
period after What?

It's just a guess, but since you refer to a "title", and aren't using
the other arguments, you might shouldn't be using Entry for this but
instead Item.

Riki



Document class Modern CV: extra full stops

2018-03-30 Thread Rich Shepard

  Just noticed that the Modern CV class appends a period (full stop) at the
end of each entry's What? box. This is fine when that's the appropriate end
of the title, but not when the title ends in a question mark or closing
quotation mark. After all do we want to present a sentence that ends like
this?.

  I'd appreciate suggestions on how to fix this. In /usr/share/texmf-dist/tex
/latex/moderncv/ I find many .sty files and a few .cls files and haven't a
clue which one, if any, controls insertion of full-stops. Nothing is
/immediately obvious to me as relevant.

TIA,

Rich