JavaScript is a scripting language commonly implemented as part of a web browser.

learn more… | top users | synonyms

28
votes
3answers
4k views

Automatic “Zoom in” hypertext boxes in PDF

I remember long time ago, seeing PDF documents (such as online PDF versions of newspapers) that had hypertext boxes around paragraphs, such that when you clicked inside those boxes the surrounded ...
2
votes
2answers
52 views

Input JS file within insDLJS environment

The eforms package provides the insDLJS environment to insert document-level JavaScript into a PDF file. It would be convenient (for code reuse and syntax highlighting, among other things) to put the ...
1
vote
0answers
27 views

Inserting Mathematical Equation in HTML through AJAX [closed]

I am retrieving mathematical equation stored in database in the TeX format, through an AJAX variable. But the equations are appearing rendered. Please help.
17
votes
1answer
6k views

How do you say Happy New Year with LaTeX?

Title says it all. How do you wish "Happy New Year" to a TeXie? Compile the code below with pdfLaTeX, view it with "PDF Reader" or "Adobe Acrobat Pro" and press the "Happy New Year" button on the ...
7
votes
1answer
102 views

Is it possible to embed a scrollable frame inside a PDF?

(This is an end-of-year crazy question) Is it possible to embed a (scrollable) frame or a PDF inside a PDF? If so, how to do it in (pdf)LaTeX? This is something pretty common in HTML (see for ...
41
votes
1answer
1k views

How to embed Javascript in LaTeX Beamer?

I'm wondering if it is possible to add javascript animations in LaTeX Beamer, e.g. figures created with C3 or D3? As far as I remember the animate packages uses javascript in order to display (and ...
7
votes
1answer
400 views

Would it be possibile to advance Beamer at the level of the HTML presentations?

I use mostly Reveal.js for my presentations and lately I learned Beamer. As far as I see you can reproduce almost anything from a HTML pres. in Beamer with a little work, except for the ...
1
vote
0answers
48 views

voting via pdflatex

Can one use a pdf file output of pdflatex as a ballot and vote counter? I am looking for a ballot.tex file such that ballot.pdf will have the following properties: There are boxes of choices ...
9
votes
1answer
261 views

Alternative text for Javascript (form) boxes for viewers that don't support Javascript?

I am using the tdclock package to display the current date and time. In looks pretty good in Acrobat, but in other viewers (like Evince) it looks terrible because they don't support Javascripts and ...
3
votes
1answer
97 views

javascript interactive plot context

I am trying to embed an interactive plot into a ConText presentation. I'm not entirely sure if this is possible. I am using javascript code from amCharts. For this I need three java scripts, two of ...
2
votes
1answer
125 views

How to validate date/email entries in pdf forms using hyperref?

Consider the MWE below, I want to validate the date entry as well as the Email addresses to be entered as they should be using the validation option that is only briefly mentioned in the manual of the ...
2
votes
2answers
125 views

Beamer : after the last page — initiate a loop

I'd like that the presentation goes to a specific page after the last page, as it would be the natural next page. I know : \hypersetup{pdfstartpage=1} But it works only to go back to the first page. ...
4
votes
2answers
277 views

Include live remote image in Beamer presentation

From this question, I see that it is possible to include remote images within a PDF, via the media9 package. Can direct inclusion of Javascript--as in this question--be used to update the image ...
1
vote
0answers
149 views

How to use MathJax with LaTeX inside a document.write() [closed]

I am generating a mixture of text and LaTeX using document.write(). MathJax only seems to process some of it. If I copy the text directly into the body of the file, it works fine. Here is a MWE. ...
0
votes
0answers
89 views

HTML + Javascript to LaTex

I'd like to convert a HTML + Javascript document to LaTex. An example document can you find here: ...
2
votes
0answers
93 views

Javascript in preamble

For TeX Live 2012 there is the package insDLJS that allows you to write a documentwide complex javascriptcode in the header of the document, like (Pseudocode): \documentclass{standalone} ...
3
votes
1answer
169 views

Change Picture with Javascript

since months i cant find a way to change pictures by pressing a button in one field. With a text is is like: \documentclass[a4paper]{article} \usepackage{eforms} ...
0
votes
1answer
65 views

Add JavaScript that executes when an image is clicked

As explained e.g. here, JavaScript can be added to a pdf using latex. Can someone provide me with an example, how I can add a JavaScript to an image in the pdf that executes when the image is ...
7
votes
1answer
3k views

Hello World in pdfLaTeX

After many years being silent, TeX can now talk! Almost minimal code below! It should be of particular interest to Physicists and Cosmologists. Need to have Adobe Reader installed. ...
19
votes
2answers
9k views

\listings code style for HTML5 (CSS, HTML, JavaScript)

I would like to create a code style for HTML5 that can be used with the \listings package. An HTML5 document consists of three languages: CSS, HTML and JavaScript. That makes the whole thing a bit ...
10
votes
1answer
4k views

hyperref: how to format text in a forms text-field

I would like to pre-format the text in a form text-field, e.g. make it bold, italic or use a specific font. The following code generates a simple text-field: \documentclass{scrreprt} ...
1
vote
1answer
184 views

Lyx generated PDF with JavaScript encounters NotAllowedError

I am trying to generate a pdf file that opens another pdf file with this code \usepackage[pdftex]{insdljs} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Main Script ...
3
votes
1answer
466 views

Beamer equivalent of Keynote's old web view [closed]

Is there a beamer package that will display a non-static, locally hosted web page? I think I am looking for something similar to Keynote's old web view, but since I have Keynote 09, I'm in a pickle. ...
10
votes
2answers
356 views

How to create PSTricks animations on the web page with interactive control panels?

I just visited a cool site that showing PSTricks animations with interactive control panels. For more details, please visit this link (click). The question is how does the owner of the site make the ...
2
votes
1answer
474 views

Copy to clipboard using Javascript macro

I'm pretty inexperienced with Javascript, especially within LaTeX, so I'd like some pointers, guidance or even an MWE of my proposed "button": I want to create a button to copy data to the system ...
3
votes
0answers
187 views

How to get and process bitmap graphics at a pixel level on-the-fly?

We are trying to solve How to get intersection point(s) of two glyphs? and there are some interesting subtasks. In word cloud algorithms they are converting glyphs (a vector form) to a raster form and ...
2
votes
2answers
166 views

Use tex to generate a html page with an embedded video, possible?

I want to use tex to generate a html page with an embedded video. I know that I can use latex2html to convert tex to html. I also know about media9 but I think it can only be used to render videos in ...
6
votes
1answer
458 views

Inject JavaScript with pdflatex etc. for page level events

I am experimenting a little bit with JavaScript in PDF documents generated via pdflatex. I wonder, whether there is a method to access the event handler of Adobe Acrobat or Acrobat Reader in order to ...
23
votes
4answers
19k views

language option supported in listings

I am afraid that listing doesn't support javascript. \begin{lstlisting}[language=javascript] ... \end{lstlisting} What am I doing wrong?
5
votes
2answers
505 views

timeline and animate package

I'm trying to make some pdf with animate package controlling a loop with the timeline. The purpose is to have a loop but reaching the last frame, the color of the dot should change. My main questions ...
1
vote
0answers
326 views

Get TeX to work with jsPdf [closed]

jsPdf is a Javascript library that creates pdf documents on the fly. This is very useful to me as I have a familiarity with Javascript and I want to be able to do this operation server-side. ...
2
votes
1answer
121 views

TeXstudio readAllStandardOutputStr seems not to work

I try to insert automatic timestamps into a LaTeX file, to get id's for some items On a windows machine I have got the following macro (JavaScript): %SCRIPT var ...
4
votes
1answer
701 views

LaTeX 3D PDF with U3D file and media9: add a view at runtime

I am wondering if I could hack media9 package to achieve such a feature: end-users should be able to add a new view of an animated U3D file at runtime. So I'll be editing the VIEWS FILE from a ...
3
votes
0answers
1k views

Interactive PDF - Click thumbnail images to open in quicklook like window

Is it possible to create an interactive PDF where you can click a scaled down embedded image and it opens it up large in a preview like window hovering in front of the open PDF? Sort of like the PDF ...
6
votes
1answer
756 views

Hide LaTeX parts through JavaScript

I'm creating an interactive pdf form with the hyperref package. The form is quite comprehensive, so the current goal is to only show parts that are relevant to the specific user. For example, the user ...
2
votes
0answers
475 views

Latex forms, MakeTextField, LayoutTextField and javascript questions

I trying to do underlined TextField with label under the field (hyperref package). using Underlined text field in a fillable form i tried to renew MakeTextField: ...
11
votes
1answer
476 views

Forming a “spoiler text” environment in LaTeX (via Javascript?)

I've been writing a mathematical text for some time, and seeing as it is the 21st century, I would like this text to be interactive and dynamic, probably in PDF format. The main function that I am ...
3
votes
0answers
199 views

How can I write specifications following the W3C specifications format in LaTeX? [on hold]

W3C specifications follow a very nice template (example: HTML-RDFa). The specifications are HTML documents styled by a javascript library ReSpec. Is it possible to write specifications in LaTeX ...
1
vote
0answers
1k views

Javascript LaTeX to HTML interpreter?

Is there a possibility to 'render' latex code with your browser? I have some *.tex files which I would like to render a HTML version of (with HTML-navigation, hyperlinks, etc). However - running some ...
4
votes
1answer
368 views

How can I make toggle buttons with images using pdflatex?

I am currently designing an interactive PDF by means of the media9 package in Latex. I have three \mediabutton buttons that I would like to treat as toggle buttons. A picture of the buttons is shown ...
2
votes
1answer
1k views

point-and-click open source javascript equation editor for latex?

Does anyone have experience with a good open source equation editor for online use? I'm not interested in WYSIWYG (What are the Open source WYSIWYG Independent Web Equation Editors available on ...
4
votes
1answer
394 views

\pushbuttons with Icons with pdflatex (xobject reference)

I would like to create a pushbutton with icons instead of text. Like the text in the example below the icons should change with the mouse options. The manual of the eforms package (eformman.pdf) ...
-1
votes
1answer
128 views

Embedding Tex inside JavaScript and/or C# [closed]

Firstly, I'm completely new to using TeX, so please bear with my ignorance. I am writing an application that will require the program to display some symbols, namely those in the MusixTeX library, but ...
23
votes
1answer
999 views

Move-around box in PDF display

I tried using the fancytooltips package and like it a lot. One thing that I could imagine would be nice is to have the entry showing up as a movable box instead of just a tooltip. (Sometimes the ...
3
votes
1answer
148 views

Can we have viewer specific text in a pdf generated by pdfLaTex?

I am wondering if we could have a pdf file, which can tell what viewer its being viewed with. I was looking for some tex command, which says something like: If viewer is Acrobat, print "Hi You are ...
1
vote
0answers
182 views

Testing system in beamer [closed]

Can I use \radioButton option in Beamer? I need to make test(choice) system with counting right answers in presentation mode, maybe there's any class for making testing. I have error with ...
8
votes
2answers
2k views

texlive.js possible?

I just found about emscripten, texlive.js is it really a converted version of texlive in JavaScript or a server as Scribtex and many others? Is this really possible?
5
votes
2answers
990 views

Is there any solution to include Java Applets in presentations/beamers?

I am preparing a presentation on the compiler Texmaker "documentclass" in "beamer". I was fascinated with the package "multimedia" which is a solution to include movies in the presentation. Question: ...
1
vote
1answer
364 views

How to use listings with multiple languages?

I've got a HTML document with JavaScript inside that I want to show in my article. For that I would like to use my JavaScript and HTML formatting. How can I get the listings package to use two ...
0
votes
1answer
574 views

inlineMath \$…\$ not working but default \(…\) does [closed]

I am having issues getting a custom inlineMath format to work. I have included the MathJax CDN and then using the in-line configuration options. I can get all of the default formats to work $$...$$, ...