Question not clear. But to insert Latex Matrix (or any other latex output, such as equations etc..) in textcell using the notebook, here is an example. If OP does not want to use the notebook at all, then this is not possible and will delete this.

Load Matex to render the Latex. Start text cell. Insert the latex in the textcell from the rendered output. Here is an example

Code:

```
<<MaTeX`
matrix = Table[i + j, {i, 1, 3}, {j, 1, 4}];
matrixAsLatex = MaTeX@TeXForm[matrix]
```

However, I would not do it this way if I were you. I use Mathematica all the time to generate Latex, but I output direct Latex to a file which later compile using lulatex directly. I use this method to generate hundreds of PDF files and reports all from Mathematica. (I do not use Export Latex at all either). But to do this, you need to know little Latex and make heavy use of TeXFrom as well when needed. Will try to post an example of how this method works if needed, but you asked for using textcell.

An option between using texcell and full method I use is to render the whole thing as String in the notebook. Here is an exammple

```
ClearAll[y,x];
<<MaTeX`
matrix=Table[i+j,{i,1,3},{j,1,4}];
matrixAsLatex=MaTeX@TeXForm[matrix];
equation = y'[x]==x;
sol=y[x]/.DSolve[equation,y[x],x];
```

ANd now type

```
string="\\text{My Matrix in Latex is} "<>ToString@TeXForm[matrix]<>
" \\text{which looks nice and my equation is } \\fbox{"
<>ToString@TeXForm[equation]<>"}\\text{ which Mathematica can
solve giving the answer}"<>ToString@TeXForm@sol;
MaTeX[string,Magnification->1.3]
```

Which gives

Or you can use `Row`

instead, as in

```
string=Row[{"My Matrix in Latex is ",
MaTeX@TeXForm[matrix],
"which looks nice and my equation is ",
MaTeX@TeXForm[equation],
" which Mathematica can solve giving the answer "
,MaTeX@TeXForm@sol}]
```

The method I use, does not do the above, but sends all output to file. So it is basically as if one is writing plain Latex, but sending output to file, and using Mathematica to do the computation and convert results to Latex as needed.

3

Take a look at MaTeX from our friend Szabolcs. It may help.

– MarcoB – 2017-07-10T14:34:34.7402Load MaTeX, then (for instance):

`<< MaTeX`

`then`

MaTeX@HoldForm[Sum[1/k^3, {k, 1, [Infinity]}]]` – David G. Stork – 2017-07-10T15:22:56.6901If you just want to state a problem mathematically in a Text cell that students will answer by using entering expressions in a Input cell, Mma notebooks already offer extensive math formatting capabilities in text cells. (Or, did you want something else?) – Alan – 2017-07-10T15:36:10.263

1

Are you looking for LaTeX or are you looking for mathematical typesetting? If the latter, check these: https://reference.wolfram.com/language/tutorial/EnteringTwoDimensionalInput.html.en https://www.wolfram.com/language/fast-introduction-for-math-students/en/entering-input/

– Szabolcs – 2017-07-10T16:09:19.467What do you mean by "

Mathematicatext" and what do you mean by setting up a notebook in a text editor? Do your students haveMathematicaor do you want them tonotuseMathematica? – Jens – 2017-07-10T17:17:21.563I

believewhat the questioner wants is a way todisplaya matrix in a Mathematica text cell which does not involve using the Wolfram language (at least not directly) to accomplish the formatting. Otherwise, their students could just copy & paste the objects from the text cells into the "input" cells. (If that's the case, then I'd probably just use a stand-alone program like LaTeXiT and include the "formatted" mathematics as images.) – Michael Seifert – 2017-07-10T17:59:53.443An excellent question about a feature that, AFAIK, is currently missing from the FrontEnd. It would be desirable not just for the purpose indicated by the poster, but also for finer (and often easier!) mathematical typesetting within a notebook than what is currently available. – murray – 2017-07-10T18:51:44.063

Sorry for the unclear question. Michael has hit it right ion the nose. I want to create a notebook using another program where I can put mathematical expression in a text cell without using the Wolfram Language.

My goal is to generate unique questions for students based on their student ID number. For example, I want to ask the question "Invert matix A = [...]" and have the matrix displayed in the text cell without having to use Mathematica.

Basically I want the functionality of generating questions a can be done in Maple T.A. but then in Mathematica – user49947 – 2017-07-11T07:38:47.637

What is the relevance of student ID numbers? Do you want some processing in

Mathematicabased on those? You still haven't clarified the workflow. If by "text cell" you mean a Mathematica text cell, then how can it be displayed withoutMathematica? – Jens – 2017-07-12T06:00:38.410Student numbers are usde to provide each student with a unique set of problems to prevent cheating.As for the workflow. I want to create a Mathematica notebook using a text editor, not Mathematica where I create a problem where, for example, a matrix is given. The matrix must not be in the wolfram language but in LaTeX. The problem text should be interpreted by Mathematica and displayed in the notebook when students open it. As I don't want student to have to run the notebook, I want the problems posed in a Mathematica text cell. Bu some here say the Mathematica front end doesn't support this. – user49947 – 2017-07-12T07:34:40.740