New answers tagged environments
0
votes
Chapter-like referencing for custom paragraphs
I'd add an optional argument for the label needed in cross-references.
Note that you should use \MakeUppercase, not \uppercase.
\documentclass{article}
\usepackage[most]{tcolorbox}
\newcommand{\...
0
votes
Chapter-like referencing for custom paragraphs
Steps required to turn code fragments into MWE:
Add \documentclass{article} and document environment.
\usepackage[tcolorblox] -> \usepackage{tcolorblox}.
\usepackage{tcolorblox} -> \usepackage{...
-1
votes
Avoid vertical space in absolutelynopagebreak environment
Try this:
\documentclass{article}
\usepackage{amsthm} % For theorem environments
\newtheorem{theorem}{Theorem}
\makeatletter
\newenvironment{absolutelynopagebreak}
{\par\@nobreaktrue\nobreak\...
1
vote
Accepted
In a default theorem environment, how to change a certain word into Roman font?
There is no “default \theoremstyle{theorem} and, indeed, I get a warning
Package amsthm Warning: Unknown theoremstyle `theorem' on input line 5.
and you should as well. The default style when amsthm ...
0
votes
why beamer default environment (theorem, lemma, definition ...) in doesn't work normal
Your theme had the rather questionable idea to redefine the block environment, a central element in beamer, which is e.g. used to create theorems etc.
You can revert back to the original definition at ...
2
votes
Accepted
Problem with 'already defined' in newenvironment
Never allocate registers in document environments, they are a fixed resource you just want to allocate them once, as the code is loaded.
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\...
0
votes
How edit headformat with thmbox=M in \declaretheoremstyle
As you've discovered, thmtools' use of thmbox does not interact well (or in most cases, at all) with other style keys. You can change the style of thmbox theorems by passing more options to the thmbox ...
1
vote
Add letter to numbering of theorem environments. Locally, and then restore to default behaviour?
One simple solution:
Copy the definition of subequations from amsmath
... but taking care to make sure you modify \the<counter> for each environment impacted $
\documentclass[12pt]{book}
%\...
0
votes
Add letter to numbering of theorem environments. Locally, and then restore to default behaviour?
After staring at the thmtools code for a long time, I think I see a way to do this. The idea is to temporarily suspend the theorem counters in question (similar to thmtools' continues key), redefining ...
1
vote
Accepted
Using a new command in the custom environment
In case \thehint is defined—perhaps it should be \thecorrectchoice?—you can easily do s.th. like
\NewEnviron{correctchoice}{%
\begingroup
\refstepcounter{correctchoice}%
\edef\@currentlabel{%
...
1
vote
Generating bubble answer sheet
This can be accomplished without modifying exsheets.
\documentclass[twoside,a4paper,cleardoublepage=empty,14pt]{book}
\usepackage{exsheets}
\SetupExSheets[question]{type=exam}
\SetupExSheets{counter-...
2
votes
Accepted
Make hint to use in another chapter
The trick is to store the chapter and question number with the hint and to use a separate counter for the hints (labels).
I also gratuitously replaced \foreach with a TeX \loop. Just remember to loop ...
1
vote
How to align the center of terms on left hand side of equations in 'aligned' environment in latex
If I modify the example so that it produces output
Then you can add one extra \hfil into the preamble used by aligned so it centres, but the result is not really usable:
\documentclass[12pt]{article}...
0
votes
Alternative to \begin{leftbar} that doesn't result in a float?
With hyperref support :D
\documentclass{article}
\usepackage{framed}
%\usepackage{hyperref}
\usepackage{footnotehyper}
\makesavenoteenv{leftbar}
\begin{document}
\begin{leftbar}
Hello\footnote{to the}...
3
votes
Accepted
Hack 'minted' definition with NewTCBListing und RenewDocumentEnvironment
Update
After seeing your edit, the comment is “D'oh!”.
\documentclass[11pt]{article}
\usepackage{fontspec}
\usepackage[minted]{tcolorbox}
\usepackage{minted}
\usepackage{hyperref}
\setminted{...
0
votes
Accepted
Is possible to use declaretheoremstyle with newtheorem for modifying theorem style?
I suggest to use tcolorbox instead.
\documentclass{article}
\usepackage{amsmath,amsthm}
\usepackage[many]{tcolorbox}
\usepackage{lipsum}
\newtheorem*{definition}{Definition}
\newtheorem{theorem}{...
0
votes
Label multiply defined warning but I only have one label LNCS template
As David Carlisle wrote, you can just use \autoref on the label for the \repeattheorem, and shouldn't use a separate \label in the theorem statement.
See the following, which should generate the ...
1
vote
Make length persistent between subfigures
if I c0orrectly understood your problem, than for equal height images you not need to define special length, but just use \setkeys{Gin}{height=<desired height of images>}:
\documentclass{article}...
1
vote
Accepted
Make length persistent between subfigures
Just put the length outside of the subfigure:
\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\newlength\mycustomlen
\begin{document}
\begin{figure}
\centering
\...
2
votes
How to figure out which package a command is from at any particular time?
One way to get a clue which package defines or redefines a command is to plant \show-commands in various places and look what changes. E.g. this
\documentclass{article}
\show\restatable
\usepackage{...
5
votes
Accepted
How to figure out which package a command is from at any particular time?
Using \show you got
->\thmt@thisistheonetrue \thmt@restatable .
which looks like the package prefix in use is thmt. Then looking at your preamble we see thmtools - that looks likely for the prefix....
Top 50 recent answers are included
Related Tags
environments × 3182macros × 428
theorems × 153
tables × 146
spacing × 142
lists × 106
tcolorbox × 104
equations × 96
math-mode × 95
beamer × 93
listings × 91
tikz-pgf × 86
counters × 81
conditionals × 79
align × 76
floats × 73
enumerate × 73
formatting × 72
numbering × 72
cross-referencing × 70
page-breaking × 68
verbatim × 67
indentation × 66
errors × 61
optional-arguments × 60