0

Before you say this has been asked before, I did try to look this up and found these thread:

Printing a table as PNG?

Compile a LaTeX document into a PNG image that's as short as possible

The issue is that I couldn't get the answers to work, probably because I'm not experienced enough. I tried to use the standalone class by writing

\documentclass[convert]{standalone}

but it gives me an error "Class standalone Warning: Conversion failed! Please ensure that shell escape is enabled (e.g. use '-shell-escape')."

Now, I have no idea how to use this -shell-escape function.

I'm using the software TeXworks and tried implementing the following solution:

How to enable shell-escape in TeXworks?

But this again just gives me the same error.

Any help is greatly appreciated!


@MadyYuvi:

enter image description here

WoeIs
  • 121
  • on the commandline use pdflatex --shell-escape yourfile.tex – David Carlisle Jul 18 '19 at 12:44
  • @DavidCarlisle can you specify what you mean by commandline? – WoeIs Jul 18 '19 at 13:19
  • @WoeIs Before giving reply, can you confirm what OS you are using, i.e., Windows or Mac? – MadyYuvi Jul 18 '19 at 13:21
  • @MadyYuvi Windows – WoeIs Jul 18 '19 at 13:22
  • @WoeIs Thanks for the confirmation, then you can type the text cmd, then the MS-DOS prompt will open by auto, from there, you go to your working path and then try as per DavidCarlisle suggestion... – MadyYuvi Jul 18 '19 at 13:23
  • @MadyYuvi, can you confirm if my configuration is correct? https://i.imgur.com/ClhaVPI.png – WoeIs Jul 18 '19 at 13:27
  • @WoeIs Sorry, my browser doesn't allow to open the link what you given... – MadyYuvi Jul 18 '19 at 13:28
  • @MadyYuvi, I've added the image to the main body of this thread. – WoeIs Jul 18 '19 at 13:30
  • @WoeIs Oops, now your question routed to how to map shortcut to run PDFLaTeX in TeXworks, I am not an expert in TeXworks, I am using epsilon as my text editor, some expert in TeXworks may reply for this...sorry... – MadyYuvi Jul 18 '19 at 13:32
  • @MadyYuvi, no worries, so I don't actually need to do any of these things, all I need is to run "pdflatex --shell-escape yourfile.tex" in my commandline? Do you know where the png gets saved to? – WoeIs Jul 18 '19 at 13:34
  • @WoeIs you can keep the .png file into the same folder where you keep TeX application file or else you can keep the image file into a separate folder, and you can map that particular path by using the tags \usepackage{graphicx}\graphicspath{{./figure/} – MadyYuvi Jul 18 '19 at 13:37
  • @MadyYuvi, is there a special way to to make the commandline find the file? It gives me the error "! I can't find file `Testfile.tex'." The file is in a folder called "Test" on my desktop. – WoeIs Jul 18 '19 at 13:53
  • @WoeIs instead of desktop, It is better to keep the folder in a drive, e.g., D: or E:, etc... – MadyYuvi Jul 18 '19 at 13:55
  • @MadyYuvi, Unfortunately I only have a C: drive. – WoeIs Jul 18 '19 at 13:58
  • @WoeIs Not an issue, please create a folder test in C: and place all the files in that folder, then try... – MadyYuvi Jul 18 '19 at 13:59
  • @MadyYuvi, But my desktop is located in the C: drive, so that shouldn't be an issue right? – WoeIs Jul 18 '19 at 14:00
  • @WoeIs Yes, that's not an issue... – MadyYuvi Jul 18 '19 at 14:01
  • 1
    Did you install ImageMagick ? – Black Mild Jul 18 '19 at 15:20

0 Answers0