Skip to main content

Questions tagged [scripts]

{scripts} is for questions involving external scripts (small programs in source code form) related to (La)TeX.

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

vscode to rename pdf files after compilation according to patterns

In Linux, I created a Makefile to rename my output pdf files according to the patterns required by my projects. Those patterns are filled from variables fetched from the tex source files themselves. ...
22decembre's user avatar
1 vote
0 answers
62 views

How to install getnonfreefonts on Windows with MiKTeX?

I was trying to install a non-free font for LaTeX. The website https://www.tug.org/fonts/getnonfreefonts/ tells me that I should use a script install-getnonfreefonts. When I've launched it with texlua ...
Ruslan Popov's user avatar
1 vote
0 answers
86 views

How to change the tooltip unmarked annotations to marked annotations using PDF scripting

I'am working on my tooltip package custom-tooltip.sty. Please see below of custom-tooltip.sty \NeedsTeXFormat{LaTeX2e}[2020/02/20] \ProvidesPackage{custom-tooltip}[2020/11/30 custom-tooltip Package] %...
Srinivasan Ganapathy's user avatar
1 vote
0 answers
41 views

Xsim Exercise without numbering

I use xsim to create exams and it works very well. I kove the way it handles exercises and solutions. Now I'm starting to create a script and I was wondering if there is a way to hide the numbering ...
Martin Heydenreich's user avatar
0 votes
1 answer
41 views

passing source to latex on command line

In a shell script, I'm doing things like pdflatex <<- EOT \def\something{a} \documentclass{article} \begin{document} \something \end{document} EOT which works as expected. However, when ...
Bubaya's user avatar
  • 2,331
1 vote
0 answers
82 views

How to write an Script for TexStudio to auto switch into English language inside of math mode?

Switching from local keyboard language to English then backing to local keyboard language outside of math mode is common in non-English latex users. How to write an Script for TexStudio to auto ...
C.F.G's user avatar
  • 552
0 votes
1 answer
71 views

Post build processes with shell script and write18

I would like to start a shell script from LaTeX. In the shell script I need to wait until the .pdf file is generated and afterwards I want to do some stuff with this file. So I created a MWE Test.tex ...
PascalS's user avatar
  • 826
0 votes
0 answers
116 views

Implement a word blacklist in latex

I'm working on a colaborative project where we're trying to align around terminology. We have a list of 'banned phrases' that some authors use coloquially, but that we want to make sure we don't use ...
MattMcEwen's user avatar
1 vote
0 answers
93 views

Is It Possible to Match This Handwritten Brooklyn Font with LaTeX?

I would like to match, if possible, the following handwritten font: I was hoping that Latex offers it, but I could not locate it. QUESTION: Is this particular font available with Latex; perhaps via a ...
DDS's user avatar
  • 8,826
0 votes
0 answers
102 views

Latexmk execute script to build dependencies

for my thesis i need the results of some external scripts to be integrated in my document. It should look like this: latexmk -pdf => external script starts wait until script is finished do the ...
niklasb's user avatar
4 votes
1 answer
174 views

Understanding implicit error on a recursive function

I was originally following the idea from Garrick Peschke To import all .tex files inside a folder, but I want my Lua function to also search inside subfolders. Unfortunately I can't make the Lua ...
Paul's user avatar
  • 45
1 vote
1 answer
201 views

Detect draft mode from Lua in LuaLaTex

I'm working with a document for which I need to generate some data from a Lua script each time the PDF is produced. However, the generation of this data might be a slow, so I would like the script ...
Miguel's user avatar
  • 113
1 vote
0 answers
155 views

Is it possible to run a script in e.g. Python in a LaTeX .cls?

For a package I'm writing, it would be very handy to use some programmed scripts, for example written in Python. Is there a way how I could add these to my .cls file? And if not, what is the usual way ...
TiMauzi's user avatar
  • 841
1 vote
1 answer
416 views

VS Code - LaTeX-Workshop - Recipe with `for` script

Hello There Currently creating compilation recipes for LaTeX-Workshop extension in visual studio code, how to create a tool that rename files using for and mv or some other method? The script using a ...
Felipe9's user avatar
  • 309
0 votes
1 answer
720 views

Script {} in latex

So I'm writing my master thesis and I was wondering whether there was a way to script a custom \Laplace function in Latex. I want to write \Laplace(input) and get the output \Laplace \{ input \} as my ...
Lopehert's user avatar
2 votes
1 answer
247 views

getnonfreefonts Certificate error

My question has been asked before, but the answer does not work for me: TeXLive getnonfreefonts-sys error: untrusted certificate from tug.org The script getnonfreefonts is unable to install the fonts ...
johnny7's user avatar
  • 111
0 votes
1 answer
119 views

How to prevent script (via \immediate\write18) from running multiple times?

How to prevent the execution of script (via \immediate\write18) multiple times when running latexmk (which calls pdftex multiple times)? The problem is that during each iteration of pdftex, the script ...
Pedro's user avatar
  • 373
0 votes
0 answers
296 views

How to run TeX4ht and or tex4ebook

I have found that I can use tex4ebook to convert my Latex document into Epub3 but I haven't found anywhere where it states what program should be used to run the script (I normally write Latex in ...
Jonathan Schouenborg's user avatar
3 votes
1 answer
120 views

TexWorks JavaScript to convert into SI-units

I try to write a script for the TexWorks editor. I want to be able to convert easy writeable physical units into the syntax of the SI-Unit latex package. For example: I write: 12,45A mark it and hit ...
user125198's user avatar
3 votes
1 answer
3k views

How do I automatically fill LaTeX templates with from a table of data?

I have a LaTeX template like \documentclass[12pt]{article} \begin{document} Hello, \VAR{USER}! \end{document} and a table of users (for example as a csv) like ID,USER 01,Peter 02,Michael 03,Jana ... ...
Michael Chen's user avatar
0 votes
0 answers
727 views

Compiling .tex file and generating pdf using a bash script in Windows

I am trying to compile & generate pdf from a .tex file using a bash script to automate the process. I need to use bash script as there are a large number of .tex files to be handled. I am using ...
akv's user avatar
  • 1
1 vote
1 answer
76 views

expand \today in english rather than hindi

\documentclass{article} \usepackage{polyglossia} \usepackage[Latin,Devanagari]{ucharclasses} \setmainfont{Mangal} \newfontfamily{\devanagarifont}{Mangal} \newfontfamily{\...
Vaibhav's user avatar
  • 6,645
5 votes
1 answer
448 views

TeXstudio; 'could not start the command' for custom command running bash script

Edit: solved. Solution: RTFM. I.e. as Schoekling suggested, the manual states: "Each user command has a name with a pattern :, e.g. user0:User Command 0. The command id has to be unique and must ...
jrbergen's user avatar
  • 153
0 votes
0 answers
100 views

How do I get consistent margins in dramatist?

The code: \documentclass[a5paper,11pt]{memoir} \usepackage{dramatist,etoolbox,enumitem} \usepackage[latin]{babel} \pagestyle{empty} \makeatletter \renewenvironment{drama} {\if@lnpa \...
Abathur's user avatar
2 votes
1 answer
41 views

Is there a script/macro which includes figures, having 3 arguments: 1) input file, 2) caption and 3) scale?

I'm looking for a macro like, \newcommand{\figu}[3]{ \begin{figure}[H] \scalebox{#3} {\begin{center} {\includegraphics[width=13 cm, height=8 cm]{#1}} \end{center}} \vspace{-0.2cm} \caption{\hspace{0....
florin's user avatar
  • 157
15 votes
5 answers
3k views

Can LaTeX automatically itemize a list?

So I have a word list file in .txt format, I want to edit it and enumerate them. But since the file runs into thousands of lines potentially, it would be a daunting task to do it manually. I wonder ...
jxhyc's user avatar
  • 1,131
1 vote
0 answers
42 views

Create a command to reduce code duplication when inserting imgage

so I have to do a pdf with a lot of images and I would like to avoid code duplication, so I'd like to create something like a function which take as input two arguments: Image name Caption text So ...
Andrea 's user avatar
0 votes
0 answers
92 views

LuaLatex , how put glyph freely

Lua are incredible engine. I have a font in ttf and I would put a specific glyph in a specific place. For example I create a logo. I need to put second version of 'a' in (x,y)=(12pt,30pt) from left ...
0x3's user avatar
  • 31
0 votes
1 answer
106 views

TeXstudio scripts – internal viewer

I need to make a macro script that would "press" Fit to Width button in the TeXstudio's internal viewer. I found that viewer object is called pdfs[0], but, unfortunately, on the wiki page there are ...
antshar's user avatar
  • 4,238
1 vote
0 answers
34 views

Matlab's script losing identation when pdf is generated. How can i solve it?

i am new in all this Latex stuff, but i am trying to learn. Currently i am stuck in a problem: display a Matlab code. This is my code in TexStudio: \documentclass[12pt]{article} \usepackage[margin =...
Guillherme's user avatar
1 vote
1 answer
302 views

Change settings with macros TeXstudio

I'd like to have a macro in my TeXstudio to change settings, more specifically PdfLaTeX command from pdflatex.exe -synctex=1 -interaction=nonstopmode %.tex to pdflatex.exe -synctex=0 -interaction=...
antshar's user avatar
  • 4,238
2 votes
1 answer
247 views

I want to write a script that replaces all $$ ... $$ math formulas with \ [... \] in texstudio

Ask people to help me write a script that replaces all the math formulas $$ ... $$ into \ [... ] in texstudio. Thank you!
Anh Tuấn Trần's user avatar
0 votes
0 answers
80 views

Dynamically move and edit text?

I've created a LaTeX document to track my goals and weekly/daily to-do's. I have labels for the goals and weekly tasks that I reference in the daily tasks. Here is what I am hoping to automate with ...
Pareod's user avatar
  • 101
1 vote
0 answers
79 views

Using MLS package and Kotex package together

I asked a similar question before but would like to rephrase it to make the point clearer. I would like to use the package MLS (to type Mongolian and Manchu scripts) and Kotex (to type Chinese-...
Ian's user avatar
  • 119
0 votes
0 answers
69 views

lyx - is it possible to include content from a few commands, perhaps in a script?

Let me try to simplify the problem that I'm facing. I am writing a handbook and I want to include the output of maaaaaany commands (and some content of some text files) in the document. I m doing the ...
eftshift0's user avatar
  • 165
1 vote
1 answer
798 views

How do you copy all the images referenced in a document into a single directory? [duplicate]

I am finalising a book and I need to submit all the images as separated files along with the manuscript. Now, images are all saved in different places and referenced with a relative path from my ...
Francesco's user avatar
  • 4,624
3 votes
0 answers
375 views

Need help with TexStudio macro for calling a shell script

So, I made this shell script that can be called from TexStudio, The scripts calls git to add and commit files with the current date, and then push them to GitHub. I want to improve it's functionality ...
Pål Bjartan's user avatar
2 votes
2 answers
172 views

filesystem tree diagram shows strange iteration behaviour

I found this (the one on the left) on TeXample.net. I made the one on the right, based on the same code. I was hoping I might be a be able to write a script to map out a real filesystem. I decided to ...
voices's user avatar
  • 2,039
2 votes
2 answers
184 views

Automatically remove \ifthenelse

Let's assume that you have a single LaTeX source file that can compile two arts of documents: a main conference paper and its extended long version. Inside, you use \ifthenese to produce the two ...
user avatar
6 votes
2 answers
249 views

Script for dualizing diagrams in tikzcd by mirroring

My question is very similar to this one, but in some cases I would prefer my diagrams to be mirrored instead of rotated. Is it possible to write a script which achieves this in LaTeX? As an example I ...
Fredrik Bakke's user avatar
1 vote
1 answer
141 views

TeXstudio scripting with system call and "?" [closed]

I want to make a simple script in texstudio, which i can use to search a selected word in my browser. Everything works quite right, except i can't call the query command correctly. The "?" seems to ...
Sebastian's user avatar
0 votes
0 answers
509 views

change font style of script in math mode

I hope you are doing well. I am writing to ask you how I can change the font style of the script in math mode in latex. Actually i use \text{} to write script in equation area nicely, for example : X_{...
Mojtaba Mansouri's user avatar
1 vote
0 answers
199 views

Can page heading marks work with paracol?

Problem summary: Neither the standard marks nor extramarks work as desired when using paracol because LaTeX treats each column as a separate page. In my application, each page on paper consists of ...
Polyhat's user avatar
  • 355
0 votes
0 answers
208 views

Do TeXStudio Macros allow for conditionals?

I am trying to get a conditional to work within a TeXStudio script macro. Specifically, this is what I have: %SCRIPT txt = cursor.selectedText() editor.write("\\left\\langle "+txt+" \\right\\rangle") ...
jackson5's user avatar
  • 101
5 votes
3 answers
491 views

Is there a way to convert \def macro in \newcommand macro automatically?

I have a big file of macros, they are all in this form : \def\eclaire{\mathbb} \def\R{\ensuremath{\eclaire R}} I want to have them in \newcommand form, for those macro it's quite easy, i just have ...
Evan Barberousse's user avatar
3 votes
0 answers
128 views

arara: load a local batch script or transform the batch script to an own rule

My question is similar to the one here, however it has a little different focus. I am working under Windows using MikTeX 2.9. I do have several latex projects which are part of a tool documentation. ...
raedma's user avatar
  • 1,794
3 votes
1 answer
826 views

De-macro script not working anymore?

I would like to use a script which is included in TeX Live called De-macro (link), this module is a bit old, the last update is from 2007 and it works with Python 2.7 I guess. I tried to use it ...
Evan Barberousse's user avatar
1 vote
1 answer
620 views

TeXworks script for inserting inline math mode

I've been trying to set up a TeXworks script that would add the in-line math mode symbol '$' around a selection. E.g., if one selected '\omega' and executed the script, the result would be '$\omega$'. ...
user49069's user avatar
1 vote
1 answer
284 views

Input variable as argument in metapost script?

I would like to pass input parameters into my .mp script. For example, instead of running: mpost script.mp I want to run something like: mpost script.mp 1 1 2 diamand Where "1 1 2 diamond" are 4 ...
user1271772's user avatar
2 votes
1 answer
50 views

How to vertically wrapped page around formula?

thank you for your time. I wonder if it is possible to render one phrase only in latex and make sure the document is wrapped around the phrase (no bigger that it need to be)? I know you can set the ...
NRagot's user avatar
  • 51