0

What's wrong with my code test ? I do this to

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{enumitem}
\frenchbsetup{StandardLists=true}
%\usepackage{textcomp}
\usepackage{amsmath,amssymb}
\usepackage{ mathrsfs}
 \usepackage{fancyhdr}
 \pagestyle{fancy}
\usepackage{graphicx}
\usepackage{xcolor}
\definecolor{tr}{rgb}{0.22,.26,.64}
 \definecolor{bl}{RGB}{022,119,184}
  \definecolor{or}{RGB}{254,89,0}
  \definecolor{v1}{RGB}{224,237,224}
%\usepackage{libertine}
\usepackage[frenchstyle]{kpfonts}
\usepackage{pifont}
\usepackage{wasysym}
\usepackage{ifsym}
\usepackage{mathabx}
\usepackage{vmargin}
\usepackage{setspace}
 \doublespacing
\parindent= 0 cm
\setmarginsrb{1cm}{2 cm}{2 cm}{1 cm}{1 cm}{0 cm}{0 cm}{0.5 cm}

\begin{document}%********************************************************************************************************
\begin{center}
\textsc{\Large Questionnaire}
\end{center}
\vspace{2 cm}
\fcolorbox{white}{v1}{\begin{minipage}{17 cm}
\textsc{L'âge}                        %l'âge_________________________________________________________________________
\end{minipage}}
{\color{gray!15}\rule[0.6 cm]{17.2 cm}{0.03 cm}}
1. Quel est votre âge? \hspace{10 cm}  \fbox{\hspace{3 cm}{\color{white}on}}
{\color{gray!15}\rule[-0.6 cm]{17.2 cm}{0.03 cm}}
\fcolorbox{white}{v1}{\begin{minipage}{17 cm}
\textsc{Sexe}           %________________________________________________________________________________________
\end{minipage}}
{\color{gray!15}\rule[0.6 cm]{17.2 cm}{0.03 cm}}
2. Vous êtes : Homme (1) ; Femme (2 ) ;
 $\textbigcircle \,$  1.1\hspace{1 cm} $\textbigcircle \,$ 2.2  

 {\color{gray!15}\rule[-0.6 cm]{17.2 cm}{0.03 cm}}
\fcolorbox{white}{v1}{\begin{minipage}{17 cm}
\textsc{La taille}          %_______________________________________________________________________________________
\end{minipage}}
{\color{gray!15}\rule[0.6 cm]{17.2 cm}{0.03 cm}}
3. Quelle est votre taille ( en $cm$ )? \hspace{8 cm}  \fbox{\hspace{3 cm}{\color{white}on}}
 {\color{gray!15}\rule[-0.6 cm]{17.2 cm}{0.03 cm}}
\fcolorbox{white}{v1}{\begin{minipage}{17 cm}
\textsc{Bac}    %_______________________________________________________________________________________________
\end{minipage}}
{\color{gray!15}\rule[0.6 cm]{18.5 cm}{0.03 cm}}

 \end{document}
  • Unrelated, but if you want to design questionnaires, you might insterested in the exam class. – Henri Menke Apr 6 '14 at 18:16
  • 1
    Could you paste the error you've got? Perhaps you didn't install a specific package? – ppr Apr 6 '14 at 18:22
  • ! LaTeX Error: Command `\leftmoon' already defined.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help.... ...athSymbol{\leftmoon} {0}{mathb}{"4B} – Aviroum Apr 6 '14 at 19:14
  • ! LaTeX Error: Command `\rightmoon' already defined.See the LaTeX manual or LaTeX Companion for explanation.Type H <return> for immediate help.... ...athSymbol{\rightmoon} {0}{mathb}{"4C} – Aviroum Apr 6 '14 at 19:15
  • Please be more specific; see chiark.greenend.org.uk/~sgtatham/bugs.html . And please condense your code to make it an MWE. – Martin Schröder Apr 7 '14 at 9:12
3

You weren't specific as to what you think is wrong with your example, but I'll assume it's the fact that several lines start far to the right -- basically, outside the text block.

A straightforward way to fix this is to provide blank lines between certain lines of code, because all-blank lines are interpreted by TeX as paragraph breaks.

enter image description here

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{enumitem}
\frenchbsetup{StandardLists=true}
%\usepackage{textcomp} 
\usepackage{amsmath,amssymb}
\usepackage{ mathrsfs}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{graphicx}
\usepackage{xcolor}
  \definecolor{tr}{rgb}{0.22,.26,.64}
  \definecolor{bl}{RGB}{022,119,184}
  \definecolor{or}{RGB}{254,89,0}
  \definecolor{v1}{RGB}{224,237,224}
%\usepackage{libertine}
\usepackage[frenchstyle]{kpfonts}
\usepackage{pifont}
\usepackage{wasysym}
\usepackage{ifsym}
%\usepackage{mathabx} %% commented out to avoid duplication of "\leftmoon"
\usepackage{vmargin}
\usepackage{setspace}
\doublespacing
\parindent= 0 cm
\setmarginsrb{1cm}{2 cm}{2 cm}{1 cm}{1 cm}{0 cm}{0 cm}{0.5 cm}

\begin{document}
\vspace*{0.5cm}

\begin{center}
\textsc{\Large Questionnaire}
\end{center}


{\color{gray!15}\rule[-0.6 cm]{17.2 cm}{0.03 cm}}

\fcolorbox{white}{v1}{\begin{minipage}{17 cm}
\textsc{L'âge}\end{minipage}}

{\color{gray!15}\rule[0.6 cm]{17.2 cm}{0.03 cm}}

1. Quel est votre âge? \hspace{10 cm}  
\fbox{\hspace{3 cm}{\color{white}on}}

{\color{gray!15}\rule[-0.6 cm]{17.2 cm}{0.03 cm}}

\fcolorbox{white}{v1}{\begin{minipage}{17 cm}
\textsc{Sexe}\end{minipage}}

{\color{gray!15}\rule[0.6 cm]{17.2 cm}{0.03 cm}}

2. Vous êtes : Homme (1) ; Femme (2 ) ;
 $\textbigcircle \,$  1.1\hspace{1 cm} $\textbigcircle \,$ 2.2  

{\color{gray!15}\rule[-0.6 cm]{17.2 cm}{0.03 cm}}

\fcolorbox{white}{v1}{\begin{minipage}{17 cm}
\textsc{La taille}\end{minipage}}

{\color{gray!15}\rule[0.6 cm]{17.2 cm}{0.03 cm}}

3. Quelle est votre taille ( en \emph{cm} )? \hspace{8 cm}  \fbox{\hspace{3 cm}{\color{white}on}}

{\color{gray!15}\rule[-0.6 cm]{17.2 cm}{0.03 cm}}

\fcolorbox{white}{v1}{\begin{minipage}{17 cm}
\textsc{Bac}\end{minipage}}

{\color{gray!15}\rule[0.6 cm]{17.2 cm}{0.03 cm}}

\end{document}
2

There are some conflicts between wasysym and mathabx; both define symbols with the same name, including \leftmoon and \rightmoon. The simplest thing would be to remove one of the packages, unless you really need both. In that case, you can delete the offending commands in between loading the packages.

\documentclass[10pt,a4paper]{article}
\usepackage{wasysym}
\let\leftmoon\relax
\let\rightmoon\relax
\let\fullmoon\relax
\let\newmoon\relax
\let\diameter\relax
\usepackage{mathabx}
\begin{document}
abc
\end{document}

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.