{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.

learn more… | top users | synonyms (3)

0
votes
0answers
15 views

Problem with adding exercises - “missing \item error”

I have the following MWE: \documentclass[12pt]{article} \makeatletter \usepackage[dutch]{babel} \usepackage{blindtext} %Paragraphs get numbered continuously \usepackage{chngcntr} ...
2
votes
1answer
24 views

Environment for Counting Names and Marking the count as Subscript

For typesetting a religious document explained as below This contains verses of list of names separated by commas. A counter is to be initiated and will be incremented with each name. Each name ...
1
vote
1answer
27 views

Count number of subenvironment under custom environment

I'm going to typeset a test and also doing a mark scheme, I have the following code: \documentclass{article} \usepackage{ifthen} \usepackage{amsmath,amsfonts,amsthm,amssymb} ...
3
votes
1answer
22 views

Data structure: Define a command or environment only valid inside a certain type of environment

I want to script the generation of LaTeX documents, and therefore, I will need to use a data structure to organize the information. For example: Person: Name Phone Address I know in LaTeX you ...
1
vote
1answer
13 views

Allow page break in table in customized environment

\documentclass[12pt]{report} \usepackage{amsmath,enumerate} \usepackage[top=1cm,bottom=1.5cm,left=1cm,right=1cm]{geometry} \usepackage{booktabs} \usepackage{longtable,tabu} % allow page break ...
0
votes
1answer
32 views

How can i write the text show in red rectangle?

How can i write the text show in red rectangle?
4
votes
2answers
124 views

How to use \newenvironment; why doesn't this code work? How do I fix it?

I've been trying to find out but my latex skills are too weak to understand what seem like similar problems. When I try this: \documentclass{memoir} \usepackage{graphicx} \usepackage{exsheets} ...
1
vote
1answer
24 views

Highlighting paragraph as own opinion

Has anyone a suggestion what one could do to mark some parts of a text as "own opinion?". I am writing a report on which basis the team will decide further steps. So I am reviewing several ...
0
votes
1answer
23 views

using the soul package with equations

I use the soul package to highlight some changes in my documents for review purposes. However I can't get it to work with equations (or other environments for that matter). Basically I create a ...
0
votes
0answers
22 views

How to number chemical reaction separately from mathematical equations? [duplicate]

While writing part of my dissertation, I need to number chemical reactions separated from mathematical equations. I checked chemscheme, but it seems not what I'm looking for. I need to numbering of ...
3
votes
1answer
22 views

How to set single spacing for all quotation environments? (Bug in etoolbox?)

I found an answer to the question here: Reduce the space between a quotation and a title. But for some reason the result is highly dependent on the code formatting and hence error prone as shown by ...
2
votes
1answer
21 views

Put some environment on left column and some others on right in article with twocolumn option

I use the article class with the twocolumn option. I would like to put definition environments on the left column and example environments on the right column. For example : ...
8
votes
2answers
203 views

How to automatically repeat all the theorems?

What I'm trying to do sounds quite simple: \begin{thm} Theorem 1 text. \end{thm} ... \begin{thm} Theorem 2 text. \end{thm} ... \RepeaAllThms This should display the theorems as it usually does, but ...
1
vote
1answer
21 views

text format in the appendix in a thesis

I am using Easy Thesis template from sharelatex. I need some help to put the text below as it is in the appendix section in a thesis. I may prefer the font as it is (ascii). REMARK ATOM 1 ...
1
vote
1answer
31 views

Table/figure in custom environment

having a custom defined environment, how would it be possible to have figure/table under the defined environment? \newenvironment{example}[1]{% \begin{exa}[#1] }{% \end{exa} } and ...
0
votes
3answers
49 views

creating theorem-like environments within 'notes' (see example)

I would like to create the following style to write mathematics: In fact the above I created myself but some numbers and spacing I had to set manually (and I would like this to be automatic of ...
3
votes
1answer
38 views

Redefining proof environment

How can I change the \begin{proof} environment so that the word Proof which is displayed in my document isn't italic? I tried changing \proofname, but that only changes the displayed text, not the ...
2
votes
1answer
46 views

Referencing custom environment

I am using \begin{figure} \includegraphics{} \caption{Caption} \label{fig:fig_name} \end{figure} and \begin{table} \begin{tabular} .... \end{tabular} \caption{Caption} \label{tab:table_name} ...
3
votes
1answer
20 views

How to use case 1, case 2 in a proof (IEEE confs)

I want to show: proof: Case 1: ..... Case 2: ..... in a proof. The following is my rough codes: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \begin{proof} ...
6
votes
1answer
50 views

Can an environment replace text within it during compilation?

Esperanto uses an alphabet that is largely ASCII, but also includes the letters ĉ, ĝ, ĥ, ĵ, ŝ, and ŭ. At the same time, some ASCII letters are not used. When you're limited to just ASCII there's a ...
1
vote
1answer
25 views

argument in newenvironment

I am trying to write a newenvironment that would be a wrapper for code layout, using minted. So far, I tried that: \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} ...
2
votes
1answer
41 views

Defining a synonym for an environment name

I'm currently writing some assignments where I need to embed code fragments. I already found the listings package for that, which works fine. My "problem" is, that I want to ...
0
votes
2answers
23 views

Terminate environments within environment in class function

I'm writing a class for a document, that inherits from article, and I encountered a problem with this: the document should be all in two columns, except the abstract. For the two columns, I use the ...
1
vote
1answer
29 views

Number theorems with chapter number

I use declaretheoremstyle to define a theorem environment, and print a list of theorems in the end of my document: \documentclass[12pt]{book} \usepackage[english]{babel} ...
3
votes
1answer
32 views

Remove repeated “Theorem (” in the list of theorems

I use declaretheoremstyle to define a theorem environment, and print a list of theorems in the end of my document: \documentclass{article} \usepackage[english]{babel} ...
1
vote
0answers
73 views

Tilde symbol inside an environment

I have set a new matcode environment in order to have some matlab code in my .tex file, using the matlab-prettifier package (combined with the listings package). However, I have a problem with the ...
4
votes
1answer
24 views

Pass options in verbatim environment inside another environment

I want to define a new environment (here testenv), which is going to include text in verbatim mode. So, I have the code: \documentclass{article} \usepackage[english,greek]{babel} ...
5
votes
1answer
49 views

Uppercase whole \newenvironment

I am trying to uppercase a whole new environment without success with the code below : \newenvironment{upc}{ \MakeUppercase\bgroup } { \egroup } Here is an example : \begin{upc} 23 ...
3
votes
0answers
18 views

Cannot wrap align and align* [duplicate]

I am used to using \newenvironment to wrap an environment: \newenvironment{wrappedequation} {Look out for the equation! \begin{equation}} {\end{equation} Phew, it's over.} This ...
5
votes
1answer
59 views

Conflict between NewDocumentEnvironment and enumerate

I have the following document: \documentclass{article} \usepackage{enumerate} \usepackage{xparse} \newcounter{probctr} \NewDocumentEnvironment{prob}{o} {% \par \addvspace{.15in}% ...
5
votes
1answer
165 views

Adjust vertical spacing for any combination of text, equations and custom environments

Edit I completely rewrote the question thanks to @pluton's comment. I have a couples of documents which have to fit on two pages. Some of them are short, so nothing needs to be done. But for some ...
5
votes
2answers
147 views

New environment, orphan line

I created three environments for my document: a booklet for a treasure hunt with scrreprt. I created 3 environments (the document is in french): enigma: ...
5
votes
2answers
75 views

Display enviroment differently for one use vs. two

My issue can be boiled down to this: \documentclass[10pt,oneside]{article} \usepackage{enumitem} \newenvironment{mygroup}{ \vspace{.15in} \textbf{\large MyGroup Heading} }{ } ...
4
votes
2answers
72 views

Compile error with redefined bmatrix and align environment

I just spent a couple of hours finding the reason for compiling errors in the last example in here: \documentclass[a4paper,draft=true, headsepline=on, twoside , 11pt, ]{scrbook} ...
2
votes
1answer
44 views

PGFplots within Environ format mistake

I try to write an environment for a simple barplot with pgfplots to reduce the needed markup. For that I use the environ package. For some reason tikz complains about a format mistake at the ...
3
votes
1answer
80 views

Which Latex environments are supported in Markdown and pandoc?

Does anyone know which Latex environments that are supported in pandoc when converting Markdown to html? I have tested equation, align, alignat which seams to work, so is there e.g. a family/kind of ...
11
votes
3answers
339 views

End \verbatim command

The verbatim environment is used to display LaTeX commands instead of having them executed. To display a single command in-line, the \verb|| command can be used. To display a whole block, we can use ...
2
votes
1answer
53 views

How can I use TiKZ to design comments in the margin of an environment which allows a pagebreak?

To distinguish different classes of environments, I use the environment shaded from the package framed. Then, I would like to design a corresponding environment using TiKZ where a line with a ...
3
votes
3answers
106 views

How to easily write conditional pages? [closed]

Is there any easy way to make latex write only some of the pages? My current idea is to make a function using the ifthen-package in the following way: \newcommand{\WhatDoYouWantToWrite}[1]{ ...
3
votes
1answer
30 views

edit an enviroment to add to a new extra parameter

I'm trying to define a new \newenviroment but I'm having some problems. I need an enviroment that uses a counter and uses an extra parameter to write some text. I'm working with this enviroment: ...
0
votes
1answer
34 views

Unwanted Vertical Space before figures in IEEE Tran Latex document

I am trying to insert .eps figures in my IEEE tran latex document. My figures are shifted down from the original position. Although the figure captions are in their desired positions. I have used word ...
0
votes
1answer
24 views

use of “chemmacros” package give errors when define a newcommand

I am using chemmacros package to write chemical symbols in my thesis. (I am using Easy Thesis template with book class). I added these packages (as below) at the top of thesis.cls file ...
1
vote
0answers
14 views

Symbol at the end of an environment [duplicate]

I'm putting a diamond symbol at the of a remark by use of \usepackage{amsthm} ... \newenvironment{rem}{\begin{remark}}{\hfill$\diamond$\end{remark}} However when the rem environment is ...
3
votes
1answer
17 views

modification to comment environment

I'm using the comment package, in my preamble I have \specialcomment{notes}{\begingroup \color{Blue}}{\endgroup} so that when I want to comment my text I write \begin{notes}...\end{notes} to get a ...
2
votes
2answers
33 views

How can I reduce the space around alltt environment blocks?

How can I reduce the space around all alltt environment blocks? \documentclass{article} \usepackage{alltt} \begin{document} Test1 \begin{alltt} some code \end{alltt} Test2 \end{document} This ...
1
vote
1answer
27 views

Can I make an environment which treats the first paragraph differently to the rest?

I am trying to make a new environment which creates a hanging indent on the first paragraph only but leaves the other paragraphs indented: My code for the above image is: \begin{hang} ...
3
votes
1answer
45 views

Multiline Chain of Implications

I'm new in this forum. Is it possible to create the chain of implications as shown in the image attached, in latex ? Thanks in advance. Tatin
0
votes
3answers
30 views

Problem with lstlisting enviroment

I'm writing \documentclass{beamer} \usepackage{listings} \begin{frame} \begin{lstlisting}[language=bash] #!/bin/bash echo "Hello,world!" \end{lstlisting} \end{frame} But the output ...
2
votes
1answer
80 views

How can I get a count of the optional arguments with xparse?

Question Is it possible to get and store a count of the optional arguments actually passed to an xparse declare argument/environment? Purpose Regardless of the number of arguments provided ...
0
votes
1answer
45 views

Customizing enumerate list with item label as parameter of new environment

I want to define a new environment which would allow me to have a like-enumerate list, i.e. have the \items numbered like in an enumerate environment and change the item name by the one given as ...