{environments} is for general questions related to (La)TeX environments. For questions about environment subcategories like {lists}, {quoting} environments, or {floats} use the appropriate tag instead.

learn more… | top users | synonyms (3)

5
votes
0answers
72 views

How to tell LaTeX to throw a warning if argument is not being used?

In this question the given argument wasn't used, because #1 was missing.. One would actually assume an error or a warning be thrown. A little MWE based on 1: \documentclass{article} \usepackage{...
5
votes
0answers
96 views

Using cprotect and environments with multiple arguments

Is there a way to use the cprotect package's \cprotEnv command to use verbatim inside environments that have optional or multiple arguments? My motivation for this question: I am working with ...
4
votes
0answers
85 views

Checking environment in order to end it

I used to typeset verse with memoir package using some heavy \vspace trickery. The verse environment was too hard to control in terms of vertical space due to the immense amount of obscure glue. For ...
4
votes
0answers
450 views

\tikzexternalize causing problems with template

I have a large document (I'm using pdflatex with Eclispe and TeXlipse) with many (many) TikZ graphics (most of them math function plots). Hoping to reduce compilation time drastically, I read about ...
4
votes
0answers
124 views

Indentation of Lists in Environments

Based on the answer of Markus Scharrer, I am using the custom lstnewenvironment to get code and Section with my environment. Since I use an environment in an environment (I know it may not be the best ...
3
votes
0answers
98 views

Rewriting a command using xparse for common code

I'm trying to write the documentation for script which I am working on using the packageltxdoc and docstrip. I have defined several commands using the package xparse and I would like to define a new ...
3
votes
0answers
47 views

Selective display of an object

I want to write an exercise sheet for students. I would like to gather the questions, the hints, and the proofs at the same place in the .tex file. Then I want to display the questions, the hints and ...
3
votes
0answers
44 views

Extensions to the standard environment, what is out there?

\NewDocumentEnvironment from the xparse package allows accessing environment arguments also in the code that is supposed to go after the content. environ and newenviron allow referring to the ...
3
votes
0answers
61 views

wrap around task environment not working

I am trying to create an environment wrapping a task environment (from the tasks package). To build the new environment I am using the xparse package. \documentclass{article} \usepackage{xparse} \...
3
votes
0answers
111 views

Using catcode in conjunction with lstnewenvironment and lstinputlisting

(This is related to Injecting text contained in file into custom environment, but I was asked to put this in a separate post) From regular expression in listings the following code works fine : \...
2
votes
0answers
27 views

Accumulate contents of an environment

I'd like to extract and duplicate the contents of several rather arbitrary environments and repeat them at the end of my document. The extract package doesn't work for me because the environment ...
2
votes
0answers
94 views

using block environment for arabic/persian Beamer and right alignment

I have a problem with block environment in Beamer. I am using persian/arabic language. For the block environment, I want the title of the block and the text inside the block be aligned on the right ...
2
votes
0answers
47 views

How do I make unruled footnotes within an environment?

I have a single environment, fancyfoot, in which I would like footnotes to have no rules. \documentclass{memoir} \usepackage{lipsum} \newenvironment{fancyfoot}{ \renewcommand{\footnoterule}{} }{...
2
votes
0answers
49 views

Can the hygiene problem of environ and newenviron be eliminated completely?

The packages environ and newenviron both provide an alternative to the standard environment macros included with LaTeX. The main difference is that they make it possible to refer to the environment ...
2
votes
0answers
244 views

Use dollar sign in verbatim environment within auctex

I am using something similar to the following, \documentclass{article} \usepackage{listings} \lstnewenvironment{shellsession}[1][] {\lstset{language=bash basicstyle=\small\ttfamily, numbers=...
2
votes
0answers
53 views

Two columns in alltt environment

How do I make two columns in an alltt environment?? \begin{alltt} \hlkwd{options}\hlstd{(}\hlkwc{BingMapsKey} \hlstd{=} \hlstr{"clave de acceso de Bing"}\hlstd{)} \hlcom{## código para Bing} \hlkwa{...
2
votes
0answers
109 views

Defining a screenplay dialog environment for breaking across pages

Edit: consider this a followup to the answer here http://tex.stackexchange.com/a/63847/64528 I'm trying to create a LaTeX/XeTeX template for screenwriting, specifically to output from an Emacs major ...
2
votes
0answers
53 views

Use of environ package with knitr

I'm working on a knitr document and trying to place knitr output inside of a new environment defined using the environ package. The example below illustrates the problem. With a traditional LaTeX ...
2
votes
0answers
127 views

Checking if first portion of an environment's content is empty

Motivation: I am working on a very personalized Exercise/Answer package for my colleagues. The exercise, exsheets, etc. packages don't do what I need. To accomplish this, I create an exercises ...
2
votes
0answers
298 views

Remove bibliography headings with multibib and tocbibind

I use multibib which creates two families of citation commands: pri and sec. I would like to get rid of bibliography headings for the \bibliographypri and \bibliographysec commands while keeping the ...
2
votes
0answers
271 views

Kile syntax highlighting: A single dollar sign in the preamble

I'm using Kile to edit my LaTeX documents. I define my own custom environment to hightlight LaTeX code named lstLaTeX with the following code: \documentclass[a4paper]{scrartcl} \usepackage[usenames,...
2
votes
0answers
65 views

can I use changes package to highlight added environments, say, itemize?

I am using changes package to track modifications to a LaTeX documents, but found simply wrapping \begin{itemize}\end{itemize} with \added command doesn't work. It works fine if I wrap the contents of ...
2
votes
0answers
183 views

Package “mdframed” creating arbitrary gaps in the border

I used to define a small environment with the package "mdframed". I've included the package in the following way: \usepackage[framemethod=tikz]{mdframed} This is how I've set up the environment: \...
1
vote
0answers
21 views

tcolorbox breakable in multicol environment

I would like to have my tcolorboxes with breakable inside my multicols environment. But they do not break. Also: \documentclass[a4paper, twocolumn]{article} Would not work for me, because for some ...
1
vote
0answers
44 views

Can I find out if I am in an environment?

Is there a way to know if I am in an (specific) environment or not? This MWE should clearify my question? \documentclass{scrartcl} \usepackage{xltxtra} \usepackage{polyglossia} \setdefaultlanguage[...
1
vote
0answers
16 views

LyX - Environments in XeTeX using Hebrew

Lately I've decided to try and use XeTeX instead of LaTeX when writing documents in LyX in Hebrew, as it was suggested to be more friendly towards different languages. More specifically, I can now use ...
1
vote
0answers
48 views

Environment for example with pstricks

How can do with pstricks the environment that appears in the image ?
1
vote
0answers
78 views

Terminate and Start and environment from within the environment

How can I terminate and resume an environment by another environment? This also seems to have broken the resume feature which was resolved in Define a List that is Always Resumed. The code \begin{...
1
vote
0answers
61 views

Italic environment

I'm composing a text, in which people will have access for some math questions, and their sequent solutions. Thing is, I want to put the whole question texts in italics, and \textit{} doesn't work on ...
1
vote
0answers
50 views

Is it possible to \newcommand any type of command?

I have been using \newcommand and \renewcommand for defining simple commands like the typical \newcommand{\R}{\mathbb{R}} But now I wonder if I can renew other types of commands. What I want to do ...
1
vote
0answers
27 views

Using self-defined fields in NewEnviron

I'd like to use a self-defined function inside a self-defined environment. I add an example showing, that the function work perfect outside the environment, but inside the environment myenv, it seems ...
1
vote
0answers
23 views

vim-latex: Environment mapping with arguments

Is it possible to use <F5> to enclose in an environment with arguments? For instance, if I type enumerate and then <F5>, I get the following \begin{enumerate} \item <cursor> \...
1
vote
0answers
34 views

Auto-create a list of conjectures from given documents

I have three mathematical documents. I want to auto-create fourth document, which should show all conjectures and problems from the first three documents. I mean that the following should be auto-...
1
vote
0answers
69 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} \...
1
vote
0answers
75 views

what is the change in macro expansion when using environ and newenviron as compared to the standard environment

The packages environ and newenviron both provide an alternative to the standard environment macros included with LaTeX. The main difference is that they make it possible to refer to the environment ...
1
vote
0answers
71 views

How to align item labels according to the longest one automatically?

Time for revenge! I've been fighting with this problem of aligning items according to the longest label automatically for some time now (see first two examples below). The left side of the longest ...
1
vote
0answers
60 views

How can I create a new table environment wrapper for pgfplotstable?

A similar question has been asked here: - newenvironment using pgfplotstable At first glance, I thought it was the same question, because the question is not clearly stated. That person is asking for ...
1
vote
0answers
101 views

Ending a tikzpicture environment in conditional causes “Missing } inserted”

I want to create a number of tikzpictures. I have a number of items I want to draw. Each tikzpicture takes up a whole page and may contain up to 4 items. (It is not good enough to to have each item in ...
1
vote
0answers
95 views

Wrap text around with newenvironment

I am trying to create a new environment with a background color. The issue is that I want text to be wrapped around it but I can't do it. The minimum working example is as follows \documentclass[12pt,...
1
vote
0answers
91 views

Floating Figure inside Environment

I have a problem while trying to use wrapfigure or floatftl in a typical Definition environment. More concretely, I try something like this: \begin{floatingfigure}[r]{5cm} \includegraphics[scale=0.3]{...
1
vote
0answers
62 views

Define environment with two sections and verbatim

I'am writing a class for the standardization of some documents and I want the interface to be smoothly as possible. One of the things I need is define an environment that produces something like this. ...
1
vote
0answers
111 views

How do I make a new command with author/journal/year citation in footnote

\documentclass{beamer} \usepackage[backend=bibtex]{biblatex}%backend=biber, natbib=true, style=chem-acs \bibliography{oralspaper} \DeclareCiteCommand{\citejournal}%%%creating \citejournal command ...
1
vote
0answers
105 views

Making a textpos command being transparent

I am defining my own margin notes command and I have a question about making a command "transparent". To be more clear, I have the following code : \documentclass{article} \usepackage[absolute]{...
1
vote
0answers
75 views

How to store the definition of an environment? Or, how to disable locally an environment?

what? I would like to "store" the definition of the environment figure into \something so that the following logics will work: % the following line is what I am looking for store(figure, \something) ...
0
votes
0answers
29 views

Change this simple environment

I am a new latex user and I have never used the eviroment structure of latex How can update this enviroment code: \setlength{\tabcolsep}{0pt} \newenvironment{entrylist}{% \begin{tabular*}{\textwidth}...
0
votes
0answers
22 views

A collection of title, authors, affiliations and abstract

How to incorporate a collection of what is described in the main question above, e.g. in a book document class?
0
votes
0answers
37 views

How to make post processing changes?

I'm not a Latex expert so I might be using the wrong terminology. I would like to create a package that make some post processing calculation and write the result to the document. More specifically, I ...
0
votes
0answers
18 views

Change the behaviour of emph per environment

Is there redefine the way emph behaves in the definition environment? Right now, since definition is in italics, emph just makes the text non-italic which is not enough to make it stand out. Is there ...
0
votes
0answers
37 views

Insert portion of code before every line break in gather environment

This is a follow-up question to Redefine equation environment: auto labeling. I want to have something like \AtEndEnvironment{gather}{\label{equ:\theequation}}(at the end) plus \label{equ:\...
0
votes
0answers
44 views

Including BODY in self-defined environment

This is a follow up question to Create array of specific counter values and Using self-defined fields in NewEnviron. I want to use the function mtadd that fills the array mtarr depending on the value ...