Author Topic: Problems with greek characters  (Read 11152 times)

pie

  • Newbie
  • *
  • Posts: 4
    • View Profile
Problems with greek characters
« on: January 14, 2014, 06:31:43 PM »
I need some greek characters in my drawings. WinFIG shows all characters as it should be but the exported graphic file (png, jpeg,..) instead shows a '?' or '\alpha'.
If I enter the Alpha character by copy/paste from Windows Character Table (special flag not set), I get a '?'.
If I set the special flag and type in '\alpha', I get the text '\alpha' instead of the greek character. WinFIG Gui shows both variants correctly. (see attachments)
Please can you help me to find a way to get these characters.
Many thanks!

Andreas

  • Administrator
  • Full Member
  • *****
  • Posts: 140
    • View Profile
Re: Problems with greek characters
« Reply #1 on: January 14, 2014, 08:47:00 PM »
If you are using LaTeX syntax for formatting, you have to export to LaTeX or combined PS/LaTeX (PDF/LaTeX). Exporting to a plain image file like PNG does not involve any LaTeX processing. I might add that as a feature in the future, but LaTeX preview was never really meant to go into exported bitmap images. it's a feature for people who are using FIG graphics in LaTeX documents.

I would not even recommend exporting to bitmap grahics. They are not suitable for high quality printing and even less if you resize the images when you put them in a document.

I *guess* you are exporting to a bitmap in order to import the image in Word. Is that right?

If you want to add bitmap images to a Word document, better export to PSTeX and run the result through a LaTeX processor. You need some kind of minimal LaTeX file to do that. Look here or in the FAQ under "How can I create a LaTeX file with PSTeX or PDFTeX?".

Convert the resulting DVI file to EPS. Import that in Word. I sounds like a lot of steps, but it's not that difficult. Put all the LaTeX command line stuff in a script.

Although I would not recommend Word for a scientific publication. Better write your whole text in LaTeX. It's easier and looks a lot better. An you can still use it in 10 years without buying an MS Office subscription.
« Last Edit: January 14, 2014, 08:49:42 PM by Andreas »
This forum belongs to www.schmidt-web-berlin.de/winfig

pie

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Problems with greek characters
« Reply #2 on: January 14, 2014, 09:53:09 PM »
Thank you for the quick response.
I use LyX (a LaTex frontend) to write the text. But I was not able to embed the Latex-Output in LyX - there is no error, but also no image embedded in the PDF-output!?.
It's easy to embed EPS- or PS-files in LyX, therefore I tried to produce a EPS-file with WinFIG without success (because the text is not included in the image-file). Then I tried the way you describe in the FAQ (I have installed MikTex which works fine together with LyX) but I always get errors calling latex.
I would be very happy if you could find out what I am doing wrong. Maybe we can communicate in german?
As attachment you can find my files.
Thank you!
« Last Edit: January 14, 2014, 09:59:48 PM by pie »

pie

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Problems with greek characters
« Reply #3 on: January 14, 2014, 10:01:02 PM »
Sorry - I've added the wrong Log-file before.
Now it's the right one.

pie

  • Newbie
  • *
  • Posts: 4
    • View Profile
Resolved: Problems with greek characters
« Reply #4 on: January 15, 2014, 02:56:12 PM »
After beginning step by step from zero I have found the reason for my problems.
To produce a greek alpha character I have to type in the following in WinFIG:
$\alpha$
The special flag must be activated

Next I export the drawing with format 'PdfTeX' which produces two files - PS-file which contains the graphic without text and a TeX-file with file-suffix 'pdftex_t' which contains the text for the graphic.

In LyX then I create a 'TeX-Code' Box pressing Ctrl+L where I load the pdftex_t file (Einfügen -> Datei -> Einfacher Text)

In the document settings of LyX (Dokument -> Einstellungen -> LaTeX Vorspann) I have to add these two lines:
\usepackage{color}
\usepackage{graphicx}

Now LyX creates a PDF-File without problems.

The main reason for all my troubles was, that firstly I didn't understand exactly how all these export possibilites work together with LaTeX and furthermore I have forgotten the '$' at the beginning and the end of the formula.

Sorry for stealing your time! But sometimes I need someone to tell my problems - seems that this helps to analyze better and faster.
Thank you Andreas!