I am trying to frame a text with \fbox
and make auto-newline
before or in the text. Currently, my formulas are out of the margin when they are too long (Sometimes there is text, not only formulas).
Part of my code :
\documentclass[a4paper]{article}
\usepackage[a4paper,top=0.1cm,bottom=0.1cm,left=0.1cm,right=1cm,marginparwidth=0.1cm]{geometry}
\usepackage{amsmath}
%boxx
\newcommand{\boxx}[1]{\fbox{#1}}
%matrix
\newcommand{\mtx}[2]{\ensuremath{{\binom{#1}{#2}}}}
\begin{document}
...
\boxx{$\mtx{n}{k} = \mtx n{n-k}$}
\boxx{$\mtx{n}{k} = \frac nk \mtx{n-1}{k-1}$}
\boxx{$\mtx{n}{k} = \mtx{n-1}{k-1} + \mtx{n-1}k$}
\boxx{$\mtx{i}{k}\mtx{k}{j} = \mtx{i}{j} \mtx{i-j}{k-j}$}
\boxx{$(x+y)^n = \sum^n_{k=0} \mtx nk x^{n-k}y^k$}
\boxx{$\sum^m_{n=k}\mtx nk = \mtx{m+1}{k+1}$}
\boxx{$(k_1,k_2,\dots,k_t) = \frac{n!}{k_1!k_2!\dots k_n!}$}
\boxx{$(x_1+x_2+\dots+x_t)^n = \sum_{k_1+k2+\dots+k_t=n}(k_1,\dots,k_t) x_1^{k_1} , x_2^{k_2}, \dots, x_t^{k_t}$}
\boxx{$(1+x)^n = \sum^n_{p=0}\mtx np x^n$}
\boxx{$(1+x)^{-n} = (\frac{1}{1-x})^n = \sum^n_{p=0}\mtx {n+q-1}q x^q$}
...
\end{document}
\documentclass{...}
and ending with\end{document}
. otherwise we can only guessing or give some general advice.\boxx