New answers tagged

1 vote

Two equations on a line and A++

Since the journal's editorial staff has informed you that they cannot or will not pursue your preferred way of displaying the primal and dual formulations of a problem, you have no meaningful ...
user avatar
  • 440k
2 votes

Changing the output of a theorem environment reference

The cleveref package allows such formatting: \documentclass{article} \usepackage{amsthm} \usepackage{hyperref} \usepackage{cleveref} \newtheorem{theo}{Theorem} \newtheorem{lem}[theo]{Lemma} \...
user avatar
  • 6,557
0 votes

LaTeX doesn't recognise label for unnumbered section

You can make \label realize the current counter by using \refstepcounter. However, since this will add to the counter value by 1, you also need \addtocounter{subsection}{-1} to redo the change. (It is ...
user avatar
  • 6,246
3 votes

Changing the output of a theorem environment reference

One option is to define \p@<cnt> to hold T where <cnt> is the counter used by that theorem environment. LaTeX2e provides a \labelformat{<cnt>}{<format>} command which can be ...
user avatar
  • 22.2k
2 votes

Label american current source correctly

As of July 1, 2022, the accepted answer, posted by user11232, does produce the intended results. One has to use to[I, l_=$4$A] (7.5,2) (7.5, 0) instead of to[I, i_>=$4$A] (7.5,2) (7.5, 0). i>= ...
user avatar
1 vote

How to center the column label in a table?

For your table you can use tabularray package with libraries amsmath, booktabs and siunitx. for numbers in table written as exponent I guess that they are intendent for table notes, therefore in the ...
user avatar
  • 255k
2 votes
Accepted

How to decrease spacing between circuit element and label in circuitikz

You not provide MWE, which reproduce your problem, so we don't know, what is in your circuit code. This works: \documentclass[12pt, margin=3mm]{standalone} \usepackage{circuitikz} \begin{document} \...
user avatar
  • 255k
7 votes
Accepted

I have labelled a table, but it says that the reference is undefined

LaTeX must be issueing two separate error messages related to the table. \caption directives are not allowed outside of LaTeX floats (such as table and figure). \caption directives are not allowed ...
user avatar
  • 440k
2 votes
Accepted

Latex subfigure special counter label

Like this? \documentclass{article} \usepackage{subcaption} \ExplSyntaxOn \NewExpandableDocumentCommand{\weird}{m} { \romainbqt_weird:n { #1 } } \cs_new:Nn \romainbqt_weird:n { \bool_lazy_and:...
user avatar
  • 994k
5 votes
Accepted

How to issue a warning if trying to reference a label in a starred equation environment?

The following causes \label calls from within equation* to print a warning: \documentclass{article} \usepackage{amsmath} \makeatletter \AddToHook{env/equation*/begin}{% \renewcommand*{\label@in@...
user avatar
  • 23k
0 votes

PGF groupplot ylabel not aligned

I have the same issue and adding \pgfplotsset{ compat/labels=pre 1.3 % <-- added this one } like Torbjørn T. suggested worked for me.
user avatar
1 vote

Protection setting \@currentlabelname to give a "name" to a \phantomsection

Solved by @Ulrike Fischer in the comments: "the \makeatletter/\makeatother must be outside/around the \newcommand." The following MWE produces the intended output (second image in the ...
user avatar
  • 21
2 votes

Reproducing a figure with a filled area in TikZ

And this is why it is better to add normal TikZ commands outside the axis environment. \documentclass{standalone} \usepackage{amsmath} \usepackage{accents} % for bar under character %%%%%% PGFPLOTS ...
user avatar
  • 70.2k
0 votes
Accepted

Label Figure in Latex

Since your question isn't about putting pictures side-by-side, I'll answer with a single image. Feel free to correct me if I'm wrong. \documentclass{article} \usepackage{graphicx} \usepackage{caption} ...
user avatar
  • 1,467
1 vote

Labeling equations in a table

With use of the tabularray packages: two possible solutions \documentclass{article} \usepackage{tabularray} \UseTblrLibrary{amsmath, booktabs, counter, varwidth} \begin{document} \addtocounter{...
user avatar
  • 255k
1 vote

Labeling equations in a table

Whether something like this is better, or something like WinnieNotThePooh's answer might depend on how compact you want the table, but if you want something more compact, you could just manually ...
user avatar
  • 36.9k
2 votes

Labeling equations in a table

Why \rotatebox[origin=c]{0}{$\stone$}? You can manually step the equation counter. \documentclass{article} \usepackage{amsmath} \usepackage{booktabs} % not sure what's the purpose of these commands \...
user avatar
  • 994k
0 votes

Labeling equations in a table

You cannot use \begin{equation}...\end{equation} inside a table cell. If you want it to look like a displayed equation, you can do this: ... & \(\displaystyle 0.5 \cos(2\pi\stone) + 0.5 \) But ...
user avatar
5 votes
Accepted

hobby package - alignment of labels to curves

It feels as though you are trying to treat a curve as the boundary of a node. Since your circle path actually is the boundary of a node then it comes with a whole slew of information, in the form of ...
user avatar
4 votes

hobby package - alignment of labels to curves

This is a version without any fancy intersection calculation (since it's not easy to do with hobby curves). \documentclass[tikz]{standalone} \usetikzlibrary{hobby,positioning} \begin{document} \...
user avatar
  • 16.6k
1 vote

Efficient way of dealing with labels on large files

As David Carlisle pointed out in the comments, trying to manually handle numbers in labels defeats the purpose of labels. I'd go so far as to say that LaTeX is all about handling this for you. Here's ...
user avatar
  • 1,467
2 votes

Efficient way of dealing with labels on large files

The reason LaTeX has \label is to avoid this problem. \documentclass{article} \usepackage{amsmath} \begin{document} aaaaa \begin{equation} \label{dog} d=1 \end{equation} aaaaa \begin{equation} \...
user avatar
4 votes

How to draw one Y axis value in red on tikzpicture

Here is an easier way to do this: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{figure} \centering \begin{tikzpicture} \begin{axis}[ symbolic x ...
user avatar
  • 4,588
2 votes

Warning in arxiv compilation: LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right

TLDR: This is a class of warning that can always be ignored in the first run. arXiv processes a minimum of twice (if the first pass is successful), and maximally 4 times. This warning will always ...
user avatar
  • 718
1 vote

How to include label in environment arguments?

I wouldn't reinvent the wheel: there are several subtle points when defining a theorem-like environment and I'm afraid your code doesn't address them. With amsthm you have a very good way to manage ...
user avatar
  • 994k
0 votes

How to include label in environment arguments?

A slightly different approach: \documentclass{article} \usepackage{ntheorem} \usepackage{cleveref} \theoremstyle{break} \newtheorem{thm}{theorem}[section] \usepackage{keyval} \makeatletter \define@...
user avatar
  • 2,938

Top 50 recent answers are included