テキストのさまざまな色の濃さを調整する方法

テキストのさまざまな色の濃さを調整する方法

質問1

ドキュメント内のさまざまな色の暗さを調整するにはどうすればよいですか?

質問2

指定された幅と長さで見出しと脚注を追加し、左、中央、右のヘッダーにテキストを書き込み、フッターにも同じことを書き込みたいです。ドキュメントの (余白) の定義を間違えた場合はgeometry、教えてください。

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} 










                                       

答え1

xcolor(のドキュメントここ) そしてfancyhdrここ) を使用すると、さらにカスタマイズできますが、これで開始できます。

\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} 

出力

関連情報