2022 Developer Survey is open! Take survey.

# Tag Info

1 vote
Accepted

### How can I define this new math mode environment with comma-separated keyval options?

For this to work we have to somehow get the \noalign at a position where TeX finds it (inside of the \begin{myalignedat} definition seems too late for this). Therefore the following uses the env/...
• 48.7k

I like to add a simple explanation. A line break is interpreted as a space. If you add a %, you comment out the line break, hence the space. You can see that with A B C vs. A% B% C So, if you ...
• 2,119

The second example shows where the problem is: the endline after \begin{mypro}. Add \ignorespaces at the end of the “begin” part. But I suggest two further changes: to add an optional argument and ...
• 985k

### Why is a box seemingly emptied after closing an environment

I'm a fan of the environ package, so I will add my version based on Steven's one. \documentclass{article} \usepackage{environ} \begin{document} \newsavebox{\somebox} \NewEnviron{myenv}{ \begin{...
• 2,119

### Why is a box seemingly emptied after closing an environment

The reason of the problem (LaTeX environment creates a group) was mentioned in another answers. You can use only TeX primitives, it gives you much more control what is done: \newbox\somebox \def\...
• 52.3k

### Why is a box seemingly emptied after closing an environment

Boxes are assigned locally by LaTeX, so after the end of myenv the assignment is lost. \newsavebox{\somebox}% for global assignment \newsavebox{\someboxinternal}% for local assignment \newenvironment{...
• 985k
1 vote
Accepted

### Why is a box seemingly emptied after closing an environment

The whole idea of environments is that their work occurs in their own group (as if the code were surrounded by {...}. Thus, by design, what happens in the environment is inaccessible to the outside ...
1 vote
Accepted

### How can I define an environment similar to alignat, but calculates the number of columns automatically like align?

A simple approach is to make a new environment that forwards 99 to alignat: (remark, this is the "standard" method to redefine environment; nevertheless it will not work for some particular ...
• 1,471
1 vote

### How to adjust vertical space before and after center environment

I added a \vspace{} command inside the center environment at the top and buttom, which seems to have worked. You can make the space smaller by using negative values and make the space larger by using ...
• 908

### How can LaTeX form an environment of Bionic-Reading style?

My solution uses only TeX primitives and common macro \newcount. We need nothing more. \newcount\tmpnum \def\bionic{\futurelet\next\bionicA} \def\bionicA{\ifx\next[\afterfi\bionicB \else \afterfi{\...
• 52.3k

### How can LaTeX form an environment of Bionic-Reading style?

As the question was so interesting I tried it (in LaTeX2e) even though It was already answered. I'm not an expert and I think it will fail if you have accentuation marks or some other weird stuff. \...
• 365

### How can LaTeX form an environment of Bionic-Reading style?

Approach with the xstring package for string manipulation and xfp for calculating the substring length: \documentclass{article} \usepackage{xstring} \usepackage{xfp} \newcommand{\bionic}[2][0.5]{% % ...
• 29.6k
Accepted

### How can LaTeX form an environment of Bionic-Reading style?

This is a solution using expl3 (LaTeX3, if you like 😉) --- I'm a novice with it, so probably it can be made better. It uses percentages instead of fractions so that I can use integer arithmetic only. ...
• 29k
1 vote

### Hide Algorithm environment

You do not need the tabular environment to specify an algorithm in LaTex. Use some packages like algorithm and algpseudocode. Here is an example of the algorithm in your picture, where the definition ...
• 347

### Help with newenvironment for unnumbered theorems

Define the label to be variable. You just need one theorem environment. \documentclass{article} \usepackage{amsthm} \newcommand{\axiomname}{} \newtheorem*{axiominner}{\axiomname} \newenvironment{...
• 985k
1 vote
Accepted

### widetext doesn't play nicely with the osa-article documentclass; are there alternatives?

Maybe using cuted package instead of widetext would help. You can add rules manually if you like. \documentclass{osa-article} \journal{osajournal} \usepackage{cuted} \usepackage{lipsum} \begin{...
Accepted

### Create side-by-side environments in Latex

You weren't entirely clear about what the problem was, but I'm assuming you want the email address and phone number to use the same kind of aligning as the lines above them, so the first set is ...
• 35.7k
1 vote

### Synctex: make it work with environment accessing its content (e.g. environ or xparse +b option)

I don't see how that would be possible in a macro expansion language. The content of a macro is not processed so you can only get error messages or synctex markers where it is used and that may be ...
• 665k
Accepted

• 24.5k
Accepted

### How to define a custom description environment?

Just % definition \NewDocumentEnvironment{my desp}{ m m }{% \begin{description}[align=right, itemindent=0cm, leftmargin=\labelsep+#1, font=#2] }{ \end{description}% } % usage \begin{my desp}{3cm}{...
• 20.6k
Accepted

### Create environment whose contents are passed to tikz-matrix

Do you know the nicematrix package and have you tried it to achieve your goal? Here is a short example: \documentclass[multi=mymatrix]{standalone} \usepackage{tikz} \usepackage{nicematrix} \...
Accepted

### How to change an environment in its body

I'm not sure I understand the problem. I suggest this. \documentclass{article} %https://tex.stackexchange.com/questions/641994/how-to-change-an-environment-in-its-body \usepackage{lipsum} \...
• 543
The problem is with \pushQED{\hfill$\clubsuit$}. You really need \pushQED{\qed} or to define something else along the line of \qed. The easiest way is to add an optional argument for the symbol to use....