\documentclass[12pt,a4paper]{article}
\usepackage{graphicx}
\usepackage[left=1.00cm, right=1.00cm, top=2.00cm, bottom=1.00cm]{geometry}
\usepackage{xcolor}
\usepackage{xcoffins}
\usepackage{pgfplots}
\usepackage{tikz-cd}
\usepackage{mathtools}
\usepackage{amssymb}
%https://tex.stackexchange.com/questions/99550/how-do-i-convert-pt-in-cm-mm-to-em-ex-as-they-are-defined-at-a-given-point-in-th
\ExplSyntaxOn
\NewDocumentCommand{\convertto}{mm}
% #1 = em or ex (or any other unit)
% #2 = dimen to convert
{
\texttt{#2~=~\fp_to_decimal:n { round ( (#2)/(1#1), 5 ) }#1}
}
\DeclareExpandableDocumentCommand{\thelength}{ O{mm} m }
{
\fp_to_decimal:n { round ( #2/1#1, 1 ) } #1
}
\ExplSyntaxOff
\NewCoffin\Framex
\NewCoffin\figi
\NewCoffin\tkzii
\NewCoffin\tkziii
\NewCoffin\tkziv
\NewCoffin\tkzv
\NewCoffin\tblvi
\NewCoffin\tkzvii
\NewCoffin\tkzviii
\NewCoffin\eqix
\NewCoffin\tkzx
\NewCoffin\figxi
\NewCoffin\tkzxii
\NewCoffin\eqxiii
\NewCoffin\txtxiv
\NewCoffin\eqxv
\begin{document}
%% Filling the boxes <<<<<<<<<<<<<<<
\SetHorizontalCoffin\Framex{\color{blue!10}\rule{\textwidth}{0.95\textheight}}
\SetHorizontalCoffin\figi{%
\includegraphics[scale=0.3]{example-image-a}
}
\SetHorizontalCoffin\tkzii{%
\begin{tikzpicture}[thick,yscale=1]
\draw[->] (0,2) -- (0,4) node[above]{$\cos{\bigl(\frac{\pi}{L} x\bigr)}$} ;
\draw[->] (-3,3) -- (3,3) node[right]{$x$} ;
\draw[very thick,line cap=round,domain=-2:2, color=green] plot[samples=200] (\x, {3+2/3cos(\x45)}) ;
\draw (-2,3.1) -- (-2,2.9) (2,3.1) -- (2,2.9) (2.5,3.75) node{$m_x=\frac{1}{2}$} ;
\draw[->] (0,-1) -- (0,1) node[above]{$\sin{\bigl(\frac{2\pi}{L} x\bigr)}$} ;
\draw[->] (-3,0) -- (3,0) node[right]{$x$} ;
\draw[very thick,line cap=round,domain=-2:2,color=red]plot[samples=200] (\x, {2/3sin(\x90)}) ;
\draw (-2,.1) -- (-2,-.1) (2,.1) -- (2,-.1)(2.5,.75) node{$m_x=1$} ;
\draw[->] (0,-4) -- (0,-2) node[above]{$\cos{\bigl(\frac{3\pi}{L} x\bigr)}$} ;
\draw[->] (-3,-3) -- (3,-3) node[right]{$x$} ;
\draw[very thick,line cap=round,domain=-2:2,color=blue]plot[samples=200] (\x, {-3+2/3cos(\x135)}) ;
\draw (-2,-2.9) -- (-2,-3.1) (2,-2.9) -- (2,-3.1)(2.5,-2.25) node{$m_x=\frac{3}{2}$} ;
\end{tikzpicture}
}
\SetHorizontalCoffin\tkziii{%
\begin{tikzcd}[ampersand replacement=&]
A \arrow{r}{\varphi} \arrow[swap]{d}{\varrho_f} & B \arrow{d}{\varrho_g} \%
A_f \arrow{r}{\varphi_f}& B_g
\end{tikzcd}
}
\SetHorizontalCoffin\tkziv{%
\begin{tikzcd}[swap, ampersand replacement=&]
F_t(x) \arrow[Rightarrow]{r}[inner sep = 1ex]{\mathcal{B}_T}
\arrow{d}{\mathcal{B}'_X}
& F(x) \arrow{d}[swap]{\mathcal{B}_X}{\exists} \
A_t \arrow{r}[swap]{\exists}{\mathcal{B}_T} \arrow[dashed,dash]{ur}
& A
\end{tikzcd}
}
\SetHorizontalCoffin\tkzv{%
\begin{tikzcd}[row sep={40,between origins}, column sep={40,between origins}, ampersand replacement=&]
& X_1 \times_{S_1} Y_1 \ar{rr}\ar{dd}\ar{dl} & & Y_1\vphantom{\times_{S_1}} \ar{dd}\ar{dl} \
X_1 \ar[crossing over]{rr} \ar{dd} & & S_1 \
& X_2 \times_{S_2} Y_2 \ar{rr} \ar{dl} & & Y_2\vphantom{\times_{S_1}} \ar{dl} \
X_2 \ar{rr} && S_2 \ar[from=uu,crossing over]
\end{tikzcd}
}
\SetHorizontalCoffin\tblvi{%
\scriptsize
\begin{tabular}{|c|c|c|c|c|c|}
\hline
& & \multicolumn{3}{|c|}{Particle Type} & Hcharge \
\hline
& Quarks & $u$ & $c$ & $t$ & $1/6$ \
Left & & $d$ & $s$ & $b$ & $1/6$ \
Handed & Leptons & $\nu_{e}$ & $\nu_{\mu}$ & $\nu_{\tau}$ & $-1/2$\
& & $e$ & $\mu$ & $\tau$ & $-1/2$ \
\hline \hline
& Quarks & $u$ & $c$ & $t$ & $2/3$\
Right & & $d$ & $s$ & $b$ & $-1/3$\
Handed & Leptons & & & &\
& & $e$ & $\mu$ & $\tau$ & $-1$\
\hline
\end{tabular}
}
\SetHorizontalCoffin\tkzvii{%
\begin{tikzpicture}[
declare function={a(\x)=(\x/10)^2;},
declare function={b(\x)=-(\x/10)^2-10;},
declare function={f(\x) = 6*sqrt(2)*rad(atan(\x/(2*sqrt(2))))*5/2.99;}
]
\begin{axis}[
domain=0:10, xmin=0,
axis lines=middle,
axis equal image,
xtick=\empty, ytick=\empty,
enlargelimits=true,
clip mode=individual, clip=false
]
\addplot [red, only marks, mark=*, samples=500, mark size=0.75] %large con 500000
(f(x), {0.5*(a(x)+b(x)) + rand * ( a(f(x)) - b(f(x))) / 2});
\addplot [thick] {a(x)};
\addplot [thick] {b(x)};
\end{axis}
\end{tikzpicture}
}
\SetHorizontalCoffin\tkzviii{%
\begin{tikzpicture}[node distance=2cm, auto]
\node (C) {$C$};
\node (P) [below of=C] {$\prod_{i \in I} A_i$};
\node (Ai) [right of=P] {$A_i$};
\draw[->,color=red] (C) to node {$f_i$} (Ai);
\draw[->, dashed] (C) to node [swap] {$\langle f_i \rangle_{i \in I}$} (P);
\draw[->, color=green] (P) to node [swap] {$\pi_i$} (Ai);
\end{tikzpicture}
}
\SetVerticalCoffin\eqix{0.6\textwidth}{%
\begin{eqnarray}
\int_{-\infty}^{\infty} e^{\pm j2\pi ft};dt
&=&\int_{-\infty}^{\infty} \cos(2\pi ft);dt\pm j\int_{-\infty}^{\infty} \sin(2\pi ft);dt
\nonumber \
&=&2\int_0^{\infty} \cos(2\pi ft);dt=\delta(f)=2\pi \delta(\omega).
\end{eqnarray}
}
\SetHorizontalCoffin\tkzx{%
\begin{tikzpicture}
\begin{axis}[only marks, mark size=1.5pt,domain=1:10,scale=0.6]
\addplot
({cos(rnd r)x+rnd},{(rnd+1)x+rnd});
\end{axis}
\end{tikzpicture}
}
\SetHorizontalCoffin\figxi{%
\includegraphics[height=100pt,width=100pt]{example-grid-100x100pt}
}
\SetHorizontalCoffin\tkzxii{%
\begin{tikzpicture}[xscale=-1,yscale=0.5,remember picture]
\begin{axis}[hide axis,width=8cm,height=4cm,clip=false]
\addplot[domain=20:300,samples=800, colormap={}{ color(2cm)=(red);
color(16cm)=(blue);
},
ultra thick, point meta=x*x,mesh]{sin(pow(x,2)/15)};
\end{axis}
\end{tikzpicture}
}
\SetVerticalCoffin\eqxiii{200pt}{%
$\Psi(x) \rightarrow \Psi^{\prime}(x) = e^{-i\omega^a(x) \mathbf{t}^a} \Psi(x)$\\
where the $\mathbf{t}^a$ are the $N^2 - 1$ generators of the group. These generators, $\mathbf{t}^a$, have a distinct algebra \\
$[\mathbf{t}^a,\mathbf{t}^b] = if^{abc}\mathbf{t}^c$
}
\SetVerticalCoffin\txtxiv{0.4\textwidth}{%
\centering \bfseries \Large A collage of equations, figures, tikz pictures, text and tables using {\color{red} xcoffins}
}
\SetVerticalCoffin\eqxv{0.3\textwidth}{%
\small
$s= \left(k_1 + k_2 \right)^2$\
The Lorentz invariant phase space for the outgoing state, $d\Phi_N$, \ is given by\
$d\Phi_N = \left(2\pi \right)^4 \delta^4\left(k_{1} + k_2 - \Sigma_i^N k_i \right)$ \
$\prod_{i}^{N} \frac{d^4 k_i}{\left(2\pi \right)^4} \left(2\pi\right) \delta \left(k_i^2 - m_i^2 \right)$
}
%% Joining the boxes to the frame and adding offsets <<<<<<<<<<<<<<<<<<<<<<<<<,
\JoinCoffins\Framex[l,t]\figi[l,t]
\JoinCoffins\Framex[hc,t]\tkziihc,t
\JoinCoffins\Framex[l,t]\tkziiil,t
\JoinCoffins\Framex[r,t]\tkzivr,t
\JoinCoffins\Framex[hc,vc]\tkzvhc,vc
\JoinCoffins\Framex[r,vc]\tblvir,vc
\RotateCoffin\tkzvii{60}
\JoinCoffins\Framex[l,vc]\tkzviil,t
\JoinCoffins\Framex[l,t]\tkzviiil,t
\RotateCoffin\eqix{90}
\JoinCoffins\Framex[r,vc]\eqixr,b
\JoinCoffins\Framex[hc,b]\tkzxhc,b
\JoinCoffins\Framex[l,b]\figxi[l,b]
\JoinCoffins\Framex[r,vc]\tkzxiir,vc
\JoinCoffins\Framex[l,vc]\eqxiiil,vc
\JoinCoffins\Framex[r,t]\txtxivr,t
\JoinCoffins\Framex[r,b]\eqxvr,b
%% Typeset the assembly in the left margin of the first line <<<<<<<<<<<<<<<
\noindent\TypesetCoffin\Framex
\section*{Heights and widths}
\begin{tabular}{lrr}
\hline
ID & height & width \
\hline
figi &\thelength[mm]{\CoffinTotalHeight\figi} & \thelength[mm]{\CoffinWidth\figi} \
tkzii & \thelength[mm]{\CoffinTotalHeight\tkzii} & \thelength[mm]{\CoffinWidth\tkzii} \
tkziii & \thelength[mm]{\CoffinTotalHeight\tkziii} & \thelength[mm]{\CoffinWidth\tkziii} \
tkziv & \thelength[mm]{\CoffinTotalHeight\tkziv} & \thelength[mm]{\CoffinWidth\tkziv} \
tkzv & \thelength[mm]{\CoffinTotalHeight\tkzv} & \thelength[mm]{\CoffinWidth\tkzv} \
tblvi & \thelength[mm]{\CoffinTotalHeight\tblvi} & \thelength[mm]{\CoffinWidth\tblvi} \
tkzvii & \thelength[mm]{\CoffinTotalHeight\tkzvii} & \thelength[mm]{\CoffinWidth\tkzvii} \
tkzviii & \thelength[mm]{\CoffinTotalHeight\tkzviii}& \thelength[mm]{\CoffinWidth\tkzviii} \
eqix & \thelength[mm]{\CoffinTotalHeight\eqix} & \thelength[mm]{\CoffinWidth\eqix} \
tkzx & \thelength[mm]{\CoffinTotalHeight\tkzx} & \thelength[mm]{\CoffinWidth\tkzx} \
figxi & \thelength[mm]{\CoffinTotalHeight\figxi} & \thelength[mm]{\CoffinWidth\figxi} \
tkzxii & \thelength[mm]{\CoffinTotalHeight\tkzxii} & \thelength[mm]{\CoffinWidth\tkzxii} \
eqxiii & \thelength[mm]{\CoffinTotalHeight\eqxiii} & \thelength[mm]{\CoffinWidth\eqxiii} \
txtxiv & \thelength[mm]{\CoffinTotalHeight\txtxiv} & \thelength[mm]{\CoffinWidth\txtxiv} \ % title
eqxv & \thelength[mm]{\CoffinTotalHeight\eqxv} & \thelength[mm]{\CoffinWidth\eqxv} \
\hline
\end{tabular}
\end{document}