3

Note that this is a different question from this one.

That aside, I was unable to find the markup for writing something like this: crossed derivative

As visible, I require the partial symbol to have a line across it.

I would also appreciate it if someone could mention the markup for a crossed normal derivative, too, as a bonus.

Thanks.

cmhughes
  • 100,947

2 Answers2

7

Something like this?

enter image description here

\documentclass{article}
\usepackage[T1]{fontenc} % for "\dh" macro
\usepackage{amsmath}     % for "\textrm" macro
\newcommand{\crpartial}{\textup{\rmfamily\dh}}
\begin{document}
\[
dS \ge \frac{\crpartial q}{T}
\]
\end{document}
Mico
  • 506,678
  • 2
    Uhm, maybe \textup? Otherwise the symbol will change e.g. in a theorem. Alternatively \textit from the very beginning, such that the symbol looks slanted no matter what. (On a personal note: as a theoretical physicist I hate this notation... :-)) – campa Feb 21 '20 at 15:51
  • @campa - Great suggestion to employ \textup. I've updated the code shown in the answer above. – Mico Feb 21 '20 at 15:54
  • 1
    @William R. Ebenezer If you wonder where to find the right symbols, you may try (http://detexify.kirelabs.org/classify.html) works quite well on your example. – Denis Feb 21 '20 at 16:16
  • What does the \dh do? And why is \textup better than \text? Can you elaborate on your answer? – AndréC Feb 21 '20 at 16:16
  • 3
    @AndréC \dh draws the symbol. \textupmakes sure it always appears identical inpendently from the context. – Denis Feb 21 '20 at 16:18
  • 2
    @AndréC Indeed, \dh is in text mode. – Denis Feb 21 '20 at 16:25
  • As far as I know, \dh is (i) a symbol that’s still used in modern Icelandic and (ii) a symbol used in phonetics. – Mico Feb 21 '20 at 16:26
  • Thanks for the really prompt answer! Me being curious: I wonder if your profile pic is of Jabba the Hutt? – William R. Ebenezer Feb 21 '20 at 16:45
  • @WilliamR.Ebenezer - Indeed, it's a picture of my illustrious, much misunderstood, and gratuitously maligned ancestor. People tell me that, as I grow older, the family resemblance is becoming more and more evident. I couldn't be more proud. :-) – Mico Feb 21 '20 at 17:52
  • 1
    @Mico makes sense! Good day ;) – William R. Ebenezer Feb 21 '20 at 17:57
  • 1
    Sorry for bothering, but on second thoughts \textup changes the shape but not the series. If the macro, for whatever reason, is in a piece set in \sffamily the result will be a sans-serif character :-) I guess it's safer to do \textup{\textrm{\dh}}. Either that or stuff like \textup{\rmfamily\dh}, or \textrm{\upshape\dh} or other possible permutations... – campa Feb 21 '20 at 20:43
  • @campa - Thanks for noticing this additional issue. I've changed \textup{\dh} to \textup{\rmfamily\dh} in the definition of the \crpartial macro. – Mico Feb 21 '20 at 21:10
  • 1
    @Mico Erm... the answer has \textrm{\rmfamily\dh}. Shouldn't \textup be in the place of \textrm? – frougon Feb 21 '20 at 23:49
  • @frougon - Good catch! – Mico Feb 22 '20 at 00:03
4

If you're happy with U+00F0 LATIN SMALL LETTER ETH, that is, ð, then you can define it as a math symbol. I used italic, that seems more appropriate.

\documentclass{article}
\usepackage{amsmath}

\DeclareSymbolFont{toneitalic}{T1}{\familydefault}{m}{it}
\DeclareMathSymbol{\cpartial}{\mathord}{toneitalic}{"F0}

\begin{document}

\begin{equation*}
dS\ge\frac{\cpartial q}{T}
\end{equation*}

\end{document}

enter image description here

The slot number "F0 is not a coincidence, as the T1 encoding tries to be as consistent with Latin-1 as possible. Anyway, in order to check, I did from the command line

latexdef dh

to get

\dh:
macro:->\T1-cmd \dh \T1\dh

Hmm, what should we ask for? With some background in the innards of LaTeX

latexdef 'T1\dh'

is the right thing to ask for:

\T1\dh:
\char"F0

You can also cross \partial. The following works with CM fonts, and can be adapted to other fonts. Not really good in \scriptscriptstyle; some work is needed in case.

\documentclass{article}
\usepackage{amsmath,graphicx}

\makeatletter
\newcommand{\cross@partial}{\mathpalette\cross@@partial\relax}
\newcommand{\cross@@partial}[2]{%
  \makebox[0pt][r]{%
    \raisebox{-0.05\height}{%
      \makebox[0.5\width][l]{%
        \rotatebox[origin=l]{30}{$\m@th#1\mathchar'26$}%
      }%
    }%
  }%
}
\newcommand{\cpartial}{\partial\cross@partial}
\makeatother

\begin{document}

\begin{equation*}
dS\ge\frac{\cpartial q}{T}\quad\scriptstyle\cpartial
\end{equation*}

\end{document}

enter image description here

egreg
  • 1,121,712