Questions tagged [environment-variables]
Environment variables like TEXINPUTS, TEXCONFIG, BSTINPUTS direct the working of tex and related commands, mostly by specifying where to look for packages, styles, etc.
114
questions
1
vote
0
answers
367
views
Variables for LaTeX in Lyx?
I created a table in LaTeX in the Premables.
Original code below, Premables without the code, and a PDF output of it -
I put placeholders (just text) for different kinds of text that I want to put in ...
2
votes
0
answers
179
views
Problem with many tikz picture for every rendering
I have many tikz picture in my text, and for every rendering of LATEX, I waste hours to external pdf is produced. If there is a way to define samples=100 as a variable, (like var1:=100 in programming) ...
2
votes
2
answers
298
views
How to give a name to a subdocument
I am generating reports, like this...
\clearpage
\section{Gold and SPY}
\noindent
\begin{minipage}{0.60\textwidth}
\centering
\includegraphics[width=1.0\textwidth]{graphs/goldport.pdf}
\end{...
2
votes
2
answers
864
views
How to escape a list of underscored filenames efficiently?
I am thinking how to read a CSV file which has filenames which have underscores efficiently into a LaTeX variable.
I think reading the raw variables into a variable by input and then manipulating ...
2
votes
1
answer
366
views
Is there some ${HOME}/.texrc or ${HOME}/.latexrc config file that will be read by latex, bibtex, etc
I find myself copying the same export TEXINPUTS=fubar:$TEXINPUTS lines for different applications that don't all read the same environment configurations files, e.g. xterm vs. Emacs's compilation-mode....
3
votes
0
answers
789
views
TEXINPUTS equivalent for inputminted to make relative paths work?
A while ago I griped about LaTeX not supporting relative paths by default. It turns out I can export the TEXINPUTS=/path/to/source environment variable to make \input{foo} look in /path/to/source/foo.
...
1
vote
2
answers
1k
views
Accessing a possibly undefined system environment variable from LaTeX (followup question)
This question is a followup to this thread in which @egreg provided a command \getenv to access a system environment variable. In response to my comment, he suggested a way to expand his script so ...
1
vote
1
answer
546
views
Using a system environmental variable in href for a pdf document
Is there a way to use a windows environmental variable in \href that uses this environment variable in the output PDF document?
When I use
\href{run:\%foo\%\\bar.cpp}{bar.cpp}
The PDF Reader I use ...
1
vote
1
answer
119
views
TexLive on Mac - commands return no results or errors
You'll have to excuse me being new to TeX, but on my Mac, typing any TeX command (after installing TeXLive 2016 from the DVD) produces no result and doesn't even show an error, which makes me think ...
0
votes
0
answers
244
views
Have document's \parskip in minipage [duplicate]
I embed an illustration of variables next to the paragraph describing them:
\noindent\begin{minipage}{.48\textwidth}
\indent Lorem ipsum
\end{minipage}
\hfill
\begin{tikzpicture}
…
\end{...
2
votes
1
answer
311
views
If and how can I add a variable and use it in commands?
How do I define a variable that can be used in commands? If it is even possible?
I want to assign a length to a variable and use it in \addvspace, like:
\newcommand{\xxx}{1em}
\addvspace{\xxx}
Or:
...
4
votes
0
answers
213
views
Does this kind of thing exist in the LaTeX habitat? Or is metaprogramming in order? [closed]
You know how matrices have coordinates like this:
Is there any way that I can import a .csv and then have automatically produced variables like \a11 and \a12, etc.
Of course, unless there is an ...
3
votes
1
answer
248
views
Anonymous listings environment
I would like to be able to switch off the listings counter individually with asterisk (*), like one would suppress an equation number using
\begin{equation*}...\end{equation*}
As with the equation ...
23
votes
2
answers
10k
views
How to read a Variable from a file in LATEX?
How to read a variable from a file, lets say textfile var.txt that contains the following:
foo = 10
bar = 20
Now I am looking for a command \missingcommand that scans the file and it can be used in ...
2
votes
3
answers
762
views
Filling in colors in frame macros
I am hoping the answer to this question is a simple, so apologies for my ignorance.
Based on posts here, I was finally able to make the frame appear the exact way I wanted it to. I made the following ...
2
votes
1
answer
110
views
Assign each drawing (line,path,etc.) as elements of a vector, so it can be recalled, used, and edited in looping
I want to know how to set drawing elements as variables(elements of a vector/array) so that it can be recalled and modified (in each loop). For example i have a line (\draw (start) -- (end)) and want ...
2
votes
1
answer
107
views
Modifying command globally from within command
I've seen a couple of somewhat similar questions, but none with similar construct or -- I'll be honest -- none with answers I've been able to understand well enough to adapt to my situation.
The ...
1
vote
1
answer
774
views
How to install ttf fonts on xelatex + BSD for www user?
I have a web application that runs on apache tomcat. The user for the process is "www". The home directory of this user is "/nonexistent" and I do not want to change that. (It is set to a nonexistent ...
3
votes
2
answers
190
views
How to implement a verbatim or null environment using a boolean within \newcommand
I am trying to use a boolean environment within a \newcommand statement to selectively implement a verbatim environment. When I set the boolean to true it should put the "Answer" within the verbatim ...
4
votes
2
answers
128
views
How to have 2 arrays of variables in one document
I've used an example from
Create an array of variables
By adding a new \newcommand as in the code below:
\documentclass{article}
\usepackage{etoolbox}
\newcounter{cnt}
\newcommand\textlist{}
\...
2
votes
1
answer
434
views
Newcommand with PythonTex
I want to realize pytontex \pyc as newcommand so that I can use it in a generic way.
When I use the newcommand I just get some strange "i" (I use it for enumerating the spec variable) and no output ...
2
votes
1
answer
95
views
Switching between wrapfigure and figure environments
I'm trying to realise switching between wrapfigure and figure environments, using boolean control. But for some reason wrapfigure does not do what it should do - be wrapped, instead it is placed in ...
1
vote
2
answers
2k
views
Use variables/properties in class file
I have a class resume which I use in a .tex file as
\documentclass{resume}
\begin{document}
\end{document}
but I also want to define some variables in my .tex document to be used in my class.
How ...
2
votes
1
answer
642
views
Indexing issues with 2D arrays
I have a tikz code using values stored in a 1D array, here is a MWE :
\documentclass{standalone}
\usepackage{tikz}
\def \myArray {{0,1,2,3}}
\begin{document}
\begin{tikzpicture}
\...
1
vote
1
answer
844
views
How to add more sty and cls locally?
Please be warned, despite this sounding very similar to Where do I place my own .sty or .cls files, to make them available to all my .tex files? it is a different problem.
I need to generate PDF as ...
1
vote
0
answers
320
views
How to strike out over an environment and formulas and using local variables in latex?
While I am revising my papers, for the sake of easier tracking and saving the time of the reviewers, and hence shortening the review process (I hope!), I use the following commands
\usepackage{ulem}
\...
4
votes
1
answer
135
views
How to condense environments and options to one environment?
In order to make grey boxes around code in my document I am using:
\usepackage{listings}
\usepackage{xcolor} %custom colours
\usepackage{mdframed} %nice frames
\definecolor{light-gray}{gray}{0.95} %...
1
vote
0
answers
121
views
Flexible space above and below an environment [closed]
I have used the amsthm package to define a new environment as follows:
\newtheoremstyle{examplestyle} % name of the style
{10pt} % space above
{10pt} % space below
{\normalfont} % font of body
...
6
votes
1
answer
651
views
LaTeX -- how to read current value of color?
I want to save the current text colour, then change it, then change back to the original. I was thinking of doing something like:
\def\oldcolor{old colour here} % save colour
\color{red} ...
1
vote
0
answers
6k
views
How to set PATH variable in portable miktex to be used with texmaker
When I perform ps->pdf or XeLaTeX I get error
'mgs.exe' is not recognized as an internal or external command, operable program or batch file.
The solution for this is to add ...\miktexport\miktex\...
2
votes
1
answer
454
views
How can I get a count of the optional arguments with xparse?
Question
Is it possible to get and store a count of the optional arguments actually passed to an xparse declare argument/environment?
Purpose
Regardless of the number of arguments provided (...
3
votes
4
answers
714
views
How can I typeset an environment and its literal equivalent in an environment?
This is a follow-up to the question: How can I typeset a command and its literal equivalent in an environment?
It would obviously be useful to handle environments too. I imagine something like the ...
11
votes
1
answer
6k
views
Can I define a variable to scale with it several figures?
I have several pictures in my document, using the subfigure environment, the code is the following:
\begin{subfigure}[b]{0.22\textwidth}
\includegraphics[width=\textwidth]{pictures/...}
\end{...
13
votes
3
answers
2k
views
How can I typeset a command and its literal equivalent in an environment?
UPDATE: I've opened a follow-up question: How can I typeset an environment and its literal equivalent in an environment?
I would like to pass a command and arguments to an environment. The output ...
1
vote
1
answer
147
views
Access specific glossary fields without triggering first usage
I would like to know if any of the fields that are manually configured during the creation of glossary entries can be accessed manually/deliberately in a macro or newcommand - possibly of the form:
\...
3
votes
2
answers
130
views
Is it posssible to embed list items `\item` in `NewEnviron` environments?
Question
Is it possible to keep the \item commands in the body and wrap the itemize list environment with \NewEnviron from the environ package? I am also trying to wrap the list inside a TikZ node, ...
1
vote
0
answers
54
views
No local package in tlmgr while I can compile in winedt in windows
Last week, I change my user name. Then things happen. And I add environment path
C:\texlive\2014\bin\win32;
But still cannot find any local information in tlmgr. How can I solve this problem
1
vote
0
answers
743
views
TeXworks doesn't recognize environment variables (Linux Mint 17 KDE)
The bottom line is that TeXworks doesn't recognize my environment variables, but the command line compile commands (pdflatex and bibtex) do just fine.
I'm running Linux Mint 17 KDE, and I installed ...
3
votes
1
answer
1k
views
Use the counter value as an argument
Do you know a simple way to use the current counter value to call the argument in a macro?
In myPackage I have this
Note: I have the for loop defined as
% \forloop[step]{counter}{initial_value}{...
0
votes
0
answers
47
views
how to insert the name of the file in the text? [duplicate]
I´m making bigwork-096.tex
The source of that file is
\begin{document}
This source is very big.\\
The name of this file is **????????**
\end{document}
What I must type instead ?????? to obtain ...
12
votes
2
answers
3k
views
Defining a variable inside an environment, but use it outside
How can I use a variable beyond the environment where it has been set?
Following the MWE given below, how can I print the variable it both places (inside and outside the environment) ?
\...
3
votes
1
answer
2k
views
Possible to renew table counter?
Can I renew the table counter to use my own counter similarly to renewing, for instance, the \tablename? What is the keyword or where could I look for it?
This will be used within a newenvironment ...
9
votes
3
answers
2k
views
How to include a second file only if environment variable is set?
I have a LaTeX document which exists in two versions, a short version and the long version. The long version has an additional chapter inserted in the middle of the document. What I want to do, is if ...
2
votes
1
answer
457
views
-shell-escape for gnuplot: it does not works when I launch pdflatex programatically
The situation and the issue
When I launch pdflatex from another program, programatically, it seems that, even with the option -shell-escape, I am not able to launch gnuplot.
I have asked to ...
5
votes
2
answers
4k
views
Understanding the arguments in newtheorem e.g. \newtheorem{theorem}{Theorem}[section] [duplicate]
I would like to understand what the arguments following \newtheorem are e.g.:
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{...
9
votes
1
answer
735
views
Suggestions for an automatic taxonomy environment
Background
In this site there are excellent examples of
How to draw up a hierarchical tree diagram for taxonomic classification of several groups but often you must show only the position of a ...
2
votes
1
answer
292
views
Outline font installation in self-contained tree
I'd like to achieve the following: a user should be able to grab a copy of a given directory, place that anywhere in his home directory, and run make to build LaTeX documents in that tree without ...
1
vote
1
answer
1k
views
Custom topmatter variable
In a simple documentclass for homework assignments, how should I go about specifying a few attributes in addition to title and author in the topmatter?
\begin{document}
\acadclass{Linear Algebra}
\...
4
votes
1
answer
478
views
Environment variable TEXEDIT doesn't work with LuaLaTeX (?)
I like the ability to press e when running pdflatex in errorstopmode to jump directly to the line where the error occurs in my favourite editor.
This works fine for pdflatex and xelatex as long as ...
3
votes
1
answer
1k
views
MikTeX does not use TEXMFLOCAL environment variable
I use TEXMFLOCAL, TEXINPUTS and TEXFONTMAPS to tune tex compilation. Everything works fine under Linux and Mac OS X, but MitTeX under Windows breaks my expectations.
c:\tmp\tex> type test.bat
set ...