Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [javascript]

JavaScript is a scripting language commonly implemented as part of a web browser, but also of some PDF viewers.

3
votes
1answer
94 views

Javascript application in latex

I would like to know if it is possible to add an interactive app created with Javascript to a Latex document. I would like to add some of the Javascripts that appear here. Like that one: EDIT I ...
3
votes
1answer
50 views

Set precise time on a video using javascript

Hi i'm trying to get a button to set the video time a precise point. The code listed below is what i've made up till now but its not working. i think because it cant get the document.getElementById. ...
1
vote
0answers
30 views

Hide fields from hyperref forms and delete the space they were taking when visible

I wanted to have a "hide/show" PushButton to hide a certain field, which I managed (see MWE). However, when the field is hidden, it still takes "space". Is there a way to not only hide the field ...
0
votes
1answer
38 views

Form: Height of TextField until the end of page

I have a tabular arrangement of Textfields. Is there a simple method to enlarge the text field down below -dynamically- until the end of the page? \documentclass[fontsize=14pt]{scrreprt} \usepackage[...
0
votes
1answer
65 views

Form: How to change the font into TextFields globally

I would like to have typewriter-font into my pdf-form. So I find out the mechanism \TextField[width=5cm, name=NAME,value=Font manually changed, format = { var f = this.getField('NAME'); f.textFont =...
0
votes
1answer
30 views

Form: 'TextField's and digsigfield in a table

Note: Question is kin to Form: Tabular arrangement of 'TextField's and digsigfield I use digsig.sty from Martin Lottermoser http://home.htp-tel.de/lottermose2/tex/dist/digsig.sty How can I ...
1
vote
1answer
95 views

put last modified date on the PDF form generated by markdown + hyperref + javascript + fancyhdr?

This is my pandoc version: pandoc --version pandoc 2.3.1 Compiled with pandoc-types 1.17.5.1, texmath 0.11.1.1, skylighting 0.7.3 Default user data directory: /Users/vle/.pandoc Copyright (C) 2006-...
2
votes
1answer
284 views

JavaScript library for producing TiKZ-like diagrams?

I can use mathjax for equations and symbols generally, but what about diagrams? Mathjax doesn't support TiKZ, so I'm looking for a JavaScript library which can be used in place of TiKZ. So far ...
1
vote
1answer
108 views

LaTeX PDF form: Detect CheckBox changed event

I use LaTeX to create a fillable PDF document. How can I detect that a \CheckBox has been clicked? It seems to react only to onfocus={...}, not to onclicked={...} or onchanged{...}. Do I need to ...
0
votes
1answer
65 views

Convert TeX to a standard equation string [closed]

I'm currently programming in Javascript, I figured this would be the best place to put it. I'm very very new to TeX, in fact I discovered it within the past hour. I was wondering if I could convert ...
1
vote
0answers
84 views

convert laTeX to semantic LaTeX Format [closed]

I'm very new in Math,LaTex and all those Related things. Recently I worked on Guppy.js . And they have option to export laTex. But when I try to Import the LaTex it gives an Error. Reading docs ...
1
vote
1answer
57 views

How to perform calculations(Not just display) [closed]

I have almost zero knowledge of TEX. I want an easy way to take common algorithms and use them to calculate values. This would ideally be done in the browser, but if not appropriate I could run on a ...
1
vote
1answer
131 views

Can I disable \setminted for a code?

in order to apply a minted style globally and not to copy paste these styles in every \begin{minted} I will use in my paper, I am using \documentclass{article} \usepackage[utf8]{inputenc} \...
3
votes
1answer
92 views

Is TeXMaker capable of using a .js script made to work for TeXWorks? If not, how do I go about turning a .js into a .tms?

I'm trying to do the following: LaTeX -> (text selected, keyboard shortcut pressed) -> \hyperref[LaTeX]{LaTeX} I can't use user tags for this because it can't use selection twice, only once. I ...
1
vote
1answer
232 views

Define Javascript function in Form with hyperref

I have TextFields with the environment Form from hyperref package. However I want to add the values of the TextFields and print the sum in another TextField. That works well with the following code: \...
1
vote
0answers
126 views

submitForm error with javascript on a PDF

MWE \documentclass{article} \usepackage[pdfpagemode=None,pdfstartview=FitH,pdfview=FitH,colorlinks=true]{hyperref} \usepackage[pdftex]{insdljs} \usepackage[pdftex]{eforms} \begin{document} \...
3
votes
1answer
321 views

Is it possible to generate random numbers dynamically with javascript on a PDF?

PDFs can be used to manage javascript, such as the packages ocgtools, ocg-p, ocgx or ocgx2, which allow you to create interactive and clickable PDFs. The hyperref package allows you to insert URLs or ...
1
vote
0answers
445 views

embedding overleaf dokument into website [closed]

is it possible to dynamically embed a overleaf document into a simple (bootstraping-theme, html5) website using the "Read Only Link" ? either with embedding the latest version of the document as a pdf ...
0
votes
1answer
371 views

Define the graphics path in the header for TeXstudio

TeXstudio opens a preview, when the mouse cursor hovers the \includegraphics command. Unfortunately this does not work, if a graphicspath is set for the document. It seems that TeXstudio 2.12.4 does ...
1
vote
1answer
202 views

Include JavaScript code in HTML using tex4ht

I have trouble including JavaScript code in the HTML header generated by tex4ht. The script I want to include is: <script type="text/javascript"> var _gaq = _gaq || []; var pluginUrl = ...
1
vote
0answers
134 views

mediabutton won't control animateinline [closed]

I am displaying an animateinline animation which loops through some frames. I now would like to have a "continue"-button to jump the animation to the next cycle of frames. If I understand the animate ...
1
vote
1answer
124 views

timeline (animate package) flickers to first tranparency when using JavaScript

This is somehow a follow-up to this question. I am using some tikz drawing which I would like to animate using the animate package. The animation should start at the beginning, run through to the end ...
6
votes
2answers
513 views

How to check if a string is a valid LaTex rule?

I am using MathQuill lib for the formula input and trying to restrict a number of operations. Is there any way I can differentiate between a string and a LaTex rule? For example: def check('\sum') =&...
4
votes
2answers
315 views

Can you influence any PDF element using JavaScript?

Using the package insDLJS, one can add JavaScript to PDF's generated by LaTeX. To reference a specific element, one can use this.getField("myElementName"). Can I give any element in LaTeX a field name?...
3
votes
1answer
456 views

Including Javascript to flatten PDF form made in latex

The goal of this is to simplify a process at my work. Any advice would be very much appreciated. This is what we have been doing Using Latex I create a pdf and send it to person 2. Person 2 emails ...
0
votes
0answers
52 views

Blacking out a created PDF after a given date with javascript

With the recent CJEU ruling, libraries can lend ebooks like normal books if the book cannot be used after the lending period. Therefore I wanted to try building a PDF with Javascript which blacks out ...
1
vote
0answers
127 views

PDF-Form \textfield output with comma instead of dot (AFNumber-Format)

I build a pdf-form with the package hyperref. I am using this form to calcualate two sums and the difference between this sums. Therefore I am using the package insdljs. Everything works fine as long ...
3
votes
1answer
86 views

Do tooltips use javascript? Might that be a problem?

I am writing my CV in LaTeX and thought it'd be fun to add a little Easter Egg when hovering over LaTeX: That was created with package pdfcomment. However, I've seen some comments (for example, here)...
0
votes
2answers
114 views

eforms's textField covers pop-up tooltip of fancytooltips

I'm trying to create a small fillable form and I have a small z-ordering problem, which I'm not able to solve on my own. I create a 'tooltip' and the 'movetips' option is defined, so the tooltip will ...
2
votes
1answer
182 views

Javascript does not work from button click

I have this very simple LaTeX file that uses the media9 package to insert 3D objects. I want to animate parts of the 3D object using Javascript, preferably on a button click. My problem is that when ...
1
vote
1answer
80 views

javascript script for automatic labeling of equations inside the tex file

What is wrong with the following code for script of the texstudio var linenumber = 0; var keynumber = 1; dialog = UniversalInputDialog(["a","b","c","d","e","g","h","i","j","k"],"Insert The Postfix:",...
1
vote
1answer
375 views

Autocomplete Texstudio macro script

Is it possible to use autocomplete in creating a macro script for Texstudio. The reason I need this is that I want to see what classes with what features can I reach when creating an script. For a ...
0
votes
5answers
2k views

latexdiff script for texstudio

I'm trying to use latexdiff script in the texstudio. What is the problem with the following script. %SCRIPT var cf = app.getCurrentFileName(); var ld = new String(cf); ld=ld.substring(0,ld....
0
votes
1answer
137 views

invoking mathtype from texsudio

Any idea how can I automatically invoke Mathtype from texstudio using macro (javascript) and put the formula back onto texstudio automatically. It can be done manually, but I want to know is it ...
3
votes
2answers
198 views

Texstudio script for deleting $ $

I was wondering how can create a texstudio script for removing the $ $ notation. what is the problem of following code. %SCRIPT txt = cursor.selectedText() txt.replace("$","") editor.write(txt) ...
2
votes
0answers
30 views

How can I get rid of indentation before my code? [duplicate]

My Javascript code has a large amount of whitespace in its block in the output pdf file. How do I get rid of this without un-indenting my latex code? Thanks in advance. \documentclass{article} \...
1
vote
1answer
857 views

3D PDF cycling between views animation

I'm creating a 3D pdf with latex and movie15 and I added some views for my u3d object... Then I added turntable.js to manually change a view of the object... till now everything is fine It is ...
0
votes
0answers
205 views

How can I set multiple languages in listings? [duplicate]

Can anyone tell me how to properly set multiple languages in listings package? In my document I have some source code of C-sharp, VBA and JavaScript and need to color the keywords. But in my case I've ...
2
votes
2answers
659 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 ...
8
votes
1answer
2k 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 ...
1
vote
0answers
110 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 A,B,C,D,...
2
votes
1answer
462 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 ...
1
vote
1answer
630 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
217 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. ...
3
votes
2answers
851 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
165 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} \usepackage{...
9
votes
1answer
1k 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 animations/...
3
votes
1answer
564 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} \begin{insDLJS}[test]{test}{...
0
votes
1answer
122 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 clicked?...
42
votes
1answer
3k 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 ...