我的代码测试有什么问题?我这样做是为了
\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}
答案1
你没有具体说明你我认为您的例子是错误的,但我认为事实上有几行从最右边开始 - 基本上在文本块之外。
解决此问题的直接方法是在某些代码行之间提供空行,因为 TeX 会将所有空行解释为段落分隔符。
\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
wasysym
和之间存在一些冲突mathabx
;两者都定义了具有相同名称的符号,包括\leftmoon
和\rightmoon
。最简单的方法是删除其中一个包,除非您确实需要这两个包。在这种情况下,您可以在加载包之间删除有问题的命令。
\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}