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.
81
questions
0
votes
0answers
29 views
Drawing Colored Disc, Inner Rings, and Arrows Using Tikz
I am somewhat new to drawing shapes on tikz and feel it is the most overwhelming part in LaTeX. While I have seen other videos and posts on drawing common shapes, could someone walk me through this ...
1
vote
3answers
97 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 ...
0
votes
0answers
27 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}[...
0
votes
0answers
18 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 ...
1
vote
1answer
66 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, ...
1
vote
0answers
58 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 ...
0
votes
0answers
66 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?
1
vote
1answer
58 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]...
4
votes
5answers
367 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?
0
votes
1answer
62 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) \\
...
0
votes
0answers
39 views
I don't know how to handle this error
I wanted to create a cheat sheet in latex, but then found a template for one, but there's an error popping up and I don't quite know how to handle it or what I should change.
I would be really ...
3
votes
1answer
41 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 ...
0
votes
2answers
301 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.
1
vote
1answer
46 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{...
0
votes
0answers
31 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 ...
4
votes
3answers
167 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....
2
votes
2answers
220 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 ...
1
vote
2answers
89 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}$ (...
1
vote
0answers
91 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 ...
1
vote
1answer
83 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 ...
3
votes
1answer
628 views
0
votes
0answers
71 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.
4
votes
1answer
198 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{...
2
votes
1answer
92 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 ...
5
votes
1answer
945 views
Draw P and S waves illustration
I need some help with drawing similar figures. Don't care about colour. Thanks.
0
votes
0answers
32 views
7
votes
1answer
318 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 ...
0
votes
0answers
72 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 ...
0
votes
1answer
136 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 ...
3
votes
1answer
5k 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 ...
7
votes
2answers
591 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}
\...
4
votes
2answers
542 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 ...
0
votes
1answer
62 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{\...
0
votes
1answer
484 views
iopart class is not friend with physics package
I am using iopart class for my document. In an equation I wish to use ket. For this reason I use \usepackage{physics}. But when I type this package, I alarmed by Command \equation already defined. And ...
4
votes
1answer
512 views
Value of physical constants in LaTeX
I want to use the value of physical constants in my LaTeX code through some reference.
As far as I checked, mandi package seems to give the value of physical constants, but I prefer the style of ...
5
votes
4answers
1k views
Putting Faraday's law formula in LaTeX
Can anyone tell me how to put the formula for faraday's law in LaTeX?
This is the formula I want
emf=(Delta.Phi)/(Delta.t)
thanks
2
votes
1answer
67 views
Prevent brakets from resizing
I am using the physics package for braket (Dirac) notation. However, some expressions (such as the braket on the right) automatically rescale in the presence of, say, an operator (such as f hat), ...
0
votes
1answer
169 views
How do I draw 3-D axes in TIKZ?
Can someone help me draw this? I need it to show the effect of a rotated polarizing component, and things always looks better in tikz, my my skills are sub-standard.
2
votes
1answer
120 views
can i get some help drawing a polarization ellipse, something like this:
Need help drawing this in tikz please.
2
votes
1answer
563 views
Required Files for Writing Physics-related Thesis
I am trying to write my dissertation for PhD in physics using overleaf website. I am using the template given by our school in this discipline that is called ua-thesis.
I also have a .bib file ...
36
votes
2answers
2k views
Physics replacement effort
I'm currently considering writing up some macros in order to provide a somewhat more reasonable alternative to what the physics package does. This is heavily inspired by Alternatives to the physics ...
38
votes
0answers
4k views
Alternatives to the physics package
The physics package is useful
A lot of my LaTeX documents make heavy use of the physics package. Aside from it overloading several standard commands (e.g. \sin, \abs, etc.), it also makes a few ...
6
votes
3answers
3k views
Macros \dv and \pdv eat the subsequent parenthesis argument
The physics package has the macros \dv and \pdv which are great but I have a small problem with them.
If an argument with parenthesis included right after them they eat the whole argument. If there ...
4
votes
2answers
410 views
Drawing a line through a box in tikz
I'm using Quantikz to draw a multiqubit gate (=labelled box) without targeting some qubits (=horizontal lines).
I have never used tikz before and wonder if there is an easy way to get the desired ...
2
votes
1answer
635 views
How to fix the spacing before starred commands from physics package
\documentclass{article}
\usepackage{physics}
\begin{document}
\fboxsep=0pt
This is some \fbox{$\ev*{\hat{O}_P}$} and then some.
\end{document}
There seems to be extra spacing added before the ...
1
vote
1answer
216 views
Up and down Wick contractions
I'm using simpler-Wick package, and I would like to have up and down contractions in the same equation. In another questions @marmot gave me a solution for up and down contractions, but I would like ...
1
vote
1answer
224 views
Time oriented wick contractions
I've used simple-wick and simpler-wick but in neither of them I can put arrows in the lines conecting the elements of the contractions.
Does anybody know how to do that?
I can do something with tikz ...
4
votes
1answer
272 views
Drawing particles in a box
I want to draw a figure, somewhat like this:
Maybe with the left box labeled State 1, and the right box labeled State 2. I searched on how to draw rectangles as a start, but I could not make much ...
5
votes
1answer
731 views
Plotting the Lorentz Constant in LaTeX
I'm having trouble producing a graph of the Lorentz constant, defined by
\frac{1}{\sqrt{1 - v^2/c^2}$
as a function of $v$. (Here, $c$ = $3 * 10^8$).
I tried many examples, but I usually get "...
2
votes
1answer
403 views
Sans-Serif Font using Metropolis Theme and Physics Package
using the beamer class theme metropolis, I stumbled over the physics package's \dv{} command. This MWE illustrates the issue:
\documentclass{beamer}
\usetheme{metropolis}
\usepackage{physics}
\begin{...