Skip to content

Instantly share code, notes, and snippets.

@doraTeX
Last active March 14, 2026 06:24
Show Gist options
  • Select an option

  • Save doraTeX/2f390981b70cc83927c65d5e2598c291 to your computer and use it in GitHub Desktop.

Select an option

Save doraTeX/2f390981b70cc83927c65d5e2598c291 to your computer and use it in GitHub Desktop.
\documentclass{jlreq}
%\documentclass[dvipdfmx]{jlreq} %% (u)pLaTeX + dvipdfmx を使う場合はドキュメントクラスオプションに [dvipdfmx] が必要
\usepackage{tikz}
\usepackage{amsmath}
\makeatletter
\def\proportionalto{%
\mathrel{\mathchoice
{\@proportionalto\tf@size}{\@proportionalto\tf@size}%
{\@proportionalto\sf@size}{\@proportionalto\ssf@size}}}
\def\@proportionalto#1{%
\dimen@=#1\p@
\@proportionalto@check@boldness
\vcenter{\hbox{%
\begin{tikzpicture}[
x=0.1\dimen@, y=0.1\dimen@,
baseline=0pt,
inner sep=0pt, outer sep=0pt,
]
\node[overlay,text=white,anchor=west] {∽};% dummy text
\draw[line width=\@varpropto@lwdim, line cap=round, line join=round]
(3.4,2.7)
.. controls (2.3200, 3.5100) and (1.8618, 3.2082) .. (1.6,2.7)
.. controls (1.2509, 2.0224) and (1.2509, 0.9776) .. (1.6,0.3)
.. controls (1.8618,-0.2082) and (2.3200,-0.5100) .. (3.4,0.3)
.. controls (4.4667, 1.1000) and (5.5333, 1.9000) .. (6.6,2.7)
.. controls (7.6800, 3.5100) and (8.1382, 3.2082) .. (8.4,2.7)
.. controls (8.7491, 2.0224) and (8.7491, 0.9776) .. (8.4,0.3)
.. controls (8.1382,-0.2082) and (7.6800,-0.5100) .. (6.6,0.3);
\path (0,0) rectangle (10,3);
\end{tikzpicture}%
}}}
\def\@proportionalto@check@boldness{%
\def\@varpropto@temp{bold}%
\ifx\math@version\@varpropto@temp
\edef\@varpropto@lwdim{\the\dimexpr 8\dimen@/100\relax}%
\else
\edef\@varpropto@lwdim{\the\dimexpr 4\dimen@/100\relax}%
\fi}
\makeatother
\begin{document}
\begin{align*}
&A \proportionalto B\\
&\boldsymbol{A \proportionalto B}
\end{align*}
\end{document}
\documentclass{jlreq}
%\documentclass[dvipdfmx]{jlreq} %% (u)pLaTeX + dvipdfmx を使う場合はドキュメントクラスオプションに [dvipdfmx] が必要
\usepackage{tikz}
\usepackage{amsmath}
\makeatletter
\def\proportionalto{%
\mathrel{\mathchoice
{\@proportionalto\tf@size}{\@proportionalto\tf@size}%
{\@proportionalto\sf@size}{\@proportionalto\ssf@size}}}
\def\@proportionalto#1{%
\dimen@=#1\p@
\vcenter{\hbox{%
\begin{tikzpicture}[
x=0.1\dimen@, y=0.1\dimen@,
baseline=0pt,
inner sep=0pt, outer sep=0pt,
]
\node[overlay,text=white,anchor=west] {∽};% dummy text
\@proportionalto@fill
\end{tikzpicture}%
}}}
\def\@proportionalto@fill{%
\def\@varpropto@temp{bold}%
\ifx\math@version\@varpropto@temp
% bold version
\fill[smooth cycle] plot coordinates {%
(3.197,2.795) (2.976,2.923) (2.698,3.045) (2.459,3.102)
(2.256,3.103) (2.085,3.058) (1.948,2.979) (1.836,2.870)
(1.745,2.743) (1.669,2.597) (1.606,2.436) (1.557,2.266)
(1.521,2.085) (1.499,1.898) (1.494,1.695) (1.500,1.494)
(1.519,1.288) (1.552,1.091) (1.600,0.897) (1.659,0.717)
(1.734,0.547) (1.818,0.398) (1.912,0.269) (2.012,0.176)
(2.117,0.120) (2.218,0.103) (2.319,0.111) (2.452,0.146)
(2.641,0.228) (2.891,0.361) (3.211,0.557) (3.375,0.677)
(3.538,0.796) (3.696,0.913) (3.857,1.033) (4.016,1.151)
(4.177,1.271) (4.334,1.388) (4.496,1.510) (4.652,1.627)
(4.814,1.748) (4.971,1.866) (5.127,1.983) (5.289,2.105)
(5.446,2.223) (5.607,2.344) (5.764,2.462) (5.925,2.585)
(6.081,2.703) (6.241,2.826) (6.396,2.946) (6.751,3.220)
(7.083,3.388) (7.404,3.485) (7.694,3.510) (7.968,3.462)
(8.193,3.352) (8.374,3.192) (8.505,3.014) (8.606,2.818)
(8.684,2.619) (8.744,2.405) (8.787,2.189) (8.816,1.963)
(8.827,1.740) (8.822,1.509) (8.799,1.283) (8.758,1.054)
(8.702,0.838) (8.622,0.633) (8.524,0.450) (8.412,0.279)
(8.287,0.132) (8.142,0.007) (7.977,-0.082) (7.783,-0.128)
(7.564,-0.121) (7.312,-0.056) (7.027,0.073) (6.803,0.205)
(6.917,0.399) (7.130,0.274) (7.390,0.159) (7.599,0.109)
(7.761,0.109) (7.891,0.147) (7.998,0.215) (8.101,0.317)
(8.193,0.442) (8.279,0.595) (8.352,0.757) (8.407,0.933)
(8.441,1.123) (8.463,1.330) (8.468,1.531) (8.457,1.735)
(8.431,1.929) (8.389,2.124) (8.335,2.307) (8.269,2.480)
(8.192,2.630) (8.104,2.766) (8.015,2.861) (7.913,2.931)
(7.811,2.965) (7.672,2.973) (7.512,2.942) (7.297,2.861)
(7.066,2.730) (6.761,2.474) (6.613,2.343) (6.458,2.209)
(6.308,2.081) (6.152,1.950) (5.998,1.823) (5.842,1.696)
(5.689,1.574) (5.529,1.448) (5.375,1.328) (5.219,1.208)
(5.056,1.087) (4.900,0.972) (4.736,0.852) (4.574,0.738)
(4.409,0.622) (4.246,0.510) (4.079,0.397) (3.913,0.286)
(3.742,0.175) (3.544,0.047) (3.189,-0.156) (2.897,-0.295)
(2.646,-0.388) (2.419,-0.433) (2.194,-0.434) (1.943,-0.372)
(1.715,-0.233) (1.544,-0.052) (1.421,0.144) (1.327,0.344)
(1.251,0.561) (1.196,0.781) (1.157,1.009) (1.135,1.239)
(1.130,1.471) (1.139,1.694) (1.161,1.921) (1.201,2.135)
(1.255,2.339) (1.325,2.531) (1.410,2.714) (1.512,2.885)
(1.637,3.041) (1.796,3.181) (1.994,3.285) (2.228,3.339)
(2.489,3.332) (2.773,3.261) (3.077,3.125) (3.310,2.990)};
\else
% normal version
\fill[smooth cycle] plot coordinates {%
(3.197,2.795) (2.976,2.923) (2.698,3.045) (2.459,3.102)
(2.256,3.103) (2.085,3.058) (1.948,2.979) (1.836,2.870)
(1.745,2.743) (1.669,2.597) (1.606,2.436) (1.557,2.266)
(1.521,2.085) (1.499,1.898) (1.494,1.695) (1.500,1.494)
(1.519,1.288) (1.552,1.091) (1.600,0.897) (1.659,0.717)
(1.734,0.547) (1.818,0.398) (1.912,0.269) (2.012,0.176)
(2.117,0.120) (2.218,0.103) (2.319,0.111) (2.452,0.146)
(2.641,0.228) (2.891,0.361) (3.211,0.557) (3.375,0.677)
(3.538,0.796) (3.696,0.913) (3.857,1.033) (4.016,1.151)
(4.177,1.271) (4.334,1.388) (4.496,1.510) (4.652,1.627)
(4.814,1.748) (4.971,1.866) (5.127,1.983) (5.289,2.105)
(5.446,2.223) (5.607,2.344) (5.764,2.462) (5.925,2.585)
(6.081,2.703) (6.241,2.826) (6.396,2.946) (6.751,3.220)
(7.083,3.388) (7.404,3.485) (7.694,3.510) (7.968,3.462)
(8.193,3.352) (8.374,3.192) (8.505,3.014) (8.606,2.818)
(8.684,2.619) (8.744,2.405) (8.787,2.189) (8.816,1.963)
(8.827,1.740) (8.822,1.509) (8.799,1.283) (8.758,1.054)
(8.702,0.838) (8.622,0.633) (8.524,0.450) (8.412,0.279)
(8.287,0.132) (8.142,0.007) (7.977,-0.082) (7.783,-0.128)
(7.564,-0.121) (7.312,-0.056) (7.027,0.073) (6.803,0.205)
(6.879,0.334) (7.096,0.207) (7.364,0.087) (7.587,0.032)
(7.768,0.030) (7.920,0.071) (8.046,0.146) (8.163,0.255)
(8.266,0.388) (8.361,0.547) (8.442,0.716) (8.505,0.902)
(8.547,1.100) (8.575,1.314) (8.586,1.523) (8.580,1.737)
(8.559,1.940) (8.522,2.146) (8.472,2.340) (8.408,2.527)
(8.330,2.693) (8.238,2.848) (8.135,2.971) (8.007,3.072)
(7.863,3.131) (7.679,3.152) (7.476,3.123) (7.225,3.037)
(6.961,2.893) (6.639,2.631) (6.489,2.504) (6.332,2.374)
(6.180,2.249) (6.023,2.121) (5.868,1.997) (5.710,1.872)
(5.556,1.751) (5.395,1.626) (5.240,1.507) (5.084,1.388)
(4.922,1.267) (4.766,1.151) (4.602,1.031) (4.442,0.916)
(4.278,0.799) (4.116,0.685) (3.951,0.569) (3.788,0.456)
(3.619,0.343) (3.433,0.217) (3.090,0.017) (2.812,-0.121)
(2.581,-0.210) (2.386,-0.252) (2.202,-0.255) (2.001,-0.208)
(1.814,-0.096) (1.667,0.055) (1.553,0.229) (1.463,0.412)
(1.387,0.613) (1.331,0.820) (1.289,1.036) (1.263,1.255)
(1.254,1.479) (1.258,1.694) (1.273,1.914) (1.307,2.119)
(1.356,2.315) (1.418,2.499) (1.496,2.675) (1.590,2.838)
(1.703,2.984) (1.846,3.114) (2.024,3.209) (2.237,3.261)
(2.479,3.256) (2.748,3.189) (3.043,3.058) (3.272,2.925)};
\fi
\path (0,0) rectangle (10,3);
}
\makeatother
\begin{document}
\begin{align*}
&A \proportionalto B\\
&\boldsymbol{A \proportionalto B}
\end{align*}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment