{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)

0
votes
0answers
11 views

Modify proof environment: new line before qed square [duplicate]

I would like to put the QED square at the end of proof on its own line. How can i do that? The qed square should be right aligned and below the last line of the proof.
1
vote
1answer
41 views

framed environment with fixed image in marginpar

I would like to get the exact output below in the LaTeX. But unable to fix it and how to set image in the marginpar for each example environment. My MWE is: \documentclass{book} ...
1
vote
1answer
34 views

error with @ifnextchar and paralist after texlive 2014 update

I've been using a save/restore TeXnique with let/def to redefine the \@enumerate@ command from the paralist package so that the enumerate environment can accept a second optional parameter (a name of ...
0
votes
0answers
33 views

Put one part of sentence outside $ math environment

I want the 'assume' written in normal style. So not within the math environment so it becomes italic. This is my code \documentclass{article} \usepackage{amsmath} \begin{document} ...
1
vote
1answer
35 views

Redefine obeyspaces to newline

I want to typeset code snippets from different programming languages. I couldn't get listings to do what I want (one complete height of an empty line takes up too much space for my liking) and neither ...
14
votes
2answers
522 views

Kleinberg-Tardos style of book writing

I recently read a book Algorithm Design by Jon Kleinberg and Eva Tardos, which is written in a very unique style. This book doesn't have any typical LaTeX environments such as theorem, lemma, and ...
2
votes
1answer
36 views

Beamer: splitting environment across \newenvironment

I would like to define a new environment in Beamer that creates a frame containing only an itemize (and maybe some other stuff once I this basic case to work). The following ...
1
vote
1answer
17 views

Adding a new crossref type for a user-defined environment

In short, I'm trying to define an environment comment which has its own crossref type and counter. I want to be able to refer to these comment environments later. Looks like cleveref does what I ...
0
votes
0answers
13 views

Show Answer Key with letter alternatives at the end of document

I have a document in which between some explanation texts I insert some numbered questions (it's a book, actually). Here's the basic of the code I have now: \documentclass[10pt,a4paper,oneside]{book} ...
0
votes
0answers
27 views

justifying and scriptsize for all beamer slides

Following the answer here, I'm looking for a way to justify and set the scriptsize font for all beamer slides inside frame environment, I tried: \setbeamertemplate{frame}{/scriptsize/justifying} ...
7
votes
1answer
155 views

Fancy example environment

How do create a colourful example environment like the one here?
5
votes
1answer
288 views

A command to end any environment?

Wouldn't it be nice if we have a command to end an environment in a generic way? Example: \begin{itemize} \item Apple \item Banana \endenv % replaces / is an alternative to, \end{itemize} ...
9
votes
3answers
220 views

How To Make a Special Position Environment in LaTeX?

So I must admit I am way out of my depth and have no idea what I'm doing. I apologize in advance for a long and complicated question. I'm trying to build this output: Which I have successfully ...
3
votes
3answers
215 views

Quote Environment à la Strunk’s ‘The Elements of Style’

How can I have a an environment similar to Strunk's The Elements of Style:
0
votes
0answers
16 views

Macro that feeds its argument to an environment that changes the catcodes

Suppose an environment that reads its contents with changed catcodes (verbatim, CJK, etc). I want to write a macro that invokes this environment on its single apparent argument. The argument is ...
2
votes
0answers
16 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} ...
4
votes
0answers
85 views

How to make a text environment [duplicate]

How can make an environment in which I can write my text and in output, I see it indented with a coloured vertical line? I want the code be like the following: \begin{textbox}[orange][1cm] % [colour ...
1
vote
1answer
53 views

Tikz nodes with `fit=(top)(bottom)` slightly missized

I like to create textboxes via TikZ. I start with that flexible example. And, Yes :) I do create texboxes. Here it is. But I still have two problems.. Q1 I use fit to create light gray ...
1
vote
2answers
42 views

environment - solution environment for exercises (different than proof environment)

I am typing up solutions to a variety of problems in a textbook, and I want to use the proof environment for proofs but a similar environment for solutions. The link here Duplicating the amsthm ...
1
vote
1answer
18 views

varioref's \labelformat for own environment

I defined my own environment for short pseudo-algorithms, and I would like to use the \labelformat command to change the output of \vref. Varioref's documentation says: "The command takes two ...
2
votes
2answers
42 views

Environment which sends text conditionally to an appendix?

I am writing a paper and would like an environment that has the following property. If some flag is set to "true" in the preamble, all text wrapped in that environment is sent to the appendix. If the ...
2
votes
1answer
25 views

\csuse inside a \NewEnviron using the environment parameter

I am trying define a environment that displays a text specified by the parameter of the environment. The following example demonstrates it: \documentclass{article} \usepackage{environ} ...
4
votes
1answer
55 views

Probsoln customization of solution environment (set as marginpar)

I'm using probsoln, and I want to put the solution as a marginpar and with footnotesize. Please look at the MWE below. Writelatex won't compile, spitting out LaTeX Error: \begin{solutionnew} on ...
4
votes
1answer
63 views

Problem grouping environments

Below are two examples. The first one works fine, no errors no warnings, but on trying to build a doc from the latter, I get a heap of errors. Working: \documentclass[]{article} \usepackage{environ} ...
1
vote
1answer
37 views

Configure newenvironment with xkeyval

I am having trouble getting xkeyval to work with \newenvironment. If I define the whole thing as a command instead, it works perfectly. So my guess is that the problem is not how I use xkeyval, but ...
4
votes
1answer
42 views

new table environment based on ltablex's tabularx

I defined a new environment for some custom tables (to not have to repeat the header and column definitions etc. again and again). \newenvironment{mytable}{ \noindent\tabularx{\textwidth}{|c|c|X|} ...
2
votes
0answers
41 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
1answer
68 views

Can't use command with square brackets in matrix environment

I've defined a command that uses square brackets, and when I use it within a matrix environment, the command is not parsed. I stumbled upon a solution to my problem here: "[" Square bracket ...
4
votes
1answer
41 views

How to nicely split proofs into different parts?

I often break long proofs into smaller pieces, in order to make it easier to read and understand. I'm doing that by adding a fbox with "Part X: ...". However, this doesn't work out very well all the ...
0
votes
0answers
25 views

include A3 into A4 document troubles

I know there is lot of topic about including A3 into A4 documents. But I decided to make my own environment to try to understand how it can work. I create one new environment to include A3 landscape ...
4
votes
3answers
43 views

How can I implement this environment? (Title - Margin - Item)

I want to make this environment or macro in LaTeX. This picture is made by ms-word. Suppose that 'Title' and 'How' is 3cm of width and there is a 1cm margin between 'Title' and 'Title 1'. and ...
1
vote
2answers
44 views

nested environment with a star

I want to redefine an environment that include the environment alignat*. I discovered that I can't do that : \newenvironment{variables} { \paragraph{Variables :} \begin{alignat*}{2} } { ...
4
votes
1answer
21 views

Tagging and new environment

I am using the tagging package in my document to "customize it. To include/exclude some parts of my document using a taglist, I could use the following : \begin{taggedblock}{<taglist>} and ...
5
votes
1answer
140 views

close all environments?

Is it possible to create a macro that would close all current open environments? Or even an explicit subset of all current open environments (where the subset would be standard user environments)? ...
5
votes
1answer
49 views

End mark for unnumbered and continued examples

Consider the following MWE \documentclass{article} \usepackage{amsthm} \usepackage{hyperref} \theoremstyle{plain} \newtheorem{theorem}{Theorem}[section] \theoremstyle{definition} ...
2
votes
2answers
71 views

how do I add line numbers to itemize environment?

I have an itemize environment that I use in a figure to describe, say, an algorithm or a process. I want to include line numbers, all aligned on the left most side of the figure so that I can refer to ...
2
votes
2answers
42 views

customize description environment

I would like to define an environment induction which is like the description environment. I have in mind that the output of \begin{induction}{A} \item[a1] Part $a1$ of the induction proof. \item[a2] ...
3
votes
1answer
64 views

Smaller vertical space between repeated environments

I have a new environment that is defined with addvspace at the beginning and end. This works fine if it is surrounded by text. Now, I want this space to be smaller (smallskipamount) between these ...
3
votes
2answers
67 views

Conditionals used in defining of new environment

I want to produce two versions of one document with different content. The idea is to comment out certain sections if a logical variable is false. This logical variable will be inputted eventually ...
0
votes
0answers
48 views

How do I hide page numbers when overlapped?

I'm trying to add an environment for code listings to stay on one page as described in "How to prevent lstlisting from splitting code between pages?". When my listing is at the bottom of the page, ...
1
vote
0answers
45 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. ...
3
votes
2answers
44 views

Compiler Error when Creating a Macro/Environment

I'm trying to create a new command or environment or something to format what is essentially a section, but it needs to have it's own counter. I would like to not use any of the \section \subsection ...
5
votes
1answer
119 views

Display Mode without Math Mode

First I want to apologize if the answer to this question is well known. But after some searching, I couldn't uncover any similar questions. In my document, I would like to feature a regular sentence ...
3
votes
2answers
124 views

Automatically copy items from the last list

In crypto, proof involves a sequence of games. Each game contains a list of lines. Adjacent games are almost the same except for a small number of lines (usually 1). I used to copy the old game to the ...
2
votes
1answer
34 views

How can I apply a custom-defined theorem environment to nested theorems *only*?

In a previous thread, I asked about the possibility of defining a custom theorem environment whose QED symbol would be a boxed version of the theorem's name/number/label. There, I was graciously ...
4
votes
0answers
50 views

how to define a label in a new environment?

I would like to define a new environment for writing exercices. Moreover, I would like to use \ref and \nameref (with hyperref package) to build a table of exercise numbers and names. I wrote the ...
0
votes
0answers
30 views

Let \ref show “Section” or “Appendix”

I want my \ref{} command to include "Section" or "Appendix" depending on what it references to. To include "Section" I did the following: \makeatletter \renewcommand{\p@section}{Section ...
2
votes
2answers
80 views

Defining New Environments using a Command

I would be able to do something like the following: Instead of having the following, where I repeat the same code many many times: \documentclass{article} \usepackage{enumerate} ...
15
votes
4answers
556 views

How do I use the boxed theorem name as a QED symbol

I'm wondering if there's a relatively simple way to achieve a result similar to the following: In particular, I'd like to be able to assign names and/or numbers to theorems/lemmas/propositions and ...
1
vote
1answer
30 views

How to not miss lines using equation enviroment

How can I stop the empty lines being put on - first between the itemization letter and the equation, and then between the two different equation \item \begin{equation} \begin{split} ...