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 <first letter of the Greek letter
name> 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