2

This is my code:

\documentclass[a4paper, french, 12pt]{article}
\usepackage{amsfonts}
\usepackage{indentfirst}
\usepackage{xcolor}
\usepackage{array}
\usepackage{booktabs}
\oddsidemargin 0in
\topmargin 0in
\evensidemargin 0in
\topskip 0in

\title{\textsc{\fbox{Rappel de trigonométrie}}}
\date{}
\begin{document}

    \maketitle
    \pagenumbering{gobble}

    \section{\textit{\color{red}Valeurs remarquables et formules élémentaires}}

Voici un tableau des valeurs remarquables concernant les fonctions trigonométriques: 

\begin{center}
\[
\begin{array}{@{} l *{6}{>{\displaystyle}c} @{}}
\toprule
x       & 0 &\frac{\pi}{6}   &\frac{\pi}{4}   &\frac{\pi}{3}   &\frac{\pi}{2}&\pi\\ 
\midrule
\cos(x) & 1 &\frac{\sqrt3}{2}&\frac{\sqrt2}{2}&\frac{1}{2}     &0            &-1 \\ 
\addlinespace
\sin(x) & 0 &\frac{1}{2}     &\frac{\sqrt2}{2}&\frac{\sqrt3}{2}&1            &0  \\ 
\addlinespace
\tan(x) & 0 &\frac{1}{\sqrt3}&1               &\sqrt3          &\infty       &0  \\ 
\bottomrule
\end{array}
\]
\end{center}
\par
Les fonctions $\cos$ et $\sin$ sont reliées par la formule suivante:
\begin{center}
\fbox{$\forall x \in \mathbb{R}, \cos(x) + \sin(x) = 1$}
\end{center}

\end{document}
10
  • 1
    Hey thanks how did u rewrite it so quickly?
    – Pablito
    Commented Jul 1, 2019 at 3:08
  • 1
    (I'm rly new to LaTeX btw sry ^^
    – Pablito
    Commented Jul 1, 2019 at 3:08
  • 2
    Does \usepackage[margin=0.5in]{geometry} instead of \oddsidemargin 0in \topmargin 0in \evensidemargin 0in \topskip 0in give you what you want? (To mark the code as code, put the code in the cursor and press the {} button.)
    – user121799
    Commented Jul 1, 2019 at 3:09
  • ima try this out
    – Pablito
    Commented Jul 1, 2019 at 3:10
  • Thanks it's perfect!
    – Pablito
    Commented Jul 1, 2019 at 3:10

1 Answer 1

1

This is a summary of the discussion in the comments, which I will be happy to delete. Note also that there is the \boxed command (provided by the amsmath package) for boxed displayed equations.

Observe that I've omitted both center wrappers.

Note that there should be no blank lines between text and a displayed equation.

enter image description here

\documentclass[a4paper, french, 12pt]{article}
\usepackage{amssymb,amsmath} % 'amssymb' loads 'amsfonts' automatically
%\usepackage{indentfirst} %not needed if 'babel' is loaded with option 'french'
\usepackage{babel}
\usepackage[T1]{fontenc}

\usepackage{xcolor,array,booktabs}
\usepackage[left=0.5in,right=0.5in]{geometry}

\usepackage{titlesec}
\titleformat{\section}
{\normalfont\bfseries\itshape\color{red}}
{\Roman{section})}
{1em}
{}

\title{\fbox{\Huge\textsc{Rappel de Trigonométrie}}}
\date{}
\begin{document}
\maketitle

\pagenumbering{gobble}

\section{Valeurs remarquables et formules élémentaires}

Voici un tableau des valeurs remarquables concernant les fonctions trigonométriques: 
\[
\begin{array}{@{} l *{6}{>{\displaystyle}c} @{}}
\toprule
x       & 0 &\frac{\pi}{6}   &\frac{\pi}{4}   &\frac{\pi}{3}   &\frac{\pi}{2}&\pi\\ 
\midrule
\cos(x) & 1 &\frac{\sqrt3}{2}&\frac{\sqrt2}{2}&\frac{1}{2}     &0            &-1 \\ 
\addlinespace
\sin(x) & 0 &\frac{1}{2}     &\frac{\sqrt2}{2}&\frac{\sqrt3}{2}&1            &0  \\ 
\addlinespace
\tan(x) & 0 &\frac{1}{\sqrt3}&1               &\sqrt3          &\infty       &0  \\ 
\bottomrule
\end{array}
\]

Les fonctions $\cos$ et $\sin$ sont reliées par la formule suivante:
\[
\boxed{\forall x \in \mathbb{R},\ \cos^2(x) + \sin^2(x) = 1}
\]

\end{document}
3
  • Please, please, change \cos(x) + \sin(x) = 1 to \cos^2(x) + \sin^2(x) = 1. And do get rid of the first center environment, or @egreg might zap you...
    – Mico
    Commented Jul 1, 2019 at 3:43
  • @Mico You are right!
    – user121799
    Commented Jul 1, 2019 at 3:45
  • Thanks a lot sorry again I’m just really new to LaTeX as you can see ^^
    – Pablito
    Commented Jul 1, 2019 at 3:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .