New answers tagged

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{\...
egreg's user avatar
  • 1.1m
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{...
cfr's user avatar
  • 193k
-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\...
John Smith's user avatar
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 ...
egreg's user avatar
  • 1.1m
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 ...
samcarter_is_at_topanswers.xyz's user avatar
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} \...
David Carlisle's user avatar
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 ...
mbert's user avatar
  • 3,301
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} %\...
Willie Wong's user avatar
  • 23.7k
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 ...
mbert's user avatar
  • 3,301
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{% ...
Ulrich Diez's user avatar
  • 27.5k
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-...
John Kormylo's user avatar
  • 77.9k
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 ...
John Kormylo's user avatar
  • 77.9k
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}...
David Carlisle's user avatar
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}...
Pablo González L's user avatar
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{...
egreg's user avatar
  • 1.1m
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}{...
egreg's user avatar
  • 1.1m
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 ...
Willie Wong's user avatar
  • 23.7k
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}...
Zarko's user avatar
  • 292k
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 \...
Marijn's user avatar
  • 35.8k
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{...
Ulrike Fischer's user avatar
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....
Joseph Wright's user avatar
  • 257k

Top 50 recent answers are included