Live data from Hacker News

Author interactive math equations and diagrams online using LATEX and PSTricks

latex2html5.com

11–20 of 26 posts

Re: Author interactive math equations and diagrams online using LATEX and PSTricks

#12
post #7
post #5

I wish there was a way to do this in PDF. If PDFs weren't these cumbersome static things it could really change how information is spread in the sciences. At least in my field the current mode for disseminating information is nearly 100% through downloading PDFs from journals, which inherently prohibits interactivity and dynamic visualizations.

I'm trying to push my research group to release our papers as iPython notebooks and it looks like my next paper will be. Our text will be rendered as normal markdown and our figures will be live figures with all the code that we used to generate them. This way, if anyone wants to check our work, extend it, or just better understand it, they're more than free to do so. It should be a nice step forward in the ultimate…

None of the journals I work with will accept any format other than .tex or .doc for submission, its pretty ridiculous. We totally rely on the journals to distribute information but they have no incentive to optimize the process for reproducability or ease of use. Don't get me started on publication fees and access fees.

Re: Author interactive math equations and diagrams online using LATEX and PSTricks

#13
post #5

I wish there was a way to do this in PDF. If PDFs weren't these cumbersome static things it could really change how information is spread in the sciences. At least in my field the current mode for disseminating information is nearly 100% through downloading PDFs from journals, which inherently prohibits interactivity and dynamic visualizations.

What static files? I don't know how cumbersome it is, but Acrobat supports interactivity using JavaScript. See http://acrobatusers.com/tutorials/filter/search&category=13&.... You can also embed Flash in Acrobat files.

Re: Author interactive math equations and diagrams online using LATEX and PSTricks

#14
LaTeX newbie here:

Can someone explain how this works (from a user standpoint)? How does userline below map mouse pointer coordinates to the line? It seems (2,2) is what is getting substituted with the (x,y) from the mouse (after adjusting for the origin).

\begin{pspicture}(-2,-2)(2,2)

\psframe(-2,-2)(2,2)

\userline[linewidth=1.5 pt]{->}(0,0)(2,2)

\end{pspicture}

I am totally lost on the following example. The lightblue line below behaves the same way as the line in the above example. But the code below is quite different, including sin and -y.

\begin{pspicture}(-2,-2)(2,2)

\psframe(-2,-2)(2,2)

\userline[linewidth=2pt,linecolor=green]{->}(0,0)(2,2){-x}{-y}

\userline[linewidth=2pt,linecolor=red]{->}(0,0)(2,2){0}{y}

\userline[linewidth=2pt,linecolor=purple]{->}(0,0)(2,2){-x}{cos(y)}

\userline[linewidth=2pt,linecolor=lightblue]{->}(0,0)(2,2)(sin(x)}{-y}

\end{pspicture}

Re: Author interactive math equations and diagrams online using LATEX and PSTricks

#15
With reference to: https://mathapedia.com/books/34/sections/203/526

The code for the second example does not sound impressive to me. I do not want to draw diagrams by specifying coordinates of each and every box and label. How do I tell it to draw a label in the center of an already placed box?

Is there a way/tool where diagrams can be drawn at a higher level of abstraction where the user does not have to specify each and every thing? I have seen a few approaches, none of which sounds to be feature-complete:

yEd [1] lets the user draw graphs and store them in formats where they can be read by a program into a graph object. I found it very difficult to use yEd to draw anything but graphs.

MS-Word includes smart art. While I am not sure, but the storage format sounds to be something intelligent such that it would at least theoretically be possible to read the diagram programmatically into the corresponding data structure. Only issue is that the templates are fairly limited and I cannot figure how to draw anything else. Drawing a graph for example does not look possible.

Then there are UML tools that should have fit the purpose but often are not intuitive enough to use. They are also not intended to draw general-purpose diagrams.

And finally mindmap-based applications that do nothing else but mindmaps.

[1] http://www.yworks.com/en/products_yed_about.html

Re: Author interactive math equations and diagrams online using LATEX and PSTricks

#16
post #12
post #7

Earlier quoted context omitted.

I'm trying to push my research group to release our papers as iPython notebooks and it looks like my next paper will be. Our text will be rendered as normal markdown and our figures will be live figures with all the code that we used to generate them. This way, if anyone wants to check our work, extend it, or just better understand it, they're more than free to do so. It should be a nice step forward in the ultimate…

None of the journals I work with will accept any format other than .tex or .doc for submission, its pretty ridiculous. We totally rely on the journals to distribute information but they have no incentive to optimize the process for reproducability or ease of use. Don't get me started on publication fees and access fees.

We're getting around this by putting a paragraph at the end of the conclusion with a link that says something to the effect of "Click here for a live version of the paper with all the code and data used in this project." It's a little more cumbersome than having the paper actually be the notebook but it helps.

Re: Author interactive math equations and diagrams online using LATEX and PSTricks

#17
post #8
post #2

For working scientists, engineers and mathematicians, that are already familiar with LaTeX, this seems to be an easy and natural path to achieve (part of) the vision of Bret Victor.

I don't understand why he doesn't release the source for his applications.

Source code here: https://github.com/pyramation/LaTeX2HTML5

and here: https://github.com/Mathapedia/LaTeX2HTML5

Re: Author interactive math equations and diagrams online using LATEX and PSTricks

#18

I threw together a quick demo kinda like this a while back using Bret Victor's Tangle.js: http://defcon21.hscott.net/wave.html

cool demo, though I think your "phase offset" is in radians, might want to throw a little π/180 in there ;)

Re: Author interactive math equations and diagrams online using LATEX and PSTricks

#19
post #14

LaTeX newbie here: Can someone explain how this works (from a user standpoint)? How does userline below map mouse pointer coordinates to the line? It seems (2,2) is what is getting substituted with the (x,y) from the mouse (after adjusting for the origin). \begin{pspicture}(-2,-2)(2,2) \psframe(-2,-2)(2,2) \userline[linewidth=1.5 pt]{->}(0,0)(2,2) \end{pspicture} I am totally lost on the following example. The lightb…

I am fairly sure that's not the source that produces the interaction. Apart from the incorrect expression, the mismatched brackets in (sin(x)} indicate that.

Re: Author interactive math equations and diagrams online using LATEX and PSTricks

#20
post #19
post #14

LaTeX newbie here: Can someone explain how this works (from a user standpoint)? How does userline below map mouse pointer coordinates to the line? It seems (2,2) is what is getting substituted with the (x,y) from the mouse (after adjusting for the origin). \begin{pspicture}(-2,-2)(2,2) \psframe(-2,-2)(2,2) \userline[linewidth=1.5 pt]{->}(0,0)(2,2) \end{pspicture} I am totally lost on the following example. The lightb…

I am fairly sure that's not the source that produces the interaction. Apart from the incorrect expression, the mismatched brackets in (sin(x)} indicate that.

Yes, I noted the mismatch too. So what is producing the interaction then (and how does it know what changes with the interaction). It must have something to do with "user" in "userline", that is, "userline" is some primitive that includes interactions. How exactly, I cannot find.
Post reply on HN