paragraphs not automatically indenting

\flushleft is not a command that takes arguments. The way you have it written everything (the entire document) after the command is flushed left. To get what you want you should write the following

{\flushleft name\\ class\\ 12.11.12} \section*{Radix Trees}

that is set the command and the text to be flushed withing curly braces.


As others have commented, \flushleft is not a command with arguments (like, for instance, \textbf or \emph).

Actually \flushleft is not a user command at all. It exists only for internal reasons, for making the flushleft environment work.

You have many possibilities for setting the author data for a document that seems not to require the full fledged \maketitle.

In what follows I assume that code snippets are preceded by your preamble (slightly modified)

\documentclass[12pt]{article}
\usepackage[greek,english]{babel}
\usepackage{graphicx}
\usepackage{amsmath,amssymb}
\usepackage{color}
\usepackage{listings}
\usepackage{float}

\setcounter{secnumdepth}{-2} % no section number

First way

\begin{document}

\noindent name

\noindent class

\noindent date

\section{Radix Trees}

Second way

Here the result is the same as in the preceding way, but the code is more compact

\begin{document}

{\raggedright
 name \\
 class \\
 date \\
}

\section{Radix Trees}

Third way

This may add some space below the data. Ordinarily, the flushleft environment adds also vertical space above it, but here we are at the top of a page, so this space will be discarded. Actually, also the space below will not be added, in this case, because a section title follows and LaTeX chooses the maximum between the predefined spaces below the environment and above the section title.

\begin{document}

\begin{flushleft}
name \\
class \\
date
\end{flushleft}

\section{Radix Trees}

Fourth (and preferred) way

\newcommand{\authordata}[3]{{\raggedright #1\\#2\\#3\par}}

\begin{document}

\authordata
  {name}
  {class}
  {date}

\section{Radix Trees}

Why is the fourth way my preferred one?

This way abstracts the input of the data, so you're free to change how it will appear by just changing the definition. For instance a simple addition of \large\bfseries will make the data more prominent:

\newcommand{\authordata}[3]{{\large\bfseries\raggedright #1\\#2\\#3\par}}

Many variations are possible, without ever touching what is after \begin{document}.

Tags:

Formatting