Linked Questions

24
votes
5answers
3k views

How can I save shell output to a variable in LaTeX? [duplicate]

I need to be able to execute a shell command through LaTeX [*] and have the resulting output available for use later on in the form of a LaTeX 'variable' (e.g., via a subsequent \newcommand command). ...
2
votes
0answers
36 views

Generate url with variable [duplicate]

Im trying to use the hyperref package for creating a link to a website with a dynamic url. I have a script that outputs an id that should be used in the url. I have been trying to wrap my head around ...
10
votes
2answers
878 views

Get return value of `\write18`

I'm using \immediate\write18{./somescript.sh} to execute my own shell script at the beginning of the latex compilation process. Is there a possibility to get the return value afterwards?
7
votes
3answers
2k views

How to use underscores with pgfplotstable?

I have an input file like this: some_entry 123 another_entry 456 yet_another_entry 789 and I want to typeset it as a table with: \pgfplotstabletypeset[col sep=space]{FILENAME} Problem is that ...
11
votes
3answers
474 views

Getting Texlive version in pdflatex? [duplicate]

I just installed Texlive 2014, and ran into this problem: lgrxenc.def not nound. The solution is apparently to remove LGRx from \usepackage[LGRx,T1]{fontenc}; but I'd rather use something like this: ...
9
votes
1answer
2k views

How to run a program inside LuaLaTeX?

Is it possible to run a simple script inside LuaLaTeX or LaTeX? For example, I need to use the calculator from the terminal. I'd like to write $echo "100.83*4.53" | bc and obtain the result in ...
4
votes
1answer
518 views

quickly changing all the file paths in a .tex file

I use a .tex file that I sync with Dropbox across two computers, - mac (running win 7) and a pc. The problem is that the .tex file is large, and contains a lot of tex commands (even user-written ones)...
3
votes
0answers
416 views

How to escape double quotes in \input

I'm trying to call shell commands that contain multiple (nested) quotation marks. This is, for instance, what I would write on the shell: $ python -c "print \"Hello World\"" which produces Hello ...
4
votes
1answer
144 views

Detecting currently running executable - and usage of Latex?

Somewhat in the similar vein as Getting Texlive version in pdflatex?, now I want to obtain the currently running executable inside a *tex run. Thanks to Write18: capturing shell (script) output as ...
1
vote
1answer
108 views

pdfLaTeX not accepting shell commands despite shell-escape option

I am testing the shell escape option, but I am stuck on a very early level -trying to do: \input{|"time /t"}}. My pdfLaTeX is complaining: ! LaTeX Error: File `|"time /t".tex' not found. As far as I ...