Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
0 votes
0 answers
38 views

Visual Studio Code: Latex workshop recipe - rename generated pdf from underline to spaces with command substitution

For compatibility latex files shouldn't have spaces, so their generated files doesn't as well. How can I create a recipe for renaming the generated pdf file substituting _ for ? In a terminal window ...
user avatar
  • 69
2 votes
1 answer
60 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 ...
user avatar
  • 28.7k
0 votes
1 answer
38 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 ...
user avatar
  • 1,471
3 votes
1 answer
55 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{...
user avatar
1 vote
1 answer
41 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 ...
user avatar
7 votes
1 answer
255 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}}$}}% \...
user avatar
0 votes
0 answers
141 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 ...
user avatar
  • 1
5 votes
1 answer
136 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 ...
user avatar
  • 153
1 vote
0 answers
45 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 ...
user avatar
0 votes
0 answers
362 views

I can't find the format file `XeLaTeX.fmt'! when compiling with bash script

Im very new to tex and I am using it to help me with my cover letter. I installed MacTex and I've been using the TexShop editor. I have found that I like the XeLaTeX the best so I've been using that. ...
user avatar
0 votes
0 answers
61 views

Why is listings not coloring the comments properly in the middle of the bash script?

I have created a minimal example to illustrate the behavior. I have a bash code using sed. I want to use multiple substitutions using sed, placing each in a different line, so that I may add a comment ...
user avatar
  • 656
0 votes
1 answer
165 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
4 votes
1 answer
84 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 ....
user avatar
0 votes
0 answers
33 views

Replace text and special character in linux

How to replace <u>Some texts need to be underlined</u> by \underline{Some texts need to be underlined} in linux by "sed" or any other means?
user avatar
0 votes
1 answer
68 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 ...
user avatar
2 votes
1 answer
71 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 ...
user avatar
0 votes
0 answers
112 views

Bash file to compile multiple documents using different variables from CSV in separate folders?

There is probably a better way to do this, but this is my MWE attempt and I cannot get it to work. I want to compile multiple form letters from a .csv file like below: company, dept World of ...
user avatar
-1 votes
1 answer
122 views

Unable to use pdftex-quiet package

I'm trying to use the pdftex-quiet package from the command line. It is correctly installed also and comes with TexLive 2019. But I am not able to use it and get the error message 'pdftex-quiet' is ...
user avatar
  • 249
3 votes
1 answer
443 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 ...
user avatar
  • 8,029
2 votes
2 answers
60 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 ...
user avatar
  • 121
0 votes
0 answers
324 views

LaTeX does not find the command although PATH is specified

LaTeX fails to pass the command to bash even though PATH is specified. For example, I am trying to invoke texcount, which is in directory /Library/TeX/textbin. When I check echo $PATH, the output I ...
user avatar
  • 81
1 vote
2 answers
260 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
3 votes
0 answers
676 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
0 votes
0 answers
274 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 ...
user avatar
2 votes
1 answer
264 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 ...
user avatar
5 votes
0 answers
1k 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 ...
user avatar
  • 49
2 votes
1 answer
588 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 ...
user avatar
0 votes
1 answer
377 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'...
user avatar
  • 288
0 votes
0 answers
61 views

Bash Syntax Hightlighting in a Tex File

I've got the question if there is a possibility to auto-highlight Bash syntax in a compiled Tex File. Is there a package that has a function to accomplish that? Thanks in advance, ADDB.
user avatar
  • 101
0 votes
1 answer
103 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 ...
user avatar
0 votes
1 answer
2k views

Listings: Correct syntax highlighting for bash // Use minted package with a box

Since I can't use the listings packet to display my bash script (because of the wrong syntax highlighting by using i.e. language=bash) I have to use the minted package. So I have two questions: Does ...
user avatar
1 vote
1 answer
161 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 '$', ...
user avatar
1 vote
1 answer
194 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 ...
user avatar
1 vote
3 answers
2k 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. ...
user avatar
6 votes
3 answers
1k 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 ...
user avatar
  • 499
1 vote
0 answers
67 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, ...
user avatar
  • 21
2 votes
2 answers
1k 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....
user avatar
  • 3,703
2 votes
1 answer
210 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 ...
user avatar
  • 21
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 ...
user avatar
2 votes
0 answers
699 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 ...
user avatar
  • 367
1 vote
1 answer
76 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 ...
user avatar
2 votes
1 answer
83 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 ? ...
user avatar
  • 35
6 votes
1 answer
712 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.
user avatar
  • 27.8k
3 votes
1 answer
1k 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} \...
user avatar
3 votes
1 answer
506 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 ...
user avatar
7 votes
1 answer
814 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=...
user avatar
3 votes
3 answers
119 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 ...
user avatar
3 votes
1 answer
715 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....
user avatar
  • 131
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 ...
user avatar
  • 115
1 vote
1 answer
575 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 ...
user avatar