4
votes
1answer
71 views

Detect actual start of text

I have conditional which is sometimes suppressed, and if it gets typeset needs to be noted. If the conditional text begins with an environment which adds vertical space prior to the actual start of ...
5
votes
2answers
220 views

(La)TeX equivalent of MS Word's “Don't add space between paragraphs of the same style”

I'm using a quote environment to add some references at the beginning of sections with two custom commands. If I have more than one reference, the \list nature of the environment automatically adds ...
9
votes
1answer
80 views

Ignore spaces and \par's after an environment

In defining an environment, I could use \ignorespacesafterend to ignore all spaces after the environment. But how could I also ignore all \pars and empty lines after the environment? In other word, ...
3
votes
3answers
81 views

Horizontal space in a new environment after \label{}

Why is the horizontal space inserted in the following mwe? \documentclass{scrartcl} \usepackage[american]{babel} \usepackage{environ} \usepackage{amsthm} % proof environment \makeatletter ...
5
votes
2answers
45 views

Spacing Between environment

I want to define an environment to detach text from the document. I would like to have one blank line before and after my quote. I defined the following environment: \newenvironment{myenv}{ ...
5
votes
1answer
173 views

First paragraph in environment without indent or space

I'm trying to create an environment that does not indent the very first paragraph of the text inside the environment. My latest attempt and the corresponding output are shown below. As you can see, ...
5
votes
3answers
128 views

Proper vertical spacing and pagebreaks in custom environment

I would like to design a simple environment which displays examples. This is what I got so far: \documentclass{article} \usepackage{xcolor} \usepackage{parskip} \usepackage{lipsum} \makeatletter ...
6
votes
3answers
376 views

Adding vertical space (\vspace) around custom environment

I have document with custom environment myenv which left margin is 4em. \documentclass{book} \usepackage{lipsum} \newenvironment{myenv}{ \setlength{\leftskip}{4em} } \begin{document} \lipsum[1-2] ...
4
votes
1answer
97 views

Changing the Look of Proof

I am using the document class amsbook. I had an issue with my theorems having a good deal of space between the statement of the theorem and the proof. I have a new theorem style: ...
8
votes
1answer
41 views

Superflous vertical spacing after tagging environment

I would like to use the tagging package to tag parts of a document, which not only contain text, but also other environments like enumerate. If I use the taggedblock-environment for this, this creates ...
1
vote
1answer
210 views

how to change spacing between align environments and equation environments?

I am using align and environment for various equations. There is some space that comes before and after the equations that I would like to minimize. Is there a single command that could be used to ...
4
votes
1answer
109 views

Adding margin to a custom environment

Is there a way to define a custom environment (for example Propositions) in such a way that the content of that environment will automatically have a given margin at the top and the bottom? I mean ...
7
votes
2answers
414 views

Modify locally the “array” environment for Equation Systems

When I started to use LyX 2.0.6 I noticed that when an Equation System is needed, there are two options available to typeset it: using the appropriate command on the Math Line cases, or ...
3
votes
2answers
861 views

\vfill and vertical space

In a two-column document, I would like some text to be positioned at the bottom right of the right column. The text is inside tabular and flushright. An MWE is: \documentclass[twocolumn]{article} ...
4
votes
2answers
271 views

Little indentation despite \noindent after tabu custom-environment

this question is about a (to me) mysterious little indent (looks like an ordinary blank...) after a custom-environment using the tabu-environment. Please compile this MWE: \documentclass[a4paper, ...
6
votes
1answer
65 views

The environ package eats a space

I am using the environ package to collect the body of an environment to be used later. It appears that the environenvironment gobbles the trailing space. For example, \documentclass{article} ...
3
votes
1answer
226 views

Ignore space in defining environment

Let assume that I want to redefine the quotation environment putting the text in italic and inserting it between quotation marks. I have some problems in adjusting the space after the opening of ...
9
votes
1answer
117 views

Spacing in list with math environment

Check out the following example. I would like to write the code as in the second list, but get output equivalent to the other two. However, there is a lot of extra vertical space after the third item ...
7
votes
2answers
115 views

An environment for two-way rules in category theory

I want to typeset some category-theoretic calculations involving adjunctions (sometimes called two-way rules). In short, they look approximately like this (MWE): \documentclass[a4paper]{article} ...
8
votes
1answer
445 views

Vertical spaces above and below longtabu

This is, in a way, a follow-up-question to New table-environment, spaces and enclosing { } in a new environment, which has already been answered conveniently by @egreg. Please compile this MWE to ...
2
votes
1answer
173 views

New table-environment, spaces and enclosing { } in a new environment

It was hard for me to find a proper title (feel free to change it) for my question which I want to introduce with an example: Situation In my document I sometimes use tabus directly in the document ...
3
votes
2answers
93 views

How to avoid unwanted Spaces in \NewDocumentEnvironment?

I tried to make my own "quote"-Environment and I wanted the first Letter to be bold and a little bit bigger than the rest. As \lettrine doesn't work the way i wanted, i tried to code it on my own. ...
8
votes
1answer
529 views

Controlling parindent in enumerate inside customized list environment

I'm trying to control the indentation of paragraphs in an enumerated list that is inside a customized list environment. I find that changing \parindent in the inner list has no effect. Here's an ...
4
votes
2answers
160 views

My custom theorem/proof environments aren't playing well together

As can be shown in the following MWE, when I have a theorem environment followed by a proof environment, the proof isn't going into the next line; it's rendering right on top of the text I have for ...
10
votes
1answer
2k views

Adjusting space before and after a latex beamer block

I wanted to ask you if there is a better way to adjust the spacing between two beamer blocks: \documentclass[slidestop]{beamer} \usetheme{Madrid} \begin{document} \addtobeamertemplate{block ...
7
votes
1answer
92 views

newenvironment with displaymath causes strange extra space/indent on following line [duplicate]

Possible Duplicate: Spacing issue for newenvironment wrapper of equation environment I have \newenvironment{mymath}{\begin{displaymath}\begin{array}{l}}{\end{array}\end{displaymath}} ...
1
vote
1answer
60 views

Avoid skipping before environment

I'm having trouble handling vertical space with my custom environments. I noticed that using \unskip after the environment eliminates that space, but I have found now solution for the space before ...
8
votes
1answer
318 views

Custom environment with fancy text indentation

I am trying to typeset text by breaking it into smaller cameos, numbering each cameo, and putting a heading. See below for an example of how I want the typeset text to look. The code with which I ...
6
votes
2answers
507 views

How can I change the whitespace above and below center?

Is it possible to control the space above and below center, e.g. the way it can be controlled above and below math display? In other words, is there an equivalent to, say, ...
3
votes
1answer
213 views

passing text to alltt embeded in command (extra newline needed)

I wanted to close alltt inside a command (to add some ornaments around the text), but the spaces that were used for putting the monospaced text into columns was not preserved. I found the solution ...
3
votes
1answer
442 views

Environments with thmtools => too much space if using itemize at the end (also problem with q.e.d. symbol)

I want to use the thmtools package, because it provides some awesome features for declaring environments (proofs, theorems, examples etc.) And I especially like the "qed" feature which places some ...
12
votes
2answers
181 views

LaTeX adds an additional blank paragraph after the end of my custom environment

A friend, who is a LaTeX user but isn't very confident with customising it, told me that he would like to be able to put framed paragraphs and framed equations into his documents. So I took it upon ...
11
votes
3answers
6k views

Creating a new environment with one optional argument

I want to create a new environment with one optional argument in LaTeX. Here is what I used: \newenvironment{argument}[1][]{% \par \noindent \textbf{Argument#1:} \noindent} {} When there is no ...
10
votes
3answers
346 views

Environment that obeys spaces

I need to build one environment that obeys spaces, but not new lines, and also change tabulation into four spaces. I can't use verbatim because I would also like to use macros in my environment.
3
votes
3answers
2k views

Redefine \arraycolsep for particular environments

How do I change \arraycolsep for a single environment? E.g., I have \arraycolsep set so that the white spacing on either side of "=" in the equation array environment is not excessive. However, this ...
5
votes
1answer
235 views

Spacing between environments

I am trying to define a dialog environment while using the lettrine package. My problem are the spaces between the dialogs. There is no problem when a dialog consists of more than two lines. But ...
7
votes
1answer
972 views

Vertical space before and after custom environment

I've created custom environment with these commands: \usepackage{relsize} \newcounter{annotation} \def\theannotation{\arabic{annotation}} \newenvironment{annotation} ...
10
votes
3answers
388 views

Adjust environments's behaviour when nested

I would like to define an environment which behaves differently when it is nested. This environment should ignore spaces at the begin and end of the environment. I have this working as I desire when ...
20
votes
2answers
5k views

How to modify spacing around quotation environment?

I am almost there in my quest to reproduce the rather compact layout of the book I'm translating... one thing to go, though: I successfully used the enumitem package to modify the vertical and ...
1
vote
3answers
1k views

Vertical space before horizontal line

I have defined an exercise environment which ends with a horizontal rule. I want to have some vertical space between the end of the environment text and the rule. When I try to insert that, the ...
5
votes
1answer
2k views

Extra intervals before and after flushright environment

I am preparing questionnaire template in LaTeX. I have the following code (simplified): \documentclass{article} \begin{document} \framebox{\parbox{4cm}{ \textbf{3. How often do you have a ...
1
vote
1answer
381 views

Custom (or any) environment inside tabular adds unwanted vspace

I wanted to define my own version of a verbatim-like environment, that has some less line spacing and uses alltt instead of verbatim, so what I can use \(\cdots\) inside. What I tried was: ...
3
votes
2answers
467 views

How to remove trailing spaces at the end of each line in a block of code?

NOTE: I have to adapt this question to reflect Martin's answer (that actually not 100% solves the original problem) so I can accept it. :-) If I work without standalone document class, I usually put ...
2
votes
2answers
292 views

Custom list of environments (per section)

I'd like to have a list of my custom environments at the start of each section. I read this post, but wasn't able to get the titletoc to help me. The given response worked for floats, but I couldn't ...
5
votes
1answer
4k views

Removing extra vertical space in \maketitle with titling package

Consider the following two LaTeX source files: First, manually producing a title using a new environment (eww): \documentclass[a4paper,10pt]{article} \parindent0cm% ...
4
votes
1answer
4k views

Removing vertical space before and after tabbing environment

When I write \begin{tabbing} \hspace{4in}\= \kill % set up two tab positions {\bf University }, {\it City, NW} \> PhD, Physics (2007-2011)\\ \end{tabbing} Methodology and numerical ...
4
votes
1answer
455 views

Theorems and Definitions as quotes

Most standard styles highlight theorems and definitions using italics. Now this is something I really would like to avoid in my thesis (and generally). Unfortunately, if I just remove this "feature", ...
4
votes
1answer
2k views

Vertical space before environments

How can I control the vertical space before an environment, e.g., taublar or minipage. Here is an example that reproduces my problem \documentclass{article} \begin{document} \noindent ...
5
votes
2answers
670 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} } ...
4
votes
1answer
943 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 ...