All Questions
Tagged with macros environments
434
questions
1
vote
2
answers
116
views
Nesting two environments
The snippet below has been obtained nesting two environments taken from amsthm and tcolorbox.
I would like to redefine the environment theorem to produce the same output (I can only modify the ...
1
vote
2
answers
44
views
Can I change the effect of a command depending on the environment in which it's invoked?
I need a user-defined command to behave differently depending on whether it's invoked inside a \begin{quotation} environment or not. Is that possible? I don't know where to start!
3
votes
2
answers
552
views
What's wrong with my new environment?
I'm trying to write this new environment, but produces this error when I use it:
This is my code:
\documentclass{article}
\newcounter{questao}
\newenvironment{questao}[1][]{
\ifx\relax#1\relax
...
0
votes
2
answers
33
views
Error while nesting two environments; Attempting to redefine \begin{equation*} and \begin{spit}; Command already defined?
I'm trying to combine \begin{equation*} and \begin{split} into an abbreviated thing. Rather than doing this:
\begin{equation*}
\begin{split}
a = b & = b \\ & = b
\end{split}
\end{...
0
votes
1
answer
62
views
Bolding a number inside a circle
I am using
\usepackage{tikz}
\newcommand*\circledd[1]{\tikz[baseline=(char.base)]{
\node[shape=circle,color=white,fill=red,draw,inner sep=3.0pt] (char) {#1};}}
to draw a circle (in a text) that ...
0
votes
1
answer
64
views
Create macro for different images in chapter title overlay using Tikz
I would like to make an image overlay of the chapter. So far I have found this code and it works if I specify the image directly in the definition:
\newcommand\chapterlabel{}
\titleformat{\chapter}
{...
0
votes
1
answer
29
views
Optional argument "#1" being evaluated before substitution in d\formatdate
I ran into a problem with the datetime package's \formatdate{}{}{} function when I was trying to create a custom environment which is like a journal entry with a date from optional arguments. I ...
1
vote
1
answer
97
views
Using a new command in the custom environment
As you can see the following MWE:
\documentclass[twoside,a4paper,cleardoublepage=empty,14pt]{book}
\usepackage{exsheets}
\SetupExSheets[question]{type=exam}
\SetupExSheets{counter-format=ch.qu[1]}
\...
1
vote
0
answers
48
views
New environment as a single box [closed]
I am making my new environment for headings. It is as follows:
\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\begin{document}
\newlength{\headspace}
\setlength{\headspace}{3mm ...
0
votes
1
answer
178
views
Generating bubble answer sheet
I wish to adding bubble answer sheet in the following MWE:
\documentclass[twoside,a4paper,cleardoublepage=empty,14pt]{book}
\usepackage{exsheets}
\SetupExSheets[question]{type=exam}
\SetupExSheets{...
1
vote
1
answer
135
views
Make hint to use in another chapter
Consider the following MWE:
\documentclass[12pt]{book}
\usepackage{exsheets}
\SetupExSheets[solution]{print=true}
\begin{document}
\begin{question}
This is a question
\end{...
0
votes
0
answers
38
views
How is it possible make invisible the custom environment sol?
Consider the following code:
\documentclass[addpoints,12pt]{exam}
\usepackage{environ}
\makeatletter
\NewEnviron{sol}{%
\def\@currentlabel{\BODY}\label{solt:\thequestion}%
\begin{solution}%
...
3
votes
2
answers
194
views
How to figure out which package a command is from at any particular time?
I know there are some posts on this but I don't understand. So for instance I want to know which package contains \restatable.
I've tried \show\restatable but I don't understand what the relevant part ...
2
votes
3
answers
607
views
How to create an environment that allows you to bold words before a " : "
(This is my first question, I hope I'm not breaking any rules in how I'm asking it)
I would need an environment that basically takes as input a list of words separated by the ":" symbol and ...
0
votes
0
answers
23
views
Is it possible to use environments from existing packages when defining my own custom environment? [duplicate]
I'm trying to define a new environment for my own needs, and I'm trying to use the lstlisting environment from the listings package in the definition of my new environment, but whenever I try to ...