[Tex/LaTex] Changing the writing language

babelgreeklanguages

I write in greek (having before load all the necessary packages and own commands – babel etc). In order to change the language and write a word in english I type \gre and the letters appear with english characters (that is correct!). The problem is that whenever I want to come back and write greek again I use the command \eng and typeset the desired word …but the first letter of it is in english!
My own commands are:

\newcommand{\eng}[1]{\latintext#1\greektext} % Change language
\newcommand{\gre}[1]{\greektext\latintext#1} % Change language

Best Answer

Your definitions are wrong. Besides, having \latintext doesn't guarantee correct hyphenation of English words. Here's a better way (the Greek sentence has been obtained from Google translation, I don't know if it's good Greek).

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english,greek]{babel}

\begin{document}

Αυτό το κείμενο είναι στα Ελληνικά \foreignlanguage{english}{not English}

\begin{otherlanguage*}{english}
This is a longer text in English, so
we use an environment for it.
\end{otherlanguage*}

Αυτό το κείμενο είναι στα Ελληνικά

\end{document}

Of course you might prefer defining a personal command, such as

\newcommand{\eng}[1]{\foreignlanguage{english}{#1}}

so you can simply type \eng{English word} in your document instead of the complicated \foreignlanguage{english}{English word}.

enter image description here