14
$\begingroup$

Is it possible to marshal multiple pictures in one question in an array or table?

For example, I'd like to piece together a 2 x 2 array from the following pictures. I essayed this but it foundered:

\begin{array}{cc} [1] & [2] \\ [3] & [4] \\ \end{array}

$$\begin{array}{cc} [1] & [2] \\ [3] & [4] \\ \end{array}$$

1 2 3 4

By the bye, the pictures are of: a Penrose triangle, poppy (to commemorate November 11th), a bilvet, and a Mobius Loop.

$\endgroup$
2
  • $\begingroup$ Just to forestall any comments to the syntax: had the OP used the correct form ![1][1] instead of [1] in the array, it still would not have worked. $\endgroup$ Sep 24, 2013 at 8:23
  • $\begingroup$ @WillieWong: Thanks. Could you thus please emend my OP? $\endgroup$
    – user53259
    Sep 24, 2013 at 8:25

2 Answers 2

8
$\begingroup$

The answer to the question in the title is that

It can't be done.

  1. MathJax interacts poorly with MarkDown (they overwrite each other's pieces). The way around it is to escape everything inside a MathJax environment and hide it from view of MarkDown.

    Therefore by design loading of pictures/links using MarkDown syntax inside a MathJax environment will not work.

  2. It is unlikely that MathJax will support loading images. This is already perfectly handled by HTML.

  3. Similarly, it is unlikely that MathJax will support loading images just so you can use the array environment, since HTML already supports <table> which plays well with <img>.


Your best hope is instead to petition the SE overlords to add support for a tabular environment. That can be achieved by either adding <table> to the list of allowed HTML tags or by implementing some sort of table markup for MarkDown like other implementations (since it is not part of the core specs)

$\endgroup$
5
  • $\begingroup$ Thank you very much. Upvoted. How would one entreat/impetrate this from the SE Lordships? $\endgroup$
    – user53259
    Sep 27, 2013 at 13:41
  • $\begingroup$ @LePressentiment: vote up the linked Meta.SO discussions. $\endgroup$ Sep 30, 2013 at 10:53
  • $\begingroup$ Thanks again. In that regard, would it help to relocate this thread there? $\endgroup$
    – user53259
    Oct 5, 2013 at 8:12
  • 1
    $\begingroup$ Not sure. But feel free to post an answer there explaining why you think such a feature would be useful. $\endgroup$ Oct 7, 2013 at 8:23
  • $\begingroup$ This is a "non-go" answer, see below for a positive suggestion $\endgroup$ Apr 15, 2015 at 8:12
19
$\begingroup$

It is sort of possible via the MathJAX extension HTML using commands of the form style{css}{math}. Basically, this style command will attach some extra CSS style attributes to the math elements and let the browser render them. However, how are they rendered depend on browser and even for a single browser, it takes a lot tweaking to make it looks right (following looks decent under Firefox 28).

I post this as an answer just to document what is possible. $\require{HTML} \newcommand{\mypic}[4][]{ \style{ display: inline-block; background: url(http://i.stack.imgur.com/#4) no-repeat center; #1 }{\phantom{\Rule{#2}{#3}{0px}}}}$

$$\begin{array}{cc} \mypic[border-radius:8px;box-shadow: 4px 4px 8px rgb(0,0,127) inset;]{112px}{112px}{4uXag.jpg}& \mypic[border-radius:8px;box-shadow: 4px 4px 8px black;padding:12px]{100px}{100px}{pqHxu.jpg?s=128}\\ \mypic{128px}{128px}{3V779.jpg}& \mypic{128px}{128px}{9Hh6X.jpg} \end{array}$$

Code implement above behavior follows

$\require{HTML}
\newcommand{\mypic}[4][]{
\style{
display: inline-block;
background: url(http://i.stack.imgur.com/#4) no-repeat center;
 #1
}{\phantom{\Rule{#2}{#3}{0px}}}}$

$$\begin{array}{cc}
\mypic[border-radius:8px;box-shadow: 4px 4px 8px rgb(0,0,127) inset;]{112px}{112px}{4uXag.jpg}&
\mypic[border-radius:8px;box-shadow: 4px 4px 8px black;padding:12px]{100px}{100px}{pqHxu.jpg?s=128}\\
\mypic{128px}{128px}{3V779.jpg}&
\mypic{128px}{128px}{9Hh6X.jpg}
\end{array}$$
$\endgroup$
0

You must log in to answer this question.