11

I want to set partial derivations like \frac{\partial}{\partial x}. This is issue is discussed several times here. Packages like esdiff or commath or suggested. However one problem with all those solutions is that the \partial is not set upright. Usually a recommendation is to use kpfonts or other fonts. Assume I do not want to change my font. Is there some LaTeX command to set the \partial upright or is this always a font issue? I have tried using \mathrm, but this doesn't work.

12
\usepackage[partialup]{kpfonts}

or if you do not want to load the kpfonts:

\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\makeatletter
\newif\ifkp@upRm% is used in the .fd-file of jkp
\DeclareSymbolFont{Letters}{OML}{jkp}{m}{n}
\DeclareMathSymbol{\partialup}{\mathord}{Letters}{128}
\makeatother
\usepackage{mathptmx}

\begin{document}

\[ \frac{\partialup f}{\partialup x} \]

\end{document}
4

Another nice approach could be rotating and scaling the \partial symbol by this one-liner:

\DeclareRobustCommand{\uppartial}{\text{\rotatebox[origin=t]{20}{\scalebox{0.95}[1]{$\partial$}}}\hspace{-1pt}}

It uses the normal partial symbol, squeezes it a bit horizontally, rotates it around the top for 20 deg and minimizes the distance to the following symbol.

Now you can use \uppartial in your math environment and get nice results like this:

uppartial

For Germans: DIN 1338 regulates which symbols are written in italics and which ones upright (see de:Wikipedia)

2

You can get upright partial symbol in Computer Modern the following way

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{bm}
\usepackage{amsmath}
\usepackage{amssymb}
\newsavebox{\foobox}
\newcommand{\slantbox}[2][0]{\mbox{%
    \sbox{\foobox}{#2}%
    \hskip\wd\foobox
    \pdfsave
    \pdfsetmatrix{1 0 #1 1}%
    \llap{\usebox{\foobox}}%
    \pdfrestore
}}
\newcommand\unslant[2][-.25]{\slantbox[#1]{$#2$}}

\newcommand{\uppartial}{\unslant\partial}
\newcommand{\upPartial}{\unslant\partial\kern-0.8pt}


\begin{document}

$$\bm{E} = -\left( \frac{\uppartial  V}{\uppartial x} \bm{\hat{\imath}} +                 \frac{\uppartial V}{\uppartial y}\bm{\hat{\jmath}} + \frac{\uppartial V}    {\uppartial z}\bm{\hat{k}} \right)$$\\

$$\bm{E} = -\left( \frac{\upPartial  V}{\upPartial x} \bm{\hat{\imath}} +     \frac{\upPartial V}{\upPartial y}\bm{\hat{\jmath}} + \frac{\upPartial V}{\upPartial z}\bm{\hat{k}} \right)$$\\

$$\bm{E} = -\left( \frac{\partial  V}{\partial x} \bm{\hat{\imath}} + \frac{\partial V}{\partial y}\bm{\hat{\jmath}} + \frac{\partial V}{\partial z}\bm{\hat{k}} \right)$$

\end{document}

Partial Symbols

This is taken from this answer.

  • 1
    May be a \reflectbox{$6$} would work as an upright partial? – Manuel Jan 23 '18 at 17:30
  • Not terrible, but I see that it looks better with this “unslant partial symbol”. – Manuel Jan 23 '18 at 17:36
  • @Manuel My choice of words was poor. This symbol looks fatter. – Apoorv Potnis Jan 23 '18 at 17:38
  • @Manuel Also, the size of reflected 6 does not match with other characters in inline mode. – Apoorv Potnis Jan 23 '18 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.