# Latex- Greek language

I want to write an assignement in greek. I added these commands:

\newcommand{\textgreek}[1]{\begingroup\fontencoding{LGR}\selectfont#1\endgroup}

\section*{\textgreek{Κείμενο}}


but it is wrong.

What else could I do?

%This is a LaTeX template for homework assignments
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}

\newcommand{\textgreek}[1]{\begingroup\fontencoding{LGR}\selectfont#1\endgroup}

\section*{\textgreek{Κείμενο}}
Name: \line(1,0){120} %you can change the length of the lines by changing the number in the curly brackets
\\Date: \line(1,0){120}

\subsection*{Instructions} %Enter instruction text here
Answer {\bf all} the questions and return to the teacher by the end of the week. Section A questions shouldn't cause you any trouble. Section B is designed to be more challenging.

\subsection*{Section A}

\begin{enumerate}%starts the numbering

\item Define the term 'minimal polynomial'.
\\\line(1,0){300}

\item Evaluate the following integral
\begin{equation*}
\int_{2}^{x} \sinh{2y}\, \mathrm{d}y
\end{equation*}
in the case where:
\begin{enumerate}
\item $x = 5$
\\\line(1,0){250}
\\\line(1,0){250}
\\\line(1,0){250}
\item $x = 9$
\\\line(1,0){250}
\\\line(1,0){250}
\\\line(1,0){250}
\end{enumerate}

\item Find the determinant of the following 3x3 matrix:
\begin{figure}[h!]%This example matrix has been enclosed in a figure to give us more positioning options
\centering
\begin{math}
\begin{pmatrix}
1 & 6 & 4 \\
3 & 1 & 7 \\
9 & 4 & 5
\end{pmatrix}
\end{math}
\end{figure}
\\\line(1,0){300}
\\\line(1,0){300}
\\\line(1,0){300}

\end{enumerate}%ends the numbering

\subsection*{Section B}

\begin{enumerate}

\item Determine the following limit:
\begin{equation*}
\lim_{x \to +\infty} \frac{\sin{x}}{x^2}
\end{equation*}
\\\line(1,0){300}
\\\line(1,0){300}
\\\line(1,0){300}

\item Prove Pythagoras' Theorem.
\\\line(1,0){300}
\\\line(1,0){300}
\\\line(1,0){300}

\item Describe the Gram-Schmidt Algorithm.
\\\line(1,0){300}
\\\line(1,0){300}
\\\line(1,0){300}

\end{enumerate}

\end{document}


You have to load babel; then the \textgreek command is already provided.

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

\begin{document}

\section*{\textgreek{Κείμενο}}
\begin{tabular}{@{}ll@{}}
Name: & \line(1,0){120} \\
Date: & \line(1,0){120}
\end{tabular}

\subsection*{Instructions} %Enter instruction text here


Notes: \bf has been obsolete for more than twenty years; use \textbf{all} and not {\bf all}; there should be a tie ~ in Section~A and Section~B in order to avoid unwanted line breaks. I also added a tabular for aligning the two lines in the header.