如何使用 pdfLaTeX 重复使用特定的 PSTricks 图形?

如何使用 pdfLaTeX 重复使用特定的 PSTricks 图形?

我必须使用一个过时的序言(见下文)(并且在我看来,充满了垃圾)。

我的任务是设置给定的前言以便使用pdfLaTex,和如果可能的话,清除过时的东西(包和设置)和垃圾,甚至用当前的东西替换,如果适用的话,更改包顺序以避免包冲突。本PSTricks图(见下文)是用于证明所做更改成功的一个例子。我使用的TeXnicCenter是最新的MiKTeXActivePerl整个文档

\documentclass[
               a4paper,
               10pt,
               fleqn,
               twoside,
               onecolumn,
               openright
              ]{memoir}

\usepackage[
            usenames,
            dvipsnames
           ]{color} 
\usepackage[
            russian,
            english,
            ngerman
           ]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[american voltages]{circuitikz}
%\usepackage[pdf]{pstricks} % added, leads to many ''Undefined control sequence.''-errors
%\usepackage{auto-pst-pdf} % alternatively added, leads to ''Command \psfragfig already defined.''-error
\usepackage{
            dsfont,
            psfrag,
            pstricks,
            pst-plot,
            pstricks-add,
            calc,
            subfig,
            pstool,
            subfig,
            subfloat,
            psfrag
           }
\usepackage{
            lmodern,
            xcolor,
            graphicx,
            epsfig,
            epsf,
            ifthen,
            calc,
            icomma,
            array,
            url,
            bbding,
            amsmath,
            amsthm,
            amssymb,
            mathtools,
            calrsfs,
            siunitx,
            booktabs,
            appendix,
            boxedminipage,
            comment
           }
\usepackage[text]{esdiff}

\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{4}
\setsecnumdepth{subsection}
\newlength{\tempdim}
\newtheorem{definition}{Definition}
\newtheorem{theorem}{Satz}
\newtheorem{lemma}{Lemma}
\newtheorem{example}{Beispiel}[chapter]
\newtheorem{exercise}{Übung}[chapter]
\makeatletter
\makeatother
\ifpdf
\usepackage[
            bookmarks = false,
            colorlinks
           ]{hyperref}
\else
\usepackage[
            dvips,
            bookmarks = false,
            colorlinks
            ]{hyperref}
\fi
\title{Aufgaben- und Lösungskatalog zu Grundlagen der Mess- und Regelungstechnik}
\includecomment{Frage}
\includecomment{KurzAntwort}
\includecomment{LangAntwort}

\begin{document}

  \frontmatter
  \maketitle
  \thispagestyle{empty}
  \clearpage
  \mainmatter

  \begin{figure}\centering\hfill
    \subfloat[Spannungsverlauf]{
      \setlength{\tempdim}{.4\linewidth/10}\psset{unit=\tempdim}
      \begin{pspicture}(-1,-0.5)(6,4)
        \psline{->}(0,4)
        \psline{->}(-1,0)(6,0)
        \psline[linestyle=dashed,linewidth=.2pt](0,3)(6,3)
        \psplot[linecolor=blue,linewidth=.4pt,plotpoints=50,plotstyle=curve]{0}{5.9}{3 1 2.71828 x neg exp sub mul}
        \psline[linecolor=blue,linewidth=0.4pt](-1,.05)(0,.05)
        \uput[l](0,4){\tiny $v_\mathrm{c}(t)$}
        \uput[l](0,3){\tiny $1$}
        \uput[d](6,0.2){\tiny \strut$t$}
        \uput[d](0,0.2){\tiny \strut$0$}
      \end{pspicture}\label{fig_capacitor_charge}}\hfill
    \subfloat[Audiosignal]{
      \setlength{\tempdim}{.4\linewidth/10}\psset{unit=\tempdim}
      \begin{pspicture}(-1,-2.5)(6.5,2.5)
        \psline{->}(0,-2)(0,2.5)
        \psline{->}(0,-2)(6.5,-2)\uput[d](6.5,-1.8){\tiny \strut$t$}
        \psline[linecolor=blue,linewidth=.4pt](0.00,0.09)(0.01,0.21)(0.02,-0.66)(0.03,0.02)(0.04,-0.69)(0.05,0.25)(0.06,-0.00)(0.07,-0.47)(0.08,0.01)(0.09,-0.52)(0.10,0.02)(0.11,-1.20)(0.12,-0.30)(0.13,0.12)(0.14,-0.47)(0.15,-0.72)(0.16,-0.32)(0.17,0.42)(0.18,0.42)(0.19,-0.09)(0.20,-0.40)(0.21,-0.02)(0.22,-0.92)(0.23,0.38)(0.24,-1.01)(0.25,-0.01)(0.26,-0.18)(0.27,-0.04)(0.28,0.49)(0.29,-0.18)(0.30,-0.11)(0.31,-0.12)(0.32,1.53)(0.33,-0.12)(0.34,1.03)(0.35,-0.02)(0.36,0.64)(0.37,0.36)(0.38,0.35)(0.39,0.98)(0.40,-0.35)(0.41,-0.18)(0.42,-0.15)(0.43,1.41)(0.44,-0.01)(0.45,0.63)(0.46,0.37)(0.47,-0.23)(0.48,0.25)(0.49,-0.06)(0.50,0.33)(0.51,0.14)(0.52,-0.14)(0.53,0.91)(0.54,-0.73)(0.55,0.15)(0.56,1.44)(0.57,0.03)(0.58,-0.31)(0.59,-0.12)(0.60,-0.54)(0.61,0.39)(0.62,-0.14)(0.63,0.02)(0.64,-0.44)(0.65,-1.84)(0.66,0.18)(0.67,0.22)(0.68,-0.16)(0.69,0.53)(0.70,0.41)(0.71,-0.22)(0.72,0.20)(0.73,0.23)(0.74,0.22)(0.75,0.25)(0.76,-1.21)(0.77,0.78)(0.78,2.52)(0.79,0.33)(0.80,-0.36)(0.81,-0.36)(0.82,-0.40)(0.83,0.10)(0.84,-0.03)(0.85,0.02)(0.86,0.32)(0.87,0.63)(0.88,1.06)(0.89,-0.06)(0.90,-0.07)(0.91,-1.24)(0.92,-0.41)(0.93,0.13)(0.94,0.66)(0.95,-0.06)(0.96,0.49)(0.97,-0.35)(0.98,-0.06)(0.99,-0.78)(1.00,0.22)(1.01,1.14)(1.02,-0.94)(1.03,0.74)(1.04,-1.35)(1.05,0.07)(1.06,1.82)(1.07,0.70)(1.08,-0.01)(1.09,0.38)(1.10,0.10)(1.11,0.46)(1.12,-1.23)(1.13,-1.49)(1.14,-0.18)(1.15,-0.19)(1.16,0.40)(1.17,-0.05)(1.18,-0.80)(1.19,0.24)(1.20,0.30)(1.21,-0.03)(1.22,-1.42)(1.23,0.43)(1.24,-0.90)(1.25,0.41)(1.26,0.26)(1.27,0.07)(1.28,0.12)(1.29,-0.64)(1.30,0.10)(1.31,-0.02)(1.32,-0.08)(1.33,0.46)(1.34,0.01)(1.35,0.37)(1.36,0.31)(1.37,-0.45)(1.38,0.89)(1.39,0.67)(1.40,0.52)(1.41,-0.45)(1.42,-0.17)(1.43,-0.28)(1.44,-0.16)(1.45,0.12)(1.46,0.23)(1.47,1.10)(1.48,-0.08)(1.49,0.39)(1.50,0.01)(1.51,-0.66)(1.52,0.28)(1.53,1.34)(1.54,-0.82)(1.55,-0.22)(1.56,0.52)(1.57,-0.42)(1.58,1.20)(1.59,-0.19)(1.60,0.13)(1.61,0.81)(1.62,-0.04)(1.63,1.63)(1.64,1.45)(1.65,0.01)(1.66,-0.35)(1.67,0.14)(1.68,-0.19)(1.69,0.07)(1.70,-0.81)(1.71,-0.15)(1.72,1.11)(1.73,0.23)(1.74,-0.28)(1.75,0.01)(1.76,0.13)(1.77,0.35)(1.78,-0.20)(1.79,0.03)(1.80,-1.14)(1.81,1.04)(1.82,0.11)(1.83,-0.03)(1.84,-0.49)(1.85,0.47)(1.86,0.40)(1.87,0.27)(1.88,-0.09)(1.89,-0.84)(1.90,-0.79)(1.91,-1.01)(1.92,-0.14)(1.93,0.18)(1.94,-0.07)(1.95,0.18)(1.96,-0.13)(1.97,-0.48)(1.98,-1.00)(1.99,-0.06)(2.00,-0.28)(2.01,0.37)(2.02,1.96)(2.03,-1.49)(2.04,0.07)(2.05,-1.21)(2.06,0.05)(2.07,0.11)(2.08,1.51)(2.09,0.01)(2.10,-0.48)(2.11,1.30)(2.12,0.06)(2.13,-0.02)(2.14,1.34)(2.15,0.19)(2.16,0.85)(2.17,0.49)(2.18,-0.11)(2.19,-1.82)(2.20,-1.11)(2.21,0.25)(2.22,-0.31)(2.23,0.22)(2.24,-0.80)(2.25,-0.31)(2.26,-0.46)(2.27,-0.02)(2.28,-1.48)(2.29,-1.16)(2.30,0.16)(2.31,0.04)(2.32,0.14)(2.33,1.52)(2.34,0.26)(2.35,0.05)(2.36,0.20)(2.37,-0.46)(2.38,-0.23)(2.39,0.40)(2.40,0.32)(2.41,0.27)(2.42,-0.58)(2.43,-0.90)(2.44,0.51)(2.45,0.05)(2.46,-0.80)(2.47,0.00)(2.48,-0.52)(2.49,-0.73)(2.50,-0.46)(2.51,0.01)(2.52,-0.41)(2.53,0.58)(2.54,0.02)(2.55,0.40)(2.56,-1.33)(2.57,-0.47)(2.58,1.55)(2.59,-0.26)(2.60,-0.33)(2.61,0.07)(2.62,-0.66)(2.63,0.71)(2.64,-0.43)(2.65,-0.39)(2.66,0.91)(2.67,0.43)(2.68,-0.05)(2.69,-0.19)(2.70,-0.08)(2.71,0.60)(2.72,-1.09)(2.73,-0.13)(2.74,0.08)(2.75,0.12)(2.76,0.43)(2.77,-0.70)(2.78,0.43)(2.79,1.15)(2.80,0.06)(2.81,0.04)(2.82,-0.61)(2.83,-0.49)(2.84,-0.41)(2.85,-0.50)(2.86,1.49)(2.87,0.72)(2.88,-0.26)(2.89,0.13)(2.90,-0.48)(2.91,-0.29)(2.92,-0.85)(2.93,0.52)(2.94,-0.22)(2.95,-0.21)(2.96,0.11)(2.97,-1.03)(2.98,0.12)(2.99,-1.35)(3.00,1.74)(3.01,-0.22)(3.02,0.12)(3.03,-0.02)(3.04,0.59)(3.05,1.37)(3.06,0.37)(3.07,0.61)(3.08,-0.44)(3.09,-0.15)(3.10,0.23)(3.11,0.90)(3.12,0.72)(3.13,0.22)(3.14,-0.06)(3.15,-0.28)(3.16,0.29)(3.17,0.30)(3.18,-0.48)(3.19,0.56)(3.20,0.62)(3.21,0.06)(3.22,0.01)(3.23,0.78)(3.24,-0.04)(3.25,0.11)(3.26,-0.24)(3.27,-0.01)(3.28,-0.27)(3.29,0.24)(3.30,0.44)(3.31,0.20)(3.32,0.19)(3.33,-0.63)(3.34,1.03)(3.35,-0.36)(3.36,-0.08)(3.37,-0.31)(3.38,0.43)(3.39,-1.73)(3.40,0.65)(3.41,0.09)(3.42,-1.14)(3.43,0.35)(3.44,0.46)(3.45,0.67)(3.46,-0.06)(3.47,-0.20)(3.48,-0.49)(3.49,0.26)(3.50,-0.73)(3.51,0.22)(3.52,-0.87)(3.53,-0.58)(3.54,0.04)(3.55,-0.59)(3.56,-0.34)(3.57,0.89)(3.58,-0.55)(3.59,0.67)(3.60,0.59)(3.61,0.06)(3.62,0.15)(3.63,-0.15)(3.64,0.99)(3.65,1.09)(3.66,-0.15)(3.67,-0.38)(3.68,1.26)(3.69,-0.20)(3.70,0.08)(3.71,-0.05)(3.72,0.16)(3.73,0.27)(3.74,0.22)(3.75,-0.08)(3.76,0.83)(3.77,0.84)(3.78,-1.15)(3.79,0.06)(3.80,0.51)(3.81,-0.30)(3.82,-0.92)(3.83,-0.34)(3.84,-0.03)(3.85,0.59)(3.86,-0.64)(3.87,1.01)(3.88,0.83)(3.89,0.05)(3.90,0.57)(3.91,1.75)(3.92,-0.28)(3.93,0.58)(3.94,0.02)(3.95,-0.55)(3.96,0.55)(3.97,-0.23)(3.98,-1.15)(3.99,0.21)(4.00,-0.53)(4.01,0.17)(4.02,-0.63)(4.03,-0.68)(4.04,0.33)(4.05,0.27)(4.06,-0.06)(4.07,0.43)(4.08,0.00)(4.09,-0.19)(4.10,0.43)(4.11,0.09)(4.12,-2.11)(4.13,0.16)(4.14,0.47)(4.15,-0.18)(4.16,-0.17)(4.17,-1.16)(4.18,-0.15)(4.19,1.09)(4.20,0.08)(4.21,-2.15)(4.22,0.40)(4.23,1.28)(4.24,0.04)(4.25,0.63)(4.26,0.90)(4.27,-0.71)(4.28,0.12)(4.29,-0.25)(4.30,-0.48)(4.31,0.65)(4.32,-0.10)(4.33,-0.57)(4.34,-0.02)(4.35,-0.20)(4.36,0.50)(4.37,0.15)(4.38,-0.43)(4.39,0.44)(4.40,-0.73)(4.41,-0.37)(4.42,0.28)(4.43,-0.07)(4.44,1.52)(4.45,-0.29)(4.46,-0.37)(4.47,-0.18)(4.48,-0.12)(4.49,1.06)(4.50,-0.48)(4.51,2.53)(4.52,-1.57)(4.53,0.09)(4.54,-0.76)(4.55,-0.36)(4.56,0.35)(4.57,-0.27)(4.58,-0.55)(4.59,-0.04)(4.60,0.43)(4.61,-0.14)(4.62,-0.28)(4.63,-0.20)(4.64,0.04)(4.65,0.46)(4.66,-0.84)(4.67,0.73)(4.68,-0.40)(4.69,-1.28)(4.70,-0.50)(4.71,0.59)(4.72,-0.30)(4.73,0.87)(4.74,1.47)(4.75,0.14)(4.76,0.75)(4.77,-0.85)(4.78,0.19)(4.79,0.51)(4.80,-0.60)(4.81,0.11)(4.82,-1.04)(4.83,0.26)(4.84,-0.00)(4.85,-0.11)(4.86,-1.06)(4.87,-0.95)(4.88,0.06)(4.89,-0.75)(4.90,0.52)(4.91,-0.33)(4.92,0.89)(4.93,0.86)(4.94,-0.06)(4.95,0.12)(4.96,-0.09)(4.97,0.80)(4.98,0.46)(4.99,0.37)(5.00,-0.27)(5.01,-1.24)(5.02,0.34)(5.03,0.46)(5.04,0.60)(5.05,0.41)(5.06,0.50)(5.07,0.46)(5.08,0.76)(5.09,-0.05)(5.10,1.43)(5.11,-0.10)(5.12,0.46)(5.13,-0.06)(5.14,0.97)(5.15,0.60)(5.16,-0.40)(5.17,1.44)(5.18,0.32)(5.19,-0.26)(5.20,-0.20)(5.21,-0.19)(5.22,0.55)(5.23,-0.78)(5.24,1.41)(5.25,-0.06)(5.26,1.90)(5.27,-0.15)(5.28,-0.26)(5.29,1.01)(5.30,-0.19)(5.31,-0.61)(5.32,-0.17)(5.33,0.01)(5.34,0.32)(5.35,0.09)(5.36,0.03)(5.37,-0.00)(5.38,-0.68)(5.39,-0.25)(5.40,0.19)(5.41,1.70)(5.42,-0.52)(5.43,0.38)(5.44,0.18)(5.45,-0.27)(5.46,-0.08)(5.47,-0.34)(5.48,-0.26)(5.49,-0.11)(5.50,0.29)(5.51,-0.03)(5.52,-0.87)(5.53,0.26)(5.54,0.16)(5.55,0.22)(5.56,0.52)(5.57,-0.36)(5.58,0.13)(5.59,0.41)(5.60,0.11)(5.61,-0.14)(5.62,0.32)(5.63,0.07)(5.64,-1.30)(5.65,0.84)(5.66,-1.17)(5.67,0.28)(5.68,-0.01)(5.69,0.35)(5.70,0.41)(5.71,-0.65)(5.72,0.06)(5.73,0.43)(5.74,0.19)(5.75,0.00)(5.76,1.39)(5.77,0.78)(5.78,0.24)(5.79,-0.60)(5.80,0.39)(5.81,-0.21)(5.82,-0.71)(5.83,0.56)(5.84,-0.15)(5.85,0.00)(5.86,-0.23)(5.87,0.31)(5.88,1.56)(5.89,0.11)(5.90,0.08)(5.91,-0.75)(5.92,0.28)(5.93,-0.65)(5.94,0.55)(5.95,0.03)(5.96,-0.29)(5.97,1.49)(5.98,-0.15)(5.99,0.41)(6.00,0.21)
      \end{pspicture}\label{fig_audio}}\hfill
    \subfloat[Anzahl der Kunden]{
      \setlength{\tempdim}{.4\linewidth/12}\psset{unit=\tempdim}
      \begin{pspicture}(-1,-0.5)(8,5)
        \psline{->}(0,5)
        \psline{->}(8,0)
        \uput[d](.5,0.2){\tiny \strut$9$}
        \uput[d](1.5,0.2){\tiny \strut$10$}
        \uput[d](2.5,0.2){\tiny \strut$11$}
        \uput[d](3.5,0.2){\tiny \strut$12$}
        \uput[d](4.5,0.2){\tiny \strut$13$}
        \uput[d](5.5,0.2){\tiny \strut$14$}
        \uput[d](6.5,0.2){\tiny \strut$15$}
        \uput[d](7.5,0.2){\tiny \strut$16$}
        \uput[l](0,.5){\tiny $1$}
        \uput[l](0,1){\tiny $2$}
        \uput[l](0,1.5){\tiny $3$}
        \uput[l](0,2){\tiny $4$}
        \uput[l](0,2.5){\tiny $5$}
        \uput[l](0,3){\tiny $6$}
        \uput[l](0,3.5){\tiny $7$}
        \uput[l](0,4){\tiny $8$}
        \uput[l](0,5){\tiny $x$}
        \psline[linewidth=0.2pt](.5,0)(.5,2)\pscircle*(.5,2){.1}
        \psline[linewidth=0.2pt](1.5,0)(1.5,1)\pscircle*(1.5,1){.1}
        \psline[linewidth=0.2pt](2.5,0)(2.5,1)\pscircle*(2.5,1){.1}
        \psline[linewidth=0.2pt](3.5,0)(3.5,2.5)\pscircle*(3.5,2.5){.1}
        \psline[linewidth=0.2pt](4.5,0)(4.5,3.5)\pscircle*(4.5,3.5){.1}
        \psline[linewidth=0.2pt](5.5,0)(5.5,4)\pscircle*(5.5,4){.1}
        \psline[linewidth=0.2pt](6.5,0)(6.5,2.5)\pscircle*(6.5,2.5){.1}
        \psline[linewidth=0.2pt](7.5,0)(7.5,.5)\pscircle*(7.5,.5){.1}
      \end{pspicture}\label{fig_customer}}\hfill\\\hfill
    \subfloat[Frequenzantwort eines Bandpassfilters]{
      \setlength{\tempdim}{.4\linewidth/6}\psset{unit=\tempdim}
      \begin{pspicture}(-1,-0.5)(8,2)
        \psline{->}(0,2)
        \psline{->}(8,0)
        \psline[linecolor=blue,linewidth=.4pt,plotpoints=50,plotstyle=curve](0.00,0.00)(0.16,0.00)(0.33,0.00)(0.49,0.01)(0.65,0.01)(0.82,0.01)(0.98,0.02)(1.14,0.03)(1.31,0.04)(1.47,0.06)(1.63,0.09)(1.80,0.12)(1.96,0.18)(2.12,0.26)(2.29,0.38)(2.45,0.54)(2.61,0.76)(2.78,1.02)(2.94,1.31)(3.10,1.57)(3.27,1.76)(3.43,1.87)(3.59,1.94)(3.76,1.97)(3.92,1.98)(4.08,1.98)(4.24,1.97)(4.41,1.94)(4.57,1.87)(4.73,1.76)(4.90,1.57)(5.06,1.31)(5.22,1.02)(5.39,0.76)(5.55,0.54)(5.71,0.38)(5.88,0.26)(6.04,0.18)(6.20,0.12)(6.37,0.09)(6.53,0.06)(6.69,0.04)(6.86,0.03)(7.02,0.02)(7.18,0.01)(7.35,0.01)(7.51,0.01)(7.67,0.00)(7.84,0.00)(8.00,0.00)
        \uput[l](0,2){\tiny $\left|H(f)\right|$}
        \uput[d](8,0.1){\tiny \strut$f$}
        \uput[d](0,0.1){\tiny \strut$0$}
      \end{pspicture}\label{fig_passbandfilter}}\hfill
    \subfloat[Digitales Bild]{
      \setlength{\tempdim}{.4\linewidth/20}\psset{unit=\tempdim}
      \begin{pspicture}(-1,-1)(9,9)
        \uput[d](4.5,0){\tiny $\rightarrow$ $x$}
        \uput[l](0,3.5){\tiny $\uparrow$}
        \uput[l](0,4.5){\tiny $y$}
        \psframe*(2,8)(7,9)\psframe*(7,7)(8,8)\psframe*(8,2)(9,7)\psframe*(7,1)(8,2)\psframe*(2,0)(7,1)\psframe*(1,1)(2,2)\psframe*(0,2)(1,7)\psframe*(1,7)(2,8)
        \psframe*(2,6)(3,7)\psframe*(6,6)(7,7)
        \psframe*(4,4)(5,6)
        \psframe*(2,3)(3,4)\psframe*(3,2)(6,3)\psframe*(6,3)(7,4)
      \end{pspicture}\label{fig_picture}}\hfill\strut
    \caption{Unterschiedliche Signale}\label{fig_exasignals}
  \end{figure}

\end{document}

编译时使用LaTeX -> DviPs -> ps2pdf。详细信息:

LaTeX

技术中心 1

文件路径:D:\TeXnicCenter\MiKTeX\texmfs\install\miktex\bin\x64\latex.exe

参数:--enable-write18 -interaction=nonstopmode "%wm"

DviPs(PDF):

技术中心2

文件路径:D:\TeXnicCenter\MiKTeX\texmfs\install\miktex\bin\x64\dvips.exe

参数:-P pdf -R0 "%bm.dvi"

Ghostscriptps2pdf):

技术中心 3

文件路径:D:\TeXnicCenter\MiKTeX\texmfs\install\miktex\bin\x64\mgs.exe

参数:-sPAPERSIZE=a4 -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile="%bm.pdf" -c save pop -f "%bm.ps"

有了这个来源我修改了TeXnicCenter给定的文档(添加的行被注释掉)以供使用pdfLaTeXLaTeX -> PDF):

技术中心4

文件路径:D:\TeXnicCenter\MiKTeX\texmfs\install\miktex\bin\x64\pdflatex.exe

参数:--enable-write18 -interaction=nonstopmode "%wm"

然而,这两种可能性这里它没有在我的计算机上编译。如果我使用\usepackage[pdf]{pstricks},它会导致很多

未定义控制序列。

错误。如果我使用\usepackage{auto-pst-pdf},那么它会导致

命令\psfragfig已定义。

错误。实际上,在这两种情况下,我只添加了其中一行(\usepackage[pdf]{pstricks}\usepackage{auto-pst-pdf}),并保持序言不变,因为我并不确切知道,我可以删除/替换什么(用当前的内容)以及无论如何应该保留什么。

我做错了什么?欢迎任何解决方案!请随意清理/更改/修改/优化序言!

提前感谢您的帮助和努力!

答案1

我将把这个项目分为两个部分:

  • 一个项目(我们将其命名为diagrams.tex)来制作 PSTricks 图表
  • main.tex一个使用图表的项目(我们将其命名为)

为了进行一致的设置(主要是字体设置),我将创建一个common.sty包含通用设置的包(我们将其命名为)。两个项目都将导入此包。

例如:

diagrams.tex

以下内容可以使用lualatex(推荐)或latex-dvips-ps2pdf(可能由于最近的问题而失败)或xelatex(可能失败)进行编译。

\documentclass[pstricks,border=12pt,12pt]{standalone}
\usepackage{common}
\begin{document}
\begin{pspicture}[showgrid](-5,-5)(5,5)
\end{pspicture}
\end{document}

main.tex

下面用pdflatex(推荐)进行编译。

\documentclass[12pt]{article}
\usepackage{common}
\usepackage{graphicx}
\usepackage{others}
\begin{document}
\includegraphics[page=...]{diagrams}
\end{document}

相关内容