So passen Sie die Dunkelheit verschiedener Farben für Text an

So passen Sie die Dunkelheit verschiedener Farben für Text an

Frage 1

Wie kann ich die Dunkelheit verschiedener Farben in meinem Dokument anpassen?

Frage 2

Ich möchte Kopfzeilen und Fußzeilen mit angegebener Breite und Länge hinzufügen und außerdem Text in die linke, mittlere und rechte Kopfzeile schreiben und dasselbe in die Fußzeile. Wenn ich beim Definieren geometry(des Rands) des Dokuments einen Fehler gemacht habe, helfen Sie mir bitte weiter.

MWE:

\documentclass[12pt, a4paper]{article}
\usepackage[top=0.6 in,bottom=0.6 in,left=0.6 in,right=0.6 in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[shortlabels]{enumitem}
\usepackage{graphicx}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{calc,shapes}
\usepackage{parskip}
%line spacing
\renewcommand{\baselinestretch}{0.95} 
%reduce top margin
\addtolength{\headsep}{-0.45cm}
\begin{document}
    \large
\begin{center}
    \textcolor{Magenta}{\textbf{Exercises}} 
\end{center} 
\textcolor{Magenta}{\textbf{Example}}

\textcolor{Blue}{\textbf{Body of question Body of question Body of question Body of question}}

\textcolor{Magenta}{\textbf{Solution}}

\textcolor{Green}{\textbf{Body of solution Body of solution Body of solution Body of solution}}
\end{document} 










                                       

Antwort1

Die Dokumentation für xcolor(Hier) Und fancyhdr(Hier) hilft Ihnen bei der weiteren Anpassung, aber dies ist nur der Anfang.

\documentclass{article}
\usepackage{xcolor}
\usepackage{fancyhdr}
\lhead{LeftHeader}
\chead{CentreHeader}
\rhead{RightHeader}
\lfoot{LeftFooter}
\cfoot{CentreFooter}
\rfoot{RightFooter}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\pagestyle{fancy}
\begin{document}
\section*{Question 1}

\subsection*{Shades}

\textcolor{magenta}{magenta} \\
\textcolor{magenta!90!black}{magenta!90!black} \\
\textcolor{magenta!80!black}{magenta!80!black} \\
\textcolor{magenta!70!black}{magenta!70!black} \\
\textcolor{magenta!60!black}{magenta!60!black} \\
\textcolor{magenta!50!black}{magenta!50!black} \\
\textcolor{magenta!40!black}{magenta!40!black} \\
\textcolor{magenta!30!black}{magenta!30!black} \\
\textcolor{magenta!20!black}{magenta!20!black} \\
\textcolor{magenta!10!black}{magenta!10!black} \\
\textcolor{black}{black}

\subsection*{Tints}

\textcolor{magenta}{magenta} \\
\textcolor{magenta!90!white}{magenta!90!white} \\
\textcolor{magenta!80!white}{magenta!80!white} \\
\textcolor{magenta!70!white}{magenta!70!white} \\
\textcolor{magenta!60!white}{magenta!60!white} \\
\textcolor{magenta!50!white}{magenta!50!white} \\
\textcolor{magenta!40!white}{magenta!40!white} \\
\textcolor{magenta!30!white}{magenta!30!white} \\
\textcolor{magenta!20!white}{magenta!20!white} \\
\textcolor{magenta!10!white}{magenta!10!white} \\
\textcolor{white}{white}

\section*{Question 2}

Add this to your preamble:

\begin{verbatim}
\usepackage{fancyhdr}
\lhead{LeftHeader}
\chead{CentreHeader}
\rhead{RightHeader}
\lfoot{LeftFooter}
\cfoot{CentreFooter}
\rfoot{RightFooter}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\pagestyle{fancy}
\end{verbatim}

\end{document} 

Ausgabe

verwandte Informationen