1
$\begingroup$

I'm generating figures in Mathematica to insert into an article I'm writing in LaTeX. I want to be able to label the objects in my figures with the notation that agrees with my article. This rest of this post has been altered to focus on my specific problem trying to do this.

As per the comment from @J.M. below, I'm trying to install MaTeX on my computer as described here, but without success. I apologize for any incompetence on my part here -- I've always been more of a pencil-and-paper kind of mathematician.

Anyway, I downloaded the file "MaTeX-1.7.2.paclet" and put it in a new folder in my Applications directory, called Mathematica-add-ons. I also downloaded "Ghostscript 9.21" for Macintosh from here successfully. (Note that this is not mentioned in the instructions, rather they gives links to download for Linux and PC, and says Ghostscript comes included with MacTex, however I don't use that.)

I did not have trouble installing MaTeX in Mathematica, and to confirm if I type

PacletFind["MaTeX"]

it says

{Paclet[MaTeX, 1.7.2, <>]}

and if I copy and past that into here we get

{
PacletManager`Paclet[
 "Name" -> "MaTeX", "Version" -> "1.7.2", 
  "MathematicaVersion" -> "10.0+", 
  "Description" -> "Create LaTeX-typeset labels within Mathematica.", 
  "Creator" -> "Szabolcs Horvát <szhorvat@gmail.com>", 
  "URL" -> "https://github.com/szhorvat/MaTeX", 
  "Thumbnail" -> "Logo.png", 
  "Extensions" -> {{
    "Documentation", "Language" -> All, 
     "MainPage" -> "Guides/MaTeX"}, {
    "Kernel", "Root" -> ".", "Context" -> "MaTeX`"}}, 
  "Location" -> "/Users/j0equ1nn/Library/Mathematica/Paclets/\
Repository/MaTeX-1.7.2"]}

But the program does not work.

If I type

MaTeX`

it tells me

Syntax::sntxi: Incomplete expression; more input is needed .

and if I type

MaTeX["x^2"]

the output is just

MaTeX[x^2]

.

What am I missing?

$\endgroup$
10
  • 1
    $\begingroup$ I presume you've seen this? $\endgroup$ Sep 23, 2017 at 23:15
  • $\begingroup$ @J.M. Yeah, I've been trying to get that work without success. But I'm continuing to mess with it right now. $\endgroup$
    – j0equ1nn
    Sep 23, 2017 at 23:19
  • 1
    $\begingroup$ Make the axis labels strings, as in AxesLabel->{"x_1", "x_2"}. But, of course you don't want an underscore so when you type the underscore, hold down the CTRL key, then type the 1 or the 2, then type CTRL-spacebar. $\endgroup$
    – LouisB
    Sep 23, 2017 at 23:40
  • 1
    $\begingroup$ @j0equ1nn You have made a major revision to your question to the extent that the question is completely different. Given that the question is still new, it may be ok. But in the future, please just ask a new question. $\endgroup$
    – QuantumDot
    Sep 24, 2017 at 0:37
  • 1
    $\begingroup$ You really need to follow the instructions precisely. As a mathematician, you live on precise explanations. Can you point out what exactly is confusing in the installation instructions? $\endgroup$
    – Szabolcs
    Sep 24, 2017 at 9:07

1 Answer 1

0
$\begingroup$

I'm trying to install MaTeX on my computer as described here

Anyway, I downloaded the file "MaTeX-1.7.2.paclet" and put it in a new folder in my Applications directory, called Mathematica-add-ons.

This is not what the instructions you linked to say you should do. You need to use the PacletInstall function with the downloaded file, precisely as shown in the installation instructions and as also explained here:

enter image description here

There is also an automatic installation script in MaTeX's README file on GitHub.

If I type MaTeX` it tells me Syntax::sntxi: Incomplete expression; more input is needed.

According to the instructions, you must use

<<MaTeX`

and not

MaTeX`

That << makes a huge difference. Please see Get and Needs.

Getting MaTeX working on a Mac with TeXShop

TeXShop is an editor for TeX files. It is not a TeX system, and does not include the components necessary to convert a .tex file into a PDF. On a Mac, you need to install MacTeX. TeXShop itself does not suffice.

I also downloaded "Ghostscript 9.21" for Macintosh

If you have MacTeX 2015 or later (i.e. if you installed MacTeX within the past two years) then this is not necessary. MacTeX already includes a compatible version of Ghostscript.

$\endgroup$
2
  • $\begingroup$ The instructions do not indicate a preferred directory in which to place the paclet file, they just tell you to download it, and then tell you how to install it from location. Right? When the instructions say to type "PacletInstall["/full/path/to/MaTeX-1.7.2.paclet"]" I interpreted this as meaning to replace where it says "full/path/to" with the full path to the file. Are you saying that is incorrect? Are you saying that the output I interpreted as confirmation of the download is not in fact a confirmation of the download and that my error lies in that aspect? $\endgroup$
    – j0equ1nn
    Sep 24, 2017 at 23:03
  • $\begingroup$ The problem was simply including the "<<" and that's it! I thank you for your help but want to point out that this could be a common mistake for people new to Mathematica. To me it looked like the "<<" was just there to represent the command prompt. So, with all due respect, your other comments come off as a little patronizing. $\endgroup$
    – j0equ1nn
    Sep 24, 2017 at 23:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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