Questions tagged [bash]

{bash} is used for everything that concerns bash commands and LaTeX like using the package {bashful}.

Filter by
Sorted by
Tagged with
8 votes
1 answer
887 views

Latexdiff support for Lyx

As a regular LyX-user i'd love to know if there exists some back-end to latexdiff available for Lyx. Currently i'm using the following bash commands to get what I want. new=MyFileName old=...
Mikael Fremling's user avatar
7 votes
1 answer
265 views

Inconsistent behaviour of \detokenize on macro beginning with "e" or "f"

I need to write to a file the unexpanded LaTeX. The macro \OuputToFile is bascially an \immediate\write18 and works fine with the following: \OuputToFile{\detokenize{$\OuterMacro{\cXXX{X}}$}}% \...
Peter Grill's user avatar
7 votes
1 answer
2k views

How can I make bash-code look good both in LaTeX and HTML?

As I am new to Latex and this kind of typing in general, I find myself in need of some basic guidelines when it comes to how to make things look good in text. I have a document that looks good when ...
Rikardny's user avatar
  • 225
7 votes
0 answers
2k views

Formatting bash with listings

I writing a documentation in LaTeX about Linux Bash resp. Shell script. And I'm having some problems: How can I start a formatting at the beginning of a line? How can I format between two signs, but ...
Hur'q's user avatar
  • 71
6 votes
3 answers
2k views

backward quote in listings

I'm typesetting a document with examples of bash code. How do I make the code like `pwd -P` appear with the same kind of quotes? I want the readers of the document to be able to copy and paste the ...
SU3's user avatar
  • 519
6 votes
1 answer
979 views

Post compile hook latexmk

Is there something like a "post compile hook" for latexmk. I want to configure latexmk to run some scripts automatically after a compilation process is completed.
student's user avatar
  • 29k
6 votes
1 answer
969 views

How to run a command before compiling (hook script) in latexmk?

I use latexmk to compile a project. It should run some bash commands before starting to compile. I tried to add $compiling_cmd="date >> /tmp/compiled.log"; to the local .latexmkrc file. But ...
Jonas Stein's user avatar
  • 8,909
5 votes
1 answer
641 views

Problem in using comment line in tcolorbox in a bash code

I am recently introduced to tcolorbox, which is a great package. I am trying to use it to highlight computer codes such as bash, python, and c++ in my document. When I run the following MWE, I get the ...
shashashamti2008's user avatar
5 votes
1 answer
445 views

TeXstudio; 'could not start the command' for custom command running bash script

Edit: solved. Solution: RTFM. I.e. as Schoekling suggested, the manual states: "Each user command has a name with a pattern :, e.g. user0:User Command 0. The command id has to be unique and must ...
jrbergen's user avatar
  • 153
4 votes
1 answer
108 views

vim-t line split not working

I'm using context on my mac machine. I'm trying to wrap lines automatically using lines=split when defining vim typing, but it's not working. This is how I define vim typing at the very top of my ....
tulelolo's user avatar
3 votes
1 answer
623 views

Bash script as part of package: how to make LaTeX find it

I'm working on some experimental package that requires LaTeX to execute a Bash script. I'm aware of -shell-escape, etc., and it does work if I simply put the script next to the LaTeX file I'm ...
Michael Palmer's user avatar
3 votes
2 answers
318 views

bashrc export TEXEDIT emacs

If PDFLaTeX fails to compile with See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. I want to press e to get an instance of Emacs. The cursor should be on ...
Jonas Stein's user avatar
  • 8,909
3 votes
1 answer
2k views

Is it possible to have two separate listings?

I have defined two listings environments, one for Python and other for Bash, both have different settings, this is a minimal example of what i'm using: \documentclass[a4paper,12pt]{article} \...
Ettore Zugliani's user avatar
3 votes
1 answer
569 views

listings package: last whitespace removed before the newline character. How to keep it?

I've some sort of template/examples of bash scripts on my computer (.sh files on my hd) in which I put commands and commented outputs. This is my example.sh file: echo this is wide ...
the_eraser's user avatar
3 votes
1 answer
2k views

How to prevent line breaks in code listings?

I am adding a big Linux terminal output as a listing and would like to prevent these line breaks from happening: e.g. user@pc ~ $ top PID USER PR NI VIRT RES SHR S %CPU %MEM ...
RootRaven's user avatar
  • 249
3 votes
3 answers
124 views

Is it possible to place compiler tags in the latex document such that one .tex document can produce two different documents sharing similar content?

I'm writing a document and I need two versions. Version one gives the outline and details of the project. It gives a method overview, data, results and conclusion etc. The methods are very ...
user2350366's user avatar
3 votes
1 answer
809 views

Error using package bashful

Even in the simplest MWE executed on a linux distribution, the command latex -shell-escape test.tex returns me the error message: Use of \bashIII doesn't match its definition. MWE: \documentclass{...
strpeter's user avatar
  • 5,235
3 votes
1 answer
148 views

Use \immediate\write18 with Single Quote

I would like to use \immediate\write18 (encoded in the \OuputToFileA macro) to output a string containing a single quote. If I replace the single quote with another character, such as X \StrSubstitute{...
Peter Grill's user avatar
3 votes
1 answer
798 views

Latex markup removal script (delcmdchanges.bash) not working [duplicate]

I have used changes package in my latex source code. To accept changes I can use final in tex file in order to remove tags in the output (PDF). If I need to remove markup in latex source,delcmdchanges....
Learning's user avatar
  • 131
3 votes
0 answers
984 views

Syntax highlighting of (Cisco) terminal

I want to highlight a complete terminal flow, mostly for the Cisco CLI, but Bash would be nice, too. As for now, the result achieved with the package lstlisting looks as follows: I achieved that with ...
user avatar
3 votes
0 answers
2k views

! LaTeX Error: File `luatex.def' not found [closed]

I've tried to make a bash script that uses pandoc in conjunction with LaTeX to convert my university notes from markdown to PDF. I initially copied the idea and script from someone of which I've ...
Alistair Hughes's user avatar
2 votes
2 answers
71 views

Is there a bash wrapper for tex output?

I am wondering if there is a bash tool available that I can pipe my latex output through and retrieve a more user-friendly output (i.e. file and line number of error). Currently, I am using a bash ...
Brian's user avatar
  • 121
2 votes
1 answer
309 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 ...
Peter Grill's user avatar
2 votes
2 answers
2k views

Removing all markup automatically changes package [closed]

I have looked around and found no answer to this question. I am using the changes package, and I need to remove all markup from the source file. There's this question about using the delcmdchanges....
Elad Den's user avatar
  • 3,941
2 votes
1 answer
86 views

Have MetaFont read an arithmetic expression from a file

I know this is a question that possibly does not belong to pure TeX, as MetaFont is part of a project to which TeX relates, ie as part of building TeX. My question is as follows: I call MetaFont from ...
Yaacov NNNNM's user avatar
2 votes
1 answer
294 views

Execute lualatex within bash script placed inside cgi-bin [closed]

have a cgi-script which generates a *.tex file based on inputs from the browser. i would like to generate a pdf and download it. however the command doesnt execute and i get a fail message if ...
Hemant's user avatar
  • 21
2 votes
1 answer
96 views

Metapost : bypass errors mpost multi fig

I'm working on a multi fig Metapost file. I'm wondering if it is possible to bypass the error message during running mpost and correctly export the other fig if there is a error in one of them ? ...
grrr's user avatar
  • 35
2 votes
1 answer
153 views

mylatex.ltx and a file name with an umlaut and / or spaces

I'm producing lots of documents by using a template engine (jinja2), a python script (courtesy of a helpful soul) and a template, which is a tex file. Compiling 50 documents takes some minutes and ...
Keks Dose's user avatar
  • 31k
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 ...
Peter Grill's user avatar
2 votes
0 answers
963 views

Can I Use LaTeX to Convert UK to US Spellings? [closed]

I have written a paper using LaTeX. My supervisor wishes to use US English for our paper to submit to an American journal. However, I'm based in New Zealand and have written the entire paper in LaTeX ...
Tom Kelly's user avatar
  • 417
1 vote
3 answers
4k views

pandoc does not recognize Chinese characters

I want to compile, with pandoc, a Markdown document containing CJK elements (Chinese, actually). It was stated there that --latex-engine=xelatex option allows pandoc to compile Unicode characters. ...
Violapterin's user avatar
1 vote
1 answer
574 views

LaTeX/XeLaTeX runs fine with TeXShop but not with bash

I always used TeXShop in the Mac for the last 7 years but now I need to run the compilation remotely. If I run in the terminal (bash shell): XeLaTeX file.tex I get kpathsea: Running mktexfmt XeLaTeX....
Sergio Parreiras's user avatar
1 vote
2 answers
350 views

How to automatically write bold commands in a bash script in Latex using listings [duplicate]

I wanna include a bash script in a black box in a pdf using latex. I achieved everything I want, except bold commands in the script using the following code: \documentclass[11pt,a4paper,DIV=15]{...
user avatar
1 vote
1 answer
178 views

Newline in lstset

I use lstset to print my code. My problem is, that my code is too long for one page, so it gets cut off. But i want just new pages instead of this cutting. I tried escapechar with the parameter '$', ...
idontknowwhoiamgodhelpme's user avatar
1 vote
1 answer
45 views

Using \immediate\write18 when lineno package yields spurious text

I am getting spurious text in the output of \immediate\write18 when the lineno package is used. The MWE below yields the following in the file foo.tex: If one comments out the line that includes ...
Peter Grill's user avatar
1 vote
1 answer
668 views

Problem in PS2PDF file size

I am using gnuplot to plot an input file. I pass this file to gnuplot from a bash script and the output is .ps. Then I convert it to pdf in my bash script, but the pdf cuts the rest of the plot off. I ...
yasmin1234's user avatar
1 vote
0 answers
79 views

Using a bash script to compile, then Image in same directory not found. Mac OS 10.15.7, pdfLateX (texlive), function \includegraphics{image}

As the title suggests, I am putting an image into my pdf document using the \includegraphics command. It works, and puts my output main.pdf in the same directory as expected. Here's where my question ...
KleinerWarden's user avatar
1 vote
1 answer
559 views

Using listings, copy bash command in 1 line

Im trying to insert in my PDF some long bash commands like this one: I like how it looks but, when trying to copy, it splits the command into 3 lines, which obviously is not how I would like it to ...
user avatar
1 vote
0 answers
75 views

New LaTeX compiled book on Linux System Administration [closed]

I just uploaded the first draft of a new book that I wrote on Linux System Administration. The source .tex documents and resources are available on my GitHub project site: LSA. This is a project site, ...
mgd's user avatar
  • 21
1 vote
1 answer
86 views

pdflatex/lualatex called from shutdown script can not find installed packages

At work I have set up a little backup script on my Ubuntu 14.04.1 machine. The script backs up my machine to an external hard drive. After this is done it copies a LaTeX project to my Dropbox and ...
David Wright's user avatar
1 vote
0 answers
45 views

how to change default editor for latex when compiling in the bash? [duplicate]

When you compile a latex file in bash (e.g., via a makefile), if latex encounters an error it stops for you to enter a command, for example R to continue running or Q to run quietly. Entering E calls ...
SKV's user avatar
  • 43
0 votes
2 answers
642 views

How to highlight variables in a \path?

Is there a way to highlight variables within a \path? For example in \path{$HOME/some/thing.txt} to highlight the $HOME part as Bash variable? Or do I have to use a listing environment for this?
musicmatze's user avatar
0 votes
1 answer
143 views

Minted: Different 'firstnumbers' for each code piece

I use minted to view my bash script. But i have to split my code into 4 pieces. My problem is, that every code piece begins now with the number 1. i.e. i want, that piece 1 is from number 1 till ...
idontknowwhoiamgodhelpme's user avatar
0 votes
1 answer
84 views

tllocalmgr reports "command install is not defined". What does it mean?

When I run the command $ tllocalmgr install nicecolors Initializing ... Error: command install is not defined Why does tllocalmgr report that the command install is not defined? The syntax is clearly ...
user202729's user avatar
  • 7,183
0 votes
1 answer
88 views

How to create individual PDFs from included TeX-files in subfolders?

I have a question that is very similar to the one described here: How to create individual chapter PDFs from included TeXs? I want to create individual PDF-files (chap01.pdf, chap02.pdf, ...) from ...
analoguelight's user avatar
0 votes
1 answer
552 views

LstListing keeps adding whitespaces when a - is used

So I want to have some nice listings for a manual I'm writing. The instructions should be copied to the ubuntu terminal in which a bunch of them can be ran after each other. I fixed that, but now I'...
Foitn's user avatar
  • 298
0 votes
1 answer
214 views

mac os double-click command to execute pdflate can't find local style file

I am writing a mac os double-click bash command file X.command to execute a sequence of pdflatex-ing of various LaTeX files. In the directory containing the files there is an included style file ...
Don Kreher's user avatar
0 votes
0 answers
50 views

unknown issue with tcolorbox bash code

Hi there I've been recently, thanks to the help received in this post, updated all my code blocks to a much nicer and neat view using tcolorbox. Unfortunately, for some reason, two of them show the ...
Matteo's user avatar
  • 163
0 votes
0 answers
36 views

Link on pdf triggers .sh/.py/.bat

I have been looking for a while for a solution in LaTex. My intention is to create a link inside a PDF generated with LaTex that triggers a .sh/.py/.bat by clicking in the link. Not like \write18, ...
picgon's user avatar
  • 1
0 votes
0 answers
727 views

Compiling .tex file and generating pdf using a bash script in Windows

I am trying to compile & generate pdf from a .tex file using a bash script to automate the process. I need to use bash script as there are a large number of .tex files to be handled. I am using ...
akv's user avatar
  • 1