Re: Più colori in un contesto matematico colorato

#69246
Up
0
Down
::


Lasciamo perdere, e mettiamoci soltanto un “teorema”: ci sono troppe variabili in gioco, altrimenti. Ecco l’esempio minimo… minimo per modo di dire però, perché debbo riempire il preambolo di tutto quello che mi sta mandando al manicomio!

`
% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%
\documentclass[12pt,fleqn]{article}

\usepackage[a4paper]{geometry}

\geometry{top=3.5cm,
bottom=3.5cm,
left=2.75cm,
right=2.75cm,
heightrounded,
bindingoffset=3mm}

\parindent=0pt

%— Testo
\usepackage[dvipsnames,svgnames]{xcolor}
\usepackage{fontspec}
\usepackage{everysel}
%\defaultfontfeatures{Color=Blue}
\EverySelectfont{\color{blue}}
\setmainfont[Ligatures=TeX,
SlantedFont={* Slanted},
SmallCapsFont={Latin Modern Roman Caps}]
{Latin Modern Roman}
\setsansfont[Ligatures=TeX]
{Latin Modern Sans}
\setmonofont[Ligatures=TeX,
SlantedFont={* Slanted}]
{Latin Modern Mono}
\newfontfamily{\frakfont}
{MarsFraktur OT}
\newfontfamily{\greekfont}
[StylisticSet=11,Ligatures={TeX}]
{Theano Didot}
\newfontfamily{\firmafont}
{Zapfino}
%\everymath{\color{Blue}}\everydisplay{\color{Blue}}

\usepackage[babelshorthands]{polyglossia}
\setmainlanguage{italian}
\setotherlanguage{german}
\setotherlanguage[variant=polytonic]{greek}

%— Pacchetti utili
\usepackage{tikz}
\usepackage{epigraph}
\usepackage{enumitem}
\usepackage[hang]{footmisc}
\renewcommand{\footnotemargin}{14pt}
\renewcommand{\hangfootparindent}{\footnotemargin}
\usepackage{caption}
\captionsetup{font=footnotesize,format=hang,
labelfont={bf},labelsep=period}

% Footnote bellino
\makeatletter
\renewcommand*\@makefnmark
{\hbox{\@textsuperscript{%
\tiny\normalfont\@thefnmark)}}}
\makeatother

% Frame
\usepackage[framemethod=TikZ]{mdframed}

%— Matematica
\usepackage{amsmath,amssymb,amsthm}
\newcommand{\bm}{\boldsymbol}

% Personalizzazione paragrafi
\usepackage{titlesec}

\titleformat{\section}[hang]
{\filright\bfseries\addfontfeatures{Color=DarkBlue}}
{\thesection.\enskip}{0pt}{}[]
\titlespacing{\section}{0pt}
{2pc plus 2pt minus 2pt}
{1.5pc plus 2pt minus 2pt}

\titleformat{\subsection}[hang]
{\filright\small\sffamily\itshape}
{\thesubsection\quad}{0pt}{}
\titlespacing{\subsection}{0pt}
{2pc plus 2pt minus 2pt}
{1.5pc plus 2pt minus 2pt}

\numberwithin{equation}{section}

% Teoremi
\newtheoremstyle{theo}{8pt}{8pt}
{\slshape}{}{\bfseries}{\enskip}{2pt}{}
\newtheoremstyle{defin}{8pt}{8pt}
{}{}{\bfseries}{\enskip}{2pt}{}
\newtheoremstyle{osserv}{8pt}{8pt}
{}{}{\bfseries}{\enskip}{2pt}{}
\newtheoremstyle{eserc}{8pt}{8pt}
{}{}{\scshape}{\enskip}{2pt}{}

\theoremstyle{theo}
\newtheorem{lemma}{Lemma}[section]
\newtheorem{teorema}{Teorema}[section]
\newtheorem{proposizione}{Proposizione}[section]
\newtheorem{corollario}{Corollario}[section]
\theoremstyle{defin}
\newtheorem{definizione}{Definizione}[section]
\theoremstyle{osserv}
\newtheorem{osservazione}{Osservazione}[section]
\theoremstyle{eserc}
\newtheorem{esempio}{Esempio}[section]
\newtheorem{esercizio}{}[section]

\newenvironment{prova}[1][Dimostrazione]
{\begin{proof}[\addfontfeatures{Color=DarkRed}\scshape #1]}
{\end{proof}}

%— Definizioni personali

% Varie
\renewcommand{\d}{\mathop{}\!\mathrm{d}}

% Abbreviazioni
\renewcommand{\emph}[1]{\textbf{\itshape #1}}

%— Macro Personali

% Insiemi matematici
\newcommand{\nn}{\mathbb{N}} \newcommand{\zz}{\mathbb{Z}}
\newcommand{\qq}{\mathbb{Q}} \newcommand{\rr}{\mathbb{R}}
\newcommand{\cc}{\mathbb{C}} \newcommand{\kk}{\mathbb{K}}

%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%

%— Inizio del documento:

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%
\noindent\begin{minipage}[0.4\textheight][t]{\textwidth}
\vspace*{2\baselineskip}
\centering
{\LARGE\bfseries\addfontfeatures{Color=DarkBlue}
\colorbox{yellow!30}{VOCABOLARIO} \\ \colorbox{yellow!30}{DI} \\ \colorbox{yellow!30}{TEORIA DELL'INTEGRAZIONE}
\par}
\vspace{0.4\baselineskip}
\vspace{0.6\baselineskip}
{\textsl{\addfontfeatures{Color=Red} Andrea Carpignani}\par}
\vspace{0.6\baselineskip}
{\scriptsize[versione del~\today]}
\vspace{0.8\baselineskip}
\usetikzlibrary{decorations}
\usetikzlibrary{decorations.fractals}
\begin{tikzpicture}[scale=0.8,decoration=Koch snowflake,thick]
\begin{scope}[draw=red!50!black!90,fill=red!15]
\filldraw[scale=3.5] decorate{decorate{decorate{ decorate{ (0,0) — ++(60:1) — ++(-60:1) — cycle }}}};
\end{scope}
\begin{scope}[draw=green!50!black!90,fill=green!15]
\filldraw[scale=2] decorate{decorate{ decorate{ (2,0.25) — ++(60:1) — ++(-60:1) — cycle }}};
\filldraw[scale=2] decorate{decorate{ decorate{ (-1.25,0.25) — ++(60:1) — ++(-60:1) — cycle }}};
\end{scope}
\begin{scope}[line width=0.75pt,draw=blue!50!black!90,fill=blue!20]
\filldraw decorate{decorate{ decorate{ (6.5,0.75) — ++(60:1) — ++(-60:1) — cycle }}};
\filldraw decorate{decorate{ decorate{ (-4,0.75) — ++(60:1) — ++(-60:1) — cycle }}};
\end{scope}
\end{tikzpicture}
\end{minipage}
\epigraph{%
\begin{minipage}[][t]{\textwidth}
\frakfont\addfontfeatures{Color=DarkBlue}
Mathematiker sind wie Franzosen: Wenn du ihnen etwas sagst, übersetzen sie es gleich in ihre eigene Sprache, und sofort bedeutet es etwas ganz anderes.
\end{minipage}}
{\frakfont\bfseries\addfontfeatures{Color=DarkBlue} Johannes Wolfgang von~Goethe}
\thispagestyle{empty}

%%%%%%%%%%%%%%%%%%%%%%

\medskip\begin{mdframed}[
innertopmargin=0\baselineskip,
innerbottommargin=0.25\baselineskip,
innerlinewidth=0.5pt,
middlelinewidth=0.5pt,
outerlinewidth=1pt,
innerlinecolor=red!50!blue!70,
middlelinecolor=red!50!blue!70,
outerlinecolor=red!50!blue!70,
backgroundcolor=red!40!blue!10
]
\begin{teorema}[fondamentale del calcolo integrale]
Sia~$f$ una funzione reale definita e continua su un intervallo~$U$ di~$\rr$ (non ridotto ad un punto), e sia~$x_0$ un punto di~$U$. Poniamo
\[
F(x) = \int_{x_0}^x f(t)\d t.
\]
Allora~$F$ è una primitiva di~$f$.
\end{teorema}
\end{mdframed}

\end{document}
`

Ciao e grazie,

Andrea

PS: Ho notato soltanto dopo che, quando applico le modifiche che mi hai consigliato, l’impaginazione della pagina cambia. Non ho idea del motivo!

Go to top