The tag has no usage guidance.

learn more… | top users | synonyms

2
votes
1answer
27 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
1answer
32 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
2answers
67 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
2answers
35 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{} ...
3
votes
1answer
50 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
1answer
31 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 ...
0
votes
0answers
38 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 ...
0
votes
0answers
24 views

Code for generating assignments with questions, sub questions and sub-subquestions

I wish to generate a question paper for an assignment, to be given to the students. Apart from the usual notes about the assignment, I wish to have question numbering, along with sub-questions and ...
2
votes
1answer
100 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
0answers
74 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
0answers
65 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
1answer
68 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
0answers
33 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 ...
7
votes
1answer
125 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} ...
0
votes
0answers
32 views

Custom code is overwriting some of the main code. Formatting problem

I am creating a document that requires some editing in the the normal ShareLaTeX format. I've googled my problem and the code seems to do the job: ...
1
vote
0answers
828 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 ...
2
votes
1answer
100 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 ...
4
votes
4answers
238 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 ...
3
votes
1answer
138 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/...} ...
11
votes
3answers
358 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
1answer
64 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: ...
4
votes
2answers
101 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
0answers
28 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
0answers
276 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
1answer
171 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 % ...
1
vote
0answers
26 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 ...
10
votes
2answers
615 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
1answer
138 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 ...
8
votes
3answers
329 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
1answer
220 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 ...
2
votes
2answers
636 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} ...
9
votes
1answer
295 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 ...
3
votes
1answer
154 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 ...
2
votes
1answer
202 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
1answer
166 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 ...
4
votes
1answer
469 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 ...
10
votes
4answers
1k views

\if(username == foo) … \else .. \fi?

I think the pseudo code in the title says it all: How can TeX (or LaTeX) find out the $USER who is running pdflatex? I'm collaborating want the output to look very slightly different when I run latex ...
2
votes
0answers
194 views

Generating pdf files that are “viewing-time” or current system-time dependent [closed]

The \FpEval{}{} function which can be used to do computations, and store the result in a variable, in latex. For details, kindly see How can I sum two values and store the result in other variable? . ...
19
votes
1answer
9k views

Definition of the TEXINPUTS variable

I am using TeX Live 2012/Debian on Linux Mint 14. I am wondering what the right definition of the TEXINPUTS variable is.
1
vote
1answer
836 views

Setting TEXINPUTS for pdflatex in Ubuntu

I have a set of files that are commonly used as inputs in my tex files, so I put them in a directory and set the path in the TEXINPUTS environment variable (in Ubuntu). This works fine when compiling ...
11
votes
2answers
5k views

$TEXMFHOME setting

I use texlive 2012 on ubuntu 12.04. I wanted my ~/texmf folder invisible, so I edited my texmf.cnf file which is in /usr/local/texlive/2012 directory: TEXMFHOME = ~/.texmf I rebooted my computer ...
26
votes
2answers
5k views

Can I access system/environment variables from LaTeX? For instance, $HOME

For instance, I want to include a figure: ~/figures/figure.pdf. On my Linux box, this is /home/me/figures/figure.pdf, but on OS X it is /Users/me/figures/figure.pdf. I'd like it if there is an ...
5
votes
3answers
9k views

Set the default path to images directory

I have a project written in LaTeX, that has many pictures (about 1000) which I have divided into 4 folders: letter, legal, booklt and screen for different purposes. I have a folder called "images" ...
11
votes
2answers
1k views

How can I keep a clean document folder with custom .cls, .sty, .bst files in a separate subfolder?

I am using a Makefile for generating a document from its tex source. The whole project consisting of own input files (.tex,.bib,.eps, ...) and non-pre-installed static input files (cls, sty, bst) is ...
3
votes
1answer
2k views

Setting TEXMFHOME variable when using Miktex portable

Apparently Miktex sometimes doesn't properly set the TEXMFHOME variable, or rather leaves it empty, even though you manually add folders to the "root" list and refresh the file name database. So how ...
0
votes
0answers
310 views

Kile and Ubuntu 11.10 AND RevTeX [duplicate]

Possible Duplicate: How can I manually install a LaTeX package (Debian/Ubuntu Linux)? I just downloaded RevTeX for a PRL paper that I propose to write. However, after unzipping the contents ...
5
votes
1answer
1k views

Placing temporary files outside of dropbox for compilation: issues with openout_any and nomenclature

So I store my TeX source files in dropbox for backup and synchronization. Of course, it's annoying when you compile to have dropbox upload and download the changes to the temporary files, so you want ...
16
votes
2answers
3k views

Directory name as a variable

Is it possible to use the directory where the current tex-file is in as variable? For example, suppose I am in the directory /path/to/foo/ and compile there the document bar.tex (absolute path is ...
9
votes
3answers
1k views

Pass variable from LaTeX to bibtex (for easy anonymization)?

I typically use a variable for my name in .bib bibliography entries, for instance: @String {myname = "Prof. Dr. Hortensia Audactor"} String {myname = "Anonymized" } @article{audactor2005pflanzen, ...
3
votes
1answer
1k views

Using TexMaker on OS X

I've started using TexMaker as an alternative to emacs (I work on both ubuntu and mac and I want to have the same programs on both) for typesetting LaTeX. TexMaker is easy to use but there is one ...