Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [phantom]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
2 answers
107 views

How to modify the cell dimensions in tikzcd?

Code: \[ \begin{tikzcd}[cells={nodes={draw=gray}}] \text{Math is excellent!} \ar[r, rightarrow] \ar[d, leftarrow] & \text{w} \ar[d, rightarrow]\\ \text{w} \ar[u, rightarrow] \ar[r, ...
user avatar
  • 297
3 votes
1 answer
124 views

How to obtain overline to a blank character?

I tried the $\overline{\phantom}$, but it doesn't work. The output should look like this. [] This can also included between single quotes. 1:
user avatar
  • 137
2 votes
3 answers
201 views

Align 2 lines horizontally starting from a dash symbol , with the first previous one without subscript and the second previous one with subscript

I try to align horizontally 2 lines after 2 words, the first one not containing a subscript in text (see below with "WL") and the second one with a subscript (see GC_{sp}). I used for this ...
user avatar
-1 votes
1 answer
36 views

I want to hide characters in a quick manner. \phantom hides but also takes a space

For example \begin{align*} \Omega \phantom{\Omega..}(A\phantom{\Omega..}) \end{align*} Prints: O (A ) I want it to print O(A) without resorting to \begin{align*} \Omega %\Omega.. (A %\Omega.. ) \...
user avatar
0 votes
0 answers
20 views

Can I hide an underbrace (not only the content beneath it)? [duplicate]

I am currently preparing a presentation and I have created a slide with an equation containing an underbrace. I'd like to create a second, identical slide and hide the underbrace on the first slide. ...
user avatar
  • 223
1 vote
0 answers
26 views

Controlling the space between lines of an Array environment

I have an array enviroment in which the various lines are matrices. A simple example is \begin_inset Formula \begin{align*} A & =\left[\begin{array}{cc} a & b\\ c & d \end{array}\right]\\ ...
user avatar
0 votes
2 answers
38 views

Why does the "LaTeX error... perhaps a missing item" error pop up when I try to create a phantom (0-space) lemma?

I wanted to create a theorem which does not occupy any space yet adds to the theorem counter. Here is the MWE. \documentclass{article} \usepackage{amsthm} \theoremstyle{plain} \newtheorem{thm}{Theorem}...
user avatar
0 votes
0 answers
86 views

phantom command error

At wikipedia this <math>\phantom{-}\frac{8}{2}=\phantom{-}4</math> should produce $\phantom{-}\frac{8}{2}=\phantom{-}4$ (I dont know how to make that display correctly here either) but I ...
user avatar
  • 101
2 votes
0 answers
52 views

\phantom \begin{figure} does not work

Why doesn't this work? \phantom{ \begin{figure}[H] \includegraphics{fig.pdf} \end{figure} } It outputs Error: Something's wrong--perhaps a missing \item. I'm trying to do ...
user avatar
2 votes
2 answers
87 views

Aligning a broken equation using phantom

I am trying to break an equation and align the characters under each other. Here is an example: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} f(a) &= f(b) + 3 + \\ &...
user avatar
  • 281
0 votes
1 answer
159 views

repeating decimals with siunitx

I am using siunitx with comma as output-decimal-marker. (localization) For the representation of numbers with repeating decimals I use overlaps. Is there an easy way to request the current value of ...
user avatar
7 votes
2 answers
175 views

\hphantom with \footnotesize, siunitx and unicode-math

Consider the following MWE. It is supposed to print the three equations with space added after the equal signs so that the right edge of the equations (the units) are horizontally aligned. % !TeX ...
user avatar
  • 12.5k
0 votes
1 answer
72 views

List of invisible things

I need to create a list of invisible things. For instance, in the following MWE, there is a list of examples, but it should not appear in the text. MWE: \documentclass{article} \usepackage{tocloft} \...
user avatar
  • 335
0 votes
0 answers
43 views

Set \phantom{-} for all columns of a matrix that has at least one negative entry

I would like to add \phantom{-} to every column of a matrix that contains at least one entry with a - in front. Here is an answer that my current code is based off. It inserts \phantom{-} in front of ...
user avatar
  • 139
1 vote
1 answer
46 views

How to align columns with multiple phantom characters?

I couldn't figure how to align a column containing { 1.00, -1.00, 10.00, 0.00 }. I aligned the first two using \phantom{-} and the last two using \phantom{1} but failed to align all 4 lines at once. ...
user avatar
  • 137
3 votes
2 answers
340 views

How to make a superscript of arbitrary width?

I'm trying to make the following two commands of the same width: \newcommand{\Bsh}{\ensuremath{B^{H}_{s}}\xspace} \newcommand{\Bsl}{\ensuremath{B^{L}_{s}}\xspace} in order to avoid these ugly ...
user avatar
1 vote
1 answer
69 views

Aligning wrapped lines and multiple equations inside align differently

In a guide I was proposed with the following problem, long equations inside an align environment are more involved to handle when the goal is to properly align the equality signs of multiple equations ...
user avatar
1 vote
1 answer
84 views

Define an underline with white contour that allows breaklines and hyphenation

I define an underline (based on the following site: https://alexwlchan.net/2017/10/latex-underlines/). This was my initial code: \usepackage{ulem} \renewcommand{\ULdepth}{1.8pt} \contourlength{0.8pt} \...
user avatar
  • 47
0 votes
2 answers
52 views

Alignment in cases environment with \hphantom

I am using the \hphantom command to center the middle 0, but the middle 0 is still too far left. Here is a picture of my problem: Here is my MWE: \documentclass{article} \usepackage[utf8]{inputenc} \...
user avatar
0 votes
0 answers
52 views

How to locally deactivate \phantom

I need to use \phantom for an argument and to deactivate it just sometimes to show only the numbers of enumerates. I spend a lot of time and I tried many things but I can't achieve it. Here is a ...
user avatar
  • 11
2 votes
3 answers
233 views

Multilines, multipages \phantom analog macro

I need a macro to be able, in pdflatex (EDIT : or lualatex if necessary), to remove some text/formulas/images which can go on many paragraphs and pages, without changing the layout (there must be an ...
user avatar
  • 23
7 votes
2 answers
745 views

How to make text appear in the middle of a phantom in math mode?

I want to make a part of an equation to appear in the center of a (horizontal) phantom. This would be awesome for example for making bra-kets that are all of the same width and still look natural. ...
user avatar
  • 271
0 votes
1 answer
153 views

Nested \left and \right) make \vphantom have non-zero width

I have many nested \left( and \right) parentheses in my document and I'm trying to find a flexible way to make outer pairs larger. Unfortunately, I cannot use \delimitershortfall recommended here. ...
user avatar
  • 369
4 votes
3 answers
109 views

How to make multiple variables take the same width in math mode?

I would like to use characters as variable names and adjust their width to all be the maximum width of a character. This way, brackets around them would align nicely as shown in the example below. ...
user avatar
  • 861
0 votes
0 answers
63 views

How to turn \phantom on/off for an entire document before compiling

I want to create a cloze with a lot of formulas and a lot of phantom blanks. But in the end, I need two versions, one with blanks and one without. Manually deleting all phantom is no solution. Is ...
user avatar
  • 157
0 votes
1 answer
105 views

baseline alignment in subscripts that have superscripts

How can I vertically align these subscripts? the problem is that the second one has a hat and the first one not. I tried \phantom and other commands, but I'm unable to get the desired results. EDIT:...
user avatar
5 votes
1 answer
322 views

Using phantom inside itemize

I'd like to use \phantom{} for spacing inside an itemize environment. It however breaks a line. What should I do? The best solution I found was to replace \phantom{} by \hspace{} which is quite ...
user avatar
2 votes
3 answers
524 views

How to set \phantom{-} automatically for entries of matrices?

I want a way to set matrix entries aligned by their sign automatically. For example, output of \begin{bmatrix} 1&1&-1\\ -1&1& 1\\ 1&-1& 1 \end{bmatrix} be same ...
user avatar
1 vote
1 answer
46 views

Align numbers at "," [duplicate]

I have a table contains tens, hundreds, or thousands numbers with or without decimal. I need those numbers to be aligned at ",", the decimal symbol (Indonesian). I try to use \newcommand\ph{$\phantom{...
user avatar
3 votes
1 answer
233 views

Underline needed using Phantom for cells in Tables

Underline need to set selected Cell using phantom text(not cell width) so that I do not want to change Column alignment? Is any way to achieve this? Kindly ignore my \al definitions. Please find MWE ...
user avatar
  • 809
2 votes
1 answer
154 views

Vertical spacing for dynkin-diagram labels

I'm trying to achieve the same vertical alignment for labels with different heights inside dynkin diagrams provided by the dynkin-diagrams package. \dynkin[Coxeter, labels={a,b,c,d}]{F}{4} gives My ...
user avatar
  • 235
5 votes
2 answers
272 views

Align equalities using stackrel

I have a code block looking like this \begin{align*} ||Ty - Tz||_w &\stackrel{\text{Satz 4.3}}{=} \sup_{t \in I}e^{-2L(t-t_0)}||(Ty)(t) - (Tz)(t)||_\infty \\ &\stackrel{\phantom{Satz ...
user avatar
5 votes
2 answers
106 views

How to align these two expressions, one has one more number?

I am trying to align (-(a-1)^2-1)x+(-(a-1)^2-1) and (-(a-1)^2-1)x+1 using \phantom command. Since (-(a-1)^2-1)x+1 is missing the (-(a-1)^2-1) part, I added \phantom{(-(a-1)^2-1)}, but there is an ...
user avatar
  • 3,039
0 votes
1 answer
731 views

Hide text without keeping space

I want to hide some text but : I don't want the hidden text to take space I still want that LaTeX parse the content (to keep numbering) I have found this solution : \vphantom{\hphantom{text}} This ...
user avatar
  • 400
0 votes
0 answers
113 views

Incomplete \iffalse; all text was ignored in tabstackengine

My MWE \documentclass[10pt]{article} \usepackage{tabstackengine,xcolor} \usepackage{amssymb} \makeatletter \newcommand*{\pmzerodot}{% \nfss@text{% \sbox0{$\vcenter{}$}% math axis \sbox2{0}% \sbox4{...
user avatar
  • 3,210
8 votes
1 answer
506 views

tikzmarknode and vphantom take up horizontal space

A tikzmarknode combined with a vphantom character takes up horizontal space. Minimal but nonetheless noticeable. \documentclass{article} \usepackage{tikz} \usetikzlibrary{tikzmark} \begin{document}...
user avatar
  • 2,174
5 votes
1 answer
361 views

Incomplete \iffalse in \caption, but correct in regular text. Where's the \if?

I'm trying to create a new character as a superposition of $\bot$ and =, as follows: For some reason it is not working in \caption environments, as opposed to regular environments. What is wrong; ...
user avatar
  • 53
1 vote
1 answer
285 views

Vertical alignment of inf subscripts without vphantom

I was wondering whether it would be possible to align the index of multiple infimums (or supremums, or limits..) without recurring to the \vphantom command - I feel somehow it's kind of "cheating". ...
user avatar
  • 661
4 votes
3 answers
542 views

Alignment of terms within align environment

The solutions below require up-to-date versions of LaTeX When I tried to run the solutions below on my own machine I was not able to reproduce their results, but still got unwanted offsets. This was ...
user avatar
  • 2,417
1 vote
2 answers
174 views

Spacing from phantom symbol being consumed by summation symbol

The problem I have found that when I add a phantom{{}+{}} in an aligned environment, if this is followed by a summation symbol, the horizontal spacing is not the same as if I had actually used +. ...
user avatar
  • 2,417
0 votes
0 answers
88 views

\phantom not working with $\varbigcirc$ [duplicate]

When I do \documentclass{article} \usepackage{stmaryrd} \begin{document} $\varbigcirc$ test \par \phantom{$\varbigcirc$} test \end{document} I get which is not what I would expect. I would ...
user avatar
  • 6,130
6 votes
1 answer
939 views

How to make some character "unreadable" as text in the pdf output but still visible?

This question might be seen is a follow up/complement to this question and answer. I'm actually taking the example from there: \documentclass{article} \usepackage{xcolor} \usepackage{transparent} \...
user avatar
  • 554
1 vote
3 answers
215 views

Specific alignment of subscripts in math mode joint with overleftarrow. How to avoid phantom space fiddling?

The oveleft/rightarrow-command is not optimal because it shiftes indices to much to the right in formulas like: $\overleftarrow{D}_v$ Therefore, I use the following macro which I have adapted from ...
user avatar
  • 322
4 votes
2 answers
990 views

How to vertically align subscripts in mathmode [duplicate]

I would like the "AB" subscripts in my formula to be vertically aligned with each other--ideally, by adjusting the second subscript to match the current placement of the first. MWE: \documentclass{...
user avatar
2 votes
0 answers
169 views

Is there a long version of \phantom?

Is there a macro or environment that hides its content, replacing it by blank space like \phantom, that accepts content consisting of multiple paragraphs? (I am aware that I could use \color{white} ...
user avatar
  • 12.5k
2 votes
0 answers
441 views

\phantom ignored at beginning of line (or line break inserted) [duplicate]

In a document, I tried to use \phantom{} to indent the next line. However, it seems the phantom part is removed and/or a line break inserted. \documentclass[xcolor=pdftex,dvipsnames,table]{beamer} % ...
user avatar
  • 645
19 votes
4 answers
1k views

The phantom directive does not do what I expect

Typing these two codes on http://latex2png.com/: \sqrt{\phantom{a^2}b} and \sqrt{a^2b} I get the following results:       You will notice that the two square roots ...
user avatar
  • 311
0 votes
1 answer
2k views

How to use format=hang *within* \caption{} which is already set to \captionsetup{format=hang}?

I know that \captionsetup{format=hang} will give me a figure caption like this: Figure 1.3: Example: This is an example that is shown here. Look at the details of this picture! But how ...
user avatar
  • 545
0 votes
3 answers
402 views

Is there a way to indent by the length of \phantom(text)?

I would like to write a text like this: Text: This is a paragraph which is so long that it has a linebreak But the indent should be set after \phantom{Text: }. How can I do that? How is it ...
user avatar
  • 545
7 votes
3 answers
857 views

How to make all parts of fraction, except numerator, disappear while keeping original position of numerator (or how to align at numerator with `&`)?

I have split the issue I have into 2 problems and decided to post them at once to avoid semi-duplicate since they are closely related. First is to render all parts of a fraction (including the line) ...
user avatar
  • 3,616