{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
34 views

Formatting multiple-choice questions

I require a question environment with the following characteristics: The prompt has to be set beforehand with \prompt{What is the answer?} because the environment has to accomodate other data such as ...
5
votes
2answers
36 views

Adding optional arguments to environment

I'm trying to understand and modify this code: \newtheorem*{nonamethm}{\nonamethmname} \newcommand{\nonamethmname}{} \newenvironment{genthm}[1] {\renewcommand{\nonamethmname}{#1}\nonamethm} ...
2
votes
3answers
40 views

Creating a new list Environment, how to change the length of \items

The code for the environment is bellow, For the longer lines in \list item how do I change the length of the \items so that it lines up with the date? Basically I want a kind of "margin" that is on ...
3
votes
2answers
41 views

Extra space after self-defined environment [duplicate]

I defined a new environment eq to simplify the equation, \newenvironment{eq}{\begin{equation}}{\end{equation} It works, but it seems that there is a extra space at the end of the environment, which ...
2
votes
1answer
35 views

Remove all proof environments

I have a document containing some proofs and want to create a version only containing the theorems (and corollaries and lemmas and examples and …), but no proofs at all. Is there an easy, automatic ...
1
vote
1answer
29 views

Custom spacing in aligned environment

How can I add an arbitrary horizontal spacing in an aligned environment? \hspace{} and \qquad don't work. \usepackage[utf8]{inputenc} %\usepackage[latin1]{inputenc} %Zeichencodierung ...
1
vote
1answer
26 views

global align parameters across items

I've read questions asking about align across multiple environments, but still am stumped about how I might address this situation. The following code: \section*{Solutions to Practice Problems} ...
5
votes
1answer
84 views

Lazy Evaluation in Forest Package?

I'm using the forest package to draw logic circuits, and I'm trying to customize the style. I want the inputs to be aligned, so I write this macro: \newcommand{\inp}[1]{[#1,tier=in]} But when the ...
2
votes
1answer
17 views

Using Forest Package in Newenvironment

I'm trying to use the forest package to draw circuits, so I want to define a "circuit" environment that is a wrapper around the forest environment. But defining a newenvironment runs into problems. ...
4
votes
3answers
88 views

create environment that resizes content

I want to create an environment that puts its content within a minipage as wide as the current page. The environment would work as follows: \begin{FitToWidth} HELLO \end{FitToWidth} and produce a ...
2
votes
1answer
45 views

Can I use phantom to hide a LaTeX environment (itemize)? [duplicate]

Is there a way I can use \phantom to hide the contents of an environment, such as itemize? This does not execute: \phantom{\begin{itemize} \item Hi! \end{itemize}} I'm ...
2
votes
1answer
42 views

How to make an item bolder in description environment

Does anyone know how to make an item bolder in description environment : i tried to add \textbf{ } like this \item [\textbf{{\textarabic{سورة الإخلاص }}}] I have the following segement of code, ...
0
votes
0answers
31 views

Defining a new environment for chapter

I would like to define a new environment for chapter. to looks like this or much better (good-looking) without using \chapter*{1\ \textarabic{سورة الإخلاص }} and ...
4
votes
1answer
29 views

Passing xticklabels to tikzpicture via an environment

I have some diagrams that need to be repeated numerous times in a document with slight variations, so I thought I would make an environment that generates the diagrams and pass the variations as ...
4
votes
1answer
69 views

Use newcommand in newenvironment

I want create an environment with newenvironment which does the follow: it evalutes its height and print it many times (textheight/height) to fit one page. My first step: \documentclass{article} ...
7
votes
2answers
59 views

Transform \sepfootnotecontent into an environment

I am currently cleaning the code of a 1000-page book that contain hundreds of very long footnotes so I decided to move them into separate files using the sepfootnotes package. It’s easy to use: ...
1
vote
1answer
45 views

How can I create a command or environment that starts and stops verbatim?

I am writing a simple LaTeX guide, aimed at editors of a student paper. The paper is for students of mathematics and physics at my university, and so we use LaTeX. Anyways, I want to include lots of ...
3
votes
1answer
32 views

Using lstenvironment in another environment

The following simple latex code doesn't seem to work for me and there seems to be no reason why: \documentclass[11pt]{article} \usepackage[T1]{fontenc} \usepackage{listings} ...
6
votes
2answers
143 views

Is it possible to comment out an already defined environment?

I have defined the following environment for producing problem statements: \newcounter{psctr} \newcounter{probctr}[psctr] \NewDocumentEnvironment{prob}{o}{% \addtocounter{probctr}{1} \vspace{.15in} ...
11
votes
1answer
88 views

Add another optional argument for an environment

I have defined an Example environment that I use as follows to produce a numbered example and send the example title to an example index: \begin{Example}[one]{Cooking eggs} To cook an egg, ... ...
0
votes
0answers
42 views

Alias normalbaselineskip to \\ in a tabularx environment

I'm still on my way to my key:value table, and this time, I'm trying to alias [\normalbaselineskip] to \\. I still want to use the standard \\. What I want is to consider \\ as [\normalbaselineskip] ...
0
votes
2answers
50 views

Change \textheight in function of width

Good day. I want define an environment that change the text height in function of the width \documentclass[a4paper]{book} \usepackage{lipsum} \begin{document} \the\textwidth---\the\textheight ...
3
votes
4answers
55 views

creating a newenvironment with cite

This is my first question here. I would like to create a new environment, call it "citar", which makes those things : basic "quote" features, + : open and close french quotes, get the text in ...
0
votes
0answers
48 views

Automatically show verbatim content of a custom environment

I've defined an environment with \newenvironment, which I am mainly using for tikz diagrams. I have it set to dynamically change the margins, vertically and horizontally center the diagrams, and put ...
3
votes
2answers
55 views

Typesetting novel dialogue where one speaker has multiple paragraphs

I'm typesetting a novel wherein many characters have 2+ paragraphs of uninterrupted dialogue. Example: “Lorem ipsum dolor sit amet…tik. “Nullam orci dolor, porttitor a…julo? “Nulla nibh ...
1
vote
0answers
31 views

Floating Figure inside Environment

I have a problem while trying to use wrapfigure or floatftl in a typical Definition environment. More concretely, I try something like this: \begin{floatingfigure}[r]{5cm} ...
8
votes
3answers
505 views

What is the best way to do math inside LaTeX macros?

I'm interested in writing a little personal package (or sharing it if it's actually useful) to speed up typesetting Trigonometry. I'd like commands like ...
2
votes
1answer
43 views

Passing a string as argument in new environment

I'm actually trying to pass a string as an argument in a new environment, but it seems that it only takes the first letter of my string. Here's my code, where #1 is usually a path (for example ...
3
votes
1answer
25 views

New theorem with svmono

I have problems with the definition of the new environments which should be the same as the theorem evironment but unnumbered. If I write: \documentclass[envcountsame,envcountchap,oribibl]{svmono} ...
4
votes
1answer
27 views

Package `Versions' Warning: Redefining environment

I am using the versions.sty package and would like to process some text twice (or more times) in a different version configuration, but within the same document. So I use \excludeversion and ...
3
votes
2answers
95 views

How to mimic Turing Machine description in Sipser textbook

Introduction to the Theory of Computation by Sipser is one of the standard textbooks on theory of computation. To describe a Turing machine (TM) in high level, this book uses a variant of enumeration ...
5
votes
1answer
95 views

Insert something “Before the end of document”

I insert the name and licence with the command \nameofcompany at the end of my document like this: \nameofcompany \end{document} Now, I want to generalize it to some documents, for that I found ...
2
votes
1answer
32 views

How to define customize frames in beamer with newenvironment

I would like to change text distribution within each frame in my presentation beamer, I tried to use \newenvironment but every time I get an error: File ended while scanning use of ...
4
votes
2answers
81 views

Is it posssible to embed list items `\item` in `NewEnviron` environments?

Question Is it possible to keep the \item commands in the body and wrap the itemize list environment with \NewEnviron from the environ package? I am also trying to wrap the list inside a TikZ node, ...
3
votes
1answer
50 views

Hide New Environment Numbering

The object of my question is learning how to remove the numbering that lies adjacent to a new environment after its been called while being able to reference the counter number later using \ref. I've ...
2
votes
1answer
55 views

Creating a Problem Environment

I'm trying to learn how to make new environments, namely I want to make a "problem environment" for examples of problems, and the algorithms that solve them. Optimally I would like it to use a ...
4
votes
1answer
19 views

How do I define an excludecomment environment in a for loop?

I'm using the forloop and comment packages to define environments prob1 through prob5 that exclude portions of my document. Here's a MWE: \documentclass[12pt]{article} \usepackage{comment} ...
0
votes
1answer
62 views

Is there a LaTeX package that contains an environment for excursions and digressions?

Is there a convenient LaTeX package that can be included in the preamble and allows to write more or less extended excursions/digressions by using commands like: \begin{excursion} extended ...
1
vote
1answer
49 views

Suppress paragraph indentation after tcblisting environment?

I am writing a document containing lost of snippets of code, and I've defined an environment using tcblisting from the tcolorbox package to do this. The environments work fine. What I want to do ...
2
votes
1answer
63 views

Suggestions for nested proofs

I would like to write down my lecture notes. The proofs of the theorems in this lecture are usually really big. It usually looks like this: Theorem 1: Here comes the statement of the Theorem ...
0
votes
0answers
20 views

custom lstlisting environment [duplicate]

I'm using the listing package for displaying source code in my document. I want to use the minipage environment to avoid page breaks within the listing, but I don't want to write, at every listing, ...
6
votes
1answer
132 views

Is there a bracket missing in teubner.sty? [closed]

When TeXifying files where I use teubner.sty, LaTeX complains Runaway argument? {\setcounter {verso}{##1}\def \writ@verso {\count 255=\value {verso}\divide \ETC . ! File ended while scanning use of ...
1
vote
1answer
45 views

Abridging \begin{} … \end{}

Is it possible to abbreviate the cumbersome commands \begin{}...\end{} once and for all? I mean, except for \begin{document} ... \end{document}, I would like to have the environments such as ...
5
votes
3answers
103 views

Custom environment with minipage and align*

I would like to have an environment that puts two equations side by side. The following works but Is there a way to make this a dedicated newenvironment? \documentclass[10pt]{article} ...
2
votes
1answer
38 views

environment within environment within command

So.... I'm trying to create (what I assume) is to be a simple command that tries to do some nice formatting. Here is what I have. \usepackage{enumitem} \newenvironment{question}{\bf}{\normalfont} ...
0
votes
0answers
9 views

TEXwork - how to set “handle” by defaultly instead of magnifying glass?

I'd like to change the settings of the pdf viewer so that it starts with "handle" instead of magnifying glass. How can I do it?
0
votes
1answer
23 views

How do I make claim environment bold?

I have defined my claim environment in the following way: \newcounter{claimcounter} \newenvironment{claim}{\stepcounter{claimcounter}{Claim \theclaimcounter:}}{} It looks like this: Claim 1 ...
2
votes
1answer
31 views

Have paragraphs with spacing between them inside “flushleft”

In my LaTeX document, I'd like to have two paragraphs which are separated by some smaller vertical spacing. When I use the following code, this works just as intended, automatically: ...
2
votes
1answer
42 views

New environment definition problem with tcblisting

I have the following code for a new environment definition: \newenvironment{VList} { \makeatletter \begin{tcblisting} \bgroup enhanced,oversize,lower separated=false, ...
2
votes
1answer
88 views

Multiple Altconditions within LaTeX Document

The question refers to this solution and trying to modify the code to support multiple altconditions in my document. The problem is to allow two sets of alternative conditions within the same ...