Skip to main content

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
0 answers
21 views

Conditional target of hyperlink or hyperref

I am creating a fillable PDF form wherein, depending on the choice from \ChoiceMenu the sequence of next pages need to be changed. I need to set the target of \hyperlink dynamically, however I could ...
Jayant Wakode's user avatar
0 votes
0 answers
31 views

How to get value of a radio button choice using javascript in LaTex form?

\ChoiceMenu[radio,radiosymbol=\ding{52},name=sseq]{}{1=132} \ChoiceMenu[radio,radiosymbol=\ding{52},name=sseq]{}{2=132} I'm creating this radio field using which I need to redirect the user of the ...
Jayant Wakode's user avatar
1 vote
1 answer
71 views

Turning Adobe Reader into an interactive picture editor?

The animate package has shown me that interaction via javascript in PDFs is possible. I would like a WYSIWYG / GUI for editing picture environments, in particular the coordinates of \put directives. ...
Jason Gross's user avatar
  • 2,169
0 votes
0 answers
23 views

Strange alignment in declarations with listing for JavaScript code [duplicate]

I'm trying to fine-tune my listing style for JavaScript and I can't understand why: Declarations like "let b = a+1;" shows like "let b =a+1;", so the space after the '=' symbol is ...
alescavo's user avatar
1 vote
0 answers
46 views

How to input CJK characters into TextField of PDF Form by using insdljs?

Recently, I'm trying to generate PDF documents with LaTeX. For some reason, I need to input CJK characters into TextField of PDF Form by using JavaScript. Numeric and alphabetic characters are shown ...
Andrew Terex's user avatar
0 votes
0 answers
242 views

How can I make rendered expressions by KaTex on a p5.js canvas show on downloaded images?

I am trying to render LaTeX-Expressions with KaTeX on a p5.js canvas in order to export them together with the canvas as a png and use that elsewhere. The expressions render just fine, but when I ...
pana pana's user avatar
0 votes
0 answers
52 views

Footnote identifier available to javascript PDF viewer code

I would like to build a javascript browser experience around the PDFs I am creating from LaTex. I'd like to select a footnote and via javascript in the browser I would add comments against that ...
Kias's user avatar
  • 101
0 votes
1 answer
241 views

How to create framebox in tooltip in All PDF Reader?

I am modified the tooltip package based on Tooltip that works with all pdf readers and also i asked one question How to make always visible the tooltip content on SumatraPDF? Since JavaScript was ...
Srinivasan Ganapathy's user avatar
1 vote
1 answer
394 views

How to show correct answers in RadioButton using Javascript

I need to show the correct answers when clicking on the (Show Answers) button and entering the correct password. To do this, select the correct answer in the radiobutton for which (true). I use MikTeX ...
Youra_P's user avatar
  • 1,128
1 vote
1 answer
73 views

Fillable Form with Calculated Total of Non-Blank Lines in Table

folks. I'm trying to create a form that sums up how many names there are in a user-filled table. Essentially, find all the non-blank cells (with a certain variable name), and add 1 to the sum each ...
Gabriel Jagush's user avatar
0 votes
0 answers
127 views

How to make always visible the tooltip content on SumatraPDF?

i am created a package for tooltip using Tooltip that works with all pdf readers. Here my TeX code below \documentclass{book} \usepackage[intlimits,tbtags]{amsmath} \usepackage[utf8]{inputenc} \...
Srinivasan Ganapathy's user avatar
0 votes
0 answers
42 views

Website solution, involving text fields and drop down menus combined with user input to produce Latex code?

I'm trying to think about this: I would like to create a website to automate the generation of a pdf document. Originally this pdf document is generated by latex, but people are not so good with latex,...
guestno6372's user avatar
3 votes
0 answers
178 views

Is it possible to generate LaTeX documents from within a lua interpreter?

I'm curious about the possibilities LuaTeX offers. I understand LuaTeX is a sort of unified API which allows you to hook into the TeX engine and benefit from some abstractions which would make the ...
user32882's user avatar
  • 1,594
0 votes
0 answers
193 views

How to combine a JavaScript code and OCG/OCMG layers within LaTeX source/macro?

This question is a "work in progress" in order to find a solution to the following previous question: (1) ocgx2: Multiple Choice Questions up to three automatic trials As suggested by @AlexG ...
ejazz's user avatar
  • 1,059
0 votes
0 answers
93 views

Change Javascript cycle velocity

I'm creating a 3D pdf with latex and media9 and I added some views for my .u3d object. Now i Have found a script which changes the views automatically:Link It is possible to change these script to ...
protter's user avatar
  • 300
3 votes
1 answer
440 views

Interactive formula using hyperref

I trying to make a digital roleplaying player sheet using Overleaf that I wish to have fillable boxes where the values in them will be extracted and used in some formulas. For example I would want to ...
RV307's user avatar
  • 33
1 vote
1 answer
117 views

media9 cross section add section caps by default in view file

I would like to know how to enable the 'add section caps' feature by default in a predefined view of a 3D object in PDF using the media9 package. Right now the part is hollow after making a ...
Thomas's user avatar
  • 126
1 vote
1 answer
386 views

Flatten PDF form

I'm not able to implement the soluton provided here in Including Javascript to flatten PDF form made in latex. A MWE will be helpful. Thank you. Edit Added MWE. Frankly I'm not sure if I've put the \...
ShastriD's user avatar
2 votes
1 answer
170 views

Can I run this javascript when I open the resulting PDF?

I have created a simle javascript file that runs hidden EXE file masked as a PDF. I would like to hide this script indside another PDF file. The script should run when I open it, but nothing is ...
Obézny Päťdesiatnik's user avatar
1 vote
0 answers
374 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]{...
Cyril Langlois's user avatar
1 vote
1 answer
61 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 ...
kyle's user avatar
  • 449
1 vote
1 answer
296 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 ...
averageUsername123's user avatar
1 vote
0 answers
80 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 ...
feryal windal's user avatar
0 votes
1 answer
264 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 ...
HerthaBSC's user avatar
0 votes
0 answers
702 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 ...
richarddmorey's user avatar
5 votes
1 answer
182 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 ...
steve's user avatar
  • 2,256
3 votes
1 answer
346 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 ...
schtandard's user avatar
  • 15.4k
0 votes
0 answers
678 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....
Bert Jan 's user avatar
0 votes
0 answers
61 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 ...
Hans-Jürgen's user avatar
1 vote
0 answers
112 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.
user avatar
5 votes
1 answer
4k 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 ...
thiloilg's user avatar
  • 153
1 vote
1 answer
130 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 ...
JoN's user avatar
  • 364
2 votes
1 answer
747 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. ...
TobiSonne's user avatar
  • 271
2 votes
1 answer
2k 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 ...
David M.'s user avatar
7 votes
1 answer
3k 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 ...
idriskameni's user avatar
3 votes
1 answer
245 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. ...
Massimiliano's user avatar
1 vote
0 answers
281 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 ...
A.Du's user avatar
  • 77
0 votes
1 answer
2k 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[...
cis's user avatar
  • 8,922
1 vote
1 answer
2k 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 = '...
cis's user avatar
  • 8,922
0 votes
1 answer
223 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 ...
cis's user avatar
  • 8,922
2 votes
1 answer
1k 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-...
biocyberman's user avatar
12 votes
1 answer
5k 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 ...
Alasdair's user avatar
  • 5,267
1 vote
2 answers
760 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 ...
MPW's user avatar
  • 137
0 votes
1 answer
1k 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 ...
alistair's user avatar
  • 103
1 vote
0 answers
214 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 ...
Mari Selvan's user avatar
1 vote
1 answer
158 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 ...
Damien Golding's user avatar
1 vote
1 answer
1k 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} \...
GuesTeX's user avatar
  • 65
3 votes
1 answer
331 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 ...
Robo's user avatar
  • 71
2 votes
1 answer
1k 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: \...
Cauti's user avatar
  • 25
1 vote
0 answers
225 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} \...
Özgür's user avatar
  • 3,344