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

Questions tagged [physics]

{physics} is a package for making typesetting mathematical physics easier and more readable. It provides macros for vector notation, quantum mechanics bracket style etc.

Filter by
Sorted by
Tagged with
1 vote
1 answer
40 views

Procedural matrices in tikz

Is there a way to typeset a tikz matrix procedurally instead of manually? i.e. here's a MWE of a 4x4 identity matrix: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{matrix} \begin{...
user avatar
  • 147
3 votes
2 answers
446 views

How can I fix tall ket notation?

I have been struggling with a tall ket symbol when I insert the letter b compared to the letter a. My problem is how I can make the ket notation for the letter b the same size as the letter a. I also ...
user avatar
3 votes
1 answer
56 views

\vu of physicx package with physics and unimath options went wrong when loading unicode-math package

\documentclass{article} \usepackage[physics, unimath]{physicx} \usepackage{unicode-math} \begin{document} $\vu{a}, \vu*{a}$ \end{document} \documentclass{article} \usepackage[physics]{physicx} % \...
user avatar
  • 419
11 votes
1 answer
483 views

Latex in MacOS powerpoint

I've been using beamer on Linux for over 8 years, but my new work now wants me to make powerpoint presentations on a MacBook and I feel very lost. I struggle with the equation editor. My ...
user avatar
  • 113
1 vote
1 answer
169 views

LaTeX symbol for c_0

Given the importance of the speed of light to so many in areas of science, engineering, computing, etc. and so many areas of daily life, particularly for example with the electromagnetic spectrum that ...
user avatar
5 votes
1 answer
146 views

Drawing a 3d wheel

I'm trying to create a physics illustration of a spinning wheel (see here). I can draw a "flat" sketch of a wheel as following. Are there any nice tricks to make it appear more three-...
user avatar
  • 265
6 votes
1 answer
754 views

How to avoid \qty conflict with physics and siunitx

I am trying to use both the physics and siunitx packages, which both have a definition for the command \qty. I want to ignore the one from physics and use only that from siunitx. This is my minimum ...
user avatar
  • 61
0 votes
2 answers
141 views

\qty problem with parentheses

Why are the parentheses not showing? (I don't want to remove packages,how can i fix this problem?) \documentclass[a4paper]{article} \usepackage{physics} \makeatletter \DeclareSymbolFont{...
user avatar
  • 172
1 vote
1 answer
43 views

Problem of \qty with \bm

I used qty symbol and bm symbol but didn't work. Why does not work? \documentclass{standalone} \usepackage{physics} \usepackage{bm} \begin{document} \[ \bm{\qty(x)} \] \end{document}
user avatar
  • 584
2 votes
0 answers
42 views

Blochsphere package - shading (brighter ball) [closed]

I am using the blochsphere package and have a problem with shading of the drawn ball. Using the color white for the ball and opacity=0.7 makes it quite dark greyish. I dont want to turn down the ...
user avatar
  • 185
3 votes
2 answers
208 views

Blochsphere Package Shading

I am using the blochsphere package and have a problem with shading of the drawn ball. Using the color white for the ball and opacity=0.7 makes it quite dark greyish. I dont want to turn down the ...
user avatar
  • 185
1 vote
1 answer
58 views

How to write Latex of the picture given [closed]

How to write Latex for the picture given.
user avatar
2 votes
2 answers
47 views

When using kpfonts, the vector versions of i and j don't behave nice with the physics package

When attempting to typeset unit vectors with the physics package shorthand \vu the following problems occur when using kpfonts which do not occur when using computer modern. \vu{i} and \vu{j} do not ...
user avatar
1 vote
1 answer
394 views

unicode-math and physics's \vb command

I can't get bold math with packages unicode-math and physics, here is mwe \documentclass{article} \usepackage{physics} \usepackage{unicode-math} \usepackage{amsmath} \begin{document} $ a, \vb*{a}, ...
user avatar
  • 1,121
7 votes
1 answer
557 views

How can I draw a mini wave?

I'm trying to draw the following figure using TikZ, but I'm stuck on how can I produce that red wave representing a photon : Here's my code and what it produces : \begin{tikzpicture}[>=stealth] \...
user avatar
  • 1,038
2 votes
1 answer
63 views

2-loop diagram with Feyn-TikZ

I am trying to generate a 2-loop diagram using Feyn-TikZ. Concretely, I am writing the following commands: \begin{tikzpicture} \begin{feynman} \vertex (i1) {\(s\)}; \vertex [above right=of i1] (a); \...
user avatar
  • 51
-1 votes
1 answer
76 views

How to Draw 3D Labeled Graph

So I am currently working on making a couple mechanics problems and I don't exactly want to just paste my scuffed drawings into my document if possible. I tried using Tikz but to be honest I have no ...
user avatar
1 vote
1 answer
103 views

Drawing Mass-Spring

I am attempting to make this into a Tikz Picture but it seemed like copy pasting stuff until it worked out didn't seem to work for me this time so would anyone be able to help me out to make this in ...
user avatar
8 votes
4 answers
839 views

How to put a curvearrow around a letter?

In physics, it's sometimes useful to draw an arrow over a letter to represent the torch around that point. I've seen this in multiple textbooks and would like to know how to do it myself in \LaTeX ...
user avatar
1 vote
3 answers
213 views

Heisenberg Spin exchange figure with Tikz

I want to construct a figure with Tikz similar to this one: I was looking for example but couldn't find any I tried to make it but it was a mess. so: How can I get the spins on the dots? and how to ...
user avatar
0 votes
0 answers
36 views

How to create a table that fits over the page and has text centered?

I'm trying to recreate the following table. I've only worked with booktabs before so I don't know how to create this kind of table. This is what I tried: \documentclass[12pt]{article} \begin{table}[...
user avatar
  • 321
0 votes
0 answers
23 views

Unable to use downloaded Class File

I've been using LaTeX with TeXnicCenter as my editor for about two years, always typing in \text mode with the {align} option.. so boring, I know. Now I decided to get more professional, and ...
user avatar
  • 21
1 vote
1 answer
108 views

how can the diffracted wave can be drawn?

So I was preparing a lesson for my students about mechanical waves, and when I've reached the section of diffraction I needed to do some figures like these : For the first one I've done it easily, ...
user avatar
  • 1,038
1 vote
1 answer
240 views

! File ended while scanning use of \frac

I did not change anything since last time, but I am getting the error message: ! File ended while scanning use of \frac Btw I am a total noob when it comes to LATEX! I've already checked the questions ...
user avatar
0 votes
0 answers
134 views

Complex graphs in LaTeX

I am trying to write all my notes I'm taking from my physics course, but I got stuck in plotting graphs; is there a way I can plot rapidly graphs like these?
user avatar
2 votes
1 answer
594 views

Using the physics package to take second derivatives with respect to primed coordinates

As it says in the title, I am attempting to write a second derivative such as the following and ideally would use the shorthand derivative from the physics package which would be the following. \dv[2]...
user avatar
4 votes
5 answers
424 views

How can I recreate this rectangle with lines, points, and labels in LaTeX?

I'm just typing this up for class and I'd appreciate some guidance like what packages I'd need and how to start?
user avatar
1 vote
1 answer
138 views

Error compiling equation

My document (subfile in documentclass book) compiles perfectly, untill I add the following equation: \begin{equation} \label{beliefupdate} \begin{split} b_{t+1}(s') & = \Pr(s'|o',a,b) \\ ...
user avatar
  • 23
3 votes
1 answer
85 views

Fatal error when using bold math and physics

I have a problem where writing \log in bold math \bm{$\log$} is resulting in a fatal error. I am using a multitude of packages, but I've narrowed it down to the physics package. I get 10 errors when ...
user avatar
0 votes
2 answers
1k views

How to write tensor or leftright double vector notation

How would the double vector notation be written above the T? I came across it in Griffith's E&M as shorthand for a tensor.
user avatar
1 vote
1 answer
118 views

How to align equations inside \abs command of the physics package

I am using the physics package and running into a problem while aligning equations \begin{align} \psi(\bm{z}) &= h`(\bm{w}^T\bm{z} + b)\bm{w}\\ \abs\Big{det\pdv{f}{\bm{z}}} = \abs{det(\bm{...
user avatar
0 votes
0 answers
45 views

LyX: How to put more than one characters in single bra or ket?

I am a new user of LyX and want to write a ket vector with an entry having a subscript or with two entries. I have mentioned the \usepackage{braket} in the LaTeX preamble and am able to use ket ...
user avatar
  • 1
4 votes
3 answers
453 views

Bolding text generated by physics package

I would like to bold parts of my equation, but it seems \bm is incompatible with \pdv, and neither \boldsymbol nor \vectorbold (also from physics) can bold the operators; \boldmath doesn't work at all....
user avatar
2 votes
2 answers
481 views

Battery and resistor symbols into a text

In this moment I have forgotten between many Physics books which I have read, where I have seen the battery and resistance symbols to use when I write a text, an article or a paragraph. I just have ...
user avatar
  • 46.2k
1 vote
2 answers
153 views

Plot construction for a velocity vs position graph. Interpolation for phase-diagram construction?

I need to plot a few graphs. First is of the function \begin{equation} x(t)= -e^{ -(0.1 \ {s}^{-1}) t} \cos \left( ( 0.995 \ {rad} / \mathrm{s})t \right) \end{equation} and of $\dot{x}$ (...
user avatar
1 vote
0 answers
230 views

Alignment of matrix entries using physics package

I'm looking for a way to achieve the same output (regarding the alignment of matrix entries) using the physics package - or simply a conformation that will work only with mathtools (like here). Either ...
user avatar
  • 551
2 votes
1 answer
100 views

Can someone help me design this shape in TikZ

I've gotten a little bit done so far but I'm not sure how to do it. Especially because I don't quite know how to do the coordinate system yet. The lower cylinder has an arrow pointing at it ...
user avatar
3 votes
1 answer
652 views

How can I draw this figure using latex?

How can I draw this figure using LaTex ?
user avatar
  • 1,038
0 votes
0 answers
101 views

Does anyone recognize this math font? I don't know if it's even still around, it's from one of Einstein's papers on General Relativity

Sorry if the images don't look the best.
user avatar
4 votes
1 answer
358 views

Lots of warnings with the physics package with the last version of expl3

Everything worked fine till I use Texlive Utility to update some packages. Then I get a lots of warnings. Here is an MWE \documentclass{amsart} \usepackage{physics} \begin{document} MWE \end{...
user avatar
  • 683
2 votes
1 answer
121 views

Commands delimited by `\{`, `\|`, `\langle`, etc

The xparse package offers the possibility to define commands delimited by single special start/end character. This can be very useful, for instance it is used a lot in the physics package. I was ...
user avatar
5 votes
1 answer
2k views

Draw P and S waves illustration

I need some help with drawing similar figures. Don't care about colour. Thanks.
user avatar
  • 59
0 votes
0 answers
38 views

About symbols size in physics package

Is it possible to change symbols size?
user avatar
  • 1
7 votes
1 answer
485 views

Aggregation states in Tikz: draw random circles and connect them randomly

Hey TeX Stackexchange! I have have a problem with a \tikzpicture in my beamer presentation about nuclear fusion. I want to show a graphic with all four aggregation states including plasma as the ...
user avatar
0 votes
0 answers
197 views

Punctuation spacing in math that ends with a differential \dd{}, and the physics package

It seems the physics package adds an extra (thin) space after \dd{x}, before my punctuation (usually "," or ".") and I don't want this. This is a common scenario for me, especially if I'm displaying a ...
user avatar
0 votes
1 answer
261 views

library of latex formulas

I want to write a lot of famous formulas, but they are big and they take time. Is there a place, where I can type the name of a formula, for example, "Maxwell equations" and get in a couple of seconds ...
user avatar
5 votes
1 answer
9k views

How to find a Nature Communications LaTeX template?

Unfortunately, I do not succeed to find the Nature Communications template on internet. May be I am not looking in the right place, but only find indications on "how" to write. Of course, I read ...
user avatar
8 votes
2 answers
1k views

Planck's blackbody curve with "rainbow" in Tikz

I am trying to transfer this image from here into Tikz. Can you please help me with the "rainbow"? As a starting point I found this code here: \documentclass[border=3.14mm,tikz]{standalone} \...
user avatar
4 votes
2 answers
607 views

How to draw a gif with expanding circles that reveal lines connecting a non-centered point to the expanding circle using Tikz

I’ve racked my brain for weeks trying to create a .gif which is a moving version of what the below diagram represents. The goal is to start with point (A) and (B) at the same position (origin) with ...
user avatar
  • 41
0 votes
1 answer
142 views

Error when using a block inside a frame in a beamer class document

The piece of code in question (I am using the "physics" package for bras and kets): \begin{block} \begin{equation*} \ket{\psi_{n\bm{k}}} = \frac{1}{\sqrt{N}}\sum_{\bm{R}}e^{i\bm{k}\cdot\bm{R}}\ket{\...
user avatar
  • 135