0

I have a file texstudio.ini, inside that file there is the following line

Tools\Commands\pdflatex=\"/usr/texbin/pdflatex" -synctex=1 -interaction=nonstopmode %.tex

I would like to change the above to

Tools\Commands\pdflatex=\"/bin/texliveonfly\" %.tex

without having to have to go inside the file and do it manually. In other words how could I do this using a bash script?

The file also contains several other command, for example

Tools\Commands\latexmk=
Tools\Commands\lualatex="lualatex -synctex=1 -interaction=nonstopmode %.tex"
Tools\Commands\makeglossaries=
Tools\Commands\makeindex=makeindex %.idx
Tools\Commands\metapost="mpost -interaction=nonstopmode ?me)"
Tools\Commands\pdf-chain=txs:///pdflatex | txs:///view-pdf
Tools\Commands\pdflatex=\"/bin/texliveonfly\" %.tex
Tools\Commands\pre-compile=
Tools\Commands\ps-chain=txs:///latex | txs:///dvips | txs:///view-ps
Tools\Commands\ps2pdf=ps2pdf %.ps
Tools\Commands\quick=txs:///compile | txs:///view
Tools\Commands\recompile-bibliography=txs:///compile | txs:///bibliography | txs:///compile
New contributor
Jake Denham-Dyson is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
sed -i 's:pdflatex -synctex=1 -interaction=nonstopmode %.tex:Tools\Commands\pdflatex=\"/bin/texliveonfly\" %.tex:' test.ini
New contributor
Jake Denham-Dyson is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

Jake Denham-Dyson is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.