Questions tagged [javascript]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Is pdflatex javascript this.getTemplate(“Template-Name”) possible

I would like to display a pdf page base on a selection box. If selection 1 is used, display page 1, if selection 2 is used display page 2. It is a kind of product datasheet and only the data of the ...
1
vote
0answers
26 views

How to make a pop up notice in adobe acrobat using LaTeX?

How to make a pop up notice in adobe acrobat using LaTeX? e.g. How can I simulate the left below corner pop up that shows page size by mouse hover.
1
vote
0answers
47 views

Is there a way to properly display JSX in LaTeX?

I have this simple example of jsx code. How can I change the settings so that the indention of the code snippet gets right? Btw in case somebody has a decent link or example of listings which support ...
1
vote
1answer
54 views

Connect .swf with media9

I found out that it is possible to call external javascript in an browser with my interactive .swf document using the ExternalInterface provided by Adobe. That means, that with e. g. button clicks I ...
0
votes
0answers
17 views

Make ChoiceMenu not fillable in hyperref form dependent on other ChoiceMenu

I have a form and there is a ChoiceMenu with three different possibilities. For two of them I have a further ChoiceMenu and it does not make sense to fill them out if the belonging option of the first ...
2
votes
1answer
39 views

Calculations in TextField do not work

I want to have some TextFields in my form where one can put numbers (shares) and the last TextField should be 100 - the sum of all other TextFields. I found this but it did not help, nothing happens. ...
2
votes
1answer
130 views

How do you create a date field with hyperref's pdf forms?

Some PDF readers might support a date picker for a text field that contains a date format, as explained here: How to create datepicker using JavaScript in Acrobat DC Pro? This article gave me the ...
3
votes
1answer
442 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
97 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
34 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
103 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
223 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
50 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
216 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-...
4
votes
1answer
747 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 ...
0
votes
2answers
206 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
116 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
100 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
60 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
221 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
109 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 ...
2
votes
1answer
330 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
135 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
420 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
652 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
531 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
324 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
157 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
158 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
616 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') =&...
3
votes
2answers
383 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
539 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
54 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
148 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 ...
2
votes
1answer
92 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
120 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
195 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
82 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
410 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
149 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
217 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
31 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
942 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
229 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
786 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
113 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
486 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
719 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 ...