Questions tagged [phantom]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
0answers
33 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 ...
2
votes
2answers
66 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 + \\ &...
0
votes
1answer
54 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 ...
7
votes
2answers
148 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 ...
0
votes
1answer
45 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} \...
0
votes
0answers
31 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 ...
1
vote
1answer
21 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. ...
3
votes
3answers
327 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 ...
1
vote
1answer
33 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 ...
0
votes
0answers
37 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} \...
0
votes
2answers
25 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} \...
0
votes
0answers
43 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 ...
1
vote
3answers
182 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 ...
6
votes
2answers
577 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. ...
0
votes
1answer
77 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. ...
4
votes
3answers
60 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. ...
0
votes
0answers
37 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 ...
0
votes
1answer
53 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:...
5
votes
1answer
180 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 ...
2
votes
3answers
387 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 ...
1
vote
1answer
41 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{...
3
votes
1answer
110 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 ...
2
votes
1answer
128 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 ...
4
votes
2answers
160 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 ...
5
votes
2answers
99 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 ...
0
votes
1answer
446 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 ...
0
votes
0answers
89 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{...
7
votes
1answer
357 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}...
4
votes
1answer
276 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; ...
1
vote
1answer
202 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". ...
4
votes
3answers
331 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 ...
1
vote
2answers
128 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 +. ...
0
votes
0answers
74 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 ...
6
votes
1answer
592 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} \...
1
vote
3answers
173 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 ...
4
votes
2answers
724 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{...
2
votes
0answers
147 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} ...
2
votes
0answers
383 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} % ...
19
votes
4answers
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 ...
0
votes
1answer
1k 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 ...
0
votes
3answers
291 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 ...
7
votes
3answers
700 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) ...
9
votes
4answers
1k views

Phantom not working as expected in cases environment

In the image below you can see the phantom not taking up as much width as it's expected in the cases environment: Here's the MWE: \documentclass{amsart} \begin{document} \begin{align*} M+A+T & =...
1
vote
2answers
648 views

Inconsistent phantom space in table p column

Follow-up from this thread. Issue phantom seems to have an inconsistent behaviour depending on whether something is printed before its call when used in a p column type in a table. When used on its ...
1
vote
1answer
1k views

Phantom Section/Subsection/Subsubsection in Beamer

I was trying to have some standard (sub(sub))sections, where beamer would automatically create a slide dedicated to separate them, and, in other cases, a section that would appear in the pdf ...
2
votes
1answer
1k views

\hphantom* vs \hphantom: Spacing doesn't line up

I assumed the asterisk for phantom-type commands disabled the phantom command. What is actually happening? (Why don't the a characters line up?) \documentclass{scrreprt} \begin{document} \hphantom*{...