atom-latex is not showing the preview PDF #338
-
|
After the last update, my atom-latex package does not show the preview PDF. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
Let me pull in an outside expert: @asiloisad, do you think this one might just come down to PDF.js being too old? (We might be able to fork this package to update the dependencies.) |
Beta Was this translation helpful? Give feedback.
-
|
I looked into this and found the root cause. It's not related to PDF.js dependencies, it's an IPv6 URL formatting issue.
In newer versions of Electron/Node.js, In { address, port } = @latex.server.http.address()
@url = """http://#{address}:#{port}/viewer.html?file=preview.pdf"""When The error in the dev console confirms this: The fix is a one-line change in getUrl: ->
try
{ address, port } = @latex.server.http.address()
host = if address.includes(':') then "[#{address}]" else address
@url = """http://#{host}:#{port}/viewer.html?file=preview.pdf"""After this change the preview works fine again.
|
Beta Was this translation helpful? Give feedback.
-
|
I'm user of LaTeX too, but I'm using latex-tools and pdf-viewer. I'm the author of these packages and actively maintain them. The |
Beta Was this translation helpful? Give feedback.


@stefaniecg, sounds like you have two options:
~/.pulsar/packages/atom-latex/lib/viewer.coffee, then reload your window. Quickest fix, but you may have to do it again in the future if you migrate to another computer.Luckily, you don't have to choose between these options; you can pursue both if you like.