使用 Tikz 的新 R 徽标

使用 Tikz 的新 R 徽标

我想R用 制作以下新标志 tikz

在此处输入图片描述

我的 MWE 输出为:

\documentclass{standalone}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}[]

\node[blue] at (0,0)  {R};
\draw (0,0) ellipse (28pt and 20pt);
\draw (0,0) ellipse (18pt and 14pt);

\end{tikzpicture}

\end{document}

在此处输入图片描述

我的输出与期望结果不太接近。任何这方面的帮助都将不胜感激。谢谢

答案1

最好的办法是从 Inkscape 导出所有内容,但在这里我仅导出了 R 字母,并通过旧徽标颜色将其放置在省略号上。您可能需要适当调整它,我只是在这里进行近似。

\documentclass[tikz]{standalone}
\definecolor{rlogo}{RGB}{126,142,176}    
\begin{document}
\begin{tikzpicture}
\shade[even odd rule,shading angle=-110] (0,0) ellipse [x radius=3,y radius=2] (0.4,-0.1) ellipse [x radius=2.4,y radius=1.5];
\begin{scope}[shift={(-1.6cm,1.8cm)},x=1pt,y=-1pt,scale=0.2]
\path[fill=rlogo,nonzero rule] (210.3155,173.1696) -- (210.3155,582.9834) --
  (331.7405,582.9834) -- (331.7405,423.6084) .. controls (362.0967,423.6084) and
  (377.2780,416.0209) .. (400.0467,453.9646) .. controls (430.4029,507.0896) and
  (468.3467,582.9834) .. (468.3467,582.9834) -- (612.5417,582.9834) .. controls
  (612.5417,582.9834) and (521.4717,431.1971) .. (513.8792,423.6084) .. controls
  (499.8854,408.4334) and (483.5229,408.4334) .. (460.7592,400.8396) .. controls
  (506.2917,393.2521) and (546.9317,373.8234) .. (561.6917,332.5396) .. controls
  (574.5917,294.5946) and (573.0792,246.3284) .. (545.4230,213.9596) .. controls
  (521.4717,188.3446) and (498.7042,173.1696) .. (437.9905,173.1696) --
  (210.3155,173.1696) -- cycle(331.7405,256.6509) -- (411.4280,256.6509) ..
  controls (430.3242,256.6509) and (445.5792,275.6209) .. (445.5792,294.5946) ..
  controls (445.5792,313.5646) and (430.4030,332.5396) .. (411.4280,332.5396) --
  (331.7405,332.5396) -- (331.7405,256.6509) -- cycle;
\end{scope}
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

\documentclass[tikz]{standalone}
\definecolor{grayR}{HTML}{8A8990}
\definecolor{grayL}{HTML}{C4C7C9}
\definecolor{blueM}{HTML}{1F63B5}   
\begin{document}  
\begin{tikzpicture}

\shade [right color=grayR,left color=grayL,shading angle=60] 
(-3.55,0.3) .. controls (-3.55,1.75) 
and (-1.9,2.7) .. (0,2.7) .. controls (2.05,2.7)  
and (3.5,1.6) .. (3.5,0.3) .. controls (3.5,-1.2) 
and (1.55,-2) .. (0,-2) .. controls (-2.3,-2) 
and (-3.55,-0.75) .. cycle;

\fill[white] 
(-2.15,0.2) .. controls (-2.15,1.2) 
and (-0.7,1.8) .. (0.5,1.8) .. controls (2.2,1.8) 
and (3.1,1.2) .. (3.1,0.2) .. controls (3.1,-0.75) 
and (2.4,-1.45) .. (0.5,-1.45) .. controls (-1.1,-1.45) 
and (-2.15,-0.7) .. cycle;

\fill[blueM] 
(1.75,1.25) -- (-0.65,1.25) -- (-0.65,-2.75) -- (0.55,-2.75) -- (0.55,-1.15) -- 
(0.95,-1.15)  .. controls (1.15,-1.15) 
and (1.5,-1.9) .. (1.9,-2.75) -- (3.25,-2.75)  .. controls (2.2,-1) 
and (2.5,-1.2) .. (1.8,-0.95) .. controls (2.6,-0.9) 
and (2.85,-0.35) .. (2.85,0.2) .. controls (2.85,0.7) 
and (2.5,1.2) .. cycle;

\fill[white]  (1.4,0.4) -- (0.55,0.4) -- (0.55,-0.3) -- (1.4,-0.3).. controls (1.75,-0.3) 
and (1.75,0.4) .. cycle;

\end{tikzpicture}
\end{document}

带有 TikZ 的 R 符号

答案3

我无法在新版本的 inkscape 上重新安装 svg2tikz 插件,但在 ubuntu 的命令行中,可以运行:

wget https://upload.wikimedia.org/wikipedia/commons/1/1b/R_logo.svg
pip install git+git://github.com/aloisklink/svg2tikz --user
svg2tikz --figonly R_logo.svg 

第一行下载 R 徽标的 svg,第二行安装 svg2tikz python 库,第三行将 svg 文件导出到 tikz。注意,我安装的是原始 svg2tikz 的一个分支

你得到:

\begin{tikzpicture}[y=0.80pt, x=0.80pt, yscale=-1.000000, xscale=1.000000, inner sep=0pt, outer sep=0pt]
\path[even odd rule] (361.4530,485.9370) .. controls (162.3290,485.9370) and
  (0.9060,377.8280) .. (0.9060,244.4690) .. controls (0.9060,111.1090) and
  (162.3290,3.0000) .. (361.4530,3.0000) .. controls (560.5780,3.0000) and
  (722.0000,111.1090) .. (722.0000,244.4690) .. controls (722.0000,377.8280) and
  (560.5780,485.9370) .. (361.4530,485.9370) -- cycle(416.6410,97.4060) ..
  controls (265.2890,97.4060) and (142.5940,171.3140) .. (142.5940,262.4840) ..
  controls (142.5940,353.6540) and (265.2890,427.5620) .. (416.6410,427.5620) ..
  controls (567.9920,427.5620) and (679.6870,377.0330) .. (679.6870,262.4840) ..
  controls (679.6870,147.9710) and (567.9920,97.4060) .. (416.6410,97.4060) --
  cycle;
\path[even odd rule] (550.0000,377.0000) .. controls (550.0000,377.0000) and
  (571.8220,383.5850) .. (584.5000,390.0000) .. controls (588.8990,392.2260) and
  (596.5100,396.6680) .. (602.0000,402.5000) .. controls (607.3780,408.2120) and
  (610.0000,414.0000) .. (610.0000,414.0000) -- (696.0000,559.0000) --
  (557.0000,559.0620) -- (492.0000,437.0000) .. controls (492.0000,437.0000) and
  (478.6900,414.1310) .. (470.5000,407.5000) .. controls (463.6680,401.9690) and
  (460.7550,400.0000) .. (454.0000,400.0000) .. controls (449.2980,400.0000) and
  (420.9740,400.0000) .. (420.9740,400.0000) -- (421.0000,558.9740) --
  (298.0000,559.0260) -- (298.0000,152.9380) -- (545.0000,152.9380) .. controls
  (545.0000,152.9380) and (657.5000,154.9670) .. (657.5000,262.0000) .. controls
  (657.5000,369.0330) and (550.0000,377.0000) .. (550.0000,377.0000) --
  cycle(496.5000,241.0240) -- (422.0370,240.9760) -- (422.0000,310.0260) --
  (496.5000,310.0020) .. controls (496.5000,310.0020) and (531.0000,309.8950) ..
  (531.0000,274.8770) .. controls (531.0000,239.1550) and (496.5000,241.0240) ..
  (496.5000,241.0240) -- cycle;

\end{tikzpicture}

虽然不是非常好,但可以作为起点。

相关内容