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, ...
5
votes
1answer
45 views

How make \parshape declared inside an environment to apply the next paragraph outside the environment?

I'm trying to do something like the MWE below: \documentclass{article} \usepackage{lipsum} \newenvironment{myenv}{% \parshape = 4 0pt 0.5\textwidth 0pt 0.5\textwidth 0pt 0.5\textwidth ...
13
votes
2answers
728 views

Format a verbatim paragraph

How can I format a verbatim paragraph? I.e. break, fill and join input lines to produce globally balanced output with the lengths of each line approaching the target \textwidth as closely as possible. ...
5
votes
1answer
121 views

How to set lengths only for a specific environment (parindent for paracol in this case)?

Is it possible to set a length specifically for an environment? I know it is possible to change lengths for parts of the document only, by placing the \setlength command between {}, but when using an ...
20
votes
2answers
892 views

Reliable code for automatic \noindent after specific environments?

This question led to a new package: noindentafter There are a number of environments which I never want to follow up with an indented paragraph. itemize, enumerate, theorem, definition, etc. I ...
1
vote
0answers
46 views

How to hold all lines in a defined environment? [duplicate]

\def\Grammercaption{\textbf{Grammer}} \def\grammer{\bgroup\ignorespaces\Grammercaption\fontsize{10}{13pt}\selectfont} \def\grammer{\egroup} I want all lines of text within this environment stick ...
3
votes
1answer
80 views

How to indent part of line to certain amount?

I apologize if this is a basic question, but I'm new to LaTeX and typography in general, and I'm not sure how to articulate my question properly. I have a document which looks like this: ...
3
votes
1answer
440 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 ...
3
votes
1answer
173 views

New environment. Highlight content with symbols and indentation

I'm writing my thesis and I want to highlight some part of my text which resides in a separate paragraph. I like the well-known example of \newenvironment{king} {\rule{1ex}{1ex}\hspace{\stretch{1}}} ...
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 ...
6
votes
3answers
586 views

New paragraph style for newbie

This question may have already been asked, but with all of my searching, I couldn’t find it. I am new to LaTeX and after a few rough starts, I am finding my way. I am using this tool to create ...
4
votes
2answers
395 views

Paragraph indenting in an mdframed environment

I'm using the mdframed package and I've defined my own environment. But it seems that paragraph indentation doesn't work inside a mdframed environment. I've used the settings option of mdframed to ...
7
votes
1answer
495 views

Adding something automatically to every paragraph in an environment

I'd like to know if it's possible to have something added automatically to any paragraph in a given environment. I use LaTeX mostly for doing fill-in-the-blank worksheets at the school where I work. ...
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 ...
8
votes
3answers
368 views

How can I indent all text after the label in my example environment

I have built my own example environment for a paper I am working on. I have created a counter to label the resulting blocks of text. Now I want to indent the Text after the label, like so: (1) ...
5
votes
1answer
157 views

Testing for a blank line (“paragraph”) immediately after \begin{document}

(With this question, I hope to resolve an edge case relevant for my quoting package.) Suppose I define a customized environment for displayed text. It resembles the standard LaTeX environment quote ...
5
votes
3answers
814 views

Change line spacing for normal text, but not in tabular or verse

\usepackage{setspace} \doublespacing I used above two lines to change the spacing in my document. This changes the spacing of the entire document. My requirement is to change the line spacing in ...
16
votes
1answer
482 views

What exactly does \@doendpe do?

Quoting from the LaTeX2e sources: [\@endparenv, \@doendpe] To suppress the paragraph indentation in text immediately following a paragraph-making environment, \everypar is changed to remove ...
4
votes
1answer
2k views

How to highlight paragraph (linebreak preserving) as well as itemize, tabular etc.?

I want to highlight changes which are introduced by myself in the pdf document. So far the soul package is very neat but it does throw errors when I want to highlight not only paragraphs but also some ...
18
votes
4answers
2k 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 ...