Re: title in lilypond code in LyX

2015-08-25 Thread Wolfgang Engelmann

Thanks Helge,
will try it.
Wolfgang

Am 25.08.2015 um 11:33 schrieb Helge Hafting:



Den 09. aug. 2015 16:29, skrev Wolfgang Engelmann:
How would one insert a title to the lilypond code insert of a lyx 
book? I tried it in the insert, but with no avail.

Wolfgang
Both LyX and lilypond has "titles", and either form can be used to 
good effect. So this depends on what you want to do.


LyX title:
This is the title for the whole document. Write it on the first line 
(not inside some lilypond stuff) and change the environment from 
"Standard" to "Title". You can only have one such title, and it must 
be at the start of the document.


Lilypond title:
This is a title for a piece of music, and goes inside a lilypond inset.
For general information on lilypond insets, read Help->Specific 
Manuals->Lilypond


Here is an example that works:
Make document with a lilypond inset (Start with the above mentioned 
help document if necessary)


This goes inside the lilypond inset:
\header {
   title = "Symphony"
  composer = "Someone"
}
\new PianoStaff <<
  % RH Staff
  \new Staff {
\clef treble
\key aes \major
\time 2/4
\partial 8
8\staccato
  }
  % LH Staff
  \new Staff {
\key aes \major
\clef treble
\partial 8
8\staccato
  }
>>



You probably have longer music than that. :-) The title is in the 
"header" block. See www.lilypond.org for more information about what 
you can put in such header blocks - composer, arranger, author, 
translator and so on.


Helge Hafting




Re: LyX efficient language/spell-check toggle

2015-08-25 Thread Guenter Milde
On 2015-08-19, alex wrote:
> I have managed to write a serviceable script that uses LyX server and 
> LFUNs and toggles between languages only with the shortcut Alt + Shift. 
> I am quite pleased with the result, but I have come up with a slight 
> improvement, that can be achieved by tracking the current language used 
> to spell check in LyX. However, all the LFUNs seem to be 
> "one-directional", that is they transfer information from the external 
> application to LyX. Is there a way (for example, a get-language LFUN 
> that I am missing) to echo the current LyX language in the terminal, so 
> that I can use it in a script?

I don't know of any. Did you have a look in the Help>Lfuns (or what it is
called in English or Greek) manual?

OTOH, if you know tie the system-keybord-layout and the text language in LyX¹
it should be fairly easy: "language greek" when the keybord layout is set to
Greek, "language english" (or whatever you use as secondary language), else.
It may become a problem if you use several non-Greek languages or language
variants.

Günter




¹ not only used for spellchecking, but also for hyphenation and
  auto-generated strings.



Re: Lyx to Latex to Lyx

2015-08-25 Thread Helge Hafting



Den 13. aug. 2015 22:53, skrev Hal Kierstead:
I do not think you understood me.  Suppose a create a LyX file and use 
it to generate a tex file.  I send it to my coauthor who does not use 
LyX.  He makes modifications to the LaTex file without changing the 
front material, and sends me his Tex file.  I should be able to use 
tex2lyx to make a revised version  of my LyX file.  But this requires 
many corrections by hand.




Currently, LaTeX import isn't perfect.

There are some ways around this. If your co-author only works on certain 
chapters/sections, then you may put those in files (child documents) of 
their own. Then you can work on most of your LyX document undisturbed by 
his work on his parts. You may even be able to avoid re-converting his 
pieces back to LyX files - for a LyX master document can have child 
documents that are latex files too.


Obviously, this only works if he works on separate parts of the document 
- not if he needs to make changes everywhere.


The best would be to convince the coauthor to use LyX for this document 
- perhaps helping out with the LyX  installation. But I guess that is 
not an option here.


Helge Hafting


Re: title in lilypond code in LyX

2015-08-25 Thread Helge Hafting



Den 09. aug. 2015 16:29, skrev Wolfgang Engelmann:
How would one insert a title to the lilypond code insert of a lyx 
book? I tried it in the insert, but with no avail.

Wolfgang
Both LyX and lilypond has "titles", and either form can be used to good 
effect. So this depends on what you want to do.


LyX title:
This is the title for the whole document. Write it on the first line 
(not inside some lilypond stuff) and change the environment from 
"Standard" to "Title". You can only have one such title, and it must be 
at the start of the document.


Lilypond title:
This is a title for a piece of music, and goes inside a lilypond inset.
For general information on lilypond insets, read Help->Specific 
Manuals->Lilypond


Here is an example that works:
Make document with a lilypond inset (Start with the above mentioned help 
document if necessary)


This goes inside the lilypond inset:
\header {
   title = "Symphony"
  composer = "Someone"
}
\new PianoStaff <<
  % RH Staff
  \new Staff {
\clef treble
\key aes \major
\time 2/4
\partial 8
8\staccato
  }
  % LH Staff
  \new Staff {
\key aes \major
\clef treble
\partial 8
8\staccato
  }
>>



You probably have longer music than that. :-) The title is in the 
"header" block. See www.lilypond.org for more information about what you 
can put in such header blocks - composer, arranger, author, translator 
and so on.


Helge Hafting