0

I have .plt plot from LTspice programme and would like to insert it into Tex, but have no idea how change .plt syntax into .tex syntax. I've checked this, but it seems that it doesn't work anymore.

[Transient Analysis]
{
   Npanes: 2
   {
      traces: 2 {524290,0,"V(n001)"} {268959747,0,"V(n002)"}
      X: (' ',1,0,0.5,5)
      Y[0]: (' ',1,2.6,0.2,5)
      Y[1]: ('_',0,1e+308,0,-1e+308)
      Volts: (' ',0,0,3,2.6,0.2,5)
      Log: 0 0 0
      GridStyle: 1
   },
   {
      traces: 1 {524291,0,"V(n002)"}
      X: (' ',1,0,0.5,5)
      Y[0]: (' ',4,2.7245,0.0005,2.7305)
      Y[1]: ('_',0,1e+308,0,-1e+308)
      Volts: (' ',0,0,4,2.7245,0.0005,2.7305)
      Log: 0 0 0
   }
}

EDIT: Talking about link above Tex is giving following error twice

I've tried \begin{frame} and \begin{frame}[fragile] solution from here but it didn't work. Also terminating lines with \\ doesn't seem to fix issue.

But still my main question is how am I supposed to convert .plt syntax into .tex syntax?

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Apr 04 '22 at 09:20
  • What do you mean exactly with "it doesn't work anymore" in relation to the other question? Does the first answer no longer work, or the second? When you try these approaches, do you get errors, or wrong output, or are the relevant export features removed from LTspice (for both answers), or is there another problem? – Marijn Apr 04 '22 at 10:02
  • First answer is giving errors, when copied 1:1, it doesn't draw sinuses itselves, only axes. Second - that's the easiest way of doing it, but unfortunately it is forbidden in my task – Tom 300 Apr 04 '22 at 10:09
  • Thanks for the clarification. What exactly is your task? Are there any other requirements or restrictions for this task? – Marijn Apr 04 '22 at 10:35
  • "All diagrams and plots have to be in vector graphics or Latex format." So talking about SVG I can go .jpg -> .pdf -> .svg -> .tex, that is easy, but I wonder that a single plot could have hundred of lines so it'll look bad in terms of reading that code. That's why I wanted to use that "Latex" which stands for any Tex code. I'll be marked for code btw – Tom 300 Apr 04 '22 at 10:43
  • The second answer is about exporting to .emf, this is a vector format. Actually it is a mixed vector/bitmap format (similar to PDF that can also contain vector drawings and embedded bitmaps), but if LTspice is halfway decent it should use the vector part for such plots. EMF files can be converted to pdf or eps, retaining the vector representation. – Marijn Apr 04 '22 at 10:57
  • For the first answer: could you explain more (as an edit to your question) what kind of error message you got? That answer is five years old, which is not very recent but usually this is not long enough to break the code completely - also it does not use very exotic features as far as I can see. Did you follow the approach closely, i.e., don't try to plot the .plt file that you have but extract the actual datapoints from LTspice first in a .txt file and plot those? Did you use the exact example document from the answer or did you try to incorporate it into your own document directly? – Marijn Apr 04 '22 at 11:08
  • Overleaf is telling you that the file jfet_mixer2.txt cannot be found. Did you create that file in LTspice and then uploaded it into Overleaf? – Marijn Apr 04 '22 at 12:55
  • Also a general comment: please don't upload screenshots with errors. A screenshot makes it more difficult to locate the error, it is not searchable/indexable by the site, and it is not accessible for blind people browsing the site using a text-to-speech program. Instead copy the text of the error and paste it into the question as text. – Marijn Apr 04 '22 at 12:59
  • @Tom300 in my answer you cited, I said that you can't convert a .plt to a graphic --- simply the data is not there. You have to save the time to voltage/current data (you can see I am doing it in the screenshot) and then use it. The error you have in the compilation is because you did not export the real simulation data. – Rmano Apr 04 '22 at 13:05
  • @Tom300 (I added a bit of info to that answer). Otherwise, the second answer (using an EMF file) will produce a vector file too. Third possibility, print the diagram to a PDF fake printer and then use a tool like pdfcrop to have a vector PDF file. – Rmano Apr 04 '22 at 13:11
  • For future issues like this: problem was about data structure in .txt file - always check :) Thanks guys for help - everything works just fine. – Tom 300 Apr 06 '22 at 07:29

0 Answers0