[Tex/LaTex] Put vertical rotated text within minipage environment

minipageverticalxcoffins

I am creating a cheat sheet for a class and wanted to add some vertical text here:

enter image description here

How do I go about doing this?

Here is the code that I have thus far:

CODE

\documentclass{article}
\usepackage[landscape]{geometry}
\usepackage[table]{xcolor}
\usepackage{mathtools}
\usepackage{multicol}
\usepackage{amssymb,amsthm}
\usepackage{tikz}
\usepackage{rotating}
\usepackage[most]{tcolorbox}
\usepackage{float}

\advance\topmargin-1in
\advance\textheight3in
\advance\textwidth3in
\advance\oddsidemargin-1.5in
\advance\evensidemargin-1.5in
\parindent0pt
\parskip2pt
\newcommand{\hr}{\centerline{\rule{3.5in}{1pt}}}

\begin{document}

\begin{multicols*}{3}

\newtcolorbox{mybox}[2][]{text width=0.97\textwidth,fontupper=\scriptsize,
fonttitle=\bfseries\sffamily\scriptsize, colbacktitle=black,enhanced,
attach boxed title to top left={yshift=-2mm,xshift=3mm},
boxed title style={sharp corners},top=3pt,bottom=2pt,
  title=#2,colback=white}

%%------------ Single Side-Band (SSB) ---------------
\hspace{-0.2cm}
\begin{minipage}{0.31\textwidth}
    \begin{mybox}{Single Side-Band (SSB)}
\begin{tabular}{l l}

\begin{minipage}{4.2cm}
\vspace*{-0.3cm}
\begin{figure}[H]
\hspace*{-0.7cm}
\includegraphics[scale=0.3]{example-image-a}
%\caption{Plot Showing Animated Rotation about the x-Axis}%
\label{fig:quad_Demod}
\end{figure}
\end{minipage} &
\begin{minipage}{3.5cm}
\vspace*{-2cm}

Phase Shifting method:\\
\hspace*{-1.8cm}
$\phi_{SSB} =  A_{c}[m(t)\cos 2\pi f_{c}t\mp\hat{m}(t)\sin2\pi f_{c}t]$
\end{minipage}
\end{tabular}

\vspace*{1.25cm}
Demod of SSB-SC:$=A_{c}m(t)+\underbrace{A_{c}[m(t)\cos 4\pi f_{c}t\mp \hat{m}(t)\sin4\pi f_{c}t]}_{\text{Suppressed by LPF}}$

% Text to place vertically to the right:
\vspace*{-3.8cm}
\rotatebox{270}{
%\hspace*{3cm}
{\tiny
\begin{minipage}{5cm}
\begin{align*}
  \phi_{SSB} = & A_{c}[m(t)\cos 2\pi f_{c}t\mp\hat{m}(t)\sin2\pi f_{c}t] + A\cos2\pi f_{c}t, \\
             = & E(t)\cos(2\pi f_{c}t + \theta(t))\\
  \text{where}\quad E(t) = & A_{c}\sqrt{[A+m(t)]^{2} + [\hat{m}(t)]^{2}} \text{ and } \theta(t)=%
  -\tan^{-1}\left\{ \frac{\hat{m}(t)}{A + m(t)} \right\}
\end{align*}
\end{minipage}
}
}
%
%

    \end{mybox}
\end{minipage}

\end{multicols*}
\end{document}

EDIT

I made an edit by placing the text in a minipage environment and I was able to rotate the text. The text box now appears to the left of the tcolorbox. How to move the text box to the right as depicted in the image above? Thanks!

Best Answer

Here's a tikz option that might suit. (Updated for US Letter size paper.)

\documentclass{article}
\usepackage[landscape,margin=0cm]{geometry}
\usepackage{mathtools}
\usepackage{amssymb,amsthm}
\usepackage{multicol}
\usepackage[most]{tcolorbox}
\usepackage{tikz}
\usetikzlibrary{positioning}

\newtcolorbox{mybox}[2][]{width=\linewidth,fontupper=\scriptsize,
  fonttitle=\bfseries\sffamily\scriptsize, colbacktitle=black, enhanced,
  attach boxed title to top left={yshift=-2mm,xshift=3mm},
  boxed title style={sharp corners},top=2mm, bottom=1mm, left=1.5mm,
  right=1.5mm, title=#2, colback=white}

\pagestyle{empty}
\parindent=0pt
\parskip=2pt

\begin{document}

\begin{multicols*}{3}

\begin{mybox}{Single Side-Band (SSB)}
\begin{tikzpicture}[node distance=2mm, inner sep=0pt, outer sep=0pt]
  \node (image) {\includegraphics[width=2.7cm]{example-image-a}};
  \node (phase) [align=center, text width=5.5cm, right=of image.north east,
      anchor=north west] {
    Phase Shifting method: \\
    $\phi_{SSB} =  A_{c}[m(t)\cos 2\pi f_{c}t\mp\hat{m}(t)\sin2\pi f_{c}t]$
  };
  \node [below=of image.south west, anchor=north west,text width=7.5cm] {
    Demod of SSB-SC: \\
    \quad$=A_{c}m(t)+\underbrace{A_{c}[m(t)\cos 4\pi f_{c}t\mp \hat{m}(t)\sin4\pi f_{c}t]}_{\text{Suppressed by LPF}}$};
  \node [rotate=90, text width=8.1cm, below=of phase.south east, anchor=south
  east, font=\tiny] {
    \begin{align*}
      \phi_{SSB} = & A_{c}[m(t)\cos 2\pi f_{c}t\mp\hat{m}(t)\sin2\pi f_{c}t] + A\cos2\pi f_{c}t, \\
                 = & E(t)\cos(2\pi f_{c}t + \theta(t)) \\
      \text{where}\quad E(t) = & A_{c}\sqrt{[A+m(t)]^{2} + [\hat{m}(t)]^{2}} \text{ and } \theta(t)=-\tan^{-1}\left\{ \frac{\hat{m}(t)}{A + m(t)} \right\}
    \end{align*}
  };
\end{tikzpicture}
\end{mybox}

\end{multicols*}
\end{document}

Single Side-Band (SSB)

Related Question