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
30 views

Using formula in a fillable PDF forms made with LaTeX?

I used the hyperref LaTeX package to make fillable PDFs in order to evaluate student's works. It's a lists of boxes in which notes are given, with : \TexField[name=note1,value=0,width=33pt,height=12p]{...
0
votes
2answers
347 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 ...
1
vote
1answer
35 views

Randomly order document content at view-time

In economics, author order is traditionally alphabetical. Due to the known bias induced by this ordering, there is small movement to randomly order a paper's authors (example). I can order document ...
1
vote
1answer
41 views

Displaying given TeX code for web application (HTML/Javascript)? [closed]

The title is pretty general but I have a bit of a specific question. I'm given a database of TeX code. I'm not familiar with what sort of format it's in (LaTeX, KaTeX, etc.), I only understand that it ...
1
vote
0answers
40 views

WebQuiz compilation and html output file empty

I'm working on the WebQuiz package. I started with first example given by the reference document webquiz.pdf. After pdflatex compilation of my first example (Quiz-1.tex), I get the pdf output document ...
0
votes
0answers
24 views

Listings: Prevent keyword highlighting in Javascript comments

I use the listings package to display code snippets in my documents. To add syntax highlighting to my javascript listings, I have defined javascript as language for the listings package. The keywords ...
12
votes
2answers
816 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 ...
34
votes
1answer
2k views

Copy to clipboard feature in PDF output

Is it possible to have a clickable "copy to clipboard" feature in a PDF document generated by LaTeX? Ideally in the form of a macro that also allows for graphical elements to be embedded inside it (...
0
votes
0answers
25 views

Open-source math input boxes (editors)

Are there any good open-source implementations of a LaTeX math input box (what might be a part of a WYSIWYG math editor) in JavaScript/TypeScript? MathLive and MathQuill are two examples of what I am ...
0
votes
0answers
41 views

pdf form javascript doesn't work in MacOS Preview?

I am trying to implement a simple word count script, but Preview seems to not want to run javascript. I do not know if there is something wrong with my LaTeX (I had a previous problem with Acrobat ...
5
votes
1answer
109 views

Key Listener to Show/Hide TikZ-Comments & Text Highlighting in PDF Output

While working on curating my lecture notes with LaTeX, I've come across a dilemma:             readability and aesthetics VS. rigor and ...
3
votes
1answer
117 views

Can we animate in LaTeX without precompiling every frame, i.e. simulate?

The animate package is great for simple animations, but it has the drawback that every frame of the animation has to be created during compilation. For animations with a simple dynamic but a long loop ...
2
votes
1answer
470 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 ...
0
votes
0answers
71 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 ...
3
votes
1answer
369 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 ...
0
votes
0answers
294 views

I am searching for javascript or PHP to render LaTeX to an image. Like https://latex.codecogs.com/svg.latex?<expression>

On my website (school/math) my users need 24 images for a game. The content of every image is a LaTeX expression, client-side rendered to an image with this code: src = "https://latex.codecogs.com/svg....
0
votes
0answers
25 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
39 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
1answer
75 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 ...
35
votes
3answers
7k 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
1answer
187 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. ...
6
votes
1answer
2k 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
119 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. ...
9
votes
1answer
2k 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
0answers
78 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
369 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
668 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
94 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
402 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-...
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
336 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
124 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
81 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 ...
14
votes
2answers
1k views

Insert web content dynamically (Javascript?)

This year in my field we have a large conference overlapping with the European soccer championship. Luckily my talk does not overlap with any match, but in case it will happen in the future I was ...
1
vote
1answer
361 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
138 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
5k views

Javascript LaTeX to HTML interpreter? [duplicate]

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 ...
2
votes
1answer
518 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: \...
24
votes
1answer
2k 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 ...
6
votes
2answers
904 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') =&...
1
vote
1answer
521 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 ...
1
vote
0answers
143 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
523 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 ...
0
votes
1answer
719 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
0answers
861 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 ...
1
vote
1answer
446 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
192 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
195 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 ...
5
votes
1answer
2k views

How do I place a simple javascript in the resulting PDF?

I would like to use LaTeX to produce a PDF document with forms with the following features: -One or two user-modifiable text fields -One output text field -A "run" button that, when pressed, will take ...
8
votes
1answer
2k 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 ...