0

I have the following code that doesn't work properly.

main.tex

\documentclass[12pt, french, a4paper]{report}

\input{header.tex}

\begin{document}

Ceci est un test Page 1
\newpage
Ceci est un test Page 2

\end{document}

headre.tex

\usepackage{babel}

% Texte en Couleur
\usepackage{xcolor}
\definecolor{mywhite}{rgb}{1, 1, 0.99}
\definecolor{myblack}{rgb}{0.04, 0.07, 0,17}
\pagecolor{myblack}
\color{mywhite}
%\pagecolor{black}
%\color{white}

%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%% Font
%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}


% Géométrie de la page
\usepackage{geometry}
\geometry{
    paper=a4paper, % Paper size, change to letterpaper for US letter size
    top=2.5cm, % Top margin
    bottom=3cm, % Bottom margin
    left=2.5cm, % Left margin
    right=2.5cm, % Right margin
    headheight=14pt, % Header height
    footskip=1.5cm, % Space from the bottom margin to the baseline of the footer
    headsep=1.2cm, % Space from the top margin to the baseline of the header
    %showframe, % Uncomment to show how the type block is set on the page
}

If I use personal colors I have this result enter image description here and in windows this enter image description here

The big problem is that vscode with the LaTeX Workshop extension displays correctly. enter image description here

For you this is displayed correctly? (my OS and extensions are up to date and if I use the default colors I don't have this problem)

  • You have a typo in the definition of myblack, there is a comma instead of period in the last number. – Ulrike Fischer Apr 4 at 13:25
  • !! Yeees ! thx. But why are the views different? – The33Coder Apr 4 at 13:33
  • Without a vs code to test I resort to TeXworks as supplied with TeX for Windows so the built in viewer shows result white on white (That is correct there is no valid change from standard white page) unless the 4 colours are corrected to the wanted 3 values as declared by the {rgb}. Interesting that adobe and edge also correctly show white page whilst firefox xodo sumatraPDF all show incorrectly like the VS code window a black background. So is that their default for no page color? NOTE GS plugins refuse to view anything e.g. there is a decode error if you wish to use 4 colors switch to {cmyk} – KJO Apr 4 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.