1

I am struggling to get the text to wrap inside the boxed equation. Any help anyone could give me would be greatly appreciated!

\usepackage[utf8]{inputenc}

\usepackage{setspace}
\usepackage{mathrsfs} 
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{eurosym}
\usepackage{amstext}
\usepackage{hyperref}
\usepackage{grffile} %Stops the file name of figures appearing
\usepackage{color}
\usepackage{mathabx}
\usepackage{float}
\usepackage{pdfpages}
\DeclareRobustCommand{\officialeuro}{%
  \ifmmode\expandafter\text\fi
  {\fontencoding{U}\fontfamily{eurosym}\selectfont e}}
\usepackage{pifont}
 \usepackage{multirow}
\usepackage[dvipsnames]{xcolor} 

\begin{document}

\begin{equation*}
\begin{aligned}
    \boxed{H_0 : There\ is\ no\ association\ between\ the\ number\ of\ seasons\ a\ club\ has\ previously\ played\ in\ the\ top \ division\ and\ survival}
    \end{aligned}
\end{equation*}
\begin{equation*}
\begin{aligned}
\boxed{H_1 : There\ is\ an\ association\ between\ the\ number\ of\ seasons\ a\ club\ has\ previously\ played\ in\ the\ top\ division\ and\ survival}
\end{aligned}
\end{equation*}
\end{document}
  • 1
    surely you don't want any of this text to be in math mode? There\ is\ no\ association\ betwee.... – David Carlisle Sep 2 '17 at 12:25
  • Welcome to TeX.ST, you must familiarize with our format. Blocks of code show better if you indent with four spaces (or select and Ctrl+K), this time Torbjørn T did this for you! – skpblack Sep 2 '17 at 12:25
3

There are plenty of ways to get a simple box, e.g. the framed package and environment. (For fancier stuff, look at tcolorbox or mdframed.) I wouldn't use an equation* for that at all.

\documentclass{article}
\usepackage{framed}
\begin{document}
\begin{framed}
\noindent $H_0$: There is no association between the number of seasons a club has previously played in the top  division and survival
\end{framed}
\begin{framed}
\noindent $H_1$: There is an association between the number of seasons a club has previously played in the top  division and survival
\end{framed}
\end{document}

output of code

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.