Ask Your Question
-1

Unable to Use Array without Issue(s) bar turing red

asked 2017-05-27 03:26:21 +0200

Krishnan Arbuja gravatar image

In my Sage/CoCalc article (Sage has recently merged with CoCalc), I am unable to create an Array without a red issue bar popping up. Morover, I am unable to cross out element in my array. The issue(s) is PackageArrayError; illegal pream-token (1): PackageArrayError; illegal pream-token (2): ...... and so on.

The whole Document is below.

     \documentclass{article}
        % set font encoding for PDFLaTeX or XeLaTeX
        \usepackage{ifxetex}
        \ifxetex
          \usepackage{fontspec}
        \else
          \usepackage[T1]{fontenc}
          \usepackage[utf8]{inputenc}
          \usepackage{lmodern}
        \fi
        \usepackage{amssymb}
        \usepackage{amsmath}
        \usepackage{ragged2e}
        \usepackage{graphicx}
        \usepackage{breqn}
        \usepackage{fixltx2e}
        \usepackage{hyperref}
        \usepackage{titlesec}
        \usepackage{amsopn}
        \usepackage{array}
        \newcommand{\dd}[1]{\mathrm{d}#1}

        % used in maketitle
        \title{Regarding Your Version of Natural Density to Rationals}
        \author{Aiyappan Nair}


        \begin{document}
        \maketitle
        Your version of asymptotic density to rationals differs from my own version. It is not a simplification but rather a change in definition. And although it is much more simple there are flaws that I would like to mention.

        \subsection{Counter-Example}
        As mentioned earlier, if sets $T_1,T_2,T_p$ are subsets of $\mathbb{Q}$, a density $D$ should have the following qualities.

        (1) If $T_1=T_2$ then $D(T_1)=D(T_2)$

        (2) If $T_1\subset{T_2}$ then $D(T_1)\le D(T_2)$

        In your new version of the density

        $$D=\lim_{r\to\infty}\frac{\left|T_1\cap V(r)\right|}{|V(r)|}$$

        Where

        $$V(r)=\left\{\left.\frac{m}{n}\right|1<m<r,1<n<r,\gcd(m,n)=1\right\}$$

        and $m,n,r\in\mathbb{Z}$ 

        If we set $T_1=\left\{\left.\frac{m}{2n+1}\right|m,n\in\mathbb{Z}\right\}$ and $T_2=\left\{\left.\frac{m}{4n+2}\right|m,n\in\mathbb{Z}\right\}$, I found that $D(T_1)>D(T_2)$ even though $T_1\subset T_2$. Which breaks requirment (2).

        \subsection{Proof of Counter Example}
        Imagine $V(r)$ as an array of values, restricted by $r$. The numerator is from listed as columns each labelled from $[1,r]$ and the denominator is listed as row labelled from $[1,r]$.

        \begin{array}{|l|col1 col2 col3 col4 col5 col6 col7 col8}
  & 1 & 2 & 3 & 4 & 5 & .. & r\\
\hline
1 & 1/1 & 2/1 & 3/1 & 4/1 & 5/1 & ..& r/1\\
2 & 1/2 & \st{2/2} & 3/2 & 4/2 & 5/2 & ..& r/2\\
3 & 1/3 & 2/3 & 3/3 & 4/3 & 5/3 & ..& r/3\\
4 & 1/4 & 2/4 & 3/4 & 4/4 & 5/4 & ..& r/4\\
5 & 1/5 & 2/5 & 3/5 & 4/5 & 5/5 & ..& r/5\\
..&  .. & ..  & ..  &  .. & ..  & ..& .. \\
r &  1/r & 2/r & 3/r  & 4/r & 5/r  & .. & r/r\\
\end{array}




    \end{document}

I have never had this problem with SageMath before it merged with CoCalc. Please help.

edit retag flag offensive close merge delete

Comments

This has nothing to do with sagemath the free software. You should ask cocalc's customer support instead.

nbruin gravatar imagenbruin ( 2017-05-27 04:57:56 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-05-28 02:51:43 +0200

calc314 gravatar image

This is a LaTeX issue. The array environment must be inside a math environment. Try the following:

\[ 
\begin{array}{|l|cccccccc}
  & 1 & 2 & 3 & 4 & 5 & .. & r\\
\hline
1 & 1/1 & 2/1 & 3/1 & 4/1 & 5/1 & ..& r/1\\
2 & 1/2 & {2/2} & 3/2 & 4/2 & 5/2 & ..& r/2\\
3 & 1/3 & 2/3 & 3/3 & 4/3 & 5/3 & ..& r/3\\
4 & 1/4 & 2/4 & 3/4 & 4/4 & 5/4 & ..& r/4\\
5 & 1/5 & 2/5 & 3/5 & 4/5 & 5/5 & ..& r/5\\
..&  .. & ..  & ..  &  .. & ..  & ..& .. \\
r &  1/r & 2/r & 3/r  & 4/r & 5/r  & .. & r/r\\
\end{array}
\]

Also, you had a \st command in one line that was not defined.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-05-27 03:26:21 +0200

Seen: 468 times

Last updated: May 28 '17