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

How to define derivatives with 2 symbols? #17

Open
Firestar-Reimu opened this issue Jul 20, 2024 · 3 comments
Open

How to define derivatives with 2 symbols? #17

Firestar-Reimu opened this issue Jul 20, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Firestar-Reimu
Copy link

\DeclareDerivative{\pdv}{\partial}[style-var=multiple, style-var-/=multiple,
style-var-!=mixed, style-var-/!=multiple, delims-eval=(), delims-eval-/=(),
delims-eval-!=()]

this only can define \frac{symbol_1}{symbol_1}, but how to define derivatives like \frac{symbol_1}{symbol_2}

for example: Cosmological Physics -- J. A. Peacock

image

@sjelatex
Copy link
Owner

sjelatex commented Jul 20, 2024

The keys style-inf-num and style-inf-den sets the symbol of the differential d in the numerator and denominator, respectively. So this should do the trick:

\DeclareDerivative{\cdv}{\partial}[style-inf-num=D, style-inf-den=\partial, style-var=multiple, style-var-/=multiple,
style-var-!=mixed, style-var-/!=multiple, delims-eval=(), delims-eval-/=(),
delims-eval-!=()]

@Firestar-Reimu
Copy link
Author

Firestar-Reimu commented Jul 21, 2024

\documentclass{article}
\usepackage{amsmath}
\usepackage{derivative}
\DeclareDerivative{\cdv}{\partial}[style-inf-num=D, style-inf-den=\partial, style-var=multiple, style-var-/=multiple,style-var-!=mixed, style-var-/!=multiple, delims-eval=(), delims-eval-/=(),
delims-eval-!=()]

\begin{document}
\[
\cdv{V}{x}
\]
\end{document}

No, this returns:

image

But \pdv[style-inf-num=D]{V}{x} is able to produce:

image

@sjelatex
Copy link
Owner

sjelatex commented Jul 21, 2024

Then that must be a bug. I will have to look into that. Got a new pc recently, so I have to install TexLive again...

For the time being I suggest you use

\derivset{\pdv}[style-inf-num=D]

That should work. In the mean time I will work on an update.

EDIT: This doesn't work either.
This mystery deepens.

@sjelatex sjelatex added the bug Something isn't working label Jul 21, 2024
@sjelatex sjelatex self-assigned this Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants