{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
1answer
500 views

bottomrule not working in a self-made environment [duplicate]

Possible Duplicate: bottomrule not working in a self-made environment I have this environment for consistent tables in my latex documents: \newenvironment{defaultTable}[2] { ...
2
votes
2answers
532 views

Beamer and newenvironments

I'm trying to combine beamer overlays and newenvironments: \newcounter{scount} \setcounter{scount}{0} \newenvironment{sitem}[1] {%before \def\data{#1} \stepcounter{scount} ...
3
votes
1answer
931 views

Def in renewenvironment

I redefine a custom environment of mine that uses "local variables": \newenvironment{asdf}[3]{ \def\argi{#1} \def\argii{#2} \def\argiii{#3} %.... } { } But when I do: ...
8
votes
1answer
1k views

Disable environment contents

I want to prevent the content of a custom environment from being shown. I've tried: \newenvironment{asdf}[3] { %some stuff happens here %...... \begin{comment} }{ \end{comment} } but this ...
18
votes
5answers
4k views

New figure environment

I am writing my PhD thesis. In my manuscript I have Figures in the text and Photographic plates (a figure of figures) in the annexes. The two elements are different and I would like create a new ...
5
votes
1answer
577 views

Newenvironment and floating figures

I want to create an environment for a list of items, that should look like this for each item: Name Image ....... Image .............. .............. with this environment ...
10
votes
2answers
537 views

LaTeX: non-verse text in verse environment.

I'm writing text in LaTeX in the verse environment. But there are some parts the should not be in verse inside the verse. The way I've done it so far is to define a new environment that begins with ...
24
votes
2answers
2k views

Defining a new environment whose contents go in a TikZ node

I would like to define an environment which typesets the contents in a box, and I'd like to use TikZ (I'm aware of alternatives like fancybox). So I would like something like \newenvironment{abox}% ...
5
votes
2answers
785 views

How to get rid of vertical space before and behind the lists

I cannot get rid of the vertical space before and behind the lists. I have code like below: \begin{list}{-}{% \setlength{\itemsep}{0pt} \setlength{\parskip}{0pt} \setlength{\parsep}{0pt} } ...
11
votes
1answer
3k views

How can I write multi line equations with alignment in inline math mode?

Is there any way to override the fact that certain environments in LaTeX are automatically "displayed"? One such example is the align* environment. I want to keep my aligned equations inline. So ...
5
votes
2answers
1k views

LaTeX strange new environment definition

I'm creating a Beamer presentation and I wanted to change margin size for single slides. I've found a solution on some old mailing list, adapted it a little and it works perfectly, but I have no idea ...
13
votes
2answers
5k views

Split-like environment inside cases environment

I'd like to have a cases environment with some cases that are too long to fit on one line. I tried this: \begin{cases} \begin{split} long expression \\ second line of long expression ...
4
votes
2answers
2k views

Beamer: Emphasize a part of a slide

I am using Beamer to create presentations. I know that it is possible to use environments like Theorem, Definition and so on: \begin{Teorem} Great theorem \end{Theorem} It appears in the box of ...
45
votes
9answers
3k views

Where do I find out how a command/environment is defined?

Say I want to redefine the itemize environment, or make a modified version of it. I want to know how it is currently defined. Where do I find this information? If it's some particular package command, ...
-1
votes
1answer
522 views

restating a theorem using theomac.sty

I am trying to restate a theorem environment using theomac.sty which floats around, following a suggestion I received here: how do I refer back to counters? The package I downloaded loads well, but ...
9
votes
3answers
2k views

No indentation at the beginning of environment

I am using the common approach of having indentations for new paragraphs and no indentation directly after a headline. I have an environment for 'information boxes' defined like this: ...
10
votes
2answers
2k views

Listings: different counters for different listing environments

How do I create two lstlisting environments that each have its own counter? If I use for example \lstnewenvironment{algorithm}[2]{ \renewcommand\lstlistingname{Algorithm} \lstset{ ... } } ...
7
votes
1answer
1k views

Creating environments with different colours and sizes

At the top of my lecture notes I define the following environments: %Student copy \newenvironment{Notes}{\LARGE\color{white}} %My copy (uncomment out "%" below) ...
4
votes
1answer
744 views

\ref giving incorrect number for \label in custom environment

I have defined a custom environment (using the tocloft package, thanx to Juan) that looks like: \newcommand{\listscriptname}{List of Scripts} \newlistof[chapter]{script}{spt}{\listscriptname} ...
5
votes
1answer
924 views

How to create an index for custom environments?

I have defined a custom script environment, and would like to include an index in the output listing all scripts with their titles. How can I create such an index? The custom environment looks like: ...
8
votes
2answers
310 views

How to make a wrapper for the figure and table environments.

I am familiar with the newenvironment command, but I was wondering, how do I carry on the parameters that are used between [ ], i.e [bht!]? I want to make a newfig and a newtab environment that will ...
20
votes
5answers
3k views

How to prevent paragraph breaks after theorem environments?

By default, the list environments (such as itemize) have the nice property that if you add a blank line after it, it starts a new paragraph, and if you don't, the paragraph continues. So The ...
19
votes
4answers
8k views

Making a new environment combining equation and split

I'm trying to define a new environment that consists of a split environment inside an equation environment. But I'm getting an error. Here's what I'm doing: \documentclass[a4paper,12pt]{article} ...
13
votes
5answers
1k views

Use column-separator & (ampersand) inside \newenvironment

I'd like to define a grammar environment which basically wraps a tabular environment. Inside the grammar environment I'd like to use an environment called production to insert rows. Example: ...
10
votes
2answers
2k views

'Dummy' LaTeX environment

I have a big LaTeX file which I would like to compile so that certain environments like figure are not shown. To that end I wanted to make use of the renewenvironment command. But the facilities of ...
4
votes
1answer
1k views

Reduce space before and after an enviroment

A simple(?) question, how do I reduce the space before and after a environment? I suppose I'm after a redefine environment command that I can put at the top of my document. Example I'm using ...
11
votes
1answer
1k views

Insert quotations

I would like to insert some literature quotations in my thesis. My first thought was to modify the verse environment as demonstrated in another question, though the result is not so pleasing. I would ...
15
votes
3answers
3k views

Problem with redefining Tabular environment with the \renewenvironment ‎command‎

In a book I'm typesetting, I want the tabular environment to be in footnote size and the other body of the book to be in normalsize font. To do this, I've tried something like the following: ...
14
votes
3answers
976 views

Extracting the contents of text in a specified environment into a new file

Imagine I have a complete latex file and I want to extract only the text that appears in a specified environment (i.e., within a custom hypothesis environment) For example: \begin{document} ... Lots ...
5
votes
1answer
929 views

Using versions environment tags inside a new environment definition

I just found out about the versions package here and am interested in using it to hide solutions in a problem set document. Recall that, to create versions block, in the preamble, you need ...
4
votes
2answers
3k views

Replacing itemize by mdwlist's itemize* throughout?

Most of my documents start with a couple of quick hacks that save me literally a couple of keystrokes a month: \let\cite\texcite \let\epsilon\varepsilon and so on. Now, I'd like to do a similar ...
6
votes
1answer
1k views

Defining a custom ‘wrapfig’ environment

[ This is an updated version of http://stackoverflow.com/questions/3233031/latex-defining-a-custom-wrapfig-environment ] The wrapfig package interacts badly with the setup and teardown done by \begin ...
4
votes
1answer
6k views

passing options to the newenvironment

I have a GrayBox environment defined as follows. It is used \begin{GrayBox}...\end{GrayBox} or \begin{GrayBox}[\textwidth]...\end{GrayBox}, that is, it can pass optional parameter to the environment. ...
11
votes
2answers
1k views

How do I define new environments, and why would I want to?

I've read about defining new, custom environments that can be used like \begin{thisismyown} % do some funky stuff \end{thisismyown} How do I define thisismyown, and why would I want to?
14
votes
2answers
759 views

How to set preferred PDF viewer for texdoc in TeXLive 2010 pretest.

I had evince, installed TexLive 2010 pretest (ubuntu lucid linx, fresh install). texdoc was using evince. Then I installed kubuntu ontop, and texdoc switched to okular. Now I've installed acroread and ...
13
votes
2answers
4k views

tabularx inside a \newenvironment

There's something wrong with this code: \newenvironment{Tbl} {\begin{tabularx}{\textwidth}{|l|X|} \hline} {\end{tabularx}} but this is fine: \newenvironment{Tbl} {\begin{tabular}{|l|l|} \hline} ...
10
votes
3answers
4k views

Defining a command for amsmath's align environment

I'd like to define a shorthand command for \begin{align*} and \end{align*}. When I write \newcommand{\ba}{\begin{align*}} it works fine. But when I write \newcommand{\ea}{\end{align*}} ...