Tagged Questions
0
votes
0answers
46 views
\renewenvironment optional arguments using old environment [duplicate]
I ran into a problem and haven't quite figured out how to solve it. I would like to reuse an existing environment definition with optional argument to get a new one, which should also have one ...
2
votes
2answers
54 views
Add parameter to existing command produces error
I have this command in a template given by my prof
\newcommand{\homeworkProblemName}{}%
\newcounter{homeworkProblemCounter}%
\newenvironment{homeworkProblem}[1][Problem ...
5
votes
1answer
67 views
Using environment argument inside a new environment doesn't work
I know it must be something trivial:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{thmtools}
\usepackage[svgnames]{xcolor}
\usepackage{framed} ...
2
votes
1answer
80 views
Create new environment with options
I'm new to creating new environments and even though I searched at the xparse*documentation I couldn't figured out how to solve my specific problem. I would like to create a new environment, say ...
10
votes
3answers
183 views
Defining a list environment with multiple optional arguments
I'm trying to define a list environment with multiple optional arguments and with a default values for those arguments. For example, creating a new environment with a name newenv, which accepts two ...
10
votes
2answers
203 views
A new environment based on enumerate
I have defined the following simple environment:
\newenvironment{renumerate}{\begin{enumerate}\raggedright}{\end{enumerate}}
I wonder how the above can be modified to use with, say, the following:
...
2
votes
1answer
112 views
Creating a custom environment
I'm using the following syntax for my code snippets
\begin{minipage}{\textwidth}
\begin{lstlisting}[caption=<something>, label=<something>]
The REST Endpoint URL
is ...
1
vote
0answers
68 views
xparse regression? Unable to create environment with single optional argument [closed]
I've created a custom environment for displaying code examples in a beamer presentation (for an introductory LaTeX couse no less), but compiling my "old" code suddenly results in an error. According ...
6
votes
3answers
2k views
Creating a new environment with one optional argument
I want to create a new environment with one optional argument in LaTeX. Here is what I used:
\newenvironment{argument}[1][]{%
\par
\noindent
\textbf{Argument#1:}
\noindent}
{}
When there is no ...
2
votes
1answer
157 views
Definining a new enviroment depending on a parameter
I want to create a new environment which depend if a parameter exists or not. The basic definition, which works fine, is:
\newrgbcolor{bcolor}{1. 1. 1.}%
\newenvironment{pbox}
...
6
votes
3answers
367 views
Optional argument to an environment inside align
I have lots of matrices so I want to define a mat environment. I sometimes need the matrix to have right-aligned columns so I am using mathtools and I want to have an optional argument that is ...
5
votes
1answer
453 views
How to expand several arguments in an environment?
I have an environment that I've defined as follows:
\newenvironment{regularEnumerateEx}[2][0em]
{begin{listSkeleton}[#1]{enumerate}{#2}}
{\end{listSkeleton}}
The problem is that I need to ...
12
votes
2answers
721 views
How do you define your environment such as to use […] for some parameter(s)?
In an environment, say
\newenvironment{whatever}[3]{...}{...}
you instantiante it (if that's the word for it in LaTeX) by
\begin{whatever}{first}{second}{third}
...
\end{whatever}
But how do ...
11
votes
3answers
787 views
How to pass an optional argument to an environment with verbatim content?
This is an attempt to make clear what happened in this question of xport (now deleted, sorry). The now deleted question included code that tried to make my answer to this question of xport work for ...