Skip to main content

Questions tagged [phantom]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6 votes
3 answers
388 views

\phantom and \obeylines

I'm using Plain TeX (actually XeTeX for font reasons but I am using it basically like it's Plain, which I'm used to). I'm typing a poem up for someone and i want to create an effect along the lines of ...
marcelgoh's user avatar
  • 305
4 votes
1 answer
177 views

\phantom not giving correct space?

The code \begin{alignat*}{2} d\bigl(x^{(j)}_j, x^{(i)}_i\bigr) & \le d\bigl(x^{(j)}_j, x^{(i)}_j\bigr) + d\bigl(x^{(i)}_j, x^{(i)}_i\bigr)\\ & < d\bigl(x^{(j)}_j, x^{(j)}_k\bigr) + ...
Atom's user avatar
  • 665
0 votes
1 answer
85 views

Spacing of a math formula defined by other math formula

I need to make sure that the spacing of some short math formula (like $x^2$) would take exactly the same spacing as some other a bit longer math formula (like $(x+1)^2-1$). The result should be $x^2$ ...
Robertas Vilkas's user avatar
0 votes
1 answer
644 views

How to write "zero with short slash" in TeX?

There is a similar application in the shortcuts below. However, I want the end parts of the slash to be deleted. So how can we create the fourth zero? Like \pmzerocomputer . Thank you. \documentclass{...
Özgür's user avatar
  • 3,280
0 votes
1 answer
49 views

Undefined Control Sequence Error with \listofencl and Titlesec

With titlesec loaded, if I replace \subsection by \phantomsection I get the stated error. With that pkg removed, the replacement compiles fine. Any insight would be appreciated. \documentclass[12pt,...
Erwann's user avatar
  • 2,120
-2 votes
4 answers
87 views

Hiding informations

Good morning, I'm trying to avoid informations from my CV. In particular, I'd like to have a method to substitute my personal address with a black box of the same size of the text. I'm currently using ...
jacopo furlan's user avatar
2 votes
2 answers
154 views

\phantom and $$ conflicting

I'm using phantom to maintain even spacing between the teacher version and the student version of a document. I have a newcommand that puts text from the teacher version into a phantom in the student ...
user26305's user avatar
  • 142
0 votes
1 answer
29 views

Aligning \operatorname's with \phantom

Consider the following MWE. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} A&=\sin x +{}\\ &\phantom{{}={}}\sin y \end{align*} \end{document} If instead of \sin ...
Delfad0r's user avatar
  • 125
4 votes
1 answer
75 views

Align two rows only using \phantom command

I want to achieve the following picture: What I have tried so far: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{matrix} \phantom{(n+{}}2^3-1^3\phantom{{}-1)^3}&=&3\...
manooooh's user avatar
  • 3,223
3 votes
1 answer
270 views

Hiding the dividing line in a fraction [duplicate]

I would like to be able to hide the dividing line in the fraction that arises from applying a command such as \dfrac. In particular, what I would like to do is take an expression such as the following:...
OGBond's user avatar
  • 75
2 votes
1 answer
99 views

Hiding verbatim material on beamer slide while saving the space

The bigger picture is the following: I want to have a minted environment hidden in the presentation but save the space and have it available in my notes. So I created a command: \newcommand{\hidden}[1]...
Tia Chung's user avatar
2 votes
4 answers
504 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, ...
Atom's user avatar
  • 665
3 votes
1 answer
243 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:
Kiran K U's user avatar
  • 323
2 votes
3 answers
409 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
53 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.. ) \...
TheGreatJRB's user avatar
1 vote
0 answers
67 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]\\ ...
Thomas Philips's user avatar
0 votes
2 answers
394 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}...
Longlisted's user avatar
0 votes
0 answers
202 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 ...
R. Emery's user avatar
  • 101
2 votes
0 answers
164 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 ...
Volker Weißmann's user avatar
2 votes
2 answers
163 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 + \\ &...
Tyler D's user avatar
  • 321
0 votes
1 answer
424 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
220 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 ...
schtandard's user avatar
  • 15.2k
0 votes
1 answer
128 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} \...
Morzen's user avatar
  • 325
0 votes
0 answers
95 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 ...
Jason1923's user avatar
  • 149
1 vote
1 answer
88 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. ...
ssd's user avatar
  • 137
3 votes
2 answers
365 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 ...
tpd's user avatar
  • 295
1 vote
1 answer
131 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 ...
hjkhuui1999's user avatar
1 vote
1 answer
192 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} \...
hllspwn's user avatar
  • 47
0 votes
2 answers
607 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} \...
hobbicon's user avatar
0 votes
0 answers
70 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 ...
Moïse's user avatar
  • 21
3 votes
3 answers
318 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 ...
alfazaz's user avatar
  • 33
8 votes
2 answers
1k 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. ...
csha's user avatar
  • 281
1 vote
1 answer
330 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. ...
Leo's user avatar
  • 399
4 votes
3 answers
238 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. ...
danijar's user avatar
  • 1,015
1 vote
0 answers
152 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 ...
Marco's user avatar
  • 169
0 votes
1 answer
198 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:...
paketecuento's user avatar
5 votes
1 answer
692 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 ...
Tex Exchanger's user avatar
2 votes
3 answers
834 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
55 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{...
Enos Lolang's user avatar
3 votes
1 answer
398 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 ...
Rajesh N's user avatar
  • 829
2 votes
1 answer
179 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 ...
Sirion's user avatar
  • 245
5 votes
2 answers
544 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 ...
user7802048's user avatar
5 votes
2 answers
111 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 ...
manooooh's user avatar
  • 3,223
0 votes
2 answers
2k 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 ...
Matheod's user avatar
  • 460
0 votes
0 answers
130 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{...
Özgür's user avatar
  • 3,280
8 votes
1 answer
658 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}...
jan's user avatar
  • 2,256
5 votes
1 answer
459 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; ...
plbt's user avatar
  • 53
1 vote
1 answer
573 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". ...
G. Gare's user avatar
  • 707
4 votes
3 answers
620 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 ...
oliversm's user avatar
  • 2,717
1 vote
2 answers
358 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 +. ...
oliversm's user avatar
  • 2,717