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

2
votes
0answers
32 views

Wrapper around `picture` environment causes page break [duplicate]

A picture environment at exactly the size of the text area can fit snugly on one page. However when I replace the environment with a wrapper environment with exactly the same definition, it takes two ...
6
votes
1answer
183 views

Why do these three changes fix this equation-numbering error?

When I use \equation...\endequation instead of \begin{equation}...\end{equation}, all equations have the same number (I know this isn't best practice for environments; I'm trying to understand the ...
11
votes
2answers
245 views

Extract source code on the fly to a file?

I'm trying to create a programming text to use for my students. My goal is to have an environment (say, "code", for instance), so, if I type the following in my .tex file: \begin{code}{Sample script} ...
2
votes
2answers
46 views

How to “align” the LyX aligned math environment

I frequently use the aligned math environment in LyX to typeset my equations. However, if I want to save space on the page and set two equations simultaneously in the same aligned math environment, ...
2
votes
1answer
31 views

Switching between wrapfigure and figure environments

I'm trying to realise switching between wrapfigure and figure environments, using boolean control. But for some reason wrapfigure does not do what it should do - be wrapped, instead it is placed in ...
2
votes
1answer
28 views

\ref to existing \label do not works, but index and url yes

This is my code and my results: \begin{figure}[h!] \label{fig:ppe_xyz} \begin{lstlisting} §$ppe_x$§ = ppe(§$A_x$§, s, order, overlap, H); §$ppe_y$§ = ppe(§$A_y$§, s, order, overlap, H); ...
4
votes
2answers
57 views

Reset counter at beginning of proof

My goal is to get a new claim environment which automatically numbers. This is fine - I can make a counter, define a claim environment and claimproof environment which number automatically, and this ...
2
votes
2answers
35 views

Changing Abstract name does not work

Here is my MWE: \documentclass[11pt]{article} \usepackage{fontspec,xgreek,polyglossia} \defaultfontfeatures{Mapping=tex-text} \setmainfont[Mapping=tex-text]{Liberation Serif} ...
3
votes
2answers
74 views

Including figures in custom environments.

In my preamble I have the following custom environment that is counted. \newtheorem{exmp}{Example}[section] When I call this in the text I always write the following piece of code, \begin{exmp} ...
2
votes
2answers
71 views

How to expand ExSheets question environment to show user-defined blank space for solution?

This is my minimal not-working example: \documentclass[a4paper,10pt]{book} \usepackage{mdframed} \usepackage{exsheets} \newenvironment{exerciseWithSpace}[1]{\begin{question}}{\end{question} ...
4
votes
1answer
52 views

\command without {} ending at the end of the line?

In a work, I have to write a lot of dialogue. This is my MWE: \documentclass{article} \newenvironment{dialogue}{% \noindent% \newcommand\one[1]{\textit{##1}\newline}% ...
1
vote
2answers
33 views

I want to set first paragraph of text environment to no indentation

I am using evironments to typeset some paragraphs of text with different fonts. I want the first paragraph after \begin{environment} to have no indentation. My code is ...
3
votes
1answer
58 views

How to define a new environment of two text blocks with number?

Hi, I want to define a new environment like the figure above. It has two text blocks with different background color. Block 1 has a short numbered title, such as 'Note' or 'Definition'. Block 2 has ...
4
votes
1answer
65 views

How to wrap a `\newcommand*` into a multi-paragraph environment?

As stated elsewhere, it is usually quite recommended to use the starred \newcommand* instead of \newcommand since this helps finding missing }s by disallowing paragraphs in its argument. Every now and ...
3
votes
2answers
180 views

How can define an acknowledgement section in two languages

I am writing my LaTex document and I would like crate an acknowledgementsection in two languages: first written in my mother tongue (Italian) and then in English as the rest of the document. I'm ...
3
votes
2answers
127 views

ConTeXt: Change emphasis font when used within blockquote environment

Background Looking to change the font for emphasized text within a specific type of macro block (environment). Only emphasized text should change; any text within the environment that is not ...
2
votes
0answers
22 views

How to get align environment in the same line as text [duplicate]

I would like to have an align environment which is not automatically written in a new line. For example in the following code, the formulas should appear in the same line as the itemize-dot or the ...
2
votes
2answers
83 views

Beamer - Use custom environment on TOC frames

I defined a environment slide based on frame to get rules beneath the headline and above the footer and get the section in the frametitle. \newenvironment{slide}[1] {\begin{frame}[environment=slide] ...
4
votes
2answers
133 views

Two abstracts in two languages in Elsevier class

I have a problem with putting two abstracts under the title of my article in elsevier class. I am using this code: \documentclass[preprint,10pt,3p]{elsarticle} %% ...
1
vote
1answer
42 views

Automatic table of contents entry from environment [closed]

I have created an environment to be used in creating examples in my text. The class is one specified by the publisher Wiley, basically a book. The environment currently takes the name of the example ...
0
votes
0answers
24 views

Code for generating assignments with questions, sub questions and sub-subquestions

I wish to generate a question paper for an assignment, to be given to the students. Apart from the usual notes about the assignment, I wish to have question numbering, along with sub-questions and ...
2
votes
2answers
45 views

\indent doesn't work as expected in custom nested environments

I have a custom environment that I use as follows: \documentclass[12pt,draft]{memoir} \usepackage[dvipsnames,usenames]{color} \definecolor{shadecolor}{gray}{0.85} \newenvironment{Myenv} ...
1
vote
1answer
29 views

Newenvironment, multicol and space problem

Why jumping a line cause a problem here ? \documentclass{article} \usepackage{multicol,xparse} \NewDocumentEnvironment{DeuxCols} { D<>{30pt} O{.5pt} mm }{% ...
6
votes
2answers
195 views

Square brackets [ ] as first text inside environment

I had a case where I wanted do start a text with a square bracket inside an environment. It was interpreted as an optional argument. My workaround was to insert a {} to separate that. Is that the way ...
2
votes
0answers
56 views

Spoilers in Web-Accessible Pdf Documents?

A highly regarded professor of mine is currently writing a graduate mathematics textbook in which he has given the book a theme of ``do it yourself'' mathematics. He has asked me to review the book ...
1
vote
1answer
23 views

Redefine an environment with options

To write a report I am using the package wrapfigure which generates figures on a side and the text flows around it. It is not news that it is very difficult to handle the spacing and positioning of ...
5
votes
3answers
136 views

newenvironment and restatable

I'm trying to create a new enviroment using restatable, but it doesn't work. What am I doing wrong? \documentclass{article} \usepackage{amsmath} \usepackage{thmtools,thm-restate} ...
3
votes
1answer
74 views

Theorem style: All letter uppercase

What do I have to do, the create a theorem environment, where the theorem name has a different style than the standard one? I want the name to be all capital letters. Obviously \newtheorem*{new ...
0
votes
1answer
31 views

linespacing local font environment [duplicate]

I have a multi-paragraph section of tiny-font within a larger document of normal-size text. The last paragraph within this section seems to get double spacing: I can fix the problem by putting a ...
6
votes
2answers
85 views

How can I change the behavior of single letters in an environment?

I'm working with a Ktunaxa, a First Nations language that uses the symbols ȼ and ⱡ (and the uppercase equivalents Ȼ and Ⱡ, but not c or l. How can I create an enivronment that would change all c and ...
3
votes
1answer
76 views

Defining an environment which includes a bibliography

Consider an environment which is intended to house a variety of content related to an author. Content may include name, affiliation, a paragraph which is a short biography, as well as, a series of ...
3
votes
1answer
67 views

Producing expandable environments with only optional arguments with LaTeX3 syntax

I am trying to create a new document environment to complete the assembly of a table (simplified for MWE) but I am having a problem combining an expandable environment with an optional only argument. ...
1
vote
0answers
39 views

Replace a nested LaTeX command with multiple arguments [closed]

I'd like to replace the LaTeX command \teilseiten{left col width}{left col text}{right col text} by an nested environment. The problem is, that the second and third argument of \teilseiten contains ...
4
votes
1answer
46 views

Need two environments in table

I want to set up a table with the column headings centered, but the data right justified, without using \multicolumn for every single cell in the heading, rather I want to use a locally global ...
1
vote
0answers
53 views

Is this possible in Latex? Creating a new environment for notices in technical documents [closed]

I don't even know how to title my request. I am also not including any code, because I have absolutely no starting point. I'm writing a technical document and once in a while I need to put a ...
2
votes
1answer
45 views

Flexibly start a new page for proof environment

I would like to redefine my proof environment so that if the content of the proof environment is only, say, 3 lines or fewer, then the entire proof environment will just start on a new page. Here is a ...
3
votes
1answer
29 views

Problem with making a “new float” and using \autoref{} command

I'm trying to do a new float called "grafico" with the float package. It works fine, but when I try to do a reference, i.e. \autoref{}, it only shows the float number (e.g. If it's "Gráfico 2.1: blah ...
2
votes
1answer
15 views

Error while nesting two environments

I'm trying to nest two environments: \documentclass{article} \usepackage{environ} \NewEnviron{innerEnviron} {INNER \BODY{} INNER} \newenvironment{outerEnviron} {OUTER \begin{innerEnviron}} ...
2
votes
1answer
55 views

Optional text printed in another colour

I would like to extend the version package to print some optionally added text in a different colour. Something like in the following example: \documentclass{article} \usepackage{version} ...
3
votes
1answer
55 views

newenvironment with braces split between start and end

I'm defining a command for placing figures in the margin. A simple version follows: \documentclass{article} \newcommand{\margin}[1]{\marginpar{#1}} \begin{document} \margin{Figure goes here} ...
4
votes
1answer
46 views

Indentation in newtheorem environment

I already have a personalization of the "newtheorem" environment, as follows: \documentclass[a4paper,10pt]{article} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} ...
2
votes
1answer
53 views

Problem with defining new environments: The first word is not shown correctly

In my Latex-file there is the following part for defining new environments for theorem, lemma and so on: Unfortunately, this produces some mistakes. When I write a new theorem, lemma etc. then the ...
1
vote
2answers
377 views

Size of the bullet using \itemize

I was wondering what is the (standard) size of the bullets that appear using the itemize environment: \begin{itemize} \item ABC \end{itemize} Is it \small, \tiny...? Is there any way to ...
3
votes
1answer
32 views

Hide indented amsthm environment using comment package

I use amsthm to define a "Solution" environment. I want to be able to hide it. Following this comment I tried using the comment package: \documentclass{article} \usepackage{amsthm} ...
2
votes
1answer
30 views

How to: print paragraph title centered, and on a shaded line across the page? - Continued

This question is a continuation of: this question Consider the following document \documentclass[landscape]{article} \usepackage[a3paper, textwidth=5cm, margin=1cm,landscape]{geometry} ...
1
vote
1answer
134 views

How to typeset a proof via structural induction

Structural induction differs from "mathmatical" induction in the number of cases: While mathmatical induction requires exactly two cases, structural induction may require many more. A proof via ...
2
votes
1answer
39 views

How do I wrap a macro definition in an environment?

I'm creating a style file, and want to store the body text of the abstract environment so that I can put it on my custom titlepage. I could have required that my users enter the abstract as ...
0
votes
1answer
56 views

code using the same packages of tikzcd works on one project but not other

I'm using the package \usepackage{tikz-cd}. Note that this code works good. \documentclass{amsart} \usepackage{tikz-cd} \begin{document} \begin{tikzcd} & D \arrow[d,"f"] \arrow[dl, ...
1
vote
1answer
28 views

Issue accessing Auctex environments [closed]

I recently installed AucTex on a new computer, and am having an issue that I do not recall with regards to accessing environments. Using C-c C-e, auto-complete etc., I am only able to access a handful ...
4
votes
2answers
65 views

How to: print paragraph title centered, and on a shaded line across the page?

For a cheat sheet I am making I would like that \paragraph{title} does the following: Centre the text 'title', on a shaded (gray) line across the entire page ( column in my case ), start the actual ...