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

learn more… | top users | synonyms (1)

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

MiKTeX and Perl scripts (and one Python script)

Again and again here on TeX.SX users of MiKTeX ask a question having a problem with a package or included program, where it turns out, that a Perl script is involved, in particular glossaries (because ...
3
votes
1answer
88 views

How to restrict TexStudio macro script to work only in text/normal mode?

I understand that you can write (?highlighted-as:numbers,math-delimiter,math-keyword) before your trigger and TexStudio will execute the macro only in Math mode. I already tested that in "scripts ...
5
votes
3answers
258 views

TeXstudio: Can a script read its trigger?

I would like to write a macro with a trigger #[a-z] that, dependent on the character in the trigger, writes the corresponding Greek letter. That is, the trigger #a should produce \alpha, the trigger ...
7
votes
1answer
57 views

How to insert a # via \immediate\write18 within a macro

It seems that using \immediate\write18{echo "\string#!/bin/bash (version 1)" > \jobname.command}% outside of a \newcommand works great. However, I want to invoke within a \newcommand: ...
168
votes
18answers
78k views

Is there any way to do a correct word count of a LaTeX document?

Often assignments (or even papers) have a word count limit. That is not a big deal when using Word, but I don't know how to do that using LaTeX. My solution has been so far to compile the document and ...
4
votes
1answer
118 views

Run a shell script (with parameters) from a PDF generated by LaTeX

I want to have a link in my PDF generated by pdflatex which executes a shell script, and this part works great. The problem I am running into is that I need the link in the PDF to be able to pass ...
0
votes
0answers
36 views

scripts.ini no such file or directory

I have a problem with usage of tex4th package. I installed it, however when I want to check if it works I receive the following error: ht: No such file or directory: C:\Program Files ...
1
vote
0answers
74 views

Good looking LaTeX code [duplicate]

I'm looking for some script (program) which would help in editing LaTeX code. Usually I have a mess in my .tex code, so it would be good if the script could align tabulars and so on. It would also be ...
0
votes
0answers
50 views

Make TeX output look as input wrt script/language?

I have several languages/keyboard layouts on my Mac-pro (Yosemite). I want to write in Armenian/Bengali/Hebrew and so on. These keyboards/languages are formally part of Mac's Yosemite so I have no ...
1
vote
0answers
46 views

Something like \tikzexternalize[prefix=tikztmp/] for LuaLaTeX

My aim is to compile a *.tex file that contains quite a number of tikz-environments and to create for every tikz-environment one pdf-file. Under LaTeX I would use something like ...
4
votes
2answers
66 views

N ary switchs (selectors / conditionnals / toggles) to handle mailling list

Suppose I want to address the same letter to 10 persons. The letters should be the same, except of course for the recipient's name and address. Moreover, I want to enclose the name of all the other ...
0
votes
0answers
34 views

How to install a script in TeXShop

Here https://dl.dropboxusercontent.com/u/3825336/TeX/index.html you can see the software created by Michael Sharpe for TeXShop. I'm interested in some of his script to facilitate some operations ...
54
votes
4answers
8k views

Detecting all pages which contain color

In an larger LaTeX document there are often only some pages with color content (mainly figures) and the remaining ones are only black and white. Because printing costs for color pages are much higher ...
1
vote
1answer
51 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 ... ...
0
votes
1answer
110 views

Organiser Refills/Inlays using LaTeX

Every year I need to refill my beloved organiser. But the refills on simple A5 paper are sold for incredible prices around $20. Is there a way to create organiser inlays using LaTeX (e.g. one week ...
21
votes
8answers
2k views

Showcase of “programming your document” paradigm

A feature of latex is that you can "program your document". You can do this by using TeX/LaTeX directly (remember that it is Turing complete) or by other languages like lua or python (especially sage) ...
2
votes
0answers
73 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 ...
33
votes
2answers
1k views

How can I make a TeX file executable?

Under UNIX, to my knowledge, any regular file can be made executable with the addition of a shebang: #! /path/to/executing-program --with --options How can I apply the same principle to a TeX file ...
0
votes
0answers
48 views

Run an external script from within lyx

Is it possible to run external scripts from within lyx, passing information about the current file as arguments? I am thinking of usecases like Interacting with file versioning software not ...
5
votes
1answer
216 views

Splitting a huge `.tex` file to chapter files on TeX/LaTeX level [closed]

Inspired by (although a possible duplicate) Outputting each chapter of a LaTeX document to a separate PDF, I wonder whether there is a possibility to extract the chapter (or whatever sectioning level) ...
1
vote
0answers
156 views

How can I make a beautiful form to input in latex?

I want to make a form, with multiple choice, or buttons or whatever... And I want that this form will give me an output that I can use in LaTex, but I don't know how make this. an output like: ...
3
votes
3answers
164 views

How to clean unused files?

I recently edited an existing document to create a new one from it (that is: I copied the whole folder to a new location and started from there). The early document had a lot of figures, but not all ...
6
votes
2answers
117 views

Nicely recover embedded images

I have the latex source code and final generated PDF, but not the image files. I'd like to modify the document, so I'd like to recover the image file so that I can recompile. I can (very slowly) ...
0
votes
0answers
160 views

Script to extract and copy from LaTeX files

I have a large LaTeX document, one main and a lot of \input{file} for each chapter. For each of these files I would like to copy them and only keep the Theorems, in other words I'd like to extract and ...
5
votes
2answers
96 views

Is there any way to know what equation number will be?

Suppose I am writing a LaTeX document describing some code and in the code I would like to refer to specific equation numbers in the document. Is there an automatic way to determine what equation ...
4
votes
1answer
161 views

How to batch generate badges with a list of names?

I want to make a number of badges using LaTeX for the participants of a summer school. There are 40 or so people, so I don't want to manually change the name and compile and then print. I could think ...
1
vote
0answers
33 views

It is possible to generate more than one pdf from one source? [duplicate]

I would like to generate some pdf files with a 'for' cycle. The documents have to be very similar, but some variables are different. It is possible to do it with only LaTeX language without external ...
1
vote
1answer
2k views

Small script letter in text or math mode?

I know that \documentclass{article} \usepackage{mathrsfs} \usepackage{extarrows} \begin{document} $\mathscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \end{document} produce : but I want to know what is ...
9
votes
1answer
334 views

Make a “standalone” version of multiple files: all document in one .tex file

Disclaimer: this question is not related to the standalone package. When writing an article, I split the content between several files, to ease the versionning notably. At the time of writing, most ...
7
votes
1answer
101 views

How to pass argument to an external script?

I want to pass some argument to an external script. I try : \immediate\write18{./script \a\ \b\ \c > output.tex} It works, but \a \b and \c are not given as three different arguments, but as ...
0
votes
0answers
530 views

Hyphen (-) , prime symbol ( ′ ), double prime symbol ( ″ ) are missing

\documentclass[conference]{IEEEtran} \hyphenation{op-tical net-works semi-conduc-tor} \begin{document} \title{Paper Title (use style: paper title)} \author{\IEEEauthorblockN{Authors Name/s per 1st ...
3
votes
1answer
95 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 = mail@tweh.de ...
9
votes
4answers
4k views

pdflatex bash script to supress all output except error messages?

I have a bash script which I use to compile a file with pdflatex twice (to make sure it sorts out references properly, etc.). This is the 'latexbuild' script I use: module load ctan pdflatex ...
0
votes
1answer
416 views

Problem executing script for latexdiff

I am a LaTeX beginner and new to Scripting. I try to implement this interesting solution for latexdiff and multiple files found in this question-answer before I begin writing my phd thesis. However ...
2
votes
1answer
101 views

TeXstudio readAllStandardOutputStr seems not to work

I try to insert automatic timestamps into a LaTeX file, to get id's for some items On a windows machine I have got the following macro (JavaScript): %SCRIPT var ...
24
votes
6answers
1k views

How can other programming languages and tools be used to create content for TeX documents?

When writing about programming languages or tools one often wants to include output from them in the document. Then it is useful if such output can be created as the document is compiled. For ...
11
votes
4answers
577 views

Autocompile LaTeX doc when updated in Windows (via dropbox, in this case)

Goal: I'd like to be able to have a script running on my Windows computer that autogenerates the PDF of my LaTeX doc whenever the main .tex doc gets updated. Use case is I am editing the .tex file ...
3
votes
2answers
956 views

Sublime Text Snippets just for LaTeX

If I want to write a few new Key Bindings for Sublime Text which should only work in LaTeX files (like typing _ or ^ after another character adds the surrounding curly brackets automatically) what do ...
5
votes
2answers
2k views

error “latexdiff: The Perl Script could not be found.” [duplicate]

I have MikTeX 2.9 installation and Strawberry Perl 5.10.1.5. All the latexdiff, latexdiff-fast, latexidff-so paths seem to be present in the scripts.ini file and their .exe files in the ...
1
vote
3answers
458 views

Script to delete a command and associated curly braces from source in TeXShop?

When I'm editing the source in TeXShop, I often find that I want to remove emphasis from a word or phrase. But deleting the \emph from the beginning of the word and the {} surrounding it is a bit more ...
1
vote
0answers
569 views

More generic live preview editor? (can support pandoc and/or custom scripts) [closed]

I'm a fan of using things like pandoc, GPP and Rake to make my source files to look cleaner, be human readable, simplify my workflow and get some level of style/semantics separation (especially for ...
4
votes
2answers
2k views

Unable to use python.sty package

When compiling a .tex file that uses python.sty package and contains: \begin{python} ... \end{python} I keep getting an error: ./main.tex:33:I can't find file 'bin/main.py.out' \end{python} ...
0
votes
0answers
32 views

Problems With Text Encoding While Cutting [duplicate]

Introduction I'm learning how to type with LaTeX and I've found that the character encoding is very important to get good results. I find myself copying parts from pdf documents such as problem ...
2
votes
1answer
339 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 ...
11
votes
6answers
4k views

Generate LaTeX Truth Table with Python Cheetah

While looking for code which can automatically generate truth table in LaTeX I stumbled on this Python generator. It appears that the code can be used from Cheetah's framework. Can anybody point me to ...
10
votes
3answers
410 views

How to replace all $ $ by \( \)?

I want to replace all TeXish math $ $ in a tex file by LaTeXish \( \) and also $$ $$ by \[ \]. How can I do this cleverly? Please beware that in TikZ environment, one can not replace $ $ by \( \).
18
votes
6answers
4k views

Automatically replace all |foo| with \abs{foo}

Technically speaking, this isn't a LaTeX specific question, but there are so many useful tools in LaTeX, and I'm using it to solve a LaTeX problem, so I thought here would be a good place to ask. I ...
4
votes
1answer
165 views

Triple scripts for analysis

I am doing the music harmonic analysis. There are plenty of symbols that must be added and there are need for: underscript triple sub/super scripts:
32
votes
7answers
3k views

What are the advantages of Lua over other scripting languages for a TeX implementation?

The question is inspired by Martin Schröder's answer to I am new to TeX. Should I use LaTeX, XeLaTeX, …? as well as my two previous questions on this forum: Automatic document update Generate LaTeX ...