Questions tagged [environments]
{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.
3,394 questions
3
votes
1
answer
60
views
Locally disallow ordinary typeset content within an environment (like it’s disallowed before `\begin{document}`)
I’d like to write an environment within which ordinary content for typesetting is not accepted. Within this environment, content is expected to be given just via a few specific commands (e.g. \...
3
votes
1
answer
71
views
How to make a `\sloppy` environment
I have a tight constraint on the geometry of the page, which I cannot change, and I need to write, under, each chapter a list of topics that are inside the chapter. Some are too long and I have one ...
3
votes
2
answers
103
views
Change Typeface Inside Description Environment
How can I select the typeface for all terms like Fire Prism and Rangers inside description environment across the document?
\documentclass[10pt, a5paper]{report}
\usepackage[left=12mm, top=18mm, ...
1
vote
1
answer
42
views
Optional command for exercise enviroment in amsart
I’m not very familiar with the amsart class. I have a .tex file with a complete preamble provided by a university professor.
In the following MWE, I have taken a part of it. Specifically, I would like ...
4
votes
2
answers
143
views
Passing a macro as the argument to an arbitrary arg-spec
MWE:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\ExplSyntaxOn
\tl_new:N \g__mymodule_env_name_tl
\tl_new:N \g__mymodule_env_args_tl
% Defaults
\tl_set:Nn \g__mymodule_env_name_tl {...
2
votes
2
answers
62
views
Make paragraph after invocation of \NewDocumentEnvironment not indented much like after a section, using @afterheading
This is a follow up to this question - Treat first paragraph after non-floating figure[H] just as you would after section (without using \noindent)
If I create a \NewDocumentEnvironment, I'd like the ...
3
votes
0
answers
46
views
Fix vertical spacing of lists at beginning of environments
When a list is the first thing in certain environments center, flushleft,... topsep get's ignored. This is great before the list but undesired after the list.
The following fixes that problem ...
0
votes
0
answers
42
views
A counter to replace chapters not supported in amsart
Related to question without an answer Defining chapter in LaTeX under amsart, I know that amsart class haven't a \chapter command.
To write a chapter I use the enviroment center, like the example ...
5
votes
1
answer
74
views
Trouble using "&" as an argument in \newenvironment
I'm trying to make a custom environment which starts by using a "&" to move to the second cell of a table, and then starting a custom enumerate environment.
Using commands for inserting ...
4
votes
1
answer
86
views
xcookybooky problem with indentation in '\preparation'
I am writing down my recipes in a document using the xcookybooky package.
I encountered a problem using the environment \begin{enumerate} in the command \preparation: as you can see by the attach ...
2
votes
1
answer
99
views
Is there a reason to choose multiple local `\newcommand`s over multiple local `\let`s to a global command?
For context, I want a/some function(s) to only be defined in certain environments. I found (after much failed bodging on my part) the delightful function \AddToHook so I can use
\AddToHook{env/myenv/...
1
vote
1
answer
73
views
Problem with unrecognized environment
Even though I count with the ptmt.sty in the same folder as the book.tex, I can't use the 'definition' environment wich is defined but not recognized. I'm really sorry, this is my first time looking ...
5
votes
1
answer
110
views
ConTeXt: Use multi-level columnset within start/stop environment
Background
Looking to typeset columns within a start/stop environment. See ConTeXt: Specify column width (unequal columns) for more background information.
Problem
Invoking \startcolumnsetsheet and \...
1
vote
1
answer
46
views
wrapfigure generates automatic indentation of NewDocumentEnvironment
I have created a simple exercise environment using NewDocumentEnvironment from xparse:
\documentclass[a4paper,12pt,openany,leqno]{book}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{asymptote}
...
2
votes
1
answer
81
views
How to define a macro which generates new custom amsthm theorem environments with manual numbering?
I'm currently trying to generalize user egreg's answer to a similar question where the asker wanted to create a new customized amsthm theorem environment which supports manual numbering in its ...