Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Physical constants #31

Open
marisbaier opened this issue Jun 19, 2024 · 3 comments
Open

Request: Physical constants #31

marisbaier opened this issue Jun 19, 2024 · 3 comments

Comments

@marisbaier
Copy link

Excuse me not knowing if this is the right place to ask but wouldn't physical constants be an amazing addition to this package?

@Leedehai
Copy link
Owner

Leedehai commented Jun 23, 2024

Hi - what constants you have in mind? I feel most of the time it's more convenient & clearer to just type the constants with native Typst..

@marisbaier
Copy link
Author

marisbaier commented Jun 27, 2024

Hi, I meant something like
#let m_e = 9.1093837*calc.pow(10,-31)

Just because I came into the habit of doing quick calculations directly in typst for my homework assignments. Currently I have them in a seperate file and I use them like $hbar^2 approx #(const.hbar^2)$

Constants I have defined are:
(but can be more readily copied from scipy here)
#let m_e = 9.1093837calc.pow(10,-31)
#let c = 299792458
#let epsilon_0 = 8.854 * calc.pow(10,-12)
#let h = 6.626 * calc.pow(10,-34)
#let hbar = 1.05457
calc.pow(10,-34)
#let pi = 3.14159254
#let alpha = 1/137
#let mu_B = 9.274 * calc.pow(10,-24)

@Leedehai
Copy link
Owner

Thanks! I see you want the constants to be defined with their numeric values. It sounds to me it's worth a separate package (or just in your personal file so that can best suit your needs?), though.

At the moment I wish physica to be meant for typesetting only. In particular, offering the numeric values could lead to debates over what units they should be in (I prefer SI personally, but in certain engineering fields SI and the Imperial units coexist.. and also, in many fields other unit systems are preferred), what precision they should have, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants