0

Trying to fix an issue I have with Greek and pdfLaTeX (Problem with Greek) I downloaded the file: http://mirrors.ctan.org/language/greek/greek-inputenc/greek-utf8.tex

When running it from the Temp Directory (I did not save it I just opened it with WinEdt directly) it runs ok and I get no errors at all (I am using pdflatex on the Latest update of MiKTeX 2.9.) but when I save it in a local directory and try to run it, it gives errors! This is something I do not understand at all!

A minimum example is:

\documentclass[a4paper]{article}
\usepackage[LGR,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[greek,english]{babel}=
\begin{document}
\subsection{Other Unicode Blocks}
\begin{description}
\item [Latin-1 Supplement]: \ensuregreek{¨ « ¯ ´   · »}
\end{description}
\end{document}      

and the errors and Warnings I get are the following:

! Missing $ inserted.
<inserted text>
                $
l.30 ...ent]: \ensuregreek{¨ « ¯ ´   \cdot »}

? r
OK, entering \nonstopmode...

LaTeX Warning: Command \guillemotright invalid in math mode on input line 30.

! Extra }, or forgotten $.
\T1\ensuregreek #1->\leavevmode {\greekscript #1}

l.30 ...ent]: \ensuregreek{¨ « ¯ ´   \cdot »}


! LaTeX Error: Command \end{description} invalid in math mode.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.46 \end{description}


! LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.46 \end{description}


! LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.46 \end{description}

! Missing $ inserted.
<inserted text>
                $
l.46 \end{description}

! Missing } inserted.
<inserted text>
                }
l.46 \end{description}

I hope this helps in understanding what the problem is.

Thank you in advance

  • 1
    It is probably effect of saving the file in format not compatible with UTF-8. – Przemysław Scherwentke Sep 12 '16 at 10:46
  • Thank you for your answer. I think I did save it ina format compatible with UTF-8. I am using WinEdt and the document properties are the following: Document Mode TeX:UNIX:UTF-8, Document Format UTF-8 – Andreas Zoupas Sep 12 '16 at 10:51
2

The first error message seems to be pretty clear:

! Missing $ inserted.
<inserted text>
                $
l.231 ...ent]: \ensuregreek{¨ « ¯ ´  \cdot »}

The macro \ensuregreek does not say anything about math, but \cdot is a math macro, thus $\cdot$ might fix this error (and likely some followup errors because of math mode, which was enabled by TeX as error recovery from the first error).

  • The part of the code giving the error is \subsection{Other Unicode Blocks} \begin{description} \item [Latin-1 Supplement]: \ensuregreek{¨ « ¯ ´ · »} ....\end{description} do you think this is still related to missing math enclosing symbols? Since this is part of large file perhaps i should try to get a minimum (not) working example out of it... but the real problem was that it run ok from the temp dir..... – Andreas Zoupas Sep 13 '16 at 18:14
  • I just got a minimum example up and the errors. I hope this helps – Andreas Zoupas Sep 13 '16 at 18:32
  • @AndreasZoupas The minimal document does not create any errors. – Heiko Oberdiek Sep 13 '16 at 18:50
  • @Przemysław Scherwentke, I think I found the root of the problem. In Winedt 10 there is ContribManager which allows users to install Macros or Programms. I had the MathGreek installed which apparently messed all my greek encoding up. I uninstalled it and everything runs ok now. The only problem is that in many latex files I use, I think that uninstalling MathGreek caused every greek character in the file to be substituted with the corresponding latex command. E.g. υ--> \upsilon..... this should be a lesson for the future for me. – Andreas Zoupas Sep 13 '16 at 19:36
0

I think I found the root of the problem. In Winedt 10 there is ContribManager which allows users to install Macros or Programms. I had the MathGreek installed which apparently messed all my greek encoding up. I uninstalled it and everything runs ok now. The only problem is that in many latex files I use, I think that uninstalling MathGreek caused every greek character in the file to be substituted with the corresponding latex command. E.g. υ--> \upsilon..... this should be a lesson for the future for me.

This solves also the other problem i posted: Problem with Greek

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.