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.

Filter by
Sorted by
Tagged with
0
votes
0answers
27 views

How do you make different theoremstyle

When preparing some manuscript, I noticed it is required that theorem, definition and remark have different formats. vi) Theorems etc. The words “Theorem”, “Lemma”, “Corollary”, “Proposition” and ...
3
votes
1answer
26 views

Using own quote environment use more width than it should

I created my own envorinment for placing quotes or something important in my text. (it is simply a \node inside tikz) However, when I set the \textwidth of the nodeto \linewidth and set an inner sep ...
2
votes
1answer
38 views

Symbollist not left aligned

Refer to this post, I try to adapt my list of symbols to my list of abbreviations. List of abbreviations % Setup list of abbreviations \newglossarystyle{mylong}{ \setglossarystyle{long} \...
0
votes
1answer
15 views

Contents indexing going mad and getting mixed up

I am having some big problem regarding the table of content of my thesis and the indexing of the propositions. I think it mainly began when I introduced chapters, whereas I only used sections before. ...
1
vote
1answer
19 views

How to handle \footnote command in example environment made using tcolorbox package?

I want to use the example environment that was suggested by @Jonathan in the related post. This is almost the same MWE: \documentclass{article} \usepackage[most]{tcolorbox} \newcounter{testexample} \...
0
votes
0answers
24 views

How do I go about setting up background color for this environment?

I found this template while browsing for a CV templates. Although I put some time into editing it now and I want to set the background color for side block which is 'aside' environment which starts ...
0
votes
1answer
24 views

Change distance to text before and after newenvironment

I cannot find a way to specify a minimum distance between the environment and the preceding / following text. Is there a way of setting a minimum for (A) and for (B) speciffically for my example ...
3
votes
0answers
29 views

Is there a downside of always using fragile? [duplicate]

I am preparing a presentation and since I am presenting a lot of code, I find myself adding [fragile] to many slides such that I can put verbatim code in it (actually lstlisting from from the listings ...
3
votes
2answers
63 views

Frame and Itemize together

I want to redefine frame as frame + itemize. I've so far tried this - \documentclass{beamer} \newenvironment{myframe}{\begin{frame}\begin{itemize}}{\end{itemize}\end{frame}} \begin{document} \begin{...
0
votes
0answers
18 views

Creating custom environment changes line spacing [duplicate]

I want to create my own environment which I need to contain the equation environment within. However, doing so changes the spacing of the lines and how text behaves: Here is the code: \documentclass[...
1
vote
2answers
29 views

Latex new environment pushes environment title to end of page when content is long

I am trying to figure out why does \newenvironment pushes the environment title down to the bottom of the page whenever the environment content is longer than 1 page. The following is an example. I ...
2
votes
0answers
70 views

Create code scrolling environment in Beamer [duplicate]

I try to present some code by using beamer. The problem I face is that most of the times the code does not fit into a single slide. Changing font size is not a solution because the audience in the ...
1
vote
1answer
38 views

Including images and animations in same environment

In my beamer presentation, I have three images and a merged pdf that I want to animate using the animate package. The set up is as follows: the three images are lined up next to each other, and I want ...
0
votes
0answers
20 views

Advice on using standalone package with tabular environment

Why is content prescribed by the code contained within the tabular environment being truncated (far right) when called using the standalone document class as configured in the mwe below? \...
4
votes
3answers
54 views

\input{} inside \chemfig{}

I'm likely ignoring something fundamental here and was hoping for some hints. Please see the inset mwe. Towards having a library of chemfig symbols, I see value in being able to point to a ...
1
vote
2answers
16 views

Locally redefine cleveref’s reference name for chapters

Consider the following MWE: \documentclass{scrbook} \usepackage{appendix} \usepackage{cleveref} \usepackage{etoolbox} \BeforeBeginEnvironment{appendices}{% \crefname{chapter}{appendix}{...
0
votes
1answer
37 views

Why does newenvironment work when not using begin/end, but not with?

I have two environments ItemBroken and ItemWorking. There are two differences in their definitions: ItemBroken takes 2 arguments, where ItemWorking takes three. ItemBroken has both a before and after ...
0
votes
1answer
13 views

How to use accentend characters in newfloat

I am using \newfloat to redefine numbers of Figures, as explained here. I used the following code: \documentclass[12pt,a4paper]{article} \usepackage[latin1]{inputenc} \usepackage{graphicx} \...
2
votes
1answer
49 views

How to make an environment like itemize to break when it reaches the end of the page?

I am currently using the Smart Twenty Seconds CV for creating my CV: The template has a sidebar on the left and text area on the Right. It uses some Kind of an own created environment which hold \...
0
votes
0answers
28 views

Define a `\newenvironment` that stores its content in a token register or in a macro

In the code below I want to define a new environment that stores its contents in order to use it later several times with different formats \documentclass{article} \newtoks\environmentcontents \...
0
votes
0answers
33 views

Make use of a CV template, one section cannot be split over 2 pages when list is getting too long [duplicate]

I currently make use of this CV template with the Name "Twenty Seconds Resume/CV" The author created a new list Environment, however when my actual list is getting too long Latex does not make a page ...
0
votes
1answer
50 views

Rename an environment: the codeexample used in tikz

I try to rename environment codeexample used in tikz document, but fail to use the tricks as in Wrap an environment. This is related to tkzexample: source and output side-by-side. The pgfmanual-en-...
2
votes
1answer
37 views

Wrap an environment

The following codes are taken from source and output side-by-side \documentclass{article} \usepackage[skins,listings]{tcolorbox} \newtcblisting{exampleB}[2][]{% colframe=red!50!yellow!50!black, ...
6
votes
2answers
195 views

Span command across LaTeX environments

Suppose I have an environment redacted which I wanted to declare in such a manner: \begin{redacted} This is some secret content. \end{redacted} Which, I wanted the result to be equivalent to passing ...
0
votes
0answers
47 views

Use \\ instead of \cr

I have defined an environment that internally uses the TeX command \halign for an aligned table. Therefore, the user of this environment needs to use \cr instead of \\ for a new line. This is not ...
1
vote
0answers
38 views

Page breaking issue with colored environment

I have the following problem. In the preamble I have the following: \newcounter{problem}[chapter]\setcounter{problem}{0} \renewcommand{\theproblem}{\arabic{chapter}.\arabic{problem}} \newenvironment{...
0
votes
1answer
41 views

Multiple errors with trying to wrap a figure

I want to wrap a figure so that it is on the right side of the paragraph but when I try to compile it, I get these errors: This is my code for that part: \documentclass[12pt]{extarticle} \...
1
vote
2answers
48 views

How to add extra leftmargin only for the body in an environment?

How to add extra left-margin only for the body in an environment? The extra margin should be of same space as the environment-head occupies. For example, what I am getting is this: And what I want is ...
2
votes
1answer
43 views

Environment with mdframed

The following mwe showcases the environment I am currently working with: \documentclass{article} \usepackage[tikz]{mdframed} \definecolor{greentitle}{RGB}{165,224,168} \newenvironment{notation}[1] ...
1
vote
1answer
33 views

Args in environment

I'm trying to create an environment. The error is as follows, the passed argument is not on the same line as the word Theorem. The result of the code below is Theorem 1.1.1 [ The desired result ...
0
votes
1answer
21 views

How to create an empty environment with custom caption?

This code shows a simple centered table that looks like this: \documentclass[12pt,a4paper]{report} \usepackage[labelfont=bf]{caption} \begin{document} \tableofcontents \listoftables \...
2
votes
1answer
60 views

Abstracting out “the font of the table header is bold”

Let's say I want my tables to have the following look: I can do that as follows: \documentclass{memoir} \usepackage[table]{xcolor} \begin{document} \begin{table}[h!] \centering \rowcolors{...
3
votes
1answer
46 views

Decorate every page of an environment

I am trying to make an environment where every page that contains content from that environment has a red border. I have tried using \EveryShipout from the everyshi package and setting a macro when I ...
2
votes
1answer
29 views

Increase parskip after first paragraph in environment

I have an environment and I'd like to increase the \parskip between the first and second paragraphs in the environment, but only the first and second paragraphs. I can achieve the effect manually ...
1
vote
1answer
36 views

Unwanted space due to colored beamer blocks

The code below redefines beamer's default block environment to allow for style customizations. Unfortunately it somehow also changes the horizontal spacing of the last column (the rule of the third ...
0
votes
0answers
7 views

Accumulate figures and place copy of all figures in appendix

So I want to have a figure accumulating environment, so that when I use a figure environment, it both shows on the page, but also in a separate appendix. For instance a alsosaveforlater environment ...
2
votes
1answer
42 views

tcolorbox in separate environment picking up style values from another tcolorbox

I have two environments, tip, and codeheading, each with their own tcolorboxes, like so: \newenvironment{tip} {\tcolorbox[colback=tip-green-background, frame hidden, boxrule=0pt, boxsep=...
0
votes
1answer
30 views

Automatically generate table with content from different environments

I am using a very simple custom environment to create exercises and their solutions. Each exercise yields a individual number of points. The number of points is defined in this way: % First argument: ...
0
votes
0answers
14 views

A & B inside tikzcd inside environ problem [duplicate]

Why does the following code produce an error and how can I avoid it? (tested in Overleaf) \documentclass{article} \usepackage{tikz-cd} \usepackage{environ} \newif\ifDraft \NewEnviron{Details}{\...
0
votes
0answers
28 views

Different Typos on different math fontstyles [duplicate]

I'd like to use a particular math fontstyle called "font 1" (it's just to explain my question), but visually there are two typos - the \sum and the \partial symbols- which do not please me. Therefore, ...
0
votes
1answer
230 views

Enumerate environment begin at 3 not 1 [duplicate]

I want to begin 3 (not 1) in enumerate environment My Code \documentclass{article} \begin{document} \begin{enumerate} \item Three \item Four \item Five \end{enumerate} \end{document} ...
3
votes
2answers
57 views

Expansion of an optional parameter for an environment

I want to define a custom environment, which takes an optional parameter, and I want be able to link to the environment using nameref. To this end, I tried something similar to the following MWE: \...
0
votes
4answers
126 views

Environment for a cheatsheet table

I would like to create a new environment to create small tables to use in a cheatsheet. I want it to look pretty much like this and would like to invoke it with something like: \begin{commandtable}...
0
votes
0answers
23 views

duplicate content in an environment

I am trying to define a (new) environment, say "exercise", with an optional argument, and a command \repeat, that work in the following way: First I write an exercise in the document: \begin{...
1
vote
2answers
56 views

Operations on both sides of equation with annotations

I recently found the package witharrows which allows you to annotate your equations and steps taking during algebraic manipulations and things like this for example. \WithArrowsOptions{displaystyle,...
1
vote
1answer
35 views

Changing the color of environments in beamer

I have just started lerning Latex. So, it is possible that the following doubt is very easy. I have to do a presentation with Beamer. I know that there exist specific comands to theorems, definitions,...
1
vote
1answer
34 views

Pass as argument options to environment inside \newenvironment

I take advantage of my previous question to ask this one, since from now on I want to implement my environments as much as possible and yet I have not found information about the topic of this ...
1
vote
0answers
15 views

Beamer footline dissapears with onslide

When using \onslide<n> with 1<=n<=k the footline will only appear on the slide \onslide<k>. To fix this it was suggested by Joachim Breitner to add a \onslide<1-> at the end ...
9
votes
2answers
423 views

Remove the small black rectangle that appears at the end of environment

I would like to correct the attached script that I was lucky enough to have it thanks to this Post \documentclass[11pt,draft]{book} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[...
0
votes
1answer
19 views

Aligning multiple array environment vertically (at the bottom)

I have multiple array environment that I want to allign vertically. Currently it looks like: With a minimal working example being: \begin{array}{|c c|} \hline A_1^1 & A_1^2 \\ A_2^1 &...