在 Windows 中使用 MiKTeX 时在哪里安装 pgflibraryqrr.shapes 文件

在 Windows 中使用 MiKTeX 时在哪里安装 pgflibraryqrr.shapes 文件

我正在尝试运行找到的代码这里,但我收到错误。I did not find the pgflibrary 'pgflibraryqrr.shapes.openrectangle.code.tex'....我将文件放在目录中

C:\Program Files (x86)\MiKTeX 2.9\tex\generic\pgf\libraries\shapes

并在 MiKTeX 中刷新了 FNDB,但我无法编译文件。你能告诉我需要把文件放在哪里吗tikzlibraryqrr.shapes.openrectangle.code.tex?谢谢。

这是找到的原始代码这里

\documentclass{book}
\usepackage[explicit]{titlesec}
\usepackage{fourier}
\usepackage{tikz}
\usepackage{epigraph}
\usepgflibrary{qrr.shapes.openrectangle}

\definecolor{mybluei}{RGB}{0,173,239}
\definecolor{myblueii}{RGB}{63,200,244}
\definecolor{myblueiii}{RGB}{199,234,253}

\tikzset{
mynode/.style={
  rounded corners=30pt,
  shape=open rectangle,
  open rectangle fill=myblueii,
  open rectangle sides=#1,
  }
}

\titleformat{\chapter}[display]
  {\normalfont\huge\sffamily}
  {}
  {20pt}
  {%
  \begin{tikzpicture}[remember picture,overlay]
  \node[
    anchor=west,
    rectangle,
    minimum height=4cm,
    text width=\paperwidth,
    xshift=-\the\dimexpr\oddsidemargin+1in\relax,
    outer sep=0pt,
    fill=myblueiii] (titlerect) {};
  \node[
    anchor=south west,
    xshift=2cm,
    text width=\textwidth] 
    at ([yshift=5pt]titlerect.south west) {\fontsize{30}{36}\selectfont#1};
  \node[
    mynode=nw,
    anchor=south east,
    fill=myblueii,
    inner xsep=1.5cm,
    outer sep=0pt,
    font=\color{white},
    minimum height=30pt] 
    at (current page.east|-titlerect.north)
     {\bfseries\MakeUppercase{\chaptertitlename}\ \thechapter};
  \end{tikzpicture}%
  }
\titleformat{name=\chapter,numberless}[display]
  {\normalfont\huge\sffamily}
  {}
  {20pt}
  {%
  \begin{tikzpicture}[remember picture,overlay]
  \node[
    anchor=west,
    rectangle,
    minimum height=4cm,
    text width=\paperwidth,
    xshift=-\the\dimexpr\oddsidemargin+1in\relax,
    outer sep=0pt,
    fill=myblueiii] (titlerect) {};
  \node[
    anchor=south west,
    xshift=2cm,
    text width=\textwidth] 
    at (titlerect.south west) {\Huge#1};
  \end{tikzpicture}%
  }
\titlespacing*{\chapter}
  {0pt}{-20pt}{60pt}

\setlength\beforeepigraphskip{1.5\baselineskip}
\setlength\afterepigraphskip{2\baselineskip}
\setlength\epigraphwidth{6.8cm}
\setlength\epigraphrule{0pt}
\renewcommand\epigraphsize{\large}
\renewcommand\textflush{flushright}

\let\oldepigraph\epigraph \renewcommand\epigraph[2]{%
  \oldepigraph{\color{mybluei}\itshape #1}{#2}}


\begin{document}

\chapter{From the Ground Up!}
\epigraph{In theory there is no difference \\ between theory and practice. \\ In practice there is.}{Lawrence ``Yogui'' Berra,1925 \\ New York Yankees baseball player}
\chapter*{A test unnumbered chapter}

\end{document}

答案1

我没有在 MiKTeX 包管理器中找到这个库。

但您始终可以执行以下操作:访问这一页并将两个文件tikzlibraryqrr.shapes.openrectangle.code.tex和 复制pgflibraryqrr.shapes.openrectangle.code.tex到您有代码的同一目录中,假设是mwe.tex。然后只需编译即可。使用我当前的 MiKTeX 我没有遇到任何错误,但生成的是 pdf!

相关内容