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 for an option to have upright partial derivatives and upright lowercase delta symbols #13

Open
apoorvpotnis opened this issue Jul 28, 2023 · 1 comment
Labels
wontfix This will not be worked on

Comments

@apoorvpotnis
Copy link

apoorvpotnis commented Jul 28, 2023

I understand that this might be difficult in pdflatex using the already existing fonts, but upright symbols are available in unicode fonts for use with xelatex/lualatex.

@sjelatex
Copy link
Owner

sjelatex commented Jul 30, 2023

I had this feature in an early development version before I released the package as v0.9. I removed it because there isn't an upright partial in computer modern latin as far as I know. You can use packages to get it, but usually it doesn't fit the document font or it changes the font for all other characters as well.

There is actually a way to achieve it in pdflatex by Shear Transform and Improved shear transform which was what I had in the early dev versions. But I don't think it was within the scope of the package to define such tricks.

\documentclass{article}
\usepackage{derivative}
\usepackage{scalerel}

\newlength{\foodim}
\newsavebox{\foobox}
\newcommand{\slantbox}[2][0]{\mbox{%
	\sbox{\foobox}{#2}%
	\foodim=#1\wd\foobox%
	\hskip\wd\foobox%
	\hskip -0.5\foodim%
	\pdfsave%
	\pdfsetmatrix{1 0 #1 1}%
	\llap{\usebox{\foobox}}%
	\pdfrestore%
	\hskip 0.5\foodim%
}}
\newcommand\unslant[2][-0.25]{\ThisStyle{\slantbox[#1]{$\SavedStyle#2$}}}
\newcommand\uprightpartial{\unslant{\partial}}

\begin{document}
	$\partial \uprightpartial$
	
	$\unslant\alpha \unslant\beta \unslant\gamma \unslant\delta$
	
	$\pdv{f}{x}$
	
	\derivset{\pdv}[style-inf=\uprightpartial]
	
	$\pdv{f}{x}$
\end{document}

image

If you are using pdflatex, you can do the above but you should use \derivset{\pdv}[style-inf=\uprightpartial] in the preamble.

Likewise if you use lualatex or xelatex, you can use

\documentclass{article}
\usepackage{derivative}
\usepackage{unicode-math}
\begin{document}
	$\pdv{f}{x}$
	
	\derivset{\pdv}[style-inf=\symup{\partial}]
	
	$\pdv{f}{x}$
\end{document}

@sjelatex sjelatex added the wontfix This will not be worked on label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants