2

Another update. This code displays essentially what I need. The only question I have at this point is if there is a way to enter the text of my "footnote" so that each line doesn't have to be placed in a separate node.

\documentclass[10pt]{article}

%%%% Set margins %%%%

\setlength{\textwidth}{6.25in}
\setlength{\oddsidemargin}{0in}

%%%% Packages %%%%

\usepackage[labelfont={bf}, justification=justified, singlelinecheck=false, labelsep=space]{caption}
\usepackage{here}
\usepackage{tikz}
\usetikzlibrary{calc,shapes,shapes.geometric,positioning}
\usepackage{hyperref}

%%%% Set pdf zoom to 100% %%%%

\hypersetup{pdfstartview={XYZ null null 1.00}, pdfview={XYZ null null 1.00}}

%%%% TikZ graphics styles/commands %%%%

\tikzstyle{arr}=[-latex, black, line width=0.5pt]
\tikzstyle{doublearr}=[latex-latex, black, line width=0.5pt]
\tikzstyle{input}=[font=\small\sffamily\bfseries]
\tikzstyle{rect}=[rectangle, draw=black, font=\small\sffamily\bfseries, inner sep=9pt]
\tikzstyle{circ}=[circle, draw=black, font=\small\sffamily\bfseries, inner sep=6pt]
\tikzstyle{trigl}=[
   isosceles triangle,
   draw,
   shape border rotate=90,
   inner sep=2,
   font=\small\sffamily\bfseries,
   isosceles triangle apex angle=60,
   isosceles triangle stretches
]

\def\onesub#1{\strut$1\rlap{$_{#1}$}$}

\begin{document}
\begin{figure}[H]
\caption{The Model with Level 1 and Level 2 Predictors}
\label{CSL12}
\begin{tikzpicture}[auto, bend angle=45]

\node[rect]                      (Yij)  at (18, -6) {$LifeSat_{ij}$};
\node[trigl, anchor=right side]  (11)   at (8, -3) {\onesub{1}};
\node[rect]                      (Gij)  at (8, -5) {$Gender_{ij}$};
\node[rect]                      (Aij)  at (8, -7) {$AgeMar_{ij}$};
\node[rect]                      (AGij) at (8, -9) {$Gender_{ij} \times AgeMar_{ij}$};
\node [input]                    (rij)  at (20.5, -6) {$r_{ij}$};
\node[trigl]                     (12)   at (10, -1.15) {\onesub{2}};
\node[rect]                      (Mj)   at (12.5, -1) {$YearsMar_{ij}$};
\node[circ]                      (B0j)  at (12.5, -4.35) {$\beta_{oj}$};
\node[input]                     (M0j)  at (13.75, -3) {$\mu_{0j}$};

\draw [arr] (B0j)                to (Yij);
\draw [arr] (Gij)                to node [pos=.15, font=\scriptsize] (b1) {$\beta_1$} (Yij);
\draw [arr] (Aij)                to node [pos=.40] {\scriptsize$\beta_2$} (Yij);
\draw [arr] (AGij)               to node [pos=.55] {\scriptsize$\beta_3$} (Yij);
\draw [arr] (rij)                to node [pos=.5, above] {\scriptsize$1$} (Yij);
\draw (11.right side)            to (B0j);
\draw [arr] (12)                 to node [pos=.25, right] {\scriptsize$\gamma_{00}$} (B0j);
\draw [arr] (Mj)                 to node [pos=.50, right] {\scriptsize$\gamma_{01}$} (B0j);
\draw [arr] (M0j)                to node [pos=.30, left] {\scriptsize$1$} (B0j);
\draw [arr] (Mj)                 to node [pos=.30, right] {\scriptsize$\gamma_{11}$} (b1);

\node[inner sep=0pt, font=\footnotesize] at ([yshift=-20]current bounding box.south) (a) 
{Note: $YearsMar_j$ is grand mean centered and was calculated by subtracting the sample mean from each score.};

\node[inner sep=0pt, below = 0cm of a, font=\footnotesize, xshift=38] 
{$AgeMar_{ij}$ is group mean centered and was calculated by subtracting the mean for the person's gender from their score.};

\end{tikzpicture}
\end{figure}

\end{document}

Based on Harish Kumar's response, I produced the updated code below. The proposed solution is definitely on the right track. I thought the figure would look better if I had the caption on the top and so I've moved it there. I've also eliminated the superscripts "a" and "b" because they didn't look as good as I thought they might. The last thing I did was to expand the text for the "footnote" that appears at the bottom.

So now for a couple of follow-up questions. 1) Is it possible to left justify the figure so that it lines up with the left side of the page? 2) Is it possible to set up the "footnote" so that it's all one piece and not in two separate nodes? Ideally, the second line of the text would be indented as shown below. The exact place where the text breaks could be set automatically or manually. I've experimented a bit with using "\" in TikZ based on some things I've seen in the manual but have had some troubles with it.

\documentclass[10pt]{article}

%%%% Packages %%%%

\usepackage[labelfont={bf}]{caption}
\usepackage{here}
\usepackage{tikz}
\usetikzlibrary{calc,shapes,shapes.geometric,positioning}
\usepackage{hyperref}

%%%% Set pdf zoom to 100% %%%%

\hypersetup{pdfstartview={XYZ null null 1.00}, pdfview={XYZ null null 1.00}}

%%%% TikZ graphics styles/commands %%%%

\tikzstyle{arr}=[-latex, black, line width=0.5pt]
\tikzstyle{doublearr}=[latex-latex, black, line width=0.5pt]
\tikzstyle{input}=[font=\small\sffamily\bfseries]
\tikzstyle{rect}=[rectangle, draw=black, font=\small\sffamily\bfseries, inner sep=9pt]
\tikzstyle{circ}=[circle, draw=black, font=\small\sffamily\bfseries, inner sep=6pt]
\tikzstyle{trigl}=[
   isosceles triangle,
   draw,
   shape border rotate=90,
   inner sep=2,
   font=\small\sffamily\bfseries,
   isosceles triangle apex angle=60,
   isosceles triangle stretches
]

\def\onesub#1{\strut$1\rlap{$_{#1}$}$}

\begin{document}
\begin{figure}[H]
\caption{The Model with Level 1 and Level 2 Predictors}
\label{CSL12}
\begin{center}
\begin{tikzpicture}[auto, bend angle=45]

\node[rect]                      (Yij)  at (18, -6) {$LifeSat_{ij}$};
\node[trigl, anchor=right side]  (11)   at (8, -3) {\onesub{1}};
\node[rect]                      (Gij)  at (8, -5) {$Gender_{ij}$};
\node[rect]                      (Aij)  at (8, -7) {$AgeMar_{ij}$};
\node[rect]                      (AGij) at (8, -9) {$Gender_{ij} \times AgeMar_{ij}$};
\node [input]                    (rij)  at (20.5, -6) {$r_{ij}$};
\node[trigl]                     (12)   at (10, -1.15) {\onesub{2}};
\node[rect]                      (Mj)   at (12.5, -1) {$YearsMar_{ij}$};
\node[circ]                      (B0j)  at (12.5, -4.35) {$\beta_{oj}$};
\node[input]                     (M0j)  at (13.75, -3) {$\mu_{0j}$};

\draw [arr] (B0j)                to (Yij);
\draw [arr] (Gij)                to node [pos=.15, font=\scriptsize] (b1) {$\beta_1$} (Yij);
\draw [arr] (Aij)                to node [pos=.40] {\scriptsize$\beta_2$} (Yij);
\draw [arr] (AGij)               to node [pos=.55] {\scriptsize$\beta_3$} (Yij);
\draw [arr] (rij)                to node [pos=.5, above] {\scriptsize$1$} (Yij);
\draw (11.right side)            to (B0j);
\draw [arr] (12)                 to node [pos=.25, right] {\scriptsize$\gamma_{00}$} (B0j);
\draw [arr] (Mj)                 to node [pos=.50, right] {\scriptsize$\gamma_{01}$} (B0j);
\draw [arr] (M0j)                to node [pos=.30, left] {\scriptsize$1$} (B0j);
\draw [arr] (Mj)                 to node [pos=.30, right] {\scriptsize$\gamma_{11}$} (b1);

\node[inner sep=0pt, font=\footnotesize] at ([yshift=-20]current bounding box.south) (a) 
{Note: $YearsMar_j$ is grand mean centered and was calculated by subtracting the sample mean from each score.};

\node[inner sep=0pt, below = 0cm of a, font=\footnotesize, xshift=20] 
{$AgeMar_{ij}$ is group mean centered and was by subtracting the mean for the person's gender from their score.};

\end{tikzpicture}
\end{center}
\end{figure}

\end{document}

Need to place a couple of footnotes after a figure. Maybe this truly is harder than I imagined. Or maybe I'll be embarrassed by how easy it turns out to be.

Below is a sample figure. The first footnote would indicate that YearsMarj is grand mean centered. The second would indicate that AgeMarij is group mean centered. Not sure if the figure would look better with footnote marks or without. If it had footnote marks, then I'd imagine having a superscripted "a" beside YearsMarj and a superscripted "b" beside AgeMarij and Gender x AgeMarij. (A superscripted 1 and a couple of superscripted 2s might do just as well though.) Will be interested to see if this is easy or difficult. Any help with it will be greatly appreciated.

\documentclass[10pt]{article}

%%%% Packages %%%%

\usepackage{here}
\usepackage{tikz}
\usetikzlibrary{calc,shapes,shapes.geometric}
\usepackage{hyperref}

%%%% Set pdf zoom to 100% %%%%

\hypersetup{pdfstartview={XYZ null null 1.00}, pdfview={XYZ null null 1.00}}

%%%% TikZ graphics styles/commands %%%%

\tikzstyle{arr}=[-latex, black, line width=0.5pt]
\tikzstyle{doublearr}=[latex-latex, black, line width=0.5pt]
\tikzstyle{input}=[font=\small\sffamily\bfseries]
\tikzstyle{rect}=[rectangle, draw=black, font=\small\sffamily\bfseries, inner sep=9pt]
\tikzstyle{circ}=[circle, draw=black, font=\small\sffamily\bfseries, inner sep=6pt]
\tikzstyle{trigl}=[
   isosceles triangle, 
   draw,
   shape border rotate=90,
   inner sep=2,
   font=\small\sffamily\bfseries,
   isosceles triangle apex angle=60,
   isosceles triangle stretches
]

\def\onesub#1{\strut$1\rlap{$_{#1}$}$}

\begin{document}
\begin{figure}[H]
\begin{center}
\begin{tikzpicture}[auto, bend angle=45]

\node[rect]                      (Yij)  at (18, -6) {$LifeSat_{ij}$};
\node[trigl, anchor=right side]  (11)   at (8, -3) {\onesub{1}};
\node[rect]                      (Gij)  at (8, -5) {$Gender_{ij}$};
\node[rect]                      (Aij)  at (8, -7) {\bf$AgeMar_{ij}$};
\node[rect]                      (AGij) at (8, -9) {$Gender_{ij} \times AgeMar_{ij}$};
\node [input]                    (rij)  at (20.5, -6) {$r_{ij}$};
\node[trigl]                     (12)   at (10, -1.15) {\onesub{2}};
\node[rect]                      (Mj)   at (12.5, -1) {$YearsMar_j$};
\node[circ]                      (B0j)  at (12.5, -4.35) {$\beta_{oj}$};
\node[input]                     (M0j)  at (13.75, -3) {$\mu_{0j}$};

\draw [arr] (B0j)                to (Yij);
\draw [arr] (Gij)                to node [pos=.15, font=\scriptsize] (b1) {$\beta_1$} (Yij);
\draw [arr] (Aij)                to node [pos=.40] {\scriptsize$\beta_2$} (Yij);
\draw [arr] (AGij)               to node [pos=.55] {\scriptsize$\beta_3$} (Yij);
\draw [arr] (rij)                to node [pos=.5, above] {\scriptsize$1$} (Yij);
\draw (11.right side)            to (B0j);
\draw [arr] (12)                 to node [pos=.25, right] {\scriptsize$\gamma_{00}$} (B0j);
\draw [arr] (Mj)                 to node [pos=.50, right] {\scriptsize$\gamma_{01}$} (B0j);
\draw [arr] (M0j)                to node [pos=.30, left] {\scriptsize$1$} (B0j);
\draw [arr] (Mj)                 to node [pos=.30, right] {\scriptsize$\gamma_{11}$} (b1);

\end{tikzpicture}
\end{center}
\caption{The Model with Level 1 and Level 2 Predictors}
\label{CSL12}
\end{figure}

\end{document}
2

1 Answer 1

5

You can add foot notes as a part of tikz picture manually. In real sense they are not foot notes but descriptions.

\documentclass[10pt]{article}

%%%% Packages %%%%

\usepackage{here}
\usepackage{tikz}
\usetikzlibrary{calc,shapes,shapes.geometric,positioning}
\usepackage{hyperref}

%%%% Set pdf zoom to 100% %%%%

\hypersetup{pdfstartview={XYZ null null 1.00}, pdfview={XYZ null null 1.00}}

%%%% TikZ graphics styles/commands %%%%

\tikzstyle{arr}=[-latex, black, line width=0.5pt]
\tikzstyle{doublearr}=[latex-latex, black, line width=0.5pt]
\tikzstyle{input}=[font=\small\sffamily\bfseries]
\tikzstyle{rect}=[rectangle, draw=black, font=\small\sffamily\bfseries, inner sep=9pt]
\tikzstyle{circ}=[circle, draw=black, font=\small\sffamily\bfseries, inner sep=6pt]
\tikzstyle{trigl}=[
   isosceles triangle,
   draw,
   shape border rotate=90,
   inner sep=2,
   font=\small\sffamily\bfseries,
   isosceles triangle apex angle=60,
   isosceles triangle stretches
]

\def\onesub#1{\strut$1\rlap{$_{#1}$}$}

\begin{document}
\begin{figure}[H]
\begin{center}
\begin{tikzpicture}[auto, bend angle=45]

\node[rect]                      (Yij)  at (18, -6) {$LifeSat_{ij}$};
\node[trigl, anchor=right side]  (11)   at (8, -3) {\onesub{1}};
\node[rect]                      (Gij)  at (8, -5) {$Gender_{ij}$};
\node[rect]                      (Aij)  at (8, -7) {\bf$AgeMar_{ij}$ $^{b}$};
\node[rect]                      (AGij) at (8, -9) {$Gender_{ij} \times AgeMar_{ij}$ $^{b}$};
\node [input]                    (rij)  at (20.5, -6) {$r_{ij}$};
\node[trigl]                     (12)   at (10, -1.15) {\onesub{2}};
\node[rect]                      (Mj)   at (12.5, -1) {$YearsMar_j$ $^{a}$};
\node[circ]                      (B0j)  at (12.5, -4.35) {$\beta_{oj}$};
\node[input]                     (M0j)  at (13.75, -3) {$\mu_{0j}$};

\draw [arr] (B0j)                to (Yij);
\draw [arr] (Gij)                to node [pos=.15, font=\scriptsize] (b1) {$\beta_1$} (Yij);
\draw [arr] (Aij)                to node [pos=.40] {\scriptsize$\beta_2$} (Yij);
\draw [arr] (AGij)               to node [pos=.55] {\scriptsize$\beta_3$} (Yij);
\draw [arr] (rij)                to node [pos=.5, above] {\scriptsize$1$} (Yij);
\draw (11.right side)            to (B0j);
\draw [arr] (12)                 to node [pos=.25, right] {\scriptsize$\gamma_{00}$} (B0j);
\draw [arr] (Mj)                 to node [pos=.50, right] {\scriptsize$\gamma_{01}$} (B0j);
\draw [arr] (M0j)                to node [pos=.30, left] {\scriptsize$1$} (B0j);
\draw [arr] (Mj)                 to node [pos=.30, right] {\scriptsize$\gamma_{11}$} (b1);

\node[inner sep=0pt,font=\footnotesize] at ([yshift=-1]current bounding box.south) (a) {$^{a}$grand mean centered};
\node[inner sep=0pt,below = 0cm of a,font=\footnotesize] {$^{b}$group mean centered};

\end{tikzpicture}
\end{center}
\caption{The Model with Level 1 and Level 2 Predictors}
\label{CSL12}
\end{figure}

\end{document}

enter image description here

As a side note, you may opt to use \tikzset instead of obsolete \tikzstyle.

Edit:

\documentclass[10pt]{article}

%%%% Packages %%%%
\usepackage{showframe}         %%% remove in your file
\usepackage[labelfont={bf}]{caption}
\usepackage{here}
\usepackage{tikz}
\usetikzlibrary{calc,shapes,shapes.geometric,positioning}
\usepackage{hyperref}

%%%% Set pdf zoom to 100% %%%%

\hypersetup{pdfstartview={XYZ null null 1.00}, pdfview={XYZ null null 1.00}}

%%%% TikZ graphics styles/commands %%%%

\tikzstyle{arr}=[-latex, black, line width=0.5pt]
\tikzstyle{doublearr}=[latex-latex, black, line width=0.5pt]
\tikzstyle{input}=[font=\small\sffamily\bfseries]
\tikzstyle{rect}=[rectangle, draw=black, font=\small\sffamily\bfseries, inner sep=9pt]
\tikzstyle{circ}=[circle, draw=black, font=\small\sffamily\bfseries, inner sep=6pt]
\tikzstyle{trigl}=[
   isosceles triangle,
   draw,
   shape border rotate=90,
   inner sep=2,
   font=\small\sffamily\bfseries,
   isosceles triangle apex angle=60,
   isosceles triangle stretches
]

\def\onesub#1{\strut$1\rlap{$_{#1}$}$}

\begin{document}
\noindent X \hrulefill X
\begin{figure}[H]
\caption{The Model with Level 1 and Level 2 Predictors}
\label{CSL12}
\begin{center}
\begin{tikzpicture}[auto, bend angle=45]

\node[rect]                      (Yij)  at (16, -6) {$LifeSat_{ij}$};
\node[trigl, anchor=right side]  (11)   at (8, -3) {\onesub{1}};
\node[rect]                      (Gij)  at (8, -5) {$Gender_{ij}$};
\node[rect]                      (Aij)  at (8, -7) {$AgeMar_{ij}$};
\node[rect]                      (AGij) at (8, -9) {$Gender_{ij} \times AgeMar_{ij}$};
\node [input]                    (rij)  at (18, -6) {$r_{ij}$};
\node[trigl]                     (12)   at (10, -1.15) {\onesub{2}};
\node[rect]                      (Mj)   at (12.5, -1) {$YearsMar_{ij}$};
\node[circ]                      (B0j)  at (12.5, -4.35) {$\beta_{oj}$};
\node[input]                     (M0j)  at (13.75, -3) {$\mu_{0j}$};

\draw [arr] (B0j)                to (Yij);
\draw [arr] (Gij)                to node [pos=.15, font=\scriptsize] (b1) {$\beta_1$} (Yij);
\draw [arr] (Aij)                to node [pos=.40] {\scriptsize$\beta_2$} (Yij);
\draw [arr] (AGij)               to node [pos=.55] {\scriptsize$\beta_3$} (Yij);
\draw [arr] (rij)                to node [pos=.5, above] {\scriptsize$1$} (Yij);
\draw (11.right side)            to (B0j);
\draw [arr] (12)                 to node [pos=.25, right] {\scriptsize$\gamma_{00}$} (B0j);
\draw [arr] (Mj)                 to node [pos=.50, right] {\scriptsize$\gamma_{01}$} (B0j);
\draw [arr] (M0j)                to node [pos=.30, left] {\scriptsize$1$} (B0j);
\draw [arr] (Mj)                 to node [pos=.30, right] {\scriptsize$\gamma_{11}$} (b1);

\node[inner sep=0pt,outer sep=0pt, font=\footnotesize,label={[yshift=-2ex]north west:{\footnotesize Note:}},text width=0.9\textwidth,anchor=north west] at ([yshift=-20,xshift=1cm]current bounding box.south west) (a)
{$YearsMar_j$ is grand mean centered and was calculated by subtracting the sample mean from each score.\\
$AgeMar_{ij}$ is group mean centered and was by subtracting the mean for the person's gender from their score.};

\end{tikzpicture}
\end{center}
\end{figure}
\noindent X \hrulefill X

\end{document}

enter image description here

1
  • The tags in the boxes should be like \textit{LifeSat}_{ij}
    – egreg
    Mar 18, 2014 at 13:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .