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
2
votes
2answers
33 views

Nested Environment in LyX: Theorem with only an enumeration

I've read the following posts but I'm not sure they answer my doubt: Lyx nested environments; Normalizing nested environments for cleaner design (LyX). I am using the AMS theorem environment, and I ...
0
votes
1answer
35 views

How to write comments after self defined environment header

I have defined an environment viz.Examples in the following way: \newtheoremstyle{myexcstyle}{3ex}{3ex}{}{}{\scshape}{:}{.5em}{} \theoremstyle{myexcstyle} \newtheorem*{exmps}{Examples} \...
0
votes
0answers
21 views

Parametrically Sorting LaTeX Sections

I am trying to create a report with a few chapters, but each chapter with many sections. I plan to update the document each day with each day's entry being in a new section. I can do the entry either ...
2
votes
2answers
55 views

Two solutions to one problem

I have defined the solution environment as below: \newtheorem{solution}{Solution}[subsection] I have two solutions to problem 1.3.3 as shown in the attached screenshot. However, by using \begin{...
0
votes
0answers
40 views

How do I create macros to use in conditional statements?

I am creating a document class for homework assignments, I would like the problem environment to have an optional option to include parts. What I have now will compile correctly in Overleaf but gives ...
2
votes
0answers
25 views

I can't change the font in awesome-cv

Latex Code How do I change the font in the list under Coursework to match the font in the rest of the latex document using awesome-cv?
2
votes
1answer
34 views

Suppressing text with strikethrough?

I would like to suppress text that has been strickenthrough (struckthrough?). I don't think that hide does this, because hide replaces with an empty box of the same size. I think something like \...
1
vote
1answer
37 views

Defining counter including section or chapter

In the following LaTeX code I want the referring number of the nlpr environment to appear as the referring number of the theorem. How shall I modify the definition of the nlpr environment? \...
1
vote
1answer
35 views

Place words before text

Currently I am working on a textbook for students. I am looking for a way to place words before text, in order to show what concepts are defined in that alinea. Something like this: ...
0
votes
1answer
29 views

User defined Section Environment - Undefined Control Sequence

I am trying to create a user defined environment to create a section the code for which is \newenvironment{rSection}[1]{ % 1 input argument - section name \sectionskip \MakeUppercase{\bf #1} % ...
1
vote
0answers
29 views

Ignore specific lines when numbering lines - how to do it?

This may also be a potentially trivial question, but did not find the answer. Answers relate to other packages. ... \usepackage{lineno} ... \begin{linenumbers} \begin{verbatim} A B C \end{...
1
vote
1answer
27 views

@currenvir check returns false

Good day, I'm trying to check for the solution environment and close it if it's open. I have tried this answer and checking directly for the @insolution toggle that is set by solution environment ...
3
votes
1answer
32 views

NewDocumentEnvironment and xparse combination adds unwanted space after

This is a follow-up question to this one, but I am afraid it is of a different nature now. The accepted answer seems to put unwanted spaces after the custom-defined environments. I am not sure how to ...
0
votes
0answers
12 views

Reference counter does not include chapter number

Trying to get reference numbers right to a custom defined environment. In short I have: \newcounter{MathToolBox}[chapter]\setcounter{MathToolBox}{0} \newcommand{\theBox}{\arabic{chapter}.\arabic{...
1
vote
0answers
16 views

Listing theorems or definitions

I followed this Marking the end of a definition to create an specific environment definition for my theorems. Is there any easy way of listing all declared definitions/theorems? I want a list similar ...
1
vote
1answer
19 views

Resolving a FancyVerb error when making a new code environment

full MWE presented at the end I am creating my own code environment with minted for a text I am writing. It is enumerable, as well as reference-able. Everything works fine and the document compiles ...
1
vote
0answers
35 views

Ideas for presenting the research question?

I know this is a very open questions, however I am looking for some impressions as I am totally unsure in what style I can do this. I am writing m bachelor thesis right now and want to present my ...
0
votes
1answer
30 views

Nameless environments spacing side-effects

I was under the assumption that wrapping a section of text within curly brackets effectively creates an implicit environment where I can temporarily change some settings, for instance the font size: ...
1
vote
1answer
37 views

newenvironment including minipages

With the following code I get almost what I would like to have (exclamation mark besides a text including an equation), but I get an overfull \hbox message although I am respecting textwidth. The ...
0
votes
1answer
32 views

Defining a new environment that utilizes the optional package inside

I have been using the optional package in order to conveniently create solutions in the same document. I had been writing solutions longhand by placing it inside: \opt{optS}{\color{blue} \textbf{...
1
vote
1answer
21 views

Nesting environments when trying to define an align-like environment which carries one single equation number

I am trying to define a new align-like environment that, in the spirit of this answer, displays only one single equation number for the entire multi-line equation. As for nesting the align and split ...
5
votes
2answers
186 views

TeX command into Environment

How to change below mentioned latex "command" as "environment" mode e.g. \marginnotesone{sample text} ---> \begin{marginnotesone}sample text\end{marginnotesone} Please find my tex code as below: ...
2
votes
1answer
41 views

Floating environment with caption outside the box

I have defined a float environment following this answer in the "optional caption" version: \documentclass{article} \usepackage{newfloat} \usepackage{caption} \DeclareFloatingEnvironment[fileext=frm,...
0
votes
1answer
46 views

How to define a two-column definition environment that breaks across pages

Related questions: How to make a table on more than one page by using the table environment TabularX and \Newenvironment{} with Page Break Description-like environment with fixed labels ...
1
vote
1answer
32 views

List arguments for a specific command within each section

How can I limit the scope of a command to a given section? I have adapted a macro found online which reads in the arguments from a command and lists them \newcommand{\printDefn}{} \newcommand\defn[...
0
votes
0answers
31 views

How to identify align points in a gather environment

I am using Lyx. I have created a set of equations in a gather environment. Now I think it would be better if I get the equal signs aligned. I don't like to reconstruct my equations again in an align ...
2
votes
1answer
105 views

How to bold custom handwritten text

I use the miama font to simulate short (a couple of lines) handwritten pieces of text. As the font is rather light, I use an adaption of Steven B. Segletes solution from How to bold custom ...
1
vote
1answer
16 views

command in {after} section of environment behaving oddly

In its simplest form, I'm trying to do an environment which wraps the filecontents environment, and does some stuff after the file is written. \usepackage[autocompile]{gregoriotex} \newenvironment{...
2
votes
2answers
33 views

Inconsistencies in environments

I have noticed that I get different results when I use an environment and when I type my code "directly", which I presume is not supposed to happen. For example, here is the code for a definition (the ...
2
votes
1answer
36 views

Rearrange inside environment

This is somewhat hacky. I'm ultimately trying to create an exam template that rearranges itself. But, I want a lot of flexibility and the randomizing exam packages that exist don't seem to work. I'm ...
1
vote
1answer
31 views

Autoref after putting the same counter for all environments

I have a xelatex amsart document in which I defined first a counter \newcounter{thms} and then defined environments, \theoremstyle{definition} \newtheorem{thms}{Theorem} \newtheorem{defni}[thms]{...
0
votes
1answer
33 views

Indent theorem body (excluding the title)

I'd like to define custom environments in which the body is indented in contrast to the body/the first line of the environment. An example could look like this In particular not every environment ...
1
vote
1answer
46 views

Making a restatable boxed theorem

This is probably very simple to do, but I am trying to write restatable theorems with boxes around them. Looking at this answer, box around theorem statement, I get a way to put boxes around a theorem,...
3
votes
1answer
29 views

Use translations in newtheorem defintion

How can I use the translations package to define multi-lingual newtheorem environments as in: \documentclass{article} \usepackage[german]{babel} \usepackage{translations} \usepackage[thmmarks,...
3
votes
2answers
65 views

Placing figures in parboxes and referencing them

I'm trying to build a latex environment that generates a table, and in that table there may be figures that need to be referenced. I absolutely need the number in the text to compile to the reference ...
0
votes
0answers
14 views

Changing the font for reference in theorem statements

I'm writing a document that has a part looking like this. Here's the code: \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} % Change according to your operating system \usepackage{...
1
vote
1answer
56 views

How to Enhance an Existing Math Environment

I'm taking the next step in my learning of LaTeX and starting to explore the possibility of creating custom environments; however, the resources I've consulted don't mention how to create an ...
0
votes
1answer
45 views

mdframed even top and bottom margin for environments

I'm trying to use LaTeX for my current ODE lecture and use mdframed for a "boxed proposition" to make it easier for the reader to distinguish the formulation from the proof. This is what I use to ...
0
votes
2answers
29 views

How can I create an absolutely positioned environment position determined by parameters using tikz?

I'm trying to define an environment that will place the contents in a tikzpicture node that gets positioned based on environment parameters. I'm very new to LaTeX, TikZ, and PGF, so the syntax is ...
0
votes
0answers
13 views

Tagging in \newenvironment does not work with unactivated tags

I have a list of exercises created using package amsthm that I would like to tag using package tagging to generate only the exercises relevant to a certain chapter. I want to create a new environment ...
0
votes
1answer
36 views

How to remove additional space under wrapfigure when using vspace in text

I'm creating some custom environments. One of them will be placed in \wrapfigure and second one will contain text which should wrap around the first one. When I'm adding \vspace between paragraphs, ...
0
votes
0answers
66 views

Can we make a better shaded/framed/boxed environment?

I have grown quite fond of Donald Arseneau's framed package. However, there are a few tweaks I would like to add, but not sure how. Whether to merge the two environments framed and shaded, or modify ...
1
vote
0answers
58 views

Use `tikzpicture` in `\newcommand` or `\newenvironment` along with `lstlisting`

I defined the following command \recomm to print a box with a separated body and a title: \newcommand{\recomm}[3]{ \vspace{0.5cm} \noindent \begin{tikzpicture} \node [rectangle, inner sep=...
2
votes
2answers
82 views

Theorem and definition name in margin

I want to have the theorem names appear in the margin. I've tried using the margin notes to do this but I was unable to do so. Here is a picture of what I am trying to do. The top line is how the ...
0
votes
1answer
27 views

Avoid extra linebreak at the end of modified “proof” environment

This question is related to How to change the word "Proof" in the proof environment?. I would like that the proofs in my document begin with "Proof. ---", instead of the standard "Proof." by ...
1
vote
0answers
28 views

How to use \newenvironment and align in standalone document

This works: \documentclass[]{article} \usepackage{amsmath} \newenvironment{f}{ \csname align*\endcsname }{ \csname endalign*\endcsname } \begin{document} \begin{f} a = 1 \end{f} \begin{f} ...
0
votes
0answers
108 views

White edge around text when underlining using \contour{white} inside a shaded environment

When using the simple code for adding nice underlines under your text: \usepackage{ulem} \usepackage{contour} \newcommand{\ul}[1]{% \uline{\phantom{#1}}% \llap{\contour{white}{#1}} … a problem ...
0
votes
2answers
75 views

How can I create custom an environment with default left margin?

--Edit-- (rewrite the code that I use currently to produce margin left) This is code that I try to make a new environment (leftwhitespace) of, instead of writing these code that create list with 1 ...
2
votes
2answers
81 views

Annoying syntax highlighting of unclosed group at \cs:w [closed]

So I was looking at my preamble, with Overleaf yelling at me for not putting a closing bracket after the piece of code attached below, which is strange, since that group is indeed closed. To confirm, ...
2
votes
3answers
193 views

New Command for Comment?

Question: Is there an environment similar to the comment environment that suppresses text and space but can be called using inline commands? I'm trying to develop a better way to type my solutions ...

1 2 3 4 5 47