对齐,调整文本

对齐,调整文本

我正在尝试制作一个包含我所有练习的文件,但遇到了一些行数的证明问题。我使用的是 MikTex 和 TexMaker (5.0.3)。这是我的代码:

%mathématiques - fichier numérique de tous mes exercices
%----------------------------------------------------------------
\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel} %pour le symbole n°
\frenchbsetup{StandardLists=true} % pour les listes avec \enumitem : à inclure si on utilise 
\usepackage{enumitem}

% spécification des marges, taille papier
%\usepackage[a4paper]{geometry}
%\geometry{hscale=0.85,vscale=0.85,centering}
%\usepackage{fullpage} % une autre solution, pas testée

\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\fancyhead[C]{} 
\fancyhead[L]{}
\fancyhead[R]{}
\renewcommand{\footrulewidth}{0pt}
\fancyfoot[C]{}
\fancyfoot[L]{}
\fancyfoot[R]{\raggedright\mbox{\frakfamily\fraklines\yinipar{S}}}

\usepackage[left=2cm,right=1cm,top=1cm,bottom=2.5cm]{geometry}
% fin de la définition des marges

\usepackage{frcursive}
\usepackage{yfonts}
\usepackage{amsmath}
\usepackage{tikz}

% le package qui pemet de définir des unités et leur affichage
\usepackage{siunitx} % Alignement des valeurs etc.
\sisetup{
    round-mode          = places, % Rounds numbers
    round-precision     = 2, % to 2 places
}

\usepackage{xcolor} % pour les couleurs sur les règles graduées par exemple
\definecolor{shamrockgreen}{rgb}{0.0, 0.62, 0.38}
\definecolor{rose}{rgb}{1.0, 0.0, 0.5}
\definecolor{richlavender}{rgb}{0.67, 0.38, 0.8}
\definecolor{tangelo}{rgb}{0.98, 0.3, 0.0}

%----------------------------------------------------------%
\begin{document}
\noindent MATH\'EMATIQUES
\newline
\vspace{1cm}
\noindent\begin{cursive}Un exemple de repère:\end{cursive}
\begin{center}
    \begin{tikzpicture}
        \draw (0,0) node {$\bullet$};
        \draw (0,0) node[below left]{$O$};
        \draw[->] (-0.4,0) -- (1,0);
        \draw[dashed] (-1.1,0) -- (-0.4,0);
        \draw (1,0) node[below]{$x$};
        \draw[->] (0,-0.4) -- (0,1);
        \draw[dashed] (0,-0.8)-- (0,-0.4);
        \draw (0,1) node[left]{$y$};
        \draw [dashed] (1,0) -- (2.4,0);
        \draw [dashed] (0,1) -- (0,2.4);
        \draw [dashed] (2,2) -- (2,0) node[below] {$2$};
        \draw [dashed] (2,2) -- (0,2) node[left] {$2$};
        \fill [red] (2,2) node[above=2mm,right]{$\alpha(2,2)$} ;
    \end{tikzpicture}
\end{center}

\vspace{1cm}

%les exercices
\noindent\begin{cursive}Exercice \no 13 p29: placer les points dans le repère\end{cursive}

\begin{center}
    \begin{tikzpicture}
        \draw (0,0) node {$\bullet$};
        \draw (0,0) node[below left]{$O$};
        \draw[->] (-4,0) -- (0,0) -- (5,0);
        \draw (1,0) node {$\bullet$};
        \draw (1,0) node [below]{$1$};
        \draw[->] (0,-4.5) --(0,0) -- (0,2);
        \draw (0,1) node {$\bullet$};
        \draw (0,1) node[left]{$1$};
%le point A(-3,-4)
        \draw [dashed] (-3,-4) -- (-3,0) node[above] {$-3$};
        \draw [dashed] (-3,-4) -- (0,-4) node[right] {$-4$};
        \draw (-3,-4) node[below left]{$A(-3,-4)$};
        \fill[green] (-3,-4) node{$\bullet$};
%le point B(4,-2)
        \draw [dashed] (4,-2) -- (4,0) node[above] {$4$};
        \draw [dashed] (4,-2) -- (0,-2) node[left] {$-2$};
        \draw (4,-2) node[below right]{$B(4,-2)$};
        \fill[orange] (4,-2) node{$\bullet$};
%le point C(3,-2)
        \draw [dashed] (3,-2) -- (3,0) node[above] {$3$};
        \draw [dashed] (3,-2) -- (0,-2) node[left] {$-2$};
        \draw (3,-2) node[above left]{$C(3,-2)$};
        \fill[cyan] (3,-2) node{$\bullet$};
%le point D(2,1)
        \draw [dashed] (2,1) -- (2,0) node[below] {$2$};
        \draw [dashed] (2,1) -- (0,1) node[left] {$1$};
        \draw (2,1) node[above right]{$D(2,1)$};
        \fill[blue] (2,1) node{$\bullet$};
%le point E(-2,-3)
        \draw [dashed] (-2,-3) -- (-2,0) node[above] {$-2$};
        \draw [dashed] (-2,-3) -- (0,-3) node[right] {$-3$};
        \draw (-2,-3) node[below]{$E(-2,-3)$};
        \fill[red] (-2,-3) node{$\bullet$};
    \end{tikzpicture}
\end{center}

\vspace{1cm}

\noindent\begin{cursive}Exercice \no 7 p28: placer les points sur la droite\end{cursive}

\begin{center}
    \begin{tikzpicture}[scale=4]
        \draw[->] [ultra thick] (-6.4,0) -- (-3.4,0);
        \draw[step=0.1][very thin, gray] (-6.52,-0.24) grid (-3.18,0.24);
        \draw (-5,0) node [above=1.2mm,fill=white]{$-5\phantom{-}$};
        \draw (-5,0) node {$|$};
        \draw (-4.5,0) node [above=1.2mm,fill=white]{$-4.5\phantom{-}$};
        \draw (-4.5,0) node {$|$};
        \draw (-4,0) node[above=1.2mm,fill=white]{$-4\phantom{-}$};
        \draw (-4,0) node {$|$};

        %placement d'un tiret à l'abscisse -4.5
        %\node at (-4.5,0) {$|$};

%le point A(-6,0)
        \draw (-6,0) node[above=5pt,fill=white]{$A(-6)$};
        \fill[orange] (-6,0) node{$\bullet$};
%le point B(-5.6,0)
        \draw (-5.6,0) node[below=1.2mm,fill=white]{$B(-5.6)$};
        \fill[blue] (-5.6,0) node{$\bullet$};
%le point C(-4.8,0)
        \draw (-4.8,0) node[below=1.3mm,fill=white]{$C(-4.8)$};
        \fill[red] (-4.8,0) node{$\bullet$};
%le point D(-3.8,0)
        \draw (-3.8,0) node[below=3pt,fill=white]{$D(-3.8)$};
        \fill[green] (-3.8,0) node{$\bullet$};
%le point E(-3.6,0)
        \draw (-3.6,0) node[above=5pt,fill=white]{$E(-3.6)$};
        \fill[cyan] (-3.6,0) node{$\bullet$};
    \end{tikzpicture}
\end{center}

\newpage

\noindent\begin{cursive}Exercice \no 9 p176:\end{cursive}

\begin{center}
    \begin{tikzpicture}[scale=1.5]  
        \draw[->] [thick] (-5.5,0) -- (3.5,0);
        \draw (-5,0) node [below=5pt]{$-5\phantom{-}$};
        \draw (-4,0) node [below=5pt]{$-4\phantom{-}$};
        \draw (-3,0) node [below=5pt]{$-3\phantom{-}$}; 
        \draw (-2,0) node [below=5pt]{$-2\phantom{-}$};     
        \draw (-1,0) node [below=5pt]{$-1\phantom{-}$};
        \draw (0,0) node [below=5pt, red]{$0$};
        \node at (0,0) {$|$};
        \draw (1,0) node [below=5pt]{$1$};
        \draw (2,0) node [below=5pt]{$2$};      
        \node at (2,0) {$|$};
        \draw (3,0) node [below=5pt]{$3$};  
        \node at (3,0) {$|$};
%le point F(-5,0)
        \draw (-5,0) node[above=5pt, rose]{$F$};
        \fill[rose] (-5,0) node{$\times$};
%le point G(-4,0)
        \draw (-4,0) node[above=5pt, shamrockgreen]{$G$};
        \fill[shamrockgreen] (-4,0) node{$\times$};
%le point O(-3,0)
        \draw (-3,0) node[above=5pt, richlavender]{$O$};
        \fill[richlavender] (-3,0) node{$\times$};
%le point I(-2,0)
        \draw (-2,0) node[above=5pt, red]{$I$};
        \fill[red] (-2,0) node{$\times$};
%le point M(-1,0)
        \draw (-1,0) node[above=5pt, tangelo]{$M$};
        \fill[tangelo] (-1,0) node{$\times$};
%le point S(1,0)
        \draw (1,0) node[above=5pt, blue]{$S$};
        \fill[blue] (1,0) node{$\times$};
    \end{tikzpicture}
\end{center}

\begin{enumerate}[label=\alph*)]

\item $OF = IG = OM = MS = 2$

\item $\begin{aligned}[t]
    &OI &=1 \\
    &OM &=2 \\
    &GS &=5 \\
    &MG &=3
\end{aligned}$

\item calcul des distances $GS$ et $MF$
\newline
$OM = MS$ donc $GS = GM + OM = GM + MS$
\newline
$OM = OF$ donc $MF = MO + OF = 2.MO$
\end{enumerate}

\vspace{1cm}

\noindent\begin{cursive}Exercice \no 12 p29:\end{cursive}

\begin{enumerate}[label=\alph*)]
    \item les abscisses des points sont en bleu:

    \begin{center}
        \begin{tikzpicture}[scale=15]
            \draw[->] [thick](-0.68,0) -- (0.13,0);
            \draw[step=0.01][very thin, gray] (-0.68,-0.06) grid (0.13,0.06);
    %le point M
            \draw (-0.6,0) node [above=5pt, red,fill=white]{$M$};
            \draw (-0.6,0) node {$|$};
            \draw (-0.6,0) node [below=5pt, blue,fill=white]{$-0,6\phantom{-}$};
            \draw (-0.5,0) node {$|$};
    %le point N
            \draw (-0.4,0) node [above=5pt, red,fill=white]{$N$};
            \draw (-0.4,0) node [below=5pt]{$-0,4\phantom{-}$};
            \draw (-0.4,0) node {$|$};
            \draw (-0.3,0) node [below=5pt]{$-0,3\phantom{-}$};
            \draw (-0.3,0) node {$|$};
            \draw (-0.2,0) node {$|$};
    %le point 0
            \draw (-0.1,0) node [above=5pt, red,fill=white]{$O$};
            \draw (-0.1,0) node {$|$};
            \draw (-0.1,0) node [below=5pt, blue,fill=white]{$-0,1\phantom{-}$};
            \draw (0,0) node {$|$};
            \draw (0,0) node [below=5pt]{$0$};
    %le point P
            \draw (0.1,0) node [above=5pt, red,fill=white]{$P$};
            \draw (0.1,0) node {$|$};
            \draw (0.1,0) node [below=5pt, blue,fill=white]{$0,1$};
        \end{tikzpicture}
    \end{center}

\item les points S et T :

    \begin{center}
        \begin{tikzpicture}[scale=15]
            \draw[->] [thick](-0.22,0) -- (0.78,0);
            \draw[step=0.01][very thin, gray] (-0.22,-0.06) grid (0.78,0.06);
            \draw (-0.1,0) node [above=5pt, red,fill=white]{$O$};
            \draw (-0.1,0) node {$|$};
            \draw (0,0) node {$|$};
            \draw (0,0) node [below=5pt]{$0$};
            \draw (0.1,0) node [above=5pt, red,fill=white]{$P$};
            \draw (0.1,0) node {$|$};
            \draw (0.1,0) node [below=5pt]{$0,1$};
    %le point T
            \draw (-0.16,0) node [above=5pt, red,fill=white]{$T$};
            \draw (-0.16,0) node {$|$};
            \draw (-0.16,0) node [below=5pt, blue,fill=white]{$-0,16\phantom{-}$};
    %le point S
            \draw (0.7,0) node [above=5pt, red,fill=white]{$S$};
            \draw (0.7,0) node {$|$};
            \draw (0.7,0) node [below=5pt, blue,fill=white]{$0,7$};
        \end{tikzpicture}
    \end{center}

\end{enumerate}

\newpage

%exemples de tableau
\noindent\begin{cursive}Des tableaux:\end{cursive}
\begin{table}[h!]
    \begin{center}

    \label{tab:table1}
        
        \begin{tabular}{l|c|r} % Alignements: left, center, right
            \textbf{Val 1} & \textbf{Val 2} & \textbf{Val 3}\\
            $\alpha$ & $\beta$ & $\gamma$ \\
            \hline
            1 & 1110.1 & a\\
            2 & 10.1 & b\\
            3 & 23.113231 & c\\
        \end{tabular}
    \caption{Valeurs basiques}

\vspace{1cm}    

    \label{tab:table2}
    
    \begin{tabular}{l|S|r} % c devient S ==> unitsx
        \textbf{Val 1} & \textbf{Val 2} & \textbf{Val 3}\\
        $\alpha$ & $\beta$ & $\gamma$ \\
        \hline
        1 & 1110.1 & a\\
        2 & 10.1 & b\\
        3 & 23.113231 & c\\
    \end{tabular}
  \caption{Valeurs alignées et arrondies}
  
    \end{center}
  \end{table}

%exemples d'équation
\noindent\begin{cursive}Des équations:\end{cursive}
\begin{gather*}
2x - 5y =  8 \\
3x^2 + 9y =  3a + c
\end{gather*}
\begin{align*}
2x - 5y &=  8 \\
3x + 9y &=  -12
\end{align*}
\begin{align*}
x&=y           &  w&=z               &  a&=b+c\\
2x&=-y         &  3w&=\frac{1}{2}z   &  a&=b\\
-4 + 5x&=2+y   &  w+2&=-1+w          &  ab&=cb
\end{align*}



\end{document}

这是我得到的结果:

在此处输入图片描述

数学下一行应该垂直对齐,但即使我切换了,第二行上还是有一个小缩进\noindent。此外,\vspace无法理解(我将其删除并放回原位),而我用\newline:执行了相反的操作\vspace,却毫无用处。

我怎样才能对齐这些线条?如果问题出在 Denis 建议的字体选择上,我是否必须将所有地方都替换为相同的字体?

谢谢你的帮助。

答案1

在下面的例子中,我使用了\setlength{parindent}来全局删除缩进。这样就不需要\noindent一遍又一遍地重复了。另外,我\newline \vspace{1cm}用一个简单的空行替换了 。通过这些更改,您将获得以下输出:

在此处输入图片描述

\documentclass[11pt,a4paper]{article}

\usepackage[T1]{fontenc}
\usepackage[french]{babel} %pour le symbole n°
\frenchbsetup{StandardLists=true} % pour les listes avec \enumitem : à inclure si on utilise 


\usepackage{frcursive}
\usepackage{yfonts}
\usepackage{amsmath}

\setlength{\parindent}{0pt}

%----------------------------------------------------------%
\begin{document}
MATH\'EMATIQUES

\begin{cursive}Un exemple de repère:\end{cursive}

\end{document}

相关内容