Questions tagged [scripts]
{scripts} is for questions involving external scripts (small programs in source code form) related to (La)TeX.
194
questions
2
votes
1
answer
246
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 ...
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....
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 ...
2
votes
1
answer
138
views
How to send a package to CTAN with ctanupload? (I get an error)
Im trying to send a new package to CTAN and I wanted to use the makefile given in the manual of ctanupload. This is how my file looks
CONTRIBUTION = metrix
NAME = Tobias Weh
EMAIL = [email protected]
...
2
votes
2
answers
837
views
Is LaTeX scriptable through AppleScript and to what extent?
Before I go full into this software and explore it thoroughly, I have some questions that need to be answered.
How far can I automate or script LaTex using AppleScript? I am choosing applescript ...
2
votes
1
answer
5k
views
How to generate LaTeX documents with Perl
I have to generate Software Requirement Specification documents in LaTeX. I have to use Perl to accomplish this. The documents consist of tables, lists, pictures, TOC, table of figures, headings and ...
2
votes
1
answer
245
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!
2
votes
1
answer
318
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}{\...
2
votes
1
answer
240
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
1
answer
263
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.
...
2
votes
1
answer
611
views
Automatic insertion of commands in TeXstudio only during compilation / quick build (with script)
I would like to achieve the following functionality in TeXstudio 2.12.4 (hg 6476:3e5c3afa4719).
During a quick build (Build and view, F5 shortcut), and only when I invoke this command, I would like ...
2
votes
2
answers
235
views
Making csv2latex work with OSX El Capitan and TexMaker
I have encountered several difficulties making csv2latex work after excel2latex mysteriously failed after having worked fine for 2 years (no upgrades of office or anything)...
I am using TexMaker as ...
2
votes
1
answer
1k
views
Cursor in TexStudio Macro
I have a Macro in TexStudio that does the following:
%SCRIPT
txt = cursor.selectedText()
editor.write("\\underbrace{"+txt+"}_{}")
cursor.clearSelection()
That is I select a text, it will be filled ...
2
votes
1
answer
939
views
Configure TeXShop to run a script on the document before typesetting
Is it possible to configure TeXshop to automatically run a script on a document at the beginning of the typesetting process? I am interested in having the application run a python script on the ...
2
votes
0
answers
394
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
0
answers
304
views
ID-number descriptive lines [closed]
I want to describe each part of an ID-number, like so:
How would I go about this? Could i set up something using tikz? I want to be able to describe IDs of different length and complexity. Preferably ...
2
votes
0
answers
1k
views
Filling LaTeX template programatically [closed]
I have an offical document template in LaTeX, which I would like to fill programatically, i.e. providing script with values for selected variables (e.g. name, surname or boolean value for Mr./Mrs.) ...
2
votes
0
answers
467
views
Kile script for regexp replace
It would be very handy to set a shortcut to script in Kile that replaces given instances of text, like for setting non-breaking spaces (~) around given words within selected text:
(^|~|\s)(I|of|not)...
2
votes
0
answers
267
views
search for and highlight words/numbers in pdfpages while only printing highlighted pages
I have a project where it would be very helpful to be able to include pdf pages with certain text and or number highlighted, and in addition limit the pages output to those which have the highlighted ...
2
votes
0
answers
342
views
How to run TexShop scripts from the terminal on OSX
I wish to run the following scripts/commands from the command line:
pdflatexmk,
the command that cleans the directory, i.e. only keeps the .tex, .pdf, .bib files.
Any help is appreciated,
Thank you ...
2
votes
0
answers
204
views
Call "cmd" from within latex
As I asked here, I'm trying to add a link to an image, which already works this way:
\documentclass{article}
\usepackage{graphicx}
\usepackage{hyperref}
\let\oldincludegraphics=\includegraphics
\...
2
votes
1
answer
386
views
How to remove LaTeX control sequences from a .tex document using plasTeX?
I need to get just the text and math expressions (ignoring tables, pictures and styling) from a set of LaTeX documents and represent them in html.
Looks like plasTeX and MathJaX are enough for this ...
1
vote
1
answer
193
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 ...
1
vote
1
answer
131
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 ...
1
vote
1
answer
2k
views
Sublime Text 2 Snippet escaping backslash
I'm trying to set up a snippet for building a set with appropriate spacing. I want the snippet to generate the following markup when I type "set" + TAB:
\{ \, content here \, \}
I have the following ...
1
vote
1
answer
1k
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.
...
1
vote
1
answer
81
views
Passing details (commands) between two
I'm working on my CV and the covering letter and I would like to compile both documents (two different document classes) in one run (more or less). Either way, I followed the example as shown in this ...
1
vote
1
answer
281
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 ...
1
vote
1
answer
281
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 ...
1
vote
1
answer
451
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 ...
1
vote
1
answer
202
views
Automatically generate similar docs
I need to generate the document containing items from txt file (for example).
Txt file:
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Can I run script (?) which generate about the following:
Header #...
1
vote
2
answers
759
views
Tool to expand latex commands in text
Is there a script out there to expand LaTeX commands in a tex source?
I am submitting a manuscript source and I need a tool that expands a LaTeX command because I do not want some commands to appear ...
1
vote
1
answer
226
views
Create a script with multiple commands to compile a file in OS X
Suppose I want to compile a file with some Feynman diagrams, using feynmf package. To do this, I need to run the following commands:
latex file_name.tex
mpost diagram_1.mp
mpost diagram_2.mp
...
...
1
vote
1
answer
124
views
Copy sectioning and non-text environments to new file (for presentation)
My situation is as follows: I've completed a thesis in LaTeX (memoir) and now need to create a presentation for its defense. That means copying all of the document structure from the thesis (...
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{\...
1
vote
1
answer
139
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 ...
1
vote
1
answer
617
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
1
answer
796
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 ...
1
vote
1
answer
845
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
1
answer
1k
views
Exporting graphs from Mathematica to LaTex document?
Matlab has Matlab2Tikz while open for Mathematica2Tikz, more here. How can I export graphs such as Harary graphs from Mathematica to LaTex?
Example graph generated in Mathematica without finding ...
1
vote
1
answer
480
views
Format code listing package
I am documenting a script which has almost 43+ keywords. The output I want is something on the below lines...
and the latex code I have is
\documentclass[a4paper, onesided]{article}
\usepackage{...
1
vote
1
answer
952
views
Collecting Beamer frames from multiple tex files
I now have several dozens of beamer TeX files with hundreds of slides. I am wondering is there an easy way of collecting all frames into one document? I think it can be done with any of the scripting ...
1
vote
1
answer
846
views
TextMate 2 and lost paths
This is a recent development, and I'm not sure what I've changed to make this happen… other than setting TM_SUPPORT_PATH to ~/Library/Application Support/TextMate/Managed/Bundles/Bundle Support....
1
vote
0
answers
48
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 ...
1
vote
0
answers
81
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]
%...
1
vote
0
answers
38
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 ...
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 ...
1
vote
0
answers
92
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 ...
1
vote
0
answers
154
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 ...
1
vote
1
answer
401
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 ...