代码

代码

我正在制作日历。该日历将是 2015 年 TUG 的日历。去年我也制作了一个日历,但由于时间限制,大多数示例都是图形。

由于这项工作很繁重,我需要你的帮助。

如果您可以/想要提供帮助,以下是贡献的要求:

  • 您的投稿不应超过 1 页 A4 大小(横向)或 A5 大小(纵向)。
  • 您应该发布您的 TeX 解决方案作为这个问题的答案。
  • 如果可能,请提供 pdf 输出文档的超链接。
  • 如果您希望将提交的内容用于日历,则应确保文档可以以单页 PDF 格式提供,且大小不超过 A4/横向。如果我需要,我会向您索要 PDF。
  • 您的提交内容可以使用用户定义的软件包和专有字体。无需公开这些内容。
  • 您的提交应包括简短的描述和输出的屏幕截图。

下面的模板可能对入门有帮助。

% save this document as example.tex
% compile this document with: pdflatex -shell-escape example.tex
\documentclass{article}

% Needed to make sure your page dimensions
% are the same as that of the calendar.
\usepackage[landscape,a4paper]{geometry}

\usepackage{tikz}
\usetikzlibrary{external}

\pagestyle{empty}

\begin{document}

\begin{tikzpicture}
\node[scale=10]{Your Art Here.};
\end{tikzpicture}

\end{document}

输出示例

  • 2013 年 10 月 4 日,我决定放松我的问题并接受排版展示。
  • 11 月 12 日,我再次放松了我的提问,因为我绝对没有时间自己制作一个看起来很美味的日历。提交一两份可能会有奖品。
  • Springer 慷慨捐赠了两本LaTeX 和朋友
  • 如果提交的作品足够多,我会编制一个日历。否则,我可能不得不取消这个项目。
  • 提交的量太少,所以我取消了 2014 年的日历。Peter Wilson 已经实现了基于 TeX 的日历所以我认为不存在什么实际问题。
  • 尼古拉斯·汉密尔顿 (Nicholas Hamilton) 和 ChrisS 赢得了这本书。

日历完成后,我会发布代码作为这个问题的答案。希望这能帮助那些想做类似事情的人。

仅供参考我决定今天(2014-02-14)不颁发我的赏金(500),因为我想稍微提高一下标准。

答案1

好吧,总得有人先走……!

输出

我已经完成了部分博士学位,并在我的论文内页上使用它来增加一些“艺术气息”,然而,词云的来源实际上是我的BibTeX 数据库,因此云与每个文档相关,并且上面的示例实际上是我制作的最后一个示例。

从方法论上讲,云本身是在 R 中通过我为此目的编写的自定义包生成的。此自定义包或多或少是wordcloud免费包的便利包装。

为了将它与 LaTeX 集成,我使用了 knitr,但是,这只是调用 R 包,我指示它以 .tikz 格式生成结果。

以下是我的解决方案的代码:

\documentclass[a4paper,landscape,12pt]{article}
\usepackage[margin=0cm]{geometry}

%SETUP
\usepackage{fancyhdr,xcolor,tikz,helvet}
\renewcommand{\familydefault}{\sfdefault}
\pagestyle{empty}
\pagecolor{black!75}

\begin{document}
    %CREATE THE CLOUD
    <<MakeCloud,echo=FALSE,eval=TRUE>>=
      set.seed(1)
      suppressMessages(library(bibcloud))
      suppressMessages(library(tikzDevice))
      options(tikzDocumentDeclaration   = '\\documentclass[12pt]{article}\\usepackage{helvet}\\renewcommand{\\familydefault}{\\sfdefault}\n')
      suppressMessages(cloud(pattern    = "phd.bib",
                             dev        = "tikz",
                             output     = "WordCloud",
                             col.outer  = "#404040",
                             col.inner  = "#FFFFFF",
                             width      = 8,
                             height     = 8,
                             scale.small= 0.25,
                             scale.large= 4,
                             stem       = FALSE,
                             max.words  = 300))
    @

  %TYPESET THE CLOUD
  \begin{figure}[p]
    \centering
    \input{WordCloud.tikz}
  \end{figure}

\end{document}

tikz 文件WordCloud.tikz和生成的 pdf 可以在以下位置找到:这里

答案2

这是 TeX 的十九世纪风格广告,展示了 XeTeX 对 OpenType 的支持以及 OpenType 字体的强大功能。单一字体,辉腾,用于制作此文件:所有文本,缩写,横幅,背景中使用的装饰以及骑马人的图像都是字体中的字形。

辉腾预览

% save this document as example.tex
% compile this document with: xelatex -shell-escape example.tex
\documentclass{article}

% Needed to make sure your page dimensions
% are the same as that of the calendar.
\usepackage[landscape,a4paper,margin=0pt]{geometry}
\parindent=0pt

\usepackage[svgnames]{xcolor}
\usepackage{tikz}

\usepackage{microtype}

\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Phaeton}

\def\swash#1{{\addfontfeatures{RawFeature=+swsh}#1}}
\def\nfrac#1{{\addfontfeatures{RawFeature=+frac}#1}}
\def\cword#1{{\addfontfeatures{RawFeature=+dlig}#1}}
\def\cwrdb#1{{\addfontfeatures{RawFeature={+dlig,+ss01}}#1}}
\def\baner#1{{\addfontfeatures{RawFeature=+ss02}#1}}

\def\orn{\char"E047\char"E048\hspace{-2pt}\raisebox{20.5pt}{\rotatebox{180}{\char"E047\char"E048}}\hspace{-2pt}}
\def\Orn{\orn\orn\orn\orn\orn\orn\orn\orn}
\def\ORn{\Orn\Orn\Orn\Orn\Orn\Orn\Orn\Orn}
\def\ORN{\ORn\ORn\ORn\ORn\ORn\ORn\Orn\Orn}

\definecolor{bgcolour}{gray}{0.9}

\pagestyle{empty}

\begin{document}
\null\vfill
\centering\begin{tikzpicture}
  % Clipping
  \clip (-0.5\textwidth+1cm,-0.5\textheight) rectangle (0.5\textwidth-1cm,0.5\textheight-2cm) ;
  % Background.
  \draw (0,0) node {\fontsize{48}{20.5}\selectfont\begin{minipage}{1.5\textwidth}\color{bgcolour}\ORN\ORN\end{minipage}} ;
  % Logo.
  \draw (0,0) node {\fontsize{120}{120}\selectfont\baner{6=======6}} ;
  \draw (0,0) node {\fontsize{48}{48}\selectfont\TeX\ \cword{AND} Friends} ;
  \draw (0,1.8) node {PROFESSOR DONALD KNUTH'S WORLD FAMOUS} ;
  \draw (0,4.5) node {\fontsize{120}{120}\selectfont\char"E00E} ;
  \draw (-4,4.5) node {\begin{minipage}{3cm}\fontsize{14}{16}\selectfont\centering\hrule\medskip\swash{\strut THE MOST POWERFUL\strut\ PROGRAM\strut}\medskip\hrule\end{minipage}} ;
  \draw (4,4.5) node {\begin{minipage}{3cm}\fontsize{14}{16}\selectfont\centering\hrule\medskip\swash{\strut OF ITS KIND AVAILABLE\strut\ TODAY\strut}\medskip\hrule\end{minipage}} ;
  \draw (0,-1.5) node {\fontsize{16}{16}\selectfont\swash{Available for all major operating systems.}} ;
  \draw (0,-5) node {\begin{minipage}{13cm}\fontsize{16}{20}\selectfont\cword{with} SUPPORT \cword{for} UNICODE \cword{and} OPENTYPE FONTS, \TeX\ \cword{and} ITS DERIVATIVES ARE \cword{the} IDEAL SOLUTION \cword{for} ALL YOUR TWENTY-FIRST CENTURY TYPESETTING NEEDS. \cword{the} IN-BUILT MACRO LANGUAGE ALLOWS YOU TO CUSTOMISE IT TO YOUR NEEDS. \cword{with} AUTOMATIC INDEXING \cword{and} REFERENCING, \cword{and} UNPARALLELED MATHEMATICS SUPPORT, THERE'S NO REASON NOT TO SWITCH TODAY.\end{minipage}} ;
  \draw (0,-9) node {\fontsize{120}{120}\selectfont\baner{1====1}} ;
  \draw (0,-8.7) node {ESTABLISHED 1978} ;
\end{tikzpicture}\par
\vfill\null
\end{document}

源代码和输出可用这里

答案3

使用 LaTeX 字体的一个非常简单的演示pdfLaTeX

A小册子传达了乔治·奥威尔的强烈讯息。

在此处输入图片描述

代码

\documentclass{article}
\usepackage[landscape,a4paper,hmargin=1.5cm,vmargin=1.5cm]{geometry}
\usepackage[osf]{garamondx}
\usepackage[T1]{fontenc}
\usepackage[cmyk,dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage{multicol}
\setlength{\columnsep}{2cm}
\usepackage{lettrine}
%\setlength{\DefaultNindent}{0em}
\setcounter{DefaultLines}{4}
\input Zallman.fd
\newcommand*\initfamily{\usefont{U}{Zallman}{xl}{n}}
\renewcommand{\LettrineFontHook}{\initfamily}
\usepackage{bbding}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}[remember picture,overlay]
  \shade[outer color=gray!15,inner color=white] (current page.south west) rectangle (current page.north east);
  \draw[gray!45,dashed] (current page.south) -- node[pos=.01,rotate=90] {\ScissorRight} (current page.north);
\end{tikzpicture}
\begin{multicols}{2}
  \newcommand{\pamphlet}{%
    {\Huge\hfill\textsc{\textcolor{RoyalBlue}{T}he
        \textcolor{RoyalBlue}{F}reedom} \textit{of} \textsc{the
        \textcolor{RoyalBlue}{P}ress}\hfill} \vspace{\baselineskip}

    \lettrine{\textcolor{RoyalBlue}{I}}{} am well acquainted with all
    the arguments against freedom of thought and speech ---the
    arguments which claim that it cannot exist, and the arguments
    which claim that it ought not to.  I answer simply that they don't
    convince me and that our civilization over a period of four
    hundred years has been founded on the opposite notice.  For quite
    a decade past I have believed that the existing Russian
    \textit{r\'egime} is a mainly evil thing, and I claim the right to
    say so, in spite of the fact that we are allies with the USSR in a
    war which I want to see won.  If I had to choose a text to justify
    myself, I should choose the line from Milton:

    \begin{quote}
      \itshape By the known rules of ancient liberty.
    \end{quote}

    The word \textit{ancient} emphasizes the fact that intellectual
    freedom is a deep--rooted tradition without which our
    characteristic western culture could only doubtfully exist.  From
    that tradition many of our intellectuals are visibly turning away.
    They have accepted the principle that a book should be published
    or suppressed, praised or damned, not on its merits but according
    to political expediency.  And others who do not actually hold this
    view assent to it from sheer cowardice.  An example of this is the
    failure of the numerous and vocal English pacifists to raise their
    voices against the prevalent worship of Russian militarism.
    According to those pacifists, all violence is evil, and they have
    urged us at every stage of the war to give in or at least to make
    a compromise peace.  But how many of them have ever suggested that
    war is also evil when it is waged by the Red Army?  Apparently the
    Russians have a right to defend themselves, whereas for us to do
    [\textit{so}] is a deadly sin.  One can only explain this
    contradiction in one way: that is, by a cowardly desire to keep in
    with the bulk of the intelligentsia, whose patriotism is directed
    towards the USSR rather than towards Britain.  I know that the
    English intelligentsia have plenty of reason for their timidity
    and dishonesty, indeed I know by heart the arguments by which they
    justify themselves.  But at least let us have no more nonsense
    about defending liberty against Fascism.  If liberty means
    anything at all it means the right to tell people what they do not
    want to hear.  The common people still vaguely subscribe to that
    doctrine and act on it.  In our country ---it is not the same in
    all countries: it was not so in republican France, and
    it is not so in the USA today--- it is the liberals who fear
    liberty and the intellectuals who want to do dirt on the
    intellect: it is to draw attention to that fact that I have
    written this preface.

    \vspace{\baselineskip}
    \noindent\textit{Extract from}
    \textsc{The Freedom of the Press}\textit{, by
      \textcolor{RoyalBlue}{George Orwell}.
      Proposed Preface to `Animal Farm', 1945.
      First published: The Times Literary Supplement,
      September 15, 1972.}\par
  } \pamphlet \columnbreak \pamphlet
\end{multicols}
\end{document}

更新

修复了文本中的打字错误。谢谢 Benjamin McKay!这是 PDF输出

答案4

我不是字体设计师或印刷师,但我想用 TikZ 来说明字体设计。这是我的想法:

输出

我在右侧添加了一段文字来补充图片,并使用 Sans Serif 字体显示排版,数字可以用于制作一个相当不错的封面 :)。输出结果可以下载这里

代码

\documentclass{article}
\usepackage[landscape,a4paper,hmargin=1.5cm,vmargin=1.5cm]{geometry}
\usepackage[defaultsans]{droidsans}
\usepackage{epigrafica}
\usepackage[LGR,OT1]{fontenc}
\usepackage{microtype}
\parskip .5\baselineskip
\usepackage[cmyk,dvipsnames]{xcolor}
\usepackage{tikz}
    \usetikzlibrary{calc,through,intersections,shadings}
\usepackage{multicol}
    \setlength{\columnsep}{3cm}
\usepackage{lettrine}
    \setcounter{DefaultLines}{4}
    \renewcommand{\DefaultLoversize}{0.2}
\usepackage[colorlinks=true,urlcolor={yellow!50},bookmarks=false]{hyperref}
\pagestyle{empty}
\color{white}  
\begin{document}
    \begin{tikzpicture}[remember picture,overlay]
        \shade[inner color=RoyalBlue!70,outer color=RoyalBlue] (current page.south west) rectangle (current page.north east);
        \shade[left color=Black,right color=transparent!0,opacity=.20] (current page.south) rectangle (current page.north east);
    \end{tikzpicture}
    \newcommand{\YearTypography}[1]{
        \ifnum#1=1
            \def\opacityF{.6}\def\opacityS{0}
        \else
            \ifnum#1=2
                \def\opacityF{.6}\def\opacityS{1}
            \else
                \ifnum#1=3 \def\opacityF{0}\def\opacityS{1}
                \else
                    \def\opacityF{.6}\def\opacityS{1}
                \fi
            \fi
        \fi
        \begin{tikzpicture}[x=.9cm,y=.9cm,white]
            \pgfmathsetmacro{\nthick}{.3};
            \pgfmathsetmacro{\nwidth}{2};
            \begin{scope}[opacity=\opacityF]
                \foreach [count=\yi] \y in {0,...,4}{
                    \pgfmathifthenelse{mod(\y,2) == 0}{"solid"}{"dashed"};
                    \draw[name path global/.expanded=hline\yi,\pgfmathresult] (0.5,\y) -- +(11.5,0);
                }
                %\foreach [count=\xi] \x in {1,3,4,6,7,9,10,12}{%Normal space between 4 and 1
                %    \draw[name path global/.expanded=vline\xi] (\x,-0.5) -- (\x,4.5);
                %}
                %\foreach [count=\xi] \x in {2,5,8,11}{
                %    \draw[name path global/.expanded=auxvline\xi,dashed] (\x,-0.3) -- (\x,4.3);
                %}
                \foreach [count=\xi] \x in {1,3,4,6,7,9,9.5,11.5}{%Number 4 closer to 1
                    \draw[name path global/.expanded=vline\xi] (\x,-0.5) -- (\x,4.5);
                }
                \foreach [count=\xi] \x in {2,5,8,10.5}{
                    \draw[name path global/.expanded=auxvline\xi,dashed] (\x,-0.3) -- (\x,4.3);
                }

                %Number 2
                \path[name intersections={of=auxvline1 and hline4,by=c12}];
                \draw[name path=circle12] (c12) circle (\nwidth/2);
                \draw[name path=circle22] (c12) circle (\nwidth/2-\nthick);
                \path[name intersections={of=vline1 and hline5,by=a1}];
                \path[name intersections={of=vline2 and hline3,by=a2}];
                \draw[name path=d1,dashed] ($(a1)+(-.2,.2)$) -- ($(a2)+(.2,-.2)$);
                \path[name intersections={of=vline1 and hline3,by=a3}];
                \path[name intersections={of=vline2 and hline1,by=a4}];
                \draw[name path=d2,dashed] ($(a3)+(-.2,.2)$) -- ($(a4)+(.2,-.2)$);
                \path[name intersections={of=d1 and circle12,by={s11,s12}}];
                \path[name intersections={of=d1 and circle22,by={s21,s22}}];
                \draw[name path=d3] ($(s22)+(.5,.5)$) -- +(-2,-2);
                \draw[name path=d4] ($(s12)+(.3,.3)$) -- +(-2,-2);
                \draw[name path=hbase2] (1,\nthick) -- +(2,0);
                \path[name intersections={of=d2 and hbase2,by=auxc}];
                \path[name intersections={of=d2 and d4,by=ic1}];
                \path[name intersections={of=d2 and d3,by=ic2}];
                \path[name intersections={of=vline1 and hline1,by=o}];
                \begin{scope}
                    \path[clip] (o) rectangle +(2,2);
                    \node [draw] at (auxc) [circle through={(ic1)}] {};
                    \node [draw] at (auxc) [circle through={(ic2)}] {};
                \end{scope}
                \path[name intersections={of=vline1 and hline4,by=i21}];
                \path[name intersections={of=vline2 and hline1,by=i22}];

                %Number 0
                \path[name intersections={of=auxvline2 and hline4,by=c10}];
                \path[name intersections={of=auxvline2 and hline2,by=c20}];
                \path[name intersections={of=vline3 and hline4,by=i01}];
                \path[name intersections={of=vline4 and hline2,by=i02}];
                \draw[name path=circle10] (c10) circle (\nwidth/2);
                \draw[name path=circle20] (c10) circle (\nwidth/2-\nthick);
                \draw[name path=circle30] (c20) circle (\nwidth/2);
                \draw[name path=circle40] (c20) circle (\nwidth/2-\nthick);
                \path[name intersections={of=circle20 and hline4,by={o11,o12}}];
                \path[name intersections={of=circle40 and hline2,by={o21,o22}}];
                \draw ($(o11)+(0,1)$) -- ($(o21)+(0,-1)$);
                \draw ($(o12)+(0,1)$) -- ($(o22)+(0,-1)$);

                %Number 1
                \path[name intersections={of=vline5 and hline4,by=i10}];
                \path[name intersections={of=auxvline3 and hline5,by=i11}];
                \path[name intersections={of=auxvline3 and hline1,by=i12}];
                \draw[name path=v11] ($(i11)-(\nthick/2,0)$) -- ($(i12)-(\nthick/2,0)$);
                \draw[name path=v12] ($(i11)+(\nthick/2,0)$) -- ($(i12)+(\nthick/2,0)$);
                \draw ($(i10)+(0,\nthick/2)$) -- ($(i11)-(\nthick/2,0)$);
                \draw[name path=d11] ($(i10)-(0,\nthick/2)$) -- ($(i11)+(\nthick/2,0)$);
                \draw[name path=d12,dashed] ($(i10)+(0,\nthick/2)+(-.2,.2)$) -- +(2.4,-2.4);
                \path[name intersections={of=d11 and d12,by=i13}];
                \path[name intersections={of=d11 and v11,by=i14}];
                \draw[name path=hbase1] (7,\nthick) -- +(2,0);
                \path[name intersections={of=vline6 and hbase1,by=i15}];
                \path[name intersections={of=vline5 and hline1,by=i16}];
                \path[name intersections={of=v11 and hbase1,by=i17}];

                %Number 4 (replace this with code for number 5)
                \path[name intersections={of=vline8 and hline1,by=i41}];
                \path[name intersections={of=vline8 and hline5,by=i42}];
                \path[name intersections={of=vline7 and hline3,by=i43}];
                \draw[name path=v41] ($(i41)+(-\nthick,0)$) -- ($(i42)+(-\nthick,0)$);
                \draw[name path=d41] (i43) -- (i42);
                \draw ($(i43)+(0,\nthick)$) -- ($(i42)+(-\nthick,0)$);
                \draw[name path=h41] ($(i43)+(0,\nthick)$) -- +(2,0);
                \path[name intersections={of=d41 and v41,by=i44}];
                \path[name intersections={of=d41 and h41,by=i45}];
                \path[name intersections={of=h41 and v41,by=i46}];
                \path[name intersections={of=vline8 and hline3,by=i47}];
            \end{scope}
            
            \begin{scope}[opacity=\opacityS]
                %Number 2
                \fill (i21) arc(180:-45:\nwidth/2) -- (ic1) let \p1=($(ic1)-(auxc)$), \n1={veclen(\x1,\y1)} in arc(135:180:\n1) -| (i22) -| (1,\nthick) let \p2=($(ic2)-(auxc)$), \n2={veclen(\x2,\y2)} in arc(180:135:\n2) -- (s22) arc(-45:180:\nwidth/2-\nthick) -- cycle;

                %Number 0
                \fill[even odd rule] (i01) arc(180:0:\nwidth/2) -- (i02) arc(0:-180:\nwidth/2) -- cycle (o11) arc(180:0:\nwidth/2-\nthick) -- (o22) arc(0:-180:\nwidth/2-\nthick) -- cycle;

                %Number 1
                \fill ($(i10)+(0,\nthick/2)$) -- ($(i11)-(\nthick/2,0)$) -- ($(i11)+(\nthick/2,0)$) |- (i15) |- (i16) |- (i17) -- (i14) -- (i13) -- cycle;

                %Number 4 (replace this with code for number 5)
                \fill[even odd rule] ($(i43)+(0,\nthick)$) -- ($(i42)+(-\nthick,0)$) -| (i41) -| ($(i47)+(-\nthick,0)$) -- (i43) -- cycle (i44) -- (i45) -- (i46) -- cycle;
            \end{scope}
        \end{tikzpicture}
    }
    
    \begin{multicols}{2}
        \vspace*{2em}
        \begin{center}
            \YearTypography{1}\par
            \YearTypography{2}\par
            \YearTypography{3}
        \end{center}
        \columnbreak
        
        \vspace*{2em}
        \lettrine{\textcolor{yellow!70}{A}}{lthough} the technology of printing text using movable type was invented in China, and despite the esteem which calligraphy held in that civilization, the vast number of Chinese characters meant that few distinctive, complete fonts could be afforded by Chinese printers. For many centuries, creating type started with cutting punches, which acted as the masters. The material that was cut formed a prototype of the character from which type was cast by various means from an alloy usually containing lead. Type design accounted for the limitations of the printing process, such as the splashing properties of ink or the wear on the type itself. In many countries, though not the United States of America, type design could be copyrighted typeface by typeface. The USA offered and continues to offer design patents as an option for typeface design protection.
        
        For the American Type Founders Corporation, and a few others using their technology, each character was drawn in a very large size, over a foot (30 cm) high. The outline was then traced by a Benton pantograph-based engraving machine with a pointer at the hand-held vertex and a cutting tool at the opposite vertex down to a size usually less than a quarter-inch (6 mm). The pantographic engraver was first used to cut punches, and later to directly create matrices.
        
        With the coming of computers, especially those on artists' desktops, type design eventually became a subdivision of computer graphics, employing a drafting program of some sort. Today, visual animators can create complex movies using just fonts. This style is called kinetic typography. Each character design can be traced by a stylus on a digitizing board, or modified from a scanned drawing of somewhat smaller size than that once used for the pantograph, or composed entirely within the computer graphics program itself. Each character is then made into a digitized form to be reconstructed within the graphics display program of a display screen or printer. Copyright was extended to this form. Although a given digitization of a typeface can all too easily be modified by another type designer, such a modified font is usually considered a derivative work, and is covered by the copyright of the original font software.
        
        \noindent History of \textit{`Type design'}, from \textit{Wikipedia, the free encyclopedia}. Available at \url{http://en.wikipedia.org/wiki/Type_design#History}.
    \end{multicols}
\end{document}

也许我的工作超出了必要的范围,欢迎提出任何意见。

更新

由于 Marc 更改了 2015 年的日历,Speravir 向我询问了今年的解决方案。可以下载这里

在此处输入图片描述

可以通过将数字 4 的代码替换为(在第一个范围内)来获得:

%Number 5
\path[name intersections={of=vline7 and hline1,by=i51}];
\path[name intersections={of=vline7 and hline5,by=i52}];
\path[name intersections={of=vline8 and hline1,by=i53}];
\path[name intersections={of=vline8 and hline5,by=i54}];
\path[name intersections={of=vline7 and hline3,by=i55}];
\path[name intersections={of=vline8 and hline3,by=i56}];
\path[name intersections={of=auxvline4 and hline2,by=c15}];
\draw[name path=circle15] (c15) circle (\nwidth/2);
\draw[name path=circle25] (c15) circle (\nwidth/2-\nthick);
\coordinate (c25) at ($(c15)+(0,2*\nthick)$);
\draw[name path=auxhline1,dashed] ($(c25)-(1,0)$) -- ($(c25)+(1,0)$);
\draw[name path=circle35,dashed] (c25) circle (\nwidth/2);
\draw[name path=circle45,dashed] (c25) circle (\nwidth/2-\nthick);
\draw[name path=line51] ($(i51)+(\nthick,0)$) -- ($(i52)+(\nthick,0)$);
\draw[name path=line52] ($(i53)-(\nthick,0)$) -- ($(i54)-(\nthick,0)$);
\draw[name path=line53] ($(i52)-(0,\nthick)$) -- ($(i54)-(0,\nthick)$);
\draw[name path=line54] ($(i55)+(0,2*\nthick)$) -- ($(i56)+(0,2*\nthick)$);
\draw[name path=line55] ($(i55)+(0,\nthick)$) -- ($(i56)+(0,\nthick)$);
\path[name intersections={of=auxvline4 and line54,by=i57}];
\path[name intersections={of=vline8 and hline2,by=i58}];
\path[name intersections={of=line51 and hline2,by=i59}];
\path[name intersections={of=auxhline1 and line52,by=i510}];

还有这个(在第二个范围内):

%Number 5
\fill (i54) -- ($(i54)-(0,\nthick)$) -- ($(i52)+(\nthick,-\nthick)$) -- ($(i55)+(\nthick,2*\nthick)$) -- (i57) arc (90:0:\nwidth/2) -- (i58) arc(0:-180:\nwidth/2) -- (i59) arc (-180:0:\nwidth/2-\nthick) -- (i510) arc(0:90:\nwidth/2-\nthick) -- ($(i55)+(0,\nthick)$) -- (i52) -- cycle;

相关内容