晚上好,
我想运行以下代码(它是 PSTRICKS 示例列表的一部分,因此您可以免费查看),但它不起作用。第 165 行和第 390 行有两个错误,我不明白。
它们涉及 } 括号,它们被放在那里似乎是有原因的(我不知道)。如果我把它们去掉,代码甚至不会开始编译。
有什么帮助吗?
谢谢你!
\documentclass[12pt,table]{article}% Thomas Soell
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{mathpazo}
\usepackage[scaled=.95]{helvet}
\usepackage{lscape}
\DeclareMathSymbol{,}{\mathord}{letters}{"3B}
%\usepackage[%
% driver=dvips,
% web={pro},
% uselayers,
% eforms={useui},
% aebxmp
%]{aeb_pro}
\usepackage[absolute,overlay]{textpos}
\usepackage{xcolor}
\usepackage{tabularx,array}
\usepackage{array}
\usepackage{ragged2e}
%\usepackage[distiller]{pstricks}
\usepackage{pst-grad,pst-text}
\usepackage{pst-node}
\usepackage{pstricks-add}
\addtolength{\topmargin}{-3.7cm}
\addtolength{\oddsidemargin}{-1.0cm}
\addtolength{\evensidemargin}{-1.0cm}
%------------------------------------------
\textheight28cm
\textwidth19cm
%------------------------------------------
\setlength{\parindent}{0pt} %\setlength{\parskip}{\baselineskip}
\pagestyle{empty}
%% Setzen der R\"{a}nder und Dimensionen (kommt von "web")
%\margins{2.3cm}{2cm}{2cm}{1.7cm} %% Kein Seitenrand
%\screensize{21cm}{29.7cm} %% Dimensionen: H\"{o}he, Breite des Dokuments
\newpsstyle{Leer}{fillstyle=solid,framesep=0pt,linewidth=.2pt,fillcolor=white,linecolor=white}
\newpsstyle{Wst}{fillstyle=gradient,framesep=0pt,linewidth=.2pt,gradbegin=yellow!10,gradend=yellow!30,gradmidpoint=0,gradangle=45,dimen=middle}
\newpsstyle{Alk}{fillstyle=gradient,framesep=0pt,linewidth=.2pt,gradbegin=blue!40,gradend=blue!60,gradmidpoint=0,gradangle=45,dimen=middle}
\newpsstyle{EAlk}{fillstyle=gradient,framesep=0pt,linewidth=.2pt,gradbegin=blue!10,gradend=blue!30,gradmidpoint=0,gradangle=45,dimen=middle}
\newpsstyle{Metall}{fillstyle=gradient,framesep=0pt,linewidth=.2pt,gradbegin=cyan!50!black!40,gradend=cyan!20!black!20,gradmidpoint=0,gradangle=45}
\newpsstyle{HalbMet}{fillstyle=gradient,framesep=0pt,linewidth=.2pt,gradbegin=orange!20,gradend=orange!40,gradmidpoint=0,gradangle=45}
\newpsstyle{NoMetal}{fillstyle=gradient,framesep=0pt,linewidth=.2pt,gradbegin=green!40!cyan!60,gradend=green!20!cyan!40,gradmidpoint=0,gradangle=45}
\newpsstyle{Halogen}{fillstyle=gradient,framesep=0pt,linewidth=.2pt,gradbegin=green!70!blue!70,gradend=green!40!blue!40,gradmidpoint=0,gradangle=45}
\newpsstyle{Edel}{fillstyle=gradient,framesep=0pt,linewidth=.2pt,gradbegin=green!40,gradend=green!60,gradmidpoint=0,gradangle=45,dimen=middle}
\newpsstyle{LantAct}{fillstyle=gradient,linewidth=.2pt,gradbegin=magenta!10!brown!30,gradend=magenta!20!brown!50,gradmidpoint=0,gradangle=45}
\newcommand{\Gase}{red}
\newcommand{\Fluessig}{blue!90!black!70}
%% Dokumentdeklarationen
%\DeclareDocInfo{%
% title={Periodensystem der Elemente},
% author={Thomas S\"{o}ll},
% subject={Periodensystem mit PSTricks},
% copyrightStatus=True,
% copyrightNotice={\u00A9 \the\year, TS},
%%% Copyright (Sonderzeichen per Unicode - http://www.utf8-zeichentabelle.de/)
% copyrightInfoURL=http://melusine.eu.org/syracuse/G/mathe/Extras/
%}
%\begin{docassembly}
%\executeSave();
%\end{docassembly}
\begin{document}
\parindent0pt
\begin{landscape}
\pagecolor{brown!15}
\newcommand{\Element}[6]
{\psset{style=#6}%
\begin{pspicture}(0,0.075)(2.75,2.67)
\psframe(0,0)(2.75,2.75)%
\rput[l](0.3,2.2){\small\textbf{#1}}%
\rput[r](2.4,2.2){\small#2}%
\rput(1.35,1.35){\textbf{\LARGE #3}}%
\rput(1.35,0.5){\small#4}
\rput[r](2.4,0.9){\textcolor{red}{\small#5}}
\end{pspicture}
}
\newcommand{\ElementLegende}[6]
{\psset{style=#6}%
\begin{pspicture}(0,0.075)(2.75,2.67)
\psframe(0,0)(2.75,2.75)%
\rput[l](0.3,2.2){\small\textbf{#1}}%
\rput[r](2.4,2.2){\small#2}%
\rput(1.35,1.35){\textbf{\LARGE #3}}%
\rput(1.35,0.5){\small#4}
\rput[r](2.4,0.9){\textcolor{red}{\small#5}}
\end{pspicture}
}
\DeclareFixedFont{\TSLarge}{T1}{phv}{b}{n}{0.8cm}
\newcommand{\Ueberschrift}[1]%
{%
\pscharpath[shadow=false,
fillstyle=gradient,
gradend=black!70,
gradbegin=cyan!50!black!80,
linestyle=solid,
linecolor=black,
linestyle=none]{\TSLarge #1}
}
\newcommand{\fuellschrift}[1]%
{%
\pscharpath[shadow=false,
fillstyle=solid,
fillcolor=white,
opacity=0.6,
linestyle=solid,
linecolor=black,
linewidth=.5pt]{\LARGE #1}
}
\newcolumntype{C}{>{\Centering}p{2.75cm}}
\newcolumntype{D}{>{\Centering}p{1.5cm}}
\tabcolsep=0pt%\bfseries%
\centering{Periodensystem der Elemente mit PSTricks}
%----- Legende ---------------------------------------------------------
\rput(6.5,5){%
\psscalebox{.5}{%
\begin{tabular}{lcllrll}
\psframe[style=Alk](0,-0.05)(0.4,0.35) \hspace{0.5cm} Alkalimetalle &\rule{1cm}{0pt}&&& \\
\psframe[style=EAlk](0,-0.05)(0.4,0.35) \hspace{0.5cm} Erdalkalimetalle &&&& \\
\psframe[style=Metall](0,-0.05)(0.4,0.35) \hspace{0.5cm} Metalle &&Ordnungszahl\hfill\rput(0,0.13){\rnode[cc]{OZA}{}}&&
\rput[l](4.7,0.13){\rnode[lc]{MZA}{Massenzahl}} \\
\psframe[style=HalbMet](0,-0.05)(0.4,0.35) \hspace{0.5cm} Halbmetalle &&& \rput[l](1,-0.2){\ElementLegende{\rnode{OZB}{}6}{12,011\rnode{MZB}{}}{%
\rnode{ESB}{}C}{\rnode{ENB}{}Kohlenstoff}{2,5\rnode{ENGB}{}}{NoMetal}} &\\
\psframe[style=NoMetal](0,-0.05)(0.4,0.35) \hspace{0.5cm} Nichtmetalle &&\rput[l](0,0.3){Elementsymbol\rput(0,0.13){\rnode{ESA}{}}}&& \\
\psframe[style=Halogen](0,-0.05)(0.4,0.35) \hspace{0.5cm} Halogene &&&&
\rput[l](4.7,0.4){\rnode[lc]{ENGA}{Elektronegativit\"{a}t}}\\
\psframe[style=Edel](0,-0.05)(0.4,0.35) \hspace{0.5cm} Edelgase &&
\rput[l](0,0.45){Elementname\rput(0,0.13){\rnode{ENA}{}}}&& \\
\psframe[style=LantAct](0,-0.05)(0.4,0.35) \hspace{0.5cm} Lanthanoide/Actinoide &&&&
\end{tabular}
\pcline[nodesep=0.1](OZA)(OZB|OZA)
\pcline[nodesep=0.1](MZA)(MZB|MZA)
\pcline[nodesep=0.1](ESA)(ESB|ESA)
\pcline[nodesep=0.1](ENA)(ENB|ENA)
\pcline[nodesep=0.1](ENGA)(ENGB|ENGA)
}
}
\rput[l](13,5.0){%
\psshadowbox[
framearc=0.05,
framesep=2.5pt,
fillcolor=orange!10,
linewidth=0.2pt,
linecolor=magenta,
fillstyle=solid,
shadowcolor=magenta!10,
shadowsize=2pt,
shadowangle=45,
]{%
\psscalebox{.5}{%
\begin{tabular}{Dl}
\textbf{\LARGE C}&Feste Elemente \\[4pt]
\textcolor{red}{\textbf{\LARGE He}}&Gasf\"{o}rmige Elemente \\[4pt]
\textcolor{blue!90!black!70}{\textbf{\LARGE Br}}&Fl\"{u}ssige Elemente \\[4pt]
\fuellschrift{Po}&Radioaktive Elemente
\end{tabular}
}}}
%-----------------------------------------------------------------------
%
%-------------------------------- Periodensystem ---------------------------------------
\psscalebox{0.55}{%
\begin{tabular}{>{\Large}p{0.75cm}*{18}{C}}
&\rput(0,0.3){1 IA}
&
&
&
&
&
&
&
&
&
&
&
&
&
&
&
&
& \rput(0,0.3){18 VIIIA}\\
%------------- 1. Periode --------------------------------------
\rput(0,1.35){1}
&\Element{1}{1,0079}{\textcolor{\Gase}{H}}{Wasserstoff}{2,1}{Wst}
&\rput(0,0.3){2 IIA}
&
&
&
&
&
&
&
&
&
&
&\rput(0,0.3){13 IIIA}
&\rput(0,0.3){14 IVA}
&\rput(0,0.3){15 VA}
&\rput(0,0.3){16 VIA}
&\rput(0,0.3){17 VIIA}
& \Element{2}{4,0026}{\textcolor{\Gase}{He}}{Helium}{}{Edel}\\
%------------- 2. Periode --------------------------------------
\rput(0,1.35){2}
&\Element{3}{6,941}{Li}{Lithium}{1,0}{Alk}
&\Element{4}{9,0122}{Be}{Beryllium}{1,5}{EAlk}
&
&
&
&
&
&
&
&
&
&
&\Element{5}{10,811}{B}{Bor}{2,0}{HalbMet}
&\Element{6}{12,011}{C}{Kohlenstoff}{2,5}{NoMetal}
&\Element{7}{14,007}{\textcolor{\Gase}{N}}{Stickstoff}{3,0}{NoMetal}
&\Element{8}{15,999}{\textcolor{\Gase}{O}}{Sauerstoff}{3,5}{NoMetal}
&\Element{9}{18,988}{\textcolor{\Gase}{F}}{Fluor}{4}{Halogen}
&\Element{10}{20,180}{\textcolor{\Gase}{Ne}}{Neon}{}{Edel}\\
%------------- 3. Periode --------------------------------------
\rput(0,1.35){3}
&\Element{11}{22,990}{Na}{Natrium}{0,9}{Alk}
&\Element{12}{24,305}{Mg}{Magnesium}{1,2}{EAlk}
&\rput(0,0.3){3 IIIA}
&\rput(0,0.3){4 IVB}
&\rput(0,0.3){5 VB}
&\rput(0,0.3){6 VIB}
&\rput(0,0.3){7 VIIB}
&\rput(0,0.3){8 VIIIB}
&\rput(0,0.3){9 VIIIB}
&\rput(0,0.3){10 VIIIB}
&\rput(0,0.3){11 IB}
&\rput(0,0.3){12 IIB}
&\Element{13}{26,982}{Al}{Aluminium}{1,5}{Metall}
&\Element{14}{28,086}{Si}{Silicium}{1,8}{HalbMet}
&\Element{15}{30,974}{P}{Phosphor}{2,1}{NoMetal}
&\Element{16}{32,065}{S}{Schwefel}{2,5}{NoMetal}
&\Element{17}{35,453}{\textcolor{\Gase}{Cl}}{Clor}{3,0}{Halogen}
&\Element{18}{39,948}{\textcolor{\Gase}{Ar}}{Argon}{}{Edel}\\
%------------- 4. Periode --------------------------------------
\rput(0,1.35){4}
&\Element{19}{39,098}{K}{Kalium}{0,8}{Alk}
&\Element{20}{40,078}{Ca}{Calcium}{1,0}{EAlk}
&\Element{21}{44,956}{Sc}{Scandium}{1,3}{Metall}
&\Element{22}{47,867}{Ti}{Titan}{1,5}{Metall}
&\Element{23}{50,942}{V}{Vanadium}{1,6}{Metall}
&\Element{24}{51,996}{Cr}{Chrom}{1,6}{Metall}
&\Element{25}{54,938}{Mn}{Mangan}{1,5}{Metall}
&\Element{26}{55,845}{Fe}{Eisen}{1,8}{Metall}
&\Element{27}{58,933}{Co}{Cobalt}{1,8}{Metall}
&\Element{28}{58,693}{Ni}{Nickel}{1,8}{Metall}
&\Element{29}{63,546}{Cu}{Kupfer}{1,9}{Metall}
&\Element{30}{65,381}{Zn}{Zink}{1,6}{Metall}
&\Element{31}{69,723}{Ga}{Gallium}{1,6}{Metall}
&\Element{32}{72,64}{Ge}{Germanium}{1,8}{HalbMet}
&\Element{33}{74,922}{As}{Arsen}{2,0}{HalbMet}
&\Element{34}{78,961}{Se}{Selen}{2,4}{NoMetal}
&\Element{35}{79,904}{\textcolor{\Fluessig}{Br}}{Brom}{2,8}{Halogen}
&\Element{36}{83,798}{\textcolor{\Gase}{Kr}}{Krypton}{}{Edel}\\
%------------- 5. Periode --------------------------------------
\rput(0,1.35){5}
&\Element{37}{85,468}{Rb}{Rubidium}{0,8}{Alk}
&\Element{38}{87,62}{Sr}{Strontium}{1,0}{EAlk}
&\Element{39}{88,906}{Y}{Yttrium}{1,3}{Metall}
&\Element{40}{91,224}{Zr}{Zirconium}{1,4}{Metall}
&\Element{41}{92,906}{Nb}{Niob}{1,6}{Metall}
&\Element{42}{95,96}{Mo}{Molybd\"{a}n}{1,8}{Metall}
&\Element{43}{98,91}{\fuellschrift{Tc}}{Technetium}{1,9}{Metall}
&\Element{44}{101,07}{Ru}{Ruthenium}{2,2}{Metall}
&\Element{45}{102,91}{Rh}{Rhodium}{2,2}{Metall}
&\Element{46}{106,42}{Pd}{Palladium}{2,2}{Metall}
&\Element{47}{107,87}{Ag}{Silber}{1,9}{Metall}
&\Element{48}{112,41}{Cd}{Cadmium}{1,7}{Metall}
&\Element{49}{114,82}{In}{Indium}{1,7}{Metall}
&\Element{50}{118,71}{Sn}{Zinn}{1,8}{Metall}
&\Element{51}{121,76}{Sb}{Antimon}{1,9}{HalbMet}
&\Element{52}{127,60}{Te}{Tellur}{2,1}{HalbMet}
&\Element{53}{126,90}{I}{Iod}{2,5}{Halogen}
&\Element{54}{131,29}{\textcolor{\Gase}{Xe}}{Xenon}{}{Edel}\\
%------------- 6. Periode --------------------------------------
\rput(0,1.35){6}
&\Element{55}{132,91}{Cs}{C\"{a}sium}{0,7}{Alk}
&\Element{56}{137,33}{Ba}{Barium}{0,9}{EAlk}
&\Element{}{}{\rput(0,0.85){\scriptsize\textbf{57 - 71}}\rput(0,0){La-Lu}}{Lanthanide}{}{LantAct}
&\Element{72}{178,49}{Hf}{Hafnium}{1,3}{Metall}
&\Element{73}{180,95}{Ta}{Tantal}{1,5}{Metall}
&\Element{74}{183,84}{W}{Wolfram}{1,7}{Metall}
&\Element{75}{186,21}{Re}{Rhenium}{1,9}{Metall}
&\Element{76}{190,23}{Os}{Osmium}{2,2}{Metall}
&\Element{77}{192,22}{Ir}{Iridium}{2,2}{Metall}
&\Element{78}{195,08}{Pt}{Platin}{2,2}{Metall}
&\Element{79}{196,97}{Au}{Gold}{2,4}{Metall}
&\Element{80}{200,59}{\textcolor{\Fluessig}{Hg}}{Quecksilber}{1,9}{Metall}
&\Element{81}{204,38}{Tl}{Thallium}{1,8}{Metall}
&\Element{82}{207,2}{Pb}{Blei}{1,8}{Metall}
&\Element{83}{208,98}{Bi}{Bismut}{1,9}{Metall}
&\Element{84}{209,98}{\fuellschrift{Po}}{Polonium}{2,0}{HalbMet}
&\Element{85}{210}{\fuellschrift{At}}{Astat}{2,2}{Halogen}
&\Element{86}{222}{\fuellschrift{Rn}}{Radon}{}{Edel}\\
%------------- 7. Periode --------------------------------------
\rput(0,1.35){7}
&\Element{87}{223}{\fuellschrift{Fr}}{Francium}{0,7}{Alk}
&\Element{88}{226,03}{\fuellschrift{Ra}}{Radium}{0,9}{EAlk}
&\Element{}{}{\rput(0,0.85){\scriptsize\textbf{89 - 103}}\rput(0,0){Ac-Lr}}{Actinide}{}{LantAct}
&\Element{104}{261}{\fuellschrift{Rf}}{Rutherfordium}{}{Metall}
&\Element{105}{262}{\fuellschrift{Db}}{Dubnium}{}{Metall}
&\Element{106}{263}{\fuellschrift{Sg}}{Seaborgium}{}{Metall}
&\Element{107}{262}{\fuellschrift{Bh}}{Bohrium}{}{Metall}
&\Element{108}{265}{\fuellschrift{Hs}}{Hassium}{}{Metall}
&\Element{109}{266}{\fuellschrift{Mt}}{Meitnerium}{}{Metall}
&\Element{110}{269}{\fuellschrift{Ds}}{Darmstadtium}{}{Metall}
&\Element{111}{272}{\fuellschrift{Rg}}{R\"{o}ntgenium}{}{Metall}
&\Element{112}{277}{\fuellschrift{Cn}}{Copernicium}{}{Metall}
&\Element{113}{287}{\fuellschrift{Uut}}{Ununtrium}{}{Metall}
&\Element{114}{289}{\fuellschrift{Fl}}{Flerovium}{}{Metall}
&\Element{115}{288}{\fuellschrift{Uup}}{Ununpentium}{}{Metall}
&\Element{116}{289}{\fuellschrift{Lv}}{Livermorium}{}{Metall}
&\Element{117}{293}{\fuellschrift{Uus}}{Ununseptium}{}{Wst}
&\Element{118}{294}{\fuellschrift{Uuo}}{Ununoctium}{}{Halogen}\\[2cm]
%------------- Lanthanide --------------------------------------
\rput[r](5.5,1.35){Lanthanide}
&
&
&\Element{57}{138,91}{La}{Lanthan}{1,1}{LantAct}
&\Element{58}{140,12}{Ce}{Cer}{1,1}{LantAct}
&\Element{59}{140,91}{Pr}{Praseodym}{1,1}{LantAct}
&\Element{60}{144,24}{Nd}{Neodym}{1,1}{LantAct}
&\Element{61}{144,90}{\fuellschrift{Pm}}{Promethium}{1,1}{LantAct}
&\Element{62}{150,36}{Sm}{Samarium}{1,2}{LantAct}
&\Element{63}{151,96}{Eu}{Europium}{1,2}{LantAct}
&\Element{64}{157,25}{Gd}{Gadolinium}{1,2}{LantAct}
&\Element{65}{158,93}{Tb}{Terbium}{1,2}{LantAct}
&\Element{66}{162,50}{Dy}{Dysprosium}{1,2}{LantAct}
&\Element{67}{164,93}{Ho}{Holmium}{1,2}{LantAct}
&\Element{68}{167,26}{Er}{Erbium}{1,2}{LantAct}
&\Element{69}{168,93}{Tm}{Thulium}{1,2}{LantAct}
&\Element{70}{173,05}{Yb}{Ytterbium}{1,2}{LantAct}
&\Element{71}{174,97}{Lu}{Lutetium}{1,2}{LantAct}
&\\[0.3cm]
%------------- Actinide --------------------------------------
\rput[r](5.5,1.35){Actinide}
&
&
&\Element{89}{227}{\fuellschrift{Ac}}{Actinium}{1,1}{LantAct}
&\Element{90}{232,04}{\fuellschrift{Th}}{Thorium}{1,3}{LantAct}
&\Element{91}{231,04}{\fuellschrift{Pa}}{Protaktinium}{1,5}{LantAct}
&\Element{92}{238,03}{\fuellschrift{U}}{Uran}{1,4}{LantAct}
&\Element{93}{237,05}{\fuellschrift{Np}}{Neptunium}{1,3}{LantAct}
&\Element{94}{244,10}{\fuellschrift{Pu}}{Plutonium}{1,3}{LantAct}
&\Element{95}{243,10}{\fuellschrift{Am}}{Americium}{1,3}{LantAct}
&\Element{96}{247,10}{\fuellschrift{Cm}}{Curium}{1,3}{LantAct}
&\Element{97}{247,10}{\fuellschrift{Bk}}{Berkelium}{1,3}{LantAct}
&\Element{98}{251,10}{\fuellschrift{Cf}}{Californium}{1,3}{LantAct}
&\Element{99}{254,10}{\fuellschrift{Es}}{Einsteinium}{1,3}{LantAct}
&\Element{100}{257,10}{\fuellschrift{Fm}}{Fermium}{1,3}{LantAct}
&\Element{101}{258}{\fuellschrift{Md}}{Mendelevium}{1,3}{LantAct}
&\Element{102}{259}{\fuellschrift{No}}{Nobelium}{1,3}{LantAct}
&\Element{103}{260}{\fuellschrift{Lr}}{Lawrencium}{1,3}{LantAct}
&\\
\end{tabular}
}
\end{landscape}
\end{document}
Periodensystem der Elemente
編輯
以下是错误的屏幕截图。
我使用带有自动检测编译模式的 TEXPAD 应用程序。
解决方案
正如评论中的人所说,我使用 PdFLaTeX 进行编译。我将其更改为他们建议的格式,现在它可以正常工作了。
感谢您的帮助!