Re: Problems with Unicode and Greek letters

2017-06-06 Thread Guenter Milde
On 2017-06-05, Juanjo ML wrote:

...

There are many ways to get Greek letters in LaTeX. The correct way(s)
depend on whether it should be a text letter or a mathematical symbol.

> When I try to write a greek character such as delta, an error shows up.

> I've tried two different ways:

>- writing it in Latex Code (Ctrl + L) (a simple Latex block with
>"\delta" within): it says "Missing $ inserted." and doesn't do anything
>further. When I click "do it anyway", Latex code seems to affect the whole
>line, till it finds a "special character", but my greek letter does not
>appear.

The LaTeX macro \delta (as any other Greek letter name) generates the
mathematical symbol. It is a "math mode command", i.e. it only works if
LaTeX is in "math mode" (inbetween $ $ or an equation.

In LyX, you could use Ctrl-L: $\delta$, but the better way is using mathed,
as you did here:

>- writing it as an inline equation (Ctrl + M) ("\delta" in a blue
>square): "Package inputenc Error: Unicode char...", but pdf is shown
>without clicking anything. It works, but I strongly believe these errors
>shouldn't be there...

I agree that the errors are not right. They don't show up normally.

Maybe you inserted a literal Unicode delta δ into the "math square" or
you have some unusual document settings and/or incomplete LaTeX installation.
Hard to tell without a minimal example.

You may try again, evt. also with Alt-M G  or with the "Greek" math toolbar.


If you want Greek *text*, don't use math mode but
literal Greek unicode characters in text mode.

With XeTeX/LuaTeX, you need to set a font that contains Greek letters.

With pdfTeX, you need to install Greek language support. 
If the text language is set to Greek and TeX fonts are used, you can also
use the ASCII transliteration provided by Babel instead of literal Greek
characters.

Günter



Re: Problems with Unicode and Greek letters

2017-06-06 Thread Michael Berger

Hi Juanjo,
I am still not clear what you actually meant saying "...a simple Latex 
block with "\delta" within" etc.

look at the screenshot attached - is that what you meant to achieve?

Michael

Hi Juanjo, there are many ways of writing Greek characters.

The far easiest and thus the most simple way would be to select a 
character from the symbols list:
Insert > Special character > Symbols > then select the category Greek or 
Greek extended and click on the character to be inserted.


For more sophisticated tasks look for the "Comprehensive Latex Symbol 
List" written by Scott Pakin, I think the latest edition is dated 
November 2015. Be warned, it is huge!


Michael

On 06/05/2017 11:08 AM, Juanjo ML wrote:

Hi guys,

I'm trying to write down my thesis in Lyx, but I find kind of tricky 
the way inputencoding is treated. When I try to write a greek 
character such as delta, an error shows up.


I've tried two different ways:

  * writing it in Latex Code (Ctrl + L) (a simple Latex block with
"\delta" within): it says "Missing $ inserted." and doesn't do
anything further. When I click "do it anyway", Latex code seems to
affect the whole line, till it finds a "special character", but my
greek letter does not appear.
  * writing it as an inline equation (Ctrl + M) ("\delta" in a blue
square): "Package inputenc Error: Unicode char...", but pdf is
shown without clicking anything. It works, but I strongly believe
these errors shouldn't be there...

May you please help me to deal with this problem? Could you please 
tell how to make it work in both ways?


Thank you all in advance!


Best regards,

Juanjo





Re: Problems with Unicode and Greek letters

2017-06-05 Thread Paul A. Rubin

On 06/05/2017 05:08 AM, Juanjo ML wrote:


I've tried two different ways:

  * writing it in Latex Code (Ctrl + L) (a simple Latex block with
"\delta" within): it says "Missing $ inserted." and doesn't do
anything further. When I click "do it anyway", Latex code seems to
affect the whole line, till it finds a "special character", but my
greek letter does not appear.
  * writing it as an inline equation (Ctrl + M) ("\delta" in a blue
square): "Package inputenc Error: Unicode char...", but pdf is
shown without clicking anything. It works, but I strongly believe
these errors shouldn't be there...


The second approach should work without errors (although I'm not 
positive a delta in math mode is identical in appearance to a text 
delta), and does here. Can you post a minimal example of the second 
method that generates an encoding error message?


Paul



Re: Problems with Unicode and Greek letters

2017-06-05 Thread Michael Berger

Hi Juanjo, there are many ways of writing Greek characters.

The far easiest and thus the most simple way would be to select a 
character from the symbols list:
Insert > Special character > Symbols > then select the category Greek or 
Greek extended and click on the character to be inserted.


For more sophisticated tasks look for the "Comprehensive Latex Symbol 
List" written by Scott Pakin, I think the latest edition is dated 
November 2015. Be warned, it is huge!


Michael

On 06/05/2017 11:08 AM, Juanjo ML wrote:

Hi guys,

I'm trying to write down my thesis in Lyx, but I find kind of tricky 
the way inputencoding is treated. When I try to write a greek 
character such as delta, an error shows up.


I've tried two different ways:

  * writing it in Latex Code (Ctrl + L) (a simple Latex block with
"\delta" within): it says "Missing $ inserted." and doesn't do
anything further. When I click "do it anyway", Latex code seems to
affect the whole line, till it finds a "special character", but my
greek letter does not appear.
  * writing it as an inline equation (Ctrl + M) ("\delta" in a blue
square): "Package inputenc Error: Unicode char...", but pdf is
shown without clicking anything. It works, but I strongly believe
these errors shouldn't be there...

May you please help me to deal with this problem? Could you please 
tell how to make it work in both ways?


Thank you all in advance!


Best regards,

Juanjo