1

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?

j0equ1nn
  • 278
  • 1
  • 8
  • 1
  • @J.M. Yeah, I've been trying to get that work without success. But I'm continuing to mess with it right now. – j0equ1nn Sep 23 '17 at 23:19
  • 1
    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. – LouisB Sep 23 '17 at 23:40
  • @LouisB Thank you, that allows me to get on with what I'm doing for the time being. Perhaps later, if I can't get MaTeX to work, I'll alter my post to address a more specific issue. – j0equ1nn Sep 23 '17 at 23:55
  • 1
    @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. – QuantumDot Sep 24 '17 at 00:37
  • @QuantumDot Okay, apologies for any confusion this causes but I don't think the question was answerable in its original form because it wasn't possible for anyone to tell what my obstacle was. – j0equ1nn Sep 24 '17 at 00:39
  • 1
    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? – Szabolcs Sep 24 '17 at 09:07
  • @Szabolcs Let's not get personal, ey? I'm describing the problem as best I can. The thing is that I do not find the download instructions confusing, I feel I have followed them, and that the program is not working regardless. – j0equ1nn Sep 24 '17 at 23:07
  • I put in a lot of effort into making MaTeX user-friendly. I honestly do not think that in this case the fault lies with the documentation. But as always, I will consider (and appreciate) any specific suggestions for improving the documentation, and will include them in the next version if I think that they will be helpful to most users. – Szabolcs Oct 01 '17 at 13:35
  • @Szabolcs I agree, I would not blame the documentation. My confusion resulted from my own lack of familiarity with Mathematica in general. I ended up bugging you about my very novice-level issue just because getting your extension to work happened to be one of the first things I wanted to do. I can imagine it would be frustrating having to answer questions of this nature so no offense intended. Thanks for your help. – j0equ1nn Oct 03 '17 at 16:58

1 Answers1

0

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.

Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263
  • 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? – j0equ1nn Sep 24 '17 at 23:03
  • 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. – j0equ1nn Sep 24 '17 at 23:24