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
1
vote
0answers
32 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 ...
0
votes
0answers
18 views

Script for inserting multiples images

So I have a text table with Two column : Image_name \ Caption I would like to read from this table the value of Image_name and Caption and automatic put them in the code like : \centering \begin{...
0
votes
0answers
13 views

Can TeXstudio scripting be used to restore the state of a split-view workspace?

While working in TeXstudio on my current project, I prefer a vertically split-view workspace with each view occupying 50% of the editor's height, 8 specific file tabs open in the north view, and every ...
0
votes
0answers
72 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 ...
0
votes
1answer
32 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 ...
1
vote
0answers
18 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 =...
1
vote
0answers
35 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=...
2
votes
1answer
98 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!
0
votes
0answers
37 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 ...
1
vote
0answers
32 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-...
0
votes
0answers
19 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 ...
1
vote
1answer
59 views

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

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 ...
2
votes
0answers
114 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 ...
2
votes
2answers
78 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 ...
2
votes
2answers
162 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 ...
6
votes
2answers
148 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. Are anyone able to write a script like this in LaTeX? As an example I have this ...
1
vote
1answer
45 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 ...
0
votes
0answers
92 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_{...
1
vote
0answers
115 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 ...
0
votes
0answers
64 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") ...
4
votes
3answers
225 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 ...
3
votes
0answers
88 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. ...
1
vote
1answer
244 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 ...
1
vote
1answer
203 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$'. ...
1
vote
1answer
126 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 ...
2
votes
1answer
47 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 ...
1
vote
1answer
153 views

Selecting a string beginning with $ and ending with $

The LaTeX editor I use, TeXStudio, allows for custom script-macros. I have little experience with JAVASCRIPT, but I do have one script I managed to create after reading the TeXstudio : user manual ...
2
votes
1answer
97 views

Move editor viewport in TeXstudio script

I'm using the "Finding the next sectioning command" TeXstudio script from the TeXstudio wiki. The script moves the editor's cursor to the next sectioning command, i.e. the next \section{}, \...
1
vote
0answers
138 views

How do I run the build script for dissertate?

I'm writing my thesis in LaTeX, and since I don't really understand how computers work I'm having a little trouble. I've downloaded a generic template here: https://github.com/suchow/Dissertate The ...
1
vote
1answer
65 views

Seamless invocation of bib de-duplication script from document source preamble?

Unfortunately, for reasons beyond my control, I am stuck with mendeley as my citation manager which provides an option to export its library to a bib file. My mendeley library is organised into ...
0
votes
0answers
172 views

Running pdflatex from a RAM disk

For performance reasons. I would like to be able to run pdflatex directly from memory and not have to go to disk. Plan is to set up a RAM disk, /RamDisk, and run everything there. Currently I have ...
2
votes
1answer
183 views

Determine active distribution via shell script

Background: Currently, I have installed /usr/local/texlive/2016 /usr/local/texlive/2017 /usr/local/texlive/2018 With TeXLive, I can use the TeX Live Utility.app to select which TeX distribution to ...
1
vote
1answer
7k views

How to install REVtex into TEXlive

I have downloaded and installed TEXlive, I now wish to use REVtex on it. I have downloaded the zip file revtex4-1. However I do not know how to install it. I have looked on other forums and they have ...
3
votes
0answers
108 views

TeXshop with shell script setting can't find a program in the shell. Why does this happen?

Hello people in this site, I am a newbie to this site, and this is my first question here. In the Preference->Engine->Latex of TeXshop, I wrote as ~/Library/TeXShop/bin/pdfplatex2 where platex2 is a ...
1
vote
0answers
80 views

Programmatically editing Synctex files?

I'm in a situation where I'm building my LaTeX with a script that preprocesses my .Tex files, producing new ones as output that are then compiled with latexmk. Ideally, the synctex files will point ...
0
votes
0answers
125 views

Run Apple Script File (.scpt) from TexMaker

Is there a possibility to run an Apple Script File (.scpt) directly from TexMaker in macOS? EDIT: My intention is to delete all not used data like .log, .acr ... to be able to share the raw .tex and ....
4
votes
1answer
5k views

Multiple Find & Replace in TexStudio using Script Macros

I am using TexStudio with MikTex. I am using at least two packages regularly to create certain lists. Let us say, in one package I have to use \begin{exam} and \end{exam} to start and end list and \...
1
vote
0answers
255 views

Dual-dialogue in play scripts

Is there a package in which dual-dialogue (dialogue in parallel columns) in a stage-play script is possible? Thank you! Something like the example in this picture:
4
votes
6answers
714 views

How to properly draw a circle with two tangent line marking the right angles

I've been trying to draw a figure, like the following draft, with precision for the last two days. After a research on internet I was able to test a lot of softwares and script languages. Two script ...
3
votes
1answer
139 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
193 views

Short-commands for many German scripts

I am typing a note which contains many German script letters. In particular, I need to type a German letter in capital as well as small. I used following commands for such: .... \newcommand{\R}{\...
1
vote
0answers
90 views

Is it possible to install wrappers for scripts not available in the package distribution in a local texmf?

Is it possible to install wrappers for scripts not available in the package distribution in a local texmf ? I would like to be able to add some perl scripts (not present in the MiKTeX distribution) ...
1
vote
1answer
578 views

Can't embed hyperlink references in a tooltip

I'm having troubles trying to embed text references in a tooltip. I'm using the tooltip script which can be found here: Tooltip that works with all pdf readers. I'm also using the hyperref package. ...
2
votes
1answer
118 views

Chemistry diagram variable substitution

I would like to write a script for doing my biochemistry homework that utilizes variable substitution. For example, I could create a base molecule using ChemFig with an X on it, then substitute that X ...
2
votes
1answer
126 views

Unsupported line breaks for tooltips

I was looking for a tooltips package but as fancytooltips & cooltooltips doesn't do what I want, I switched for a script which can be found here: Tooltip that works with all pdf readers. ...
1
vote
1answer
360 views

Automatic closing and showing embedded PDF viewer in Texstudio

I know in Texstudio the embedding PDF viewer can be closed using Esc and will appear again if I hit F7 key and it can also be expanded. Is it possible to write a macro script for which whenever I ...
0
votes
1answer
461 views

Create template and open in TexStudio (Linux) [closed]

I am constantly writing up my homework in Latex and they always have the same framework. Is there anyway I can create a script in Linux that creates a file with the framework then opens it in ...
0
votes
1answer
98 views

Tool for adding index automatically to tex's files from a list

Is there any dedicated tool (script or LaTeX's package) for adding the \index command (or other command) to many LaTeX's files? The idea is to declare the list of the requested index such Henri ...
1
vote
1answer
297 views

How change TeXShop default engine depending on file type

How do I get TeXShop to open with a certain engine already selected when it opens a certain file type? Right now the default engine is always LaTeX, which is fine when I am opening .tex files. However ...
2
votes
1answer
860 views

How to add markdown engine to TeXShop?

I have installed pandoc and MacTex so I can convert markdown to pdf from the command line but I want to be able to edit and compile .md files to pdf from the TexShop interface if possible. I looked ...