summaryrefslogtreecommitdiff
path: root/support/konwerter
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/konwerter
Initial commit
Diffstat (limited to 'support/konwerter')
-rw-r--r--support/konwerter/COPYING340
-rw-r--r--support/konwerter/Changelog36
-rw-r--r--support/konwerter/Example/reaction.eps1151
-rw-r--r--support/konwerter/Example/reaction.pdfbin0 -> 78338 bytes
-rw-r--r--support/konwerter/Example/reaction.tex94
-rw-r--r--support/konwerter/Example/reaction_letters.eps1152
-rw-r--r--support/konwerter/Example/reaction_roman.eps1152
-rw-r--r--support/konwerter/Makefile26
-rw-r--r--support/konwerter/README263
-rw-r--r--support/konwerter/README.pl239
-rw-r--r--support/konwerter/TODO3
-rw-r--r--support/konwerter/ZMIANY36
-rw-r--r--support/konwerter/czyt_zapis.cc161
-rw-r--r--support/konwerter/czyt_zapis.h11
-rw-r--r--support/konwerter/dl_wiersza.h32
-rw-r--r--support/konwerter/konwerter.cc796
-rw-r--r--support/konwerter/num_na_etyk.cc157
-rw-r--r--support/konwerter/num_na_etyk.h2
-rw-r--r--support/konwerter/operacje.cc1315
-rw-r--r--support/konwerter/operacje.h10
-rw-r--r--support/konwerter/operacje_na_tex.cc151
-rw-r--r--support/konwerter/operacje_na_tex.h7
-rw-r--r--support/konwerter/prz_string.cc91
-rw-r--r--support/konwerter/prz_string.h1
-rw-r--r--support/konwerter/system_zapisu.cc414
-rw-r--r--support/konwerter/system_zapisu.h80
26 files changed, 7720 insertions, 0 deletions
diff --git a/support/konwerter/COPYING b/support/konwerter/COPYING
new file mode 100644
index 0000000000..3358a7be86
--- /dev/null
+++ b/support/konwerter/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+
diff --git a/support/konwerter/Changelog b/support/konwerter/Changelog
new file mode 100644
index 0000000000..7712cffa05
--- /dev/null
+++ b/support/konwerter/Changelog
@@ -0,0 +1,36 @@
+0.2.4
+- Now white marks before %?pli{ are ignored
+0.2.3
+- Poprawiony błąd związany z popsutymi plikami eps, teraz wyświetla ifnormację
+- Poprawione numerowanie cyframi rzymskimi
+0.2.2
+- Dodana opcja --test która nie zmienia nic, tylko testuje poprawność etykiet
+- Uaktualnienie emaili i poprawki literówek
+0.2.1
+- Pełna obsługa języków. Teraz program mówi albo po polsku albo po angielsku.
+- Uwzględnianie zmiennej systemowej LANG.
+- Domyślny język angielski.
+- Poprawienie analizy wiersza poleceń.
+- Zamiana domyślnie tworzonego pliku na nazwa.tex.auto.tex.
+- Dodanie nowego przełącznika z poziomu pliku tex --set-d-to
+0.2.0
+- Obsługa języka angielskiego i polskiego jednocześnie.
+- Obsługa wielu sposobów numerowania jednocześnie.
+- Ustawianie liczników z poziomu dokumentu tex.
+- Nowe parametry wiersza poleceń.
+0.1.2
+- Dopisanie angielskich komentarzy i paru po polsku.
+- Usunięcie definicji DL_SCIEZKI do niczego nie potrzebnej w tym momencie.
+- Poprawienie pracy na stringach. Wyeliminowanie możliwości nadpisywania
+ innych zmiennych, co się często zdarzało i powodowało w najlepszym przypadku
+ naruszenie ochrony pamięci.
+- Usunięcie możliwości przepełnienia bufora przy podawaniu polecenia opcją -ln.
+- Umożliwienie kompilacji gcc w wersji >=3 bez komunikatu o błędach.
+- Zdefiniowanie stałej version.
+- Poprawienie błędów ortograficznych.
+0.1.1
+- Poprawienie procedury czytania z pliku latexowego (plik czyt_zapis.cc).
+ Teraz program prawidłowo odczytuje pliki do końca, czego wcześniej
+ potrafił nie robić.
+- Dostosowanie programu do kompilacji kompilatorem gcc z serii 3.
+- Dwie poprawki w pliku operacje.cc.
diff --git a/support/konwerter/Example/reaction.eps b/support/konwerter/Example/reaction.eps
new file mode 100644
index 0000000000..ceb498fabf
--- /dev/null
+++ b/support/konwerter/Example/reaction.eps
@@ -0,0 +1,1151 @@
+%!PS-Adobe-2.0 EPSF-1.2
+%%Creator: ChemDraw Ultra(tm) 7.0.1
+%%Title: reaction.eps
+%%CreationDate: 2005-03-06 22:02
+%%DocumentSuppliedProcSets: chemdict30 24 13
+%%DocumentFonts: Helvetica
+%%BoundingBox: 12 50 496 338
+%%EndComments
+%%BeginProcSet: chemdict30 24 13
+% ChemDraw Laser Prep
+% Copyright Š 1985-2002 CambridgeSoft Corp., All Rights Reserved
+userdict/chemdict30 210 dict put
+chemdict30 begin/version 24 def/sv 13 def
+/b{bind def}bind def/L{load def}b/R{null def}b/d/def L/a/add L/al/aload L
+/as/astore L/at/atan L/cp/closepath L/cv/curveto L/cw/currentlinewidth L
+/cpt/currentpoint L/dv/div L/D/dup L/e/exch L/F/false L/f/fill L/fa/forall L
+/g/get L/gi/getinterval L/gr/grestore L/gs/gsave L/ie/ifelse L/ix/index L
+/l/lineto L/mt/matrix L/M/moveto L/m/mul L/n/neg L/np/newpath L/pb/pathbbox L
+/P/pop L/r/roll L/rl/rlineto L/rm/rmoveto L/ro/rotate L/rp/repeat L
+/ru/round L/sc/scale L/sl/setlinewidth L/sm/setmatrix L/st/stroke L
+/sp/strokepath L/sq/sqrt L/s/sub L/T/true L/tr/transform L/xl/translate L
+/xc/exec L/A R/N R/St R/X R/Y R/aL R/bL R/bS R/bd R/bs R/cX R/cY R/ch R/co R
+/fB R/fI R/fS R/fZ R/fl R/ft R/iX R/iY R/idx R/lh R/llx R/lly R/lp R/nH R
+/nSq R/newdict R/ps R/rad R/rev R/sL R/sba R/sbl R/sbs R/sn R/spa R/tB R
+/typ R/urx R/ury R/w R/wF R/xX R/xY R/rBg R/gBg R/bBg R/gry R/rDst R/gDst R
+/bDst R/cpd R/Aeq R/Ath R/Aos R/Ach R/ed R/sf 20 d/cW 20 d/lW 20 d/bW 75 d
+/wF 1.5 d/aF 11.875 d/aR 0.263 d/aA 50 d/hS 54 d/pA 32 d/sh F d/S{sf m}b
+/dL{[hS] 0 setdash}b/o{1 ix}b/rot{3 -1 r}b/x{e d}b/CMT mt d/TM mt d
+/SM{CMT sm}b/XY{X D m Y D m a sq}b/s1 1 string d/fp{T charpath flattenpath}b
+/p{tr ru 0.25 a e ru 0.25 a e itransform}b/Wd{65536. dv}b
+/C{Wd rot Wd rot Wd rot setrgbcolor}b
+/setcmykcolor where{P/sk/setcmykcolor L}{/sk{4 1 r 3{3 ix a D 0 lt{P 0}if D 1\
+ gt{P 1}if 1 e s 3 1 r}rp setrgbcolor P}b}ie/sg{D currenthsbcolor P rot seths\
+bcolor currenthsbcolor e P e P o s D m .001 gt{setgray}{P}ie}b
+/sBg{65535 dv/bBg x 65535 dv/gBg x 65535 dv/rBg
+x}b
+/sRmp{currentrgbcolor bBg e s/bDst x gBg e s/gDst x rBg e s/rDst x}b
+/dD{np 2 1 r 4 2 r xl 2 dv D sc -1 0 M 0 -1 l 1 0 l 0 1 l cp SM 0 ne{f}{lW 0.\
+8 m sl st}ie}b
+/dM{gs np 3 1 r xl D sc 0 4 M 0 -8 rl 3.5 2 rm -7 4 rl 0 -4 rm 7 4 rl SM st g\
+r}b/dQ{gs np 0 360 arc 0.5 sg f gr}b
+/dR{lW 0.8 m sl 2 ix s/Y x 2 ix s/X x xl Rr SM st}b
+/dT{fp pb 3 1 r s 3 2 r s 2 1 r rm f}b/N 0 d/db{array/bs x/N 0 d}b
+/B{bs N rot put/N N 1 a d}b
+/SpA{gs np o o xl rot s e rot s o 0 ne o 0 ne or{at ro}{P P}ie
+aR aL m n D aL a 0 M 0 o n aA n aA arc cp f gr}b
+/SpH{gs np o o xl rot s e rot s o 0 ne o 0 ne or{at ro}{P P}ie
+0 cw 2 dv xl
+aR aL m n D aL a 0 M 0 o n aA n 0 arc cp f gr}b/Sp{/St x 0.316/aR x gs
+aF lW m 0.8 m St 4 and 0 ne{bW m lW dv bW sl}if/aL x
+St 8 and 0 ne{8 ix 8 ix 3 ix 3 ix SpA}if
+St 16 and 0 ne{2 ix 6 m 1 a D ix e D ix e D ix e D ix e P SpA}if
+St 32 and 0 ne{8 ix 8 ix 3 ix 3 ix SpH}if
+St 64 and 0 ne{2 ix 6 m 1 a D ix e D ix e D ix e D ix e P SpH}if
+St 2 and 0 ne{St 4 and 0 ne{[hS bW m lW dv] 0 setdash}{dL}ie}if
+np M{cv}rp St 128 and 0 ne{f}{st}ie gr}b/Ha{gs np 3 1 r
+xl D sc -.7 1.4 M 0.7 1.4 l -.7 2.4 M 0.7 2.4 l SM st gr}b
+/OP{3 ix 3 ix xl 3 -1 r s 3 1 r
+e s o o at ro D m e D m a sq}b
+/OB{/bS x OP D bS dv D lW 2 m lt{P lW 2 m}if/bd x}b
+/DA{np 0 0 M aL 0 aR aL m 180 aA s 180 aA a arc cp f}b
+/OA{np 0 cw -2 dv M aL 0 aR aL m 180 aA s
+180 arc 0 cw -2 dv rl cp f}b
+/Ast{SM cw 0.8 m sl st}b/SA{aF m lW m/aL x 0.263/aR x aL 1 aR s m np 0 M
+ rad 0 l gs Ast gr}b
+/CA{aF lW m 0.8 m/aL x 0.316/aR x aL 1 aR s m 2 dv rad D m o D m s D 0 le{P
+P P}{sq at 2
+m np rad 0 rad 180 6 -1 r s 180 6 -1 r s arc gs Ast gr cpt
+e at ro}ie}b/AA{np rad 0 rad 180 180 6 -1 r a arc gs SM st gr}b
+/RA{lW m/w x np rad w M w .7 dv w l rad w n M w .7 dv w n l w
+ .35 dv w 2 m M 0 0
+l w .35 dv w -2 m l st}b
+/HA{lW m/w x np 0 0 M w 2 m D l w 2 m w l rad w l rad w n l w 2 m
+w n l w 2 m D n l cp st}b
+/Ar1{gs 5 1 r OP/rad x{{2.25 SA DA}{1.5 SA DA}{1 SA DA}{lW 4 m sl 4.5 SA DA}
+{lW 4 m sl 3 SA DA}{lW 4 m sl 2 SA
+DA}{270 CA DA}{180 CA DA}{120 CA DA}{90 CA DA}{2.5 RA}{2.5
+HA}{1 -1 sc 270 CA DA}{1 -1 sc 180 CA DA}{1 -1 sc 120 CA DA}{1 -1 sc 90 CA
+DA}{5 RA}{5 HA}{dL 2.25 SA DA}{dL 1.5 SA DA}{dL 1 SA DA}{2.25 SA OA}{1.5 SA
+OA}{1 SA OA}{1 -1 sc 2.25 SA OA}{1 -1 sc 1.5 SA OA}
+{1 -1 sc 1 SA OA}{270 CA OA}{180 CA OA}{120 CA OA}{90 CA OA}{1 -1 sc 270 CA
+OA}{1 -1 sc 180 CA OA}{1 -1 sc 120 CA OA}{1 -1 sc 90 CA OA}{1 -1 sc 270
+AA}{1 -1 sc 180 AA}{1 -1 sc 120 AA}{1 -1 sc 90 AA}}e g xc
+gr}b/ac{arcto 4{P}rp}b/rO{4 cw m}b/Cr{0 0 1 0 360 arc}b/Ac{XY D sc Cr SM}b
+/OrA{Y X at ro XY D rev{neg}if sc}b/Ov{OrA 1 0.4 sc Cr SM}b
+/Asc{OrA 1 27 dv D sc}b/LB{9 -6 M
+21 -10 27 -8 27 0 cv
+27 8 21 10 9 6 cv
+-3 2 -3 -2 9 -6 cv
+cp}b/DLB{0 0 M
+0 0 -9.51 9.65 -9.51 18.02 cv
+-9.51 23.22 -6.75 27 0 27 cv
+6.75 27 9.51 23.22 9.51 18.02 cv
+9.51 9.65 0 0 0 0 cv
+cp}b/ZLB{LB}b
+/dt{gs np M SM cpt np rot 4.5 dv 0 360 arc f gr}b
+/whf{gs 1 setgray f gr SM st}b/blf{gs f gr SM st}b/Rr{0 rO M
+0 Y X Y rO ac
+X Y X 0 rO ac
+X 0 0 0 rO ac
+0 0 0 Y rO ac
+cp}b/Rc{0 0 M
+0 Y l
+X Y l
+X 0 l
+cp}b/grf{gs 0.5 sg f gr SM st}b/gG{D 32 dv D m 1 e s/gry x
+currentrgbcolor bDst gry m a 3 1 r gDst gry m a 3 1 r rDst gry m a 3 1 r
+setrgbcolor}b/gS{dtransform CMT idtransform
+m D 0 lt{n}if sq n D
+CMT dtransform idtransform
+e 2 m e
+xl
+7 m 32 a 256 dv D sc}b/gLB{sh{sRmp
+32 -0.5 0.5{gs
+gG
+13.5 0 xl
+D 32 s 64 dv 13.5 m D 7 m 24 dv
+gS
+-13.5 0 xl
+LB f
+gr}for
+LB SM st}{LB grf}ie}b/gOv{sh{sRmp
+32 -0.5 0.5{gs
+gG
+D 32 s 64 dv 0.65 m D
+gS
+Cr f
+gr}for
+Cr SM st}{Cr grf}ie}b/gAc{sh{sRmp
+32 -0.5 0.5{gs
+gG
+D 32 s 64 dv D
+gS
+Cr f
+gr}for
+Cr SM st}{Cr grf}ie}b
+/gDLB{sh{sRmp
+32 -0.5 0.5{gs
+gG
+0 13.5 xl
+D 32 s 64 dv 13.5 m D 7 m 24 dv e
+gS
+0 -13.5 xl
+DLB f
+gr}for
+DLB SM st}{DLB grf}ie}b/gRr{sh{sRmp
+32 -0.5 0.5{gs
+gG
+X 2 dv Y 2 dv xl
+D 32 s 64 dv X Y lt{X}{Y}ie m 0.25 m D
+gS
+X -2 dv Y -2 dv xl
+Rr f
+gr}for
+Rr SM st}{Rr grf}ie}b/gRc{sh{sRmp
+32 -0.5 0.5{gs
+gG
+X 2 dv Y 2 dv xl
+D 32 s 64 dv X Y lt{X}{Y}ie m 0.25 m D
+gS
+X -2 dv Y -2 dv xl
+Rc f
+gr}for
+Rc SM st}{Rc grf}ie}b/gZLB{gLB}b/Ath{Y X at ro XY 2 dv/rad x gs D SA DA gr
+ rad 2 m 0 xl 180 ro SA DA}b/Aeq{Y X at ro XY/rad x
+rev{1 -1 sc}if
+gs
+0 lW 2 m xl
+D SA OA
+gr
+rad 0 xl
+180 ro
+0 lW 2 m xl
+SA OA}b/Aos{X Y M SM cpt xl XY e dv lW 1.667 m o o lt{e}if P D sc}b/Ach{5 Aos
+gs/Helvetica findfont[1 0 0 -1 0 0]makefont 5.5 scalefont setfont
+D stringwidth P 2 dv D 1 a/rad x
+n 0 M show gr
+rad 2 s -5 M
+rad n -5 rad n 1 2 ac
+rad n 1 rad 1 2 ac
+rad 1 rad -5 2 ac
+rad -5 rad n -5 2 ac
+cp Ast}b/Ar{D 39 lt{Ar1}
+{gs 5 1 r o o xl 3 -1 r e s 3 1 r s e
+o 0 lt o 0 lt ne/rev x
+D 0 lt{1 -1 sc neg}if/Y x D 0 lt{-1 1 sc neg}
+if/X x np{{Y 16 div D 2 S lt{P 2 S}if/lp x
+lp 0 M 0 0 l 0 Y l lp Y l
+X lp s 0 M X 0 l X Y l X lp s Y l SM st}{Y 16 div D 2 S lt{P 2 S}if/lp x
+lp 0 M
+0 0 0 Y lp ac
+0 Y 2 dv lp neg o lp ac
+0 Y 2 dv 0 Y lp ac
+0 Y lp Y lp ac
+X lp s 0 M
+X 0 X Y lp ac
+X Y 2 dv X lp a o lp ac
+X Y 2 dv X Y lp ac
+X Y X lp s Y lp ac SM st}{Y D 2 dv Y 180 pA s 180 pA a arc st
+np X Y s Y 2 dv
+Y pA D neg arcn st}{Rc SM st}{X lW 2 dv a lW -2 dv M
+rO D rl
+X lW 2 dv a rO a Y lW 2 dv a rO a l
+rO lW -2 dv a Y lW 2 dv a rO a l
+lW -2 dv Y lW 2 dv a l
+0 Y l X Y l X 0 l cp f
+0 0 M
+0 Y l
+X Y l
+X 0 l cp
+SM st}{Rr SM st}{rO Y M rO rO xl
+0 Y X Y rO ac
+X Y X 0 rO ac
+X 0 0 0 rO ac
+rO neg D xl X Y 0 Y rO ac
+cp f
+Rr st}{Ac st}{OrA gAc}{Ov st}{OrA 1 .4 sc gOv}{Asc LB whf}{Asc gLB}
+{Asc gs gLB gr
+-1 -1 sc LB whf}{Asc gs gLB gr
+-0.4 -0.4 sc LB whf}{Asc LB gs whf gr
+np -0.4 -0.4 sc gLB}{Asc DLB -1 -1 sc DLB gs whf gr
+np 90 ro gs gDLB gr -1 -1 sc gDLB}{Asc gs -1 -1 sc ZLB whf gr
+gs 3.6 12 sc gOv gr
+ZLB whf}{Asc gs -1 -1 sc gZLB gr
+gs 3.6 12 sc Cr whf gr
+gZLB}{0 0 M X Y l SM st}{bW sl 0 0 M X Y l SM st}
+{dL 0 0 M X Y l SM st}{OrA 1 16 dv D sc
+0 -1 M
+0 0 1 0 1 ac
+8 0 8 1 1 ac
+8 0 16 0 1 ac
+16 0 16 -1 1 ac
+SM st}{XY D 0 0 dt X Y dt}{XY 2 dv X Y dt}{XY D X Y dt 0 0 M SM cpt xl
+2 dv D sc
+1 0 M -1 0 l
+0 1 M 0 -1 l
+Ast}{XY D X Y dt 0 0 M SM cpt xl
+2 dv D sc
+1 0 M -1 0 l
+Ast}{4.5 Aos
+1 0 M -1 0 l
+0 1 M 0 -1 l
+2 0 M 0 0 2 0 360 arc
+Ast}{4.5 Aos
+1 0 M -1 0 l
+2 0 M 0 0 2 0 360 arc
+Ast}{2.25 Ath}{1.5 Ath}{1 Ath}{2.25 Aeq}{1.5 Aeq}{1 Aeq}{OrA 1 16 dv D sc
+0 -1 M 0 0 l 16 0 l 16 -1 l SM st}{5 Aos
+1 -1 M -1 -1 l
+0 2 M 0 -2 l
+Ast}{5 Aos
+1 -1 M -1 -1 l
+1 1 M -1 1 l
+0 2 M 0 -2 l
+Ast}{4.5 Aos
+1 0 M -1 0 l
+0 1 M 0 -1 l
+Ast}{4.5 Aos
+1 0 M -1 0 l
+Ast}{gRc}{gRr}{Rc blf}{Rr blf}{Ac blf}{Ov blf}{Asc DLB -1 -1 sc DLB gs whf gr
+np 90 ro DLB -1 -1 sc DLB blf}{Asc gs -1 -1 sc ZLB blf gr
+gs 3.6 12 sc Cr whf gr
+ZLB blf}{Asc gs -1 -1 sc ZLB whf gr
+gs 3.6 12 sc Cr blf gr
+ZLB whf}{Asc LB gs whf gr
+np -0.4 -0.4 sc LB blf}{Asc LB gs f gr gs SM st gr
+np -0.4 -0.4 sc LB whf}{Asc LB blf}{Asc LB gs f gr gs SM st gr
+np -1 -1 sc LB whf}{Ac whf}{OrA gAc}{Ac blf}{Ov whf}
+{OrA 1 .4 sc gOv}{Ov blf}{(Rac)Ach}{(Abs)Ach}{(Rel)Ach}
+}e 39 s g xc gr}ie}b/DS{np M l st}b
+/DD{gs dL DS gr}b/DB{gs 12 OB bW sl np 0 0 M 0 l st gr}b/ap{e 3 ix a
+e 2 ix a}b/PT{D 2 4 gi al P OP D 1 sc
+o length 6 gt{P 6 g}{e P 8 dv}ie
+D lW 2 m lt{P lW 2 m}if
+0 e
+0 0
+3 -1 r s 3 1 r e s e
+0 0 M 1 0 l
+0 0 ap M 1 0 ap l
+e n e n
+0 0 ap M 1 0 ap l
+P P}b/DT{gs np PT SM st gr}b
+/NH{lW s D hS dv ru
+cvi D 0 eq{P 1}if/nH x
+D hS nH m s
+D 0 lt{P .1 s nH dv}{nH 2 a dv D 0 xl 2 m s nH dv}ie}b
+/Bd{D type/arraytype ne{bs e g}if{{P}{{{DS}{DD}{gs 12 OB np
+bW 2 dv/bd x
+lW 2 dv e D NH e{D bd M bd n l}for
+st gr}{gs 12 OB np
+lW 2 dv 0 xl NH 1 sc
+bW 2 dv wF m nH 1 a dv/bd x
+0 1 nH
+{D 1 a bd m o o M n l}for SM st gr}{P}{DB}{gs 12 OB
+np 0 lW 2 dv o o n M l bW 2 dv
+wF m o o l n l
+cp f gr}{P}{gs 12 OB/bL x
+bW 2 dv D lW lt{P lW}if/bd x np 0 0 M
+bL bd 4 m dv ru 2 o o lt{e}if P cvi/nSq x
+bL nSq 2 m dv D sc
+nSq{.135 .667 .865 .667 1 0 rcurveto
+.135 -.667 .865 -.667 1 0 rcurveto}rp SM st gr}{gs 12 OB
+np 0 lW 2 dv o o n M l bW 2 dv
+wF m o o l n l
+cp SM lW 0.8 m sl st gr}{P}{4 2 r gs OP/rad x 1 SA DA gr}{P}
+}o 1 g 1 s g e 2 4 gi al P
+5 -1 r xc}{al P 8 ix 1 eq{DD}{DS}ie 5 -1 r 2 eq{DB}{DS}ie P}{DT}}o 0 g g xc}b
+/ed{gs cpt np cw 2 dv 0 360 arc f gr}b
+/SPe{gs 0 e xl 1 1 S dv D n sc CMT currentmatrix P lW sl 4.0 setmiterlimit
+np}b/ws{Wd 0 32 4 -1 roll widthshow}b/blank/Times-Roman findfont/CharStrings
+g/space g d/mv 256 array d/NUL/SOH/STX/ETX/EOT/ENQ/ACK/BEL/BS/HT/LF/VT
+/FF/CR/SO/SI
+/DLE/DC1/DC2/DC3/DC4/NAK/SYN/ETB/CAN/EM/SUB/ESC/FS/GS/RS/US
+mv 0 32 gi as P
+mv 32/Times-Roman findfont/Encoding get
+32 96 gi putinterval
+mv 39/quotesingle put
+mv 96/grave put/unknown/unknown/quotesinglbase/florin/quotedblbase/ellipsis
+/dagger/daggerdbl
+/circumflex/perthousand/Scaron/guilsinglleft/OE/unknown/unknown/unknown
+/unknown/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash
+/emdash
+/tilde/trademark/scaron/guilsinglright/oe/unknown/unknown/Ydieresis
+/blank/exclamdown/cent/sterling/currency/yen/brokenbar/section
+/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered
+/macron
+/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph
+/periodcentered
+/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf
+/threequarters/questiondown
+/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
+/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
+/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
+/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
+/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
+mv 128 128 gi as P/fSt 50 string d(ChemDraw)fSt copy P/fD{D/Symbol eq{
+findfont[1 0 0 -1 0 0]makefont}{D {findfont}stopped{/Helvetica findfont}if
+D length dict/newdict x{
+1 index/FID ne{1 index/FontMatrix eq{[1 0 0 -1 0 0]matrix concatmatrix}if
+newdict 3 1 r put}{P P}ie}forall
+newdict/Encoding mv put
+fSt 8 fSt length 8 sub gi cvs length 8 add
+fSt 0 rot gi cvn newdict definefont}ie}b/ts{gs xl ro 0 0 M}b
+/nl{0 e xl 0 0 M}b/tx{ft e g e sf m rot D 96 and 0 ne{
+64 and 0 ne{-0.5}{0.25}ie e 0.75 m}{P 0 e}ie
+D 4 -1 r e scalefont setfont m cpt P e M}b
+end
+%%EndProcSet
+%%EndProlog
+
+chemdict30 begin
+/cW 40 def
+/bW 80 def
+/lW 20 def
+/hS 54 def
+/sh true def
+388 SPe[
+/Helvetica
+fD]/ft x
+240 1000 M
+9920 1000 l
+9920 6760 l
+240 6760 l
+cp clip np
+65535 65535
+65535 sBg
+0 252 2283 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(R)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+936 2195 M
+930 2205 l
+924 2215 l
+421 2215 l
+421 2195 l
+cp
+f
+gr
+0 1152 1763 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1131 1765 M
+1148 1775 l
+897 2210 l
+880 2200 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1193 1801 M
+1210 1811 l
+959 2246 l
+942 2236 l
+cp
+f
+gr
+0 1152 2803 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(OEt)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1188 2632 M
+1171 2642
+l
+924 2215 l
+930 2205 l
+936 2195 l
+cp
+f
+gr
+0 1530 2226 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(+)show
+gr
+0 2115 2248 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(e)show
+64 12
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+3330 2177 2550 2177 2 Ar
+gr
+0 3432 2283 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(R)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4104 2195 M
+4110 2205 l
+4104 2215 l
+3601 2215 l
+3601 2195 l
+cp
+f
+gr
+0 4332 1763 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4342 1783 M
+4359 1793 l
+4122 2205 l
+4110 2205 l
+4104 2195 l
+cp
+f
+gr
+0 4332 2803 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(OEt)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4368 2632 M
+4351 2642
+l
+4104 2215 l
+4110 2205 l
+4122 2205 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+4035 2055 4035 2205 63 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6414 1640 M
+6420 1650 l
+6410 1660 l
+5820 1660 l
+5820 1640 l
+cp
+f
+gr
+0 6642 1208 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6652 1228 M
+6669 1238 l
+6435 1644 l
+6420 1650 l
+6414 1640 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6430 2790 M
+6420 2805 l
+6410 2795 l
+6410 1660 l
+6420 1650 l
+6430 1663 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+5820 2815 M
+5820 2795 l
+6410 2795 l
+6420 2805 l
+6416 2815 l
+cp
+f
+gr
+0 6766 3307 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6774 3145 M
+6760 3159 l
+6416 2815 l
+6420 2805 l
+6438 2809 l
+cp
+f
+gr
+0 6896 2653 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(OEt)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6866 2610 M
+6873 2628
+l
+6438 2809 l
+6420 2805 l
+6430 2790 l
+cp
+f
+gr
+0 6921 1883 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(OEt)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6897 1767 M
+6892 1787
+l
+6430 1663 l
+6420 1650 l
+6435 1644 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+7331 2407 7026 2585 32 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+7262 1902 6932 1815 32 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+8745 4920 8745 3825 2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8785 2541 M
+8775 2535 l
+8765 2529 l
+8765 1941 l
+8775 1935 l
+8785 1929 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8250 1644 M
+8260 1626 l
+8785 1929 l
+8775 1935 l
+8765 1941 l
+cp
+f
+gr
+0 9216 2913 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9223 2741 M
+9213 2758 l
+8770 2502 l
+8780 2485 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9187 2803 M
+9177 2820 l
+8734 2564 l
+8744 2547 l
+cp
+f
+gr
+0 9216 1713 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9172 1653 M
+9182 1670 l
+8744 1923 l
+8734 1906 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9208 1715 M
+9218 1732 l
+8780 1985 l
+8770 1968 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8260 2844 M
+8250 2826 l
+8765 2529 l
+8775 2535 l
+8785 2541 l
+cp
+f
+gr
+0 9015 4365 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(e)show
+64 12
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8785 6021 M
+8775 6015 l
+8765 6009 l
+8765 5421 l
+8775 5415 l
+8785 5421 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8250 5124 M
+8260 5106 l
+8775 5403 l
+8775 5415 l
+8765 5421 l
+cp
+f
+gr
+0 9216 6393 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9223 6221 M
+9213 6238 l
+8770 5982 l
+8780 5965 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9187 6283 M
+9177 6300 l
+8734 6044 l
+8744 6027 l
+cp
+f
+gr
+0 9216 5193 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9190 5164 M
+9200 5181 l
+8785 5421 l
+8775 5415 l
+8775 5403 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8260 6324 M
+8250 6306 l
+8765 6009 l
+8775 6015 l
+8785 6021 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+8775 5359 8625 5359 63 Ar
+gr
+0 7560 5633 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(e)show
+64 12
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6400 6084 M
+6390 6090 l
+6380 6084 l
+6380 5496 l
+6390 5490 l
+6400 5496 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+5865 5199 M
+5875 5181 l
+6390 5478 l
+6390 5490 l
+6380 5496 l
+cp
+f
+gr
+0 6831 6468 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6820 6327 M
+6810 6344 l
+6390 6102 l
+6390 6090 l
+6400 6084 l
+cp
+f
+gr
+0 6831 5268 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6805 5239 M
+6815 5256 l
+6400 5496 l
+6390 5490 l
+6390 5478 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+5875 6399 M
+5865 6381 l
+6380 6084 l
+6390 6090 l
+6390 6102 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+6390 5434 6240 5434 63 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+6405 6255
+6405 6405 63 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4390 6024 M
+4380 6030 l
+4370 6024 l
+4370 5436 l
+4380 5430 l
+4390 5436 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4462 5988 M
+4442 5988 l
+4442 5472 l
+4462 5472 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+3855 5139 M
+3865 5121 l
+4380 5418 l
+4380 5430 l
+4370 5436 l
+cp
+f
+gr
+0 4821 6408 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4810 6267 M
+4800 6284 l
+4380 6042 l
+4380 6030 l
+4390 6024 l
+cp
+f
+gr
+0 4821 5208 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4795 5179 M
+4805 5196 l
+4390 5436 l
+4380 5430 l
+4380 5418 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+3865 6339 M
+3855 6321 l
+4370 6024 l
+4380 6030 l
+4380 6042 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+5490 2177 4710 2177 2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+8220 2177
+7440 2177 2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+7200 5828 7980 5828
+2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+5085 5828 5865 5828 2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+3105 5828 3885 5828 2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+2020 6084 M
+2010 6090 l
+2000 6084 l
+2000 5496 l
+2010 5490 l
+2020 5484 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1485 5199 M
+1495 5181 l
+2020 5484 l
+2010 5490 l
+2000 5496 l
+cp
+f
+gr
+0 2451 6468 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(OH)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+2440 6327 M
+2430 6344
+l
+2010 6102 l
+2010 6090 l
+2020 6084 l
+cp
+f
+gr
+0 2451 5268 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+2407 5208 M
+2417 5225 l
+1979 5478 l
+1969 5461 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+2443 5270 M
+2453 5287 l
+2015 5540 l
+2005 5523 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1495 6399 M
+1485 6381 l
+2000 6084 l
+2010 6090 l
+2010 6102 l
+cp
+f
+gr
+0 3338 5722 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(H)show
+64 12
+0 tx
+(+)show
+gr
+0 675 3281 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(?et{ester;1})show
+gr
+0 3840 3274 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(?et{radanion;2})show
+gr
+0 6390 3281 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0
+12
+0 tx
+(?et{dianion;3})show
+gr
+0 8715 3281 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0
+12
+0 tx
+(?et{diket;4})show
+gr
+0 8625 6683 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(?et{rada;5})show
+gr
+0 6285 6690 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0
+tx
+(?et{diadirad;6})show
+gr
+0 4290 6690 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0
+12
+0 tx
+(?et{dianion2;7})show
+gr
+0 1890 6690 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0
+12
+0 tx
+(?et{product;8})show
+gr
+gr end
+%%Trailer
+showpage
+
diff --git a/support/konwerter/Example/reaction.pdf b/support/konwerter/Example/reaction.pdf
new file mode 100644
index 0000000000..7032938bb0
--- /dev/null
+++ b/support/konwerter/Example/reaction.pdf
Binary files differ
diff --git a/support/konwerter/Example/reaction.tex b/support/konwerter/Example/reaction.tex
new file mode 100644
index 0000000000..3cf46103ee
--- /dev/null
+++ b/support/konwerter/Example/reaction.tex
@@ -0,0 +1,94 @@
+%& --translate-file=il2-pl
+\documentclass[a4paper,12pt,final]{article}
+\usepackage[left=2.5cm,right=2.5cm,bottom=2.5cm,top=2.5cm]{geometry}
+\usepackage[american]{babel}
+\usepackage[T1]{fontenc}
+\usepackage[dvips]{graphicx}
+
+%The new command form compound insertion definiton. That could be anything that you imagine.
+\newcommand{\nrzw}[1]{{\Huge{\textbf{#1}}}}
+
+\date{06/03/2005}
+
+%opening
+\title{The example article using konwerter}
+\author{Piotr Wawrzyniak}
+
+\begin{document}
+
+\maketitle
+\section{Preface}
+In this document I persent some wonderful features of konwerter. If you see the source of this file, you will be able to more understand how this program works. The reaction.ps file, is the original file, with labels, that was not preprocessed by konwerter. Why it is ps file, not dvi? Because konwerter changes also eps files, and the dvi file strongly depends on it. It is just demonstration how all looks like before processing. Of course you can easily restore original format of eps files calling konwerter with -ntl option. The reaction.tex.auto.tex is the file, that was already processed. That file one should compile using latex, and after that one will get reaction.tex.auto.dvi file, that contains already not labels but numbers. The resultat that I've got one can see in the reaction.tex.auto.ps file.
+
+Before working one should create a special command form label inserting - $\backslash$nrzw\{\}. Here is what I did:
+\begin{verbatim}
+\newcommand{\nrzw}[1]{{\Huge{\textbf{#1}}}}
+\end{verbatim}
+
+I realized that it looks horrible, but it is just example. For konwerter it doesn't really matter what the new command does, so it can be anything.
+
+To see how the konwerter works, please run it as follows:
+\begin{verbatim}
+konwerter reaction.tex
+latex reaction.tex.auto.tex
+dvips -o reaction.tex.auto.ps
+gv reaction.tex.auto.ps
+\end{verbatim}
+
+The first command, converts all labels to numbers. As a~result you get the new reaction.tex.auto.tex file, that should be compiled with \LaTeX. The third command is the converting from dvi file to postscript, and the final command is seeing a~result.
+
+Have a~great fun, using the konwerter.
+\begin{flushright}
+ Piotr Wawrzyniak
+\end{flushright}
+
+\newpage
+\section{The acyloin condensation - arabic numbering.}
+%We are including the eps file
+%?plik{reaction.eps}
+\begin{figure}[htp]
+\includegraphics[width=1\textwidth]{reaction.eps}
+\caption{The acyloin condensation mechanism.}
+\end{figure}
+Above we have the mechanism of the acyloin condensation. It is just great example of atak of the electron on the carbonyl group. The ester
+ \nrzw{ester} is attacked by an electron, forming the anion radical \nrzw{radanion}. Two particles of \nrzw{radanion} can combine together,
+ forming dianion \nrzw{dianion}, that after two OEt group removing forms diketon \nrzw{diket}. The next step of the reaction is once again attack of
+ the electron and forming the compound \nrzw{rada}, that undergoes another electron attack, forming dianiondiradikal \nrzw{diadirad}. This
+ particle can undergoes rearrangement to a compound \nrzw{dianion2}, that after protonation gives $\alpha$ hydroxyketon \nrzw{product}.
+
+\newpage
+\section{The acyloin condensation - roman numbering.}
+\begin{center}
+\textbf{We are starting numbering from 5: --set-r-to 5.}
+\end{center}
+%--set-r-to 5
+%We are including the eps file
+%?plik{reaction_roman.eps}
+\begin{figure}[htp]
+\includegraphics[width=1\textwidth]{reaction_roman.eps}
+\caption{The acyloin condensation mechanism.}
+\end{figure}
+Above we have the mechanism of the acyloin condensation. It is just great example of atak of the electron on the carbonyl group. The ester
+ \nrzw{:rester} is attacked by an electron, forming the anion radical \nrzw{:rradanion}. Two particles of \nrzw{:rradanion} can combine together,
+ forming dianion \nrzw{:rdianion}, that after two OEt group removing forms diketon \nrzw{:rdiket}. The next step of the reaction is once again attack of
+ the electron and forming the compound \nrzw{:rrada}, that undergoes another electron attack, forming dianiondiradikal \nrzw{:rdiadirad}. This
+ particle can undergoes rearrangement to a compound \nrzw{:rdianion2}, that after protonation gives $\alpha$ hydroxyketon \nrzw{:rproduct}.
+
+ \newpage
+\section{The acyloin condensation - letters numbering.}
+\begin{center}
+\textbf{We are starting numbering from 10: --set-L-to 10.}
+\end{center}
+%--set-L-to 10
+%We are including the eps file
+%?plik{reaction_letters.eps}
+\begin{figure}[htp]
+\includegraphics[width=1\textwidth]{reaction_letters.eps}
+\caption{The acyloin condensation mechanism.}
+\end{figure}
+Above we have the mechanism of the acyloin condensation. It is just great example of atak of the electron on the carbonyl group. The ester
+ \nrzw{:Lester} is attacked by an electron, forming the anion radical \nrzw{:Lradanion}. Two particles of \nrzw{:Lradanion} can combine together,
+ forming dianion \nrzw{:Ldianion}, that after two OEt group removing forms diketon \nrzw{:Ldiket}. The next step of the reaction is once again attack of
+ the electron and forming the compound \nrzw{:Lrada}, that undergoes another electron attack, forming dianiondiradikal \nrzw{:Ldiadirad}. This
+ particle can undergoes rearrangement to a compound \nrzw{:Ldianion2}, that after protonation gives $\alpha$ hydroxyketon \nrzw{:Lproduct}.
+\end{document}
diff --git a/support/konwerter/Example/reaction_letters.eps b/support/konwerter/Example/reaction_letters.eps
new file mode 100644
index 0000000000..30d49841a0
--- /dev/null
+++ b/support/konwerter/Example/reaction_letters.eps
@@ -0,0 +1,1152 @@
+%!PS-Adobe-2.0 EPSF-1.2
+%%Creator: ChemDraw Ultra(tm) 7.0.1
+%%Title: reaction_letters.eps
+%%CreationDate: 2005-03-06 22:21
+%%DocumentSuppliedProcSets: chemdict30 24 13
+%%DocumentFonts: Helvetica
+%%BoundingBox: 12 50 506 338
+%%EndComments
+%%BeginProcSet: chemdict30 24 13
+% ChemDraw Laser Prep
+% Copyright Š 1985-2002 CambridgeSoft Corp., All Rights Reserved
+userdict/chemdict30 210 dict put
+chemdict30 begin/version 24 def/sv 13 def
+/b{bind def}bind def/L{load def}b/R{null def}b/d/def L/a/add L/al/aload L
+/as/astore L/at/atan L/cp/closepath L/cv/curveto L/cw/currentlinewidth L
+/cpt/currentpoint L/dv/div L/D/dup L/e/exch L/F/false L/f/fill L/fa/forall L
+/g/get L/gi/getinterval L/gr/grestore L/gs/gsave L/ie/ifelse L/ix/index L
+/l/lineto L/mt/matrix L/M/moveto L/m/mul L/n/neg L/np/newpath L/pb/pathbbox L
+/P/pop L/r/roll L/rl/rlineto L/rm/rmoveto L/ro/rotate L/rp/repeat L
+/ru/round L/sc/scale L/sl/setlinewidth L/sm/setmatrix L/st/stroke L
+/sp/strokepath L/sq/sqrt L/s/sub L/T/true L/tr/transform L/xl/translate L
+/xc/exec L/A R/N R/St R/X R/Y R/aL R/bL R/bS R/bd R/bs R/cX R/cY R/ch R/co R
+/fB R/fI R/fS R/fZ R/fl R/ft R/iX R/iY R/idx R/lh R/llx R/lly R/lp R/nH R
+/nSq R/newdict R/ps R/rad R/rev R/sL R/sba R/sbl R/sbs R/sn R/spa R/tB R
+/typ R/urx R/ury R/w R/wF R/xX R/xY R/rBg R/gBg R/bBg R/gry R/rDst R/gDst R
+/bDst R/cpd R/Aeq R/Ath R/Aos R/Ach R/ed R/sf 20 d/cW 20 d/lW 20 d/bW 75 d
+/wF 1.5 d/aF 11.875 d/aR 0.263 d/aA 50 d/hS 54 d/pA 32 d/sh F d/S{sf m}b
+/dL{[hS] 0 setdash}b/o{1 ix}b/rot{3 -1 r}b/x{e d}b/CMT mt d/TM mt d
+/SM{CMT sm}b/XY{X D m Y D m a sq}b/s1 1 string d/fp{T charpath flattenpath}b
+/p{tr ru 0.25 a e ru 0.25 a e itransform}b/Wd{65536. dv}b
+/C{Wd rot Wd rot Wd rot setrgbcolor}b
+/setcmykcolor where{P/sk/setcmykcolor L}{/sk{4 1 r 3{3 ix a D 0 lt{P 0}if D 1\
+ gt{P 1}if 1 e s 3 1 r}rp setrgbcolor P}b}ie/sg{D currenthsbcolor P rot seths\
+bcolor currenthsbcolor e P e P o s D m .001 gt{setgray}{P}ie}b
+/sBg{65535 dv/bBg x 65535 dv/gBg x 65535 dv/rBg
+x}b
+/sRmp{currentrgbcolor bBg e s/bDst x gBg e s/gDst x rBg e s/rDst x}b
+/dD{np 2 1 r 4 2 r xl 2 dv D sc -1 0 M 0 -1 l 1 0 l 0 1 l cp SM 0 ne{f}{lW 0.\
+8 m sl st}ie}b
+/dM{gs np 3 1 r xl D sc 0 4 M 0 -8 rl 3.5 2 rm -7 4 rl 0 -4 rm 7 4 rl SM st g\
+r}b/dQ{gs np 0 360 arc 0.5 sg f gr}b
+/dR{lW 0.8 m sl 2 ix s/Y x 2 ix s/X x xl Rr SM st}b
+/dT{fp pb 3 1 r s 3 2 r s 2 1 r rm f}b/N 0 d/db{array/bs x/N 0 d}b
+/B{bs N rot put/N N 1 a d}b
+/SpA{gs np o o xl rot s e rot s o 0 ne o 0 ne or{at ro}{P P}ie
+aR aL m n D aL a 0 M 0 o n aA n aA arc cp f gr}b
+/SpH{gs np o o xl rot s e rot s o 0 ne o 0 ne or{at ro}{P P}ie
+0 cw 2 dv xl
+aR aL m n D aL a 0 M 0 o n aA n 0 arc cp f gr}b/Sp{/St x 0.316/aR x gs
+aF lW m 0.8 m St 4 and 0 ne{bW m lW dv bW sl}if/aL x
+St 8 and 0 ne{8 ix 8 ix 3 ix 3 ix SpA}if
+St 16 and 0 ne{2 ix 6 m 1 a D ix e D ix e D ix e D ix e P SpA}if
+St 32 and 0 ne{8 ix 8 ix 3 ix 3 ix SpH}if
+St 64 and 0 ne{2 ix 6 m 1 a D ix e D ix e D ix e D ix e P SpH}if
+St 2 and 0 ne{St 4 and 0 ne{[hS bW m lW dv] 0 setdash}{dL}ie}if
+np M{cv}rp St 128 and 0 ne{f}{st}ie gr}b/Ha{gs np 3 1 r
+xl D sc -.7 1.4 M 0.7 1.4 l -.7 2.4 M 0.7 2.4 l SM st gr}b
+/OP{3 ix 3 ix xl 3 -1 r s 3 1 r
+e s o o at ro D m e D m a sq}b
+/OB{/bS x OP D bS dv D lW 2 m lt{P lW 2 m}if/bd x}b
+/DA{np 0 0 M aL 0 aR aL m 180 aA s 180 aA a arc cp f}b
+/OA{np 0 cw -2 dv M aL 0 aR aL m 180 aA s
+180 arc 0 cw -2 dv rl cp f}b
+/Ast{SM cw 0.8 m sl st}b/SA{aF m lW m/aL x 0.263/aR x aL 1 aR s m np 0 M
+ rad 0 l gs Ast gr}b
+/CA{aF lW m 0.8 m/aL x 0.316/aR x aL 1 aR s m 2 dv rad D m o D m s D 0 le{P
+P P}{sq at 2
+m np rad 0 rad 180 6 -1 r s 180 6 -1 r s arc gs Ast gr cpt
+e at ro}ie}b/AA{np rad 0 rad 180 180 6 -1 r a arc gs SM st gr}b
+/RA{lW m/w x np rad w M w .7 dv w l rad w n M w .7 dv w n l w
+ .35 dv w 2 m M 0 0
+l w .35 dv w -2 m l st}b
+/HA{lW m/w x np 0 0 M w 2 m D l w 2 m w l rad w l rad w n l w 2 m
+w n l w 2 m D n l cp st}b
+/Ar1{gs 5 1 r OP/rad x{{2.25 SA DA}{1.5 SA DA}{1 SA DA}{lW 4 m sl 4.5 SA DA}
+{lW 4 m sl 3 SA DA}{lW 4 m sl 2 SA
+DA}{270 CA DA}{180 CA DA}{120 CA DA}{90 CA DA}{2.5 RA}{2.5
+HA}{1 -1 sc 270 CA DA}{1 -1 sc 180 CA DA}{1 -1 sc 120 CA DA}{1 -1 sc 90 CA
+DA}{5 RA}{5 HA}{dL 2.25 SA DA}{dL 1.5 SA DA}{dL 1 SA DA}{2.25 SA OA}{1.5 SA
+OA}{1 SA OA}{1 -1 sc 2.25 SA OA}{1 -1 sc 1.5 SA OA}
+{1 -1 sc 1 SA OA}{270 CA OA}{180 CA OA}{120 CA OA}{90 CA OA}{1 -1 sc 270 CA
+OA}{1 -1 sc 180 CA OA}{1 -1 sc 120 CA OA}{1 -1 sc 90 CA OA}{1 -1 sc 270
+AA}{1 -1 sc 180 AA}{1 -1 sc 120 AA}{1 -1 sc 90 AA}}e g xc
+gr}b/ac{arcto 4{P}rp}b/rO{4 cw m}b/Cr{0 0 1 0 360 arc}b/Ac{XY D sc Cr SM}b
+/OrA{Y X at ro XY D rev{neg}if sc}b/Ov{OrA 1 0.4 sc Cr SM}b
+/Asc{OrA 1 27 dv D sc}b/LB{9 -6 M
+21 -10 27 -8 27 0 cv
+27 8 21 10 9 6 cv
+-3 2 -3 -2 9 -6 cv
+cp}b/DLB{0 0 M
+0 0 -9.51 9.65 -9.51 18.02 cv
+-9.51 23.22 -6.75 27 0 27 cv
+6.75 27 9.51 23.22 9.51 18.02 cv
+9.51 9.65 0 0 0 0 cv
+cp}b/ZLB{LB}b
+/dt{gs np M SM cpt np rot 4.5 dv 0 360 arc f gr}b
+/whf{gs 1 setgray f gr SM st}b/blf{gs f gr SM st}b/Rr{0 rO M
+0 Y X Y rO ac
+X Y X 0 rO ac
+X 0 0 0 rO ac
+0 0 0 Y rO ac
+cp}b/Rc{0 0 M
+0 Y l
+X Y l
+X 0 l
+cp}b/grf{gs 0.5 sg f gr SM st}b/gG{D 32 dv D m 1 e s/gry x
+currentrgbcolor bDst gry m a 3 1 r gDst gry m a 3 1 r rDst gry m a 3 1 r
+setrgbcolor}b/gS{dtransform CMT idtransform
+m D 0 lt{n}if sq n D
+CMT dtransform idtransform
+e 2 m e
+xl
+7 m 32 a 256 dv D sc}b/gLB{sh{sRmp
+32 -0.5 0.5{gs
+gG
+13.5 0 xl
+D 32 s 64 dv 13.5 m D 7 m 24 dv
+gS
+-13.5 0 xl
+LB f
+gr}for
+LB SM st}{LB grf}ie}b/gOv{sh{sRmp
+32 -0.5 0.5{gs
+gG
+D 32 s 64 dv 0.65 m D
+gS
+Cr f
+gr}for
+Cr SM st}{Cr grf}ie}b/gAc{sh{sRmp
+32 -0.5 0.5{gs
+gG
+D 32 s 64 dv D
+gS
+Cr f
+gr}for
+Cr SM st}{Cr grf}ie}b
+/gDLB{sh{sRmp
+32 -0.5 0.5{gs
+gG
+0 13.5 xl
+D 32 s 64 dv 13.5 m D 7 m 24 dv e
+gS
+0 -13.5 xl
+DLB f
+gr}for
+DLB SM st}{DLB grf}ie}b/gRr{sh{sRmp
+32 -0.5 0.5{gs
+gG
+X 2 dv Y 2 dv xl
+D 32 s 64 dv X Y lt{X}{Y}ie m 0.25 m D
+gS
+X -2 dv Y -2 dv xl
+Rr f
+gr}for
+Rr SM st}{Rr grf}ie}b/gRc{sh{sRmp
+32 -0.5 0.5{gs
+gG
+X 2 dv Y 2 dv xl
+D 32 s 64 dv X Y lt{X}{Y}ie m 0.25 m D
+gS
+X -2 dv Y -2 dv xl
+Rc f
+gr}for
+Rc SM st}{Rc grf}ie}b/gZLB{gLB}b/Ath{Y X at ro XY 2 dv/rad x gs D SA DA gr
+ rad 2 m 0 xl 180 ro SA DA}b/Aeq{Y X at ro XY/rad x
+rev{1 -1 sc}if
+gs
+0 lW 2 m xl
+D SA OA
+gr
+rad 0 xl
+180 ro
+0 lW 2 m xl
+SA OA}b/Aos{X Y M SM cpt xl XY e dv lW 1.667 m o o lt{e}if P D sc}b/Ach{5 Aos
+gs/Helvetica findfont[1 0 0 -1 0 0]makefont 5.5 scalefont setfont
+D stringwidth P 2 dv D 1 a/rad x
+n 0 M show gr
+rad 2 s -5 M
+rad n -5 rad n 1 2 ac
+rad n 1 rad 1 2 ac
+rad 1 rad -5 2 ac
+rad -5 rad n -5 2 ac
+cp Ast}b/Ar{D 39 lt{Ar1}
+{gs 5 1 r o o xl 3 -1 r e s 3 1 r s e
+o 0 lt o 0 lt ne/rev x
+D 0 lt{1 -1 sc neg}if/Y x D 0 lt{-1 1 sc neg}
+if/X x np{{Y 16 div D 2 S lt{P 2 S}if/lp x
+lp 0 M 0 0 l 0 Y l lp Y l
+X lp s 0 M X 0 l X Y l X lp s Y l SM st}{Y 16 div D 2 S lt{P 2 S}if/lp x
+lp 0 M
+0 0 0 Y lp ac
+0 Y 2 dv lp neg o lp ac
+0 Y 2 dv 0 Y lp ac
+0 Y lp Y lp ac
+X lp s 0 M
+X 0 X Y lp ac
+X Y 2 dv X lp a o lp ac
+X Y 2 dv X Y lp ac
+X Y X lp s Y lp ac SM st}{Y D 2 dv Y 180 pA s 180 pA a arc st
+np X Y s Y 2 dv
+Y pA D neg arcn st}{Rc SM st}{X lW 2 dv a lW -2 dv M
+rO D rl
+X lW 2 dv a rO a Y lW 2 dv a rO a l
+rO lW -2 dv a Y lW 2 dv a rO a l
+lW -2 dv Y lW 2 dv a l
+0 Y l X Y l X 0 l cp f
+0 0 M
+0 Y l
+X Y l
+X 0 l cp
+SM st}{Rr SM st}{rO Y M rO rO xl
+0 Y X Y rO ac
+X Y X 0 rO ac
+X 0 0 0 rO ac
+rO neg D xl X Y 0 Y rO ac
+cp f
+Rr st}{Ac st}{OrA gAc}{Ov st}{OrA 1 .4 sc gOv}{Asc LB whf}{Asc gLB}
+{Asc gs gLB gr
+-1 -1 sc LB whf}{Asc gs gLB gr
+-0.4 -0.4 sc LB whf}{Asc LB gs whf gr
+np -0.4 -0.4 sc gLB}{Asc DLB -1 -1 sc DLB gs whf gr
+np 90 ro gs gDLB gr -1 -1 sc gDLB}{Asc gs -1 -1 sc ZLB whf gr
+gs 3.6 12 sc gOv gr
+ZLB whf}{Asc gs -1 -1 sc gZLB gr
+gs 3.6 12 sc Cr whf gr
+gZLB}{0 0 M X Y l SM st}{bW sl 0 0 M X Y l SM st}
+{dL 0 0 M X Y l SM st}{OrA 1 16 dv D sc
+0 -1 M
+0 0 1 0 1 ac
+8 0 8 1 1 ac
+8 0 16 0 1 ac
+16 0 16 -1 1 ac
+SM st}{XY D 0 0 dt X Y dt}{XY 2 dv X Y dt}{XY D X Y dt 0 0 M SM cpt xl
+2 dv D sc
+1 0 M -1 0 l
+0 1 M 0 -1 l
+Ast}{XY D X Y dt 0 0 M SM cpt xl
+2 dv D sc
+1 0 M -1 0 l
+Ast}{4.5 Aos
+1 0 M -1 0 l
+0 1 M 0 -1 l
+2 0 M 0 0 2 0 360 arc
+Ast}{4.5 Aos
+1 0 M -1 0 l
+2 0 M 0 0 2 0 360 arc
+Ast}{2.25 Ath}{1.5 Ath}{1 Ath}{2.25 Aeq}{1.5 Aeq}{1 Aeq}{OrA 1 16 dv D sc
+0 -1 M 0 0 l 16 0 l 16 -1 l SM st}{5 Aos
+1 -1 M -1 -1 l
+0 2 M 0 -2 l
+Ast}{5 Aos
+1 -1 M -1 -1 l
+1 1 M -1 1 l
+0 2 M 0 -2 l
+Ast}{4.5 Aos
+1 0 M -1 0 l
+0 1 M 0 -1 l
+Ast}{4.5 Aos
+1 0 M -1 0 l
+Ast}{gRc}{gRr}{Rc blf}{Rr blf}{Ac blf}{Ov blf}{Asc DLB -1 -1 sc DLB gs whf gr
+np 90 ro DLB -1 -1 sc DLB blf}{Asc gs -1 -1 sc ZLB blf gr
+gs 3.6 12 sc Cr whf gr
+ZLB blf}{Asc gs -1 -1 sc ZLB whf gr
+gs 3.6 12 sc Cr blf gr
+ZLB whf}{Asc LB gs whf gr
+np -0.4 -0.4 sc LB blf}{Asc LB gs f gr gs SM st gr
+np -0.4 -0.4 sc LB whf}{Asc LB blf}{Asc LB gs f gr gs SM st gr
+np -1 -1 sc LB whf}{Ac whf}{OrA gAc}{Ac blf}{Ov whf}
+{OrA 1 .4 sc gOv}{Ov blf}{(Rac)Ach}{(Abs)Ach}{(Rel)Ach}
+}e 39 s g xc gr}ie}b/DS{np M l st}b
+/DD{gs dL DS gr}b/DB{gs 12 OB bW sl np 0 0 M 0 l st gr}b/ap{e 3 ix a
+e 2 ix a}b/PT{D 2 4 gi al P OP D 1 sc
+o length 6 gt{P 6 g}{e P 8 dv}ie
+D lW 2 m lt{P lW 2 m}if
+0 e
+0 0
+3 -1 r s 3 1 r e s e
+0 0 M 1 0 l
+0 0 ap M 1 0 ap l
+e n e n
+0 0 ap M 1 0 ap l
+P P}b/DT{gs np PT SM st gr}b
+/NH{lW s D hS dv ru
+cvi D 0 eq{P 1}if/nH x
+D hS nH m s
+D 0 lt{P .1 s nH dv}{nH 2 a dv D 0 xl 2 m s nH dv}ie}b
+/Bd{D type/arraytype ne{bs e g}if{{P}{{{DS}{DD}{gs 12 OB np
+bW 2 dv/bd x
+lW 2 dv e D NH e{D bd M bd n l}for
+st gr}{gs 12 OB np
+lW 2 dv 0 xl NH 1 sc
+bW 2 dv wF m nH 1 a dv/bd x
+0 1 nH
+{D 1 a bd m o o M n l}for SM st gr}{P}{DB}{gs 12 OB
+np 0 lW 2 dv o o n M l bW 2 dv
+wF m o o l n l
+cp f gr}{P}{gs 12 OB/bL x
+bW 2 dv D lW lt{P lW}if/bd x np 0 0 M
+bL bd 4 m dv ru 2 o o lt{e}if P cvi/nSq x
+bL nSq 2 m dv D sc
+nSq{.135 .667 .865 .667 1 0 rcurveto
+.135 -.667 .865 -.667 1 0 rcurveto}rp SM st gr}{gs 12 OB
+np 0 lW 2 dv o o n M l bW 2 dv
+wF m o o l n l
+cp SM lW 0.8 m sl st gr}{P}{4 2 r gs OP/rad x 1 SA DA gr}{P}
+}o 1 g 1 s g e 2 4 gi al P
+5 -1 r xc}{al P 8 ix 1 eq{DD}{DS}ie 5 -1 r 2 eq{DB}{DS}ie P}{DT}}o 0 g g xc}b
+/ed{gs cpt np cw 2 dv 0 360 arc f gr}b
+/SPe{gs 0 e xl 1 1 S dv D n sc CMT currentmatrix P lW sl 4.0 setmiterlimit
+np}b/ws{Wd 0 32 4 -1 roll widthshow}b/blank/Times-Roman findfont/CharStrings
+g/space g d/mv 256 array d/NUL/SOH/STX/ETX/EOT/ENQ/ACK/BEL/BS/HT/LF/VT
+/FF/CR/SO/SI
+/DLE/DC1/DC2/DC3/DC4/NAK/SYN/ETB/CAN/EM/SUB/ESC/FS/GS/RS/US
+mv 0 32 gi as P
+mv 32/Times-Roman findfont/Encoding get
+32 96 gi putinterval
+mv 39/quotesingle put
+mv 96/grave put/unknown/unknown/quotesinglbase/florin/quotedblbase/ellipsis
+/dagger/daggerdbl
+/circumflex/perthousand/Scaron/guilsinglleft/OE/unknown/unknown/unknown
+/unknown/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash
+/emdash
+/tilde/trademark/scaron/guilsinglright/oe/unknown/unknown/Ydieresis
+/blank/exclamdown/cent/sterling/currency/yen/brokenbar/section
+/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered
+/macron
+/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph
+/periodcentered
+/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf
+/threequarters/questiondown
+/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
+/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
+/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
+/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
+/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
+mv 128 128 gi as P/fSt 50 string d(ChemDraw)fSt copy P/fD{D/Symbol eq{
+findfont[1 0 0 -1 0 0]makefont}{D {findfont}stopped{/Helvetica findfont}if
+D length dict/newdict x{
+1 index/FID ne{1 index/FontMatrix eq{[1 0 0 -1 0 0]matrix concatmatrix}if
+newdict 3 1 r put}{P P}ie}forall
+newdict/Encoding mv put
+fSt 8 fSt length 8 sub gi cvs length 8 add
+fSt 0 rot gi cvn newdict definefont}ie}b/ts{gs xl ro 0 0 M}b
+/nl{0 e xl 0 0 M}b/tx{ft e g e sf m rot D 96 and 0 ne{
+64 and 0 ne{-0.5}{0.25}ie e 0.75 m}{P 0 e}ie
+D 4 -1 r e scalefont setfont m cpt P e M}b
+end
+%%EndProcSet
+%%EndProlog
+
+chemdict30 begin
+/cW 40 def
+/bW 80 def
+/lW 20 def
+/hS 54 def
+/sh true def
+388 SPe[
+/Helvetica
+fD]/ft x
+240 1000 M
+10120 1000 l
+10120 6760 l
+240 6760 l
+cp clip np
+65535 65535
+65535 sBg
+0 252 2283 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(R)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+936 2195 M
+930 2205 l
+924 2215 l
+421 2215 l
+421 2195 l
+cp
+f
+gr
+0 1152 1763 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1131 1765 M
+1148 1775 l
+897 2210 l
+880 2200 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1193 1801 M
+1210 1811 l
+959 2246 l
+942 2236 l
+cp
+f
+gr
+0 1152 2803 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(OEt)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1188 2632 M
+1171 2642
+l
+924 2215 l
+930 2205 l
+936 2195 l
+cp
+f
+gr
+0 1530 2226 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(+)show
+gr
+0 2115 2248 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(e)show
+64 12
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+3330 2177 2550 2177 2 Ar
+gr
+0 3432 2283 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(R)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4104 2195 M
+4110 2205 l
+4104 2215 l
+3601 2215 l
+3601 2195 l
+cp
+f
+gr
+0 4332 1763 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4342 1783 M
+4359 1793 l
+4122 2205 l
+4110 2205 l
+4104 2195 l
+cp
+f
+gr
+0 4332 2803 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(OEt)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4368 2632 M
+4351 2642
+l
+4104 2215 l
+4110 2205 l
+4122 2205 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+4035 2055 4035 2205 63 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6414 1640 M
+6420 1650 l
+6410 1660 l
+5820 1660 l
+5820 1640 l
+cp
+f
+gr
+0 6642 1208 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6652 1228 M
+6669 1238 l
+6435 1644 l
+6420 1650 l
+6414 1640 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6430 2790 M
+6420 2805 l
+6410 2795 l
+6410 1660 l
+6420 1650 l
+6430 1663 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+5820 2815 M
+5820 2795 l
+6410 2795 l
+6420 2805 l
+6416 2815 l
+cp
+f
+gr
+0 6766 3307 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6774 3145 M
+6760 3159 l
+6416 2815 l
+6420 2805 l
+6438 2809 l
+cp
+f
+gr
+0 6896 2653 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(OEt)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6866 2610 M
+6873 2628
+l
+6438 2809 l
+6420 2805 l
+6430 2790 l
+cp
+f
+gr
+0 6921 1883 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(OEt)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6897 1767 M
+6892 1787
+l
+6430 1663 l
+6420 1650 l
+6435 1644 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+7331 2407 7026 2585 32 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+7262 1902 6932 1815 32 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+8745 4920 8745 3825 2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8785 2541 M
+8775 2535 l
+8765 2529 l
+8765 1941 l
+8775 1935 l
+8785 1929 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8250 1644 M
+8260 1626 l
+8785 1929 l
+8775 1935 l
+8765 1941 l
+cp
+f
+gr
+0 9216 2913 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9223 2741 M
+9213 2758 l
+8770 2502 l
+8780 2485 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9187 2803 M
+9177 2820 l
+8734 2564 l
+8744 2547 l
+cp
+f
+gr
+0 9216 1713 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9172 1653 M
+9182 1670 l
+8744 1923 l
+8734 1906 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9208 1715 M
+9218 1732 l
+8780 1985 l
+8770 1968 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8260 2844 M
+8250 2826 l
+8765 2529 l
+8775 2535 l
+8785 2541 l
+cp
+f
+gr
+0 9015 4365 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(e)show
+64 12
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8785 6021 M
+8775 6015 l
+8765 6009 l
+8765 5421 l
+8775 5415 l
+8785 5421 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8250 5124 M
+8260 5106 l
+8775 5403 l
+8775 5415 l
+8765 5421 l
+cp
+f
+gr
+0 9216 6393 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9223 6221 M
+9213 6238 l
+8770 5982 l
+8780 5965 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9187 6283 M
+9177 6300 l
+8734 6044 l
+8744 6027 l
+cp
+f
+gr
+0 9216 5193 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9190 5164 M
+9200 5181 l
+8785 5421 l
+8775 5415 l
+8775 5403 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8260 6324 M
+8250 6306 l
+8765 6009 l
+8775 6015 l
+8785 6021 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+8775 5359 8625 5359 63 Ar
+gr
+0 7560 5633 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(e)show
+64 12
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6400 6084 M
+6390 6090 l
+6380 6084 l
+6380 5496 l
+6390 5490 l
+6400 5496 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+5865 5199 M
+5875 5181 l
+6390 5478 l
+6390 5490 l
+6380 5496 l
+cp
+f
+gr
+0 6831 6468 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6820 6327 M
+6810 6344 l
+6390 6102 l
+6390 6090 l
+6400 6084 l
+cp
+f
+gr
+0 6831 5268 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6805 5239 M
+6815 5256 l
+6400 5496 l
+6390 5490 l
+6390 5478 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+5875 6399 M
+5865 6381 l
+6380 6084 l
+6390 6090 l
+6390 6102 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+6390 5434 6240 5434 63 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+6405 6255
+6405 6405 63 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4390 6024 M
+4380 6030 l
+4370 6024 l
+4370 5436 l
+4380 5430 l
+4390 5436 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4462 5988 M
+4442 5988 l
+4442 5472 l
+4462 5472 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+3855 5139 M
+3865 5121 l
+4380 5418 l
+4380 5430 l
+4370 5436 l
+cp
+f
+gr
+0 4821 6408 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4810 6267 M
+4800 6284 l
+4380 6042 l
+4380 6030 l
+4390 6024 l
+cp
+f
+gr
+0 4821 5208 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4795 5179 M
+4805 5196 l
+4390 5436 l
+4380 5430 l
+4380 5418 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+3865 6339 M
+3855 6321 l
+4370 6024 l
+4380 6030 l
+4380 6042 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+5490 2177 4710 2177 2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+8220 2177
+7440 2177 2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+7200 5828 7980 5828
+2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+5085 5828 5865 5828 2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+3105 5828 3885 5828 2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+2020 6084 M
+2010 6090 l
+2000 6084 l
+2000 5496 l
+2010 5490 l
+2020 5484 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1485 5199 M
+1495 5181 l
+2020 5484 l
+2010 5490 l
+2000 5496 l
+cp
+f
+gr
+0 2451 6468 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(OH)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+2440 6327 M
+2430 6344
+l
+2010 6102 l
+2010 6090 l
+2020 6084 l
+cp
+f
+gr
+0 2451 5268 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+2407 5208 M
+2417 5225 l
+1979 5478 l
+1969 5461 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+2443 5270 M
+2453 5287 l
+2015 5540 l
+2005 5523 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1495 6399 M
+1485 6381 l
+2000 6084 l
+2010 6090 l
+2010 6102 l
+cp
+f
+gr
+0 3338 5722 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(H)show
+64 12
+0 tx
+(+)show
+gr
+0 675 3281 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(?et{:Lester;1})show
+gr
+0 3840 3274 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0
+12
+0 tx
+(?et{:Lradanion;2})show
+gr
+0 6390 3281 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0
+12
+0 tx
+(?et{:Ldianion;3})show
+gr
+0 8715 3281 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0
+12
+0 tx
+(?et{:Ldiket;4})show
+gr
+0 8625 6683 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0
+12
+0 tx
+(?et{:Lrada;5})show
+gr
+0 6285 6690 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(?et{:Ldiadirad;6})show
+gr
+0 4290 6690 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0
+12
+0 tx
+(?et{:Ldianion2;7})show
+gr
+0 1890 6690 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0
+12
+0 tx
+(?et{:Lproduct;8})show
+gr
+gr end
+%%Trailer
+showpage
+
diff --git a/support/konwerter/Example/reaction_roman.eps b/support/konwerter/Example/reaction_roman.eps
new file mode 100644
index 0000000000..acde1a518f
--- /dev/null
+++ b/support/konwerter/Example/reaction_roman.eps
@@ -0,0 +1,1152 @@
+%!PS-Adobe-2.0 EPSF-1.2
+%%Creator: ChemDraw Ultra(tm) 7.0.1
+%%Title: reaction_roman.eps
+%%CreationDate: 2005-03-06 22:17
+%%DocumentSuppliedProcSets: chemdict30 24 13
+%%DocumentFonts: Helvetica
+%%BoundingBox: 12 50 504 338
+%%EndComments
+%%BeginProcSet: chemdict30 24 13
+% ChemDraw Laser Prep
+% Copyright Š 1985-2002 CambridgeSoft Corp., All Rights Reserved
+userdict/chemdict30 210 dict put
+chemdict30 begin/version 24 def/sv 13 def
+/b{bind def}bind def/L{load def}b/R{null def}b/d/def L/a/add L/al/aload L
+/as/astore L/at/atan L/cp/closepath L/cv/curveto L/cw/currentlinewidth L
+/cpt/currentpoint L/dv/div L/D/dup L/e/exch L/F/false L/f/fill L/fa/forall L
+/g/get L/gi/getinterval L/gr/grestore L/gs/gsave L/ie/ifelse L/ix/index L
+/l/lineto L/mt/matrix L/M/moveto L/m/mul L/n/neg L/np/newpath L/pb/pathbbox L
+/P/pop L/r/roll L/rl/rlineto L/rm/rmoveto L/ro/rotate L/rp/repeat L
+/ru/round L/sc/scale L/sl/setlinewidth L/sm/setmatrix L/st/stroke L
+/sp/strokepath L/sq/sqrt L/s/sub L/T/true L/tr/transform L/xl/translate L
+/xc/exec L/A R/N R/St R/X R/Y R/aL R/bL R/bS R/bd R/bs R/cX R/cY R/ch R/co R
+/fB R/fI R/fS R/fZ R/fl R/ft R/iX R/iY R/idx R/lh R/llx R/lly R/lp R/nH R
+/nSq R/newdict R/ps R/rad R/rev R/sL R/sba R/sbl R/sbs R/sn R/spa R/tB R
+/typ R/urx R/ury R/w R/wF R/xX R/xY R/rBg R/gBg R/bBg R/gry R/rDst R/gDst R
+/bDst R/cpd R/Aeq R/Ath R/Aos R/Ach R/ed R/sf 20 d/cW 20 d/lW 20 d/bW 75 d
+/wF 1.5 d/aF 11.875 d/aR 0.263 d/aA 50 d/hS 54 d/pA 32 d/sh F d/S{sf m}b
+/dL{[hS] 0 setdash}b/o{1 ix}b/rot{3 -1 r}b/x{e d}b/CMT mt d/TM mt d
+/SM{CMT sm}b/XY{X D m Y D m a sq}b/s1 1 string d/fp{T charpath flattenpath}b
+/p{tr ru 0.25 a e ru 0.25 a e itransform}b/Wd{65536. dv}b
+/C{Wd rot Wd rot Wd rot setrgbcolor}b
+/setcmykcolor where{P/sk/setcmykcolor L}{/sk{4 1 r 3{3 ix a D 0 lt{P 0}if D 1\
+ gt{P 1}if 1 e s 3 1 r}rp setrgbcolor P}b}ie/sg{D currenthsbcolor P rot seths\
+bcolor currenthsbcolor e P e P o s D m .001 gt{setgray}{P}ie}b
+/sBg{65535 dv/bBg x 65535 dv/gBg x 65535 dv/rBg
+x}b
+/sRmp{currentrgbcolor bBg e s/bDst x gBg e s/gDst x rBg e s/rDst x}b
+/dD{np 2 1 r 4 2 r xl 2 dv D sc -1 0 M 0 -1 l 1 0 l 0 1 l cp SM 0 ne{f}{lW 0.\
+8 m sl st}ie}b
+/dM{gs np 3 1 r xl D sc 0 4 M 0 -8 rl 3.5 2 rm -7 4 rl 0 -4 rm 7 4 rl SM st g\
+r}b/dQ{gs np 0 360 arc 0.5 sg f gr}b
+/dR{lW 0.8 m sl 2 ix s/Y x 2 ix s/X x xl Rr SM st}b
+/dT{fp pb 3 1 r s 3 2 r s 2 1 r rm f}b/N 0 d/db{array/bs x/N 0 d}b
+/B{bs N rot put/N N 1 a d}b
+/SpA{gs np o o xl rot s e rot s o 0 ne o 0 ne or{at ro}{P P}ie
+aR aL m n D aL a 0 M 0 o n aA n aA arc cp f gr}b
+/SpH{gs np o o xl rot s e rot s o 0 ne o 0 ne or{at ro}{P P}ie
+0 cw 2 dv xl
+aR aL m n D aL a 0 M 0 o n aA n 0 arc cp f gr}b/Sp{/St x 0.316/aR x gs
+aF lW m 0.8 m St 4 and 0 ne{bW m lW dv bW sl}if/aL x
+St 8 and 0 ne{8 ix 8 ix 3 ix 3 ix SpA}if
+St 16 and 0 ne{2 ix 6 m 1 a D ix e D ix e D ix e D ix e P SpA}if
+St 32 and 0 ne{8 ix 8 ix 3 ix 3 ix SpH}if
+St 64 and 0 ne{2 ix 6 m 1 a D ix e D ix e D ix e D ix e P SpH}if
+St 2 and 0 ne{St 4 and 0 ne{[hS bW m lW dv] 0 setdash}{dL}ie}if
+np M{cv}rp St 128 and 0 ne{f}{st}ie gr}b/Ha{gs np 3 1 r
+xl D sc -.7 1.4 M 0.7 1.4 l -.7 2.4 M 0.7 2.4 l SM st gr}b
+/OP{3 ix 3 ix xl 3 -1 r s 3 1 r
+e s o o at ro D m e D m a sq}b
+/OB{/bS x OP D bS dv D lW 2 m lt{P lW 2 m}if/bd x}b
+/DA{np 0 0 M aL 0 aR aL m 180 aA s 180 aA a arc cp f}b
+/OA{np 0 cw -2 dv M aL 0 aR aL m 180 aA s
+180 arc 0 cw -2 dv rl cp f}b
+/Ast{SM cw 0.8 m sl st}b/SA{aF m lW m/aL x 0.263/aR x aL 1 aR s m np 0 M
+ rad 0 l gs Ast gr}b
+/CA{aF lW m 0.8 m/aL x 0.316/aR x aL 1 aR s m 2 dv rad D m o D m s D 0 le{P
+P P}{sq at 2
+m np rad 0 rad 180 6 -1 r s 180 6 -1 r s arc gs Ast gr cpt
+e at ro}ie}b/AA{np rad 0 rad 180 180 6 -1 r a arc gs SM st gr}b
+/RA{lW m/w x np rad w M w .7 dv w l rad w n M w .7 dv w n l w
+ .35 dv w 2 m M 0 0
+l w .35 dv w -2 m l st}b
+/HA{lW m/w x np 0 0 M w 2 m D l w 2 m w l rad w l rad w n l w 2 m
+w n l w 2 m D n l cp st}b
+/Ar1{gs 5 1 r OP/rad x{{2.25 SA DA}{1.5 SA DA}{1 SA DA}{lW 4 m sl 4.5 SA DA}
+{lW 4 m sl 3 SA DA}{lW 4 m sl 2 SA
+DA}{270 CA DA}{180 CA DA}{120 CA DA}{90 CA DA}{2.5 RA}{2.5
+HA}{1 -1 sc 270 CA DA}{1 -1 sc 180 CA DA}{1 -1 sc 120 CA DA}{1 -1 sc 90 CA
+DA}{5 RA}{5 HA}{dL 2.25 SA DA}{dL 1.5 SA DA}{dL 1 SA DA}{2.25 SA OA}{1.5 SA
+OA}{1 SA OA}{1 -1 sc 2.25 SA OA}{1 -1 sc 1.5 SA OA}
+{1 -1 sc 1 SA OA}{270 CA OA}{180 CA OA}{120 CA OA}{90 CA OA}{1 -1 sc 270 CA
+OA}{1 -1 sc 180 CA OA}{1 -1 sc 120 CA OA}{1 -1 sc 90 CA OA}{1 -1 sc 270
+AA}{1 -1 sc 180 AA}{1 -1 sc 120 AA}{1 -1 sc 90 AA}}e g xc
+gr}b/ac{arcto 4{P}rp}b/rO{4 cw m}b/Cr{0 0 1 0 360 arc}b/Ac{XY D sc Cr SM}b
+/OrA{Y X at ro XY D rev{neg}if sc}b/Ov{OrA 1 0.4 sc Cr SM}b
+/Asc{OrA 1 27 dv D sc}b/LB{9 -6 M
+21 -10 27 -8 27 0 cv
+27 8 21 10 9 6 cv
+-3 2 -3 -2 9 -6 cv
+cp}b/DLB{0 0 M
+0 0 -9.51 9.65 -9.51 18.02 cv
+-9.51 23.22 -6.75 27 0 27 cv
+6.75 27 9.51 23.22 9.51 18.02 cv
+9.51 9.65 0 0 0 0 cv
+cp}b/ZLB{LB}b
+/dt{gs np M SM cpt np rot 4.5 dv 0 360 arc f gr}b
+/whf{gs 1 setgray f gr SM st}b/blf{gs f gr SM st}b/Rr{0 rO M
+0 Y X Y rO ac
+X Y X 0 rO ac
+X 0 0 0 rO ac
+0 0 0 Y rO ac
+cp}b/Rc{0 0 M
+0 Y l
+X Y l
+X 0 l
+cp}b/grf{gs 0.5 sg f gr SM st}b/gG{D 32 dv D m 1 e s/gry x
+currentrgbcolor bDst gry m a 3 1 r gDst gry m a 3 1 r rDst gry m a 3 1 r
+setrgbcolor}b/gS{dtransform CMT idtransform
+m D 0 lt{n}if sq n D
+CMT dtransform idtransform
+e 2 m e
+xl
+7 m 32 a 256 dv D sc}b/gLB{sh{sRmp
+32 -0.5 0.5{gs
+gG
+13.5 0 xl
+D 32 s 64 dv 13.5 m D 7 m 24 dv
+gS
+-13.5 0 xl
+LB f
+gr}for
+LB SM st}{LB grf}ie}b/gOv{sh{sRmp
+32 -0.5 0.5{gs
+gG
+D 32 s 64 dv 0.65 m D
+gS
+Cr f
+gr}for
+Cr SM st}{Cr grf}ie}b/gAc{sh{sRmp
+32 -0.5 0.5{gs
+gG
+D 32 s 64 dv D
+gS
+Cr f
+gr}for
+Cr SM st}{Cr grf}ie}b
+/gDLB{sh{sRmp
+32 -0.5 0.5{gs
+gG
+0 13.5 xl
+D 32 s 64 dv 13.5 m D 7 m 24 dv e
+gS
+0 -13.5 xl
+DLB f
+gr}for
+DLB SM st}{DLB grf}ie}b/gRr{sh{sRmp
+32 -0.5 0.5{gs
+gG
+X 2 dv Y 2 dv xl
+D 32 s 64 dv X Y lt{X}{Y}ie m 0.25 m D
+gS
+X -2 dv Y -2 dv xl
+Rr f
+gr}for
+Rr SM st}{Rr grf}ie}b/gRc{sh{sRmp
+32 -0.5 0.5{gs
+gG
+X 2 dv Y 2 dv xl
+D 32 s 64 dv X Y lt{X}{Y}ie m 0.25 m D
+gS
+X -2 dv Y -2 dv xl
+Rc f
+gr}for
+Rc SM st}{Rc grf}ie}b/gZLB{gLB}b/Ath{Y X at ro XY 2 dv/rad x gs D SA DA gr
+ rad 2 m 0 xl 180 ro SA DA}b/Aeq{Y X at ro XY/rad x
+rev{1 -1 sc}if
+gs
+0 lW 2 m xl
+D SA OA
+gr
+rad 0 xl
+180 ro
+0 lW 2 m xl
+SA OA}b/Aos{X Y M SM cpt xl XY e dv lW 1.667 m o o lt{e}if P D sc}b/Ach{5 Aos
+gs/Helvetica findfont[1 0 0 -1 0 0]makefont 5.5 scalefont setfont
+D stringwidth P 2 dv D 1 a/rad x
+n 0 M show gr
+rad 2 s -5 M
+rad n -5 rad n 1 2 ac
+rad n 1 rad 1 2 ac
+rad 1 rad -5 2 ac
+rad -5 rad n -5 2 ac
+cp Ast}b/Ar{D 39 lt{Ar1}
+{gs 5 1 r o o xl 3 -1 r e s 3 1 r s e
+o 0 lt o 0 lt ne/rev x
+D 0 lt{1 -1 sc neg}if/Y x D 0 lt{-1 1 sc neg}
+if/X x np{{Y 16 div D 2 S lt{P 2 S}if/lp x
+lp 0 M 0 0 l 0 Y l lp Y l
+X lp s 0 M X 0 l X Y l X lp s Y l SM st}{Y 16 div D 2 S lt{P 2 S}if/lp x
+lp 0 M
+0 0 0 Y lp ac
+0 Y 2 dv lp neg o lp ac
+0 Y 2 dv 0 Y lp ac
+0 Y lp Y lp ac
+X lp s 0 M
+X 0 X Y lp ac
+X Y 2 dv X lp a o lp ac
+X Y 2 dv X Y lp ac
+X Y X lp s Y lp ac SM st}{Y D 2 dv Y 180 pA s 180 pA a arc st
+np X Y s Y 2 dv
+Y pA D neg arcn st}{Rc SM st}{X lW 2 dv a lW -2 dv M
+rO D rl
+X lW 2 dv a rO a Y lW 2 dv a rO a l
+rO lW -2 dv a Y lW 2 dv a rO a l
+lW -2 dv Y lW 2 dv a l
+0 Y l X Y l X 0 l cp f
+0 0 M
+0 Y l
+X Y l
+X 0 l cp
+SM st}{Rr SM st}{rO Y M rO rO xl
+0 Y X Y rO ac
+X Y X 0 rO ac
+X 0 0 0 rO ac
+rO neg D xl X Y 0 Y rO ac
+cp f
+Rr st}{Ac st}{OrA gAc}{Ov st}{OrA 1 .4 sc gOv}{Asc LB whf}{Asc gLB}
+{Asc gs gLB gr
+-1 -1 sc LB whf}{Asc gs gLB gr
+-0.4 -0.4 sc LB whf}{Asc LB gs whf gr
+np -0.4 -0.4 sc gLB}{Asc DLB -1 -1 sc DLB gs whf gr
+np 90 ro gs gDLB gr -1 -1 sc gDLB}{Asc gs -1 -1 sc ZLB whf gr
+gs 3.6 12 sc gOv gr
+ZLB whf}{Asc gs -1 -1 sc gZLB gr
+gs 3.6 12 sc Cr whf gr
+gZLB}{0 0 M X Y l SM st}{bW sl 0 0 M X Y l SM st}
+{dL 0 0 M X Y l SM st}{OrA 1 16 dv D sc
+0 -1 M
+0 0 1 0 1 ac
+8 0 8 1 1 ac
+8 0 16 0 1 ac
+16 0 16 -1 1 ac
+SM st}{XY D 0 0 dt X Y dt}{XY 2 dv X Y dt}{XY D X Y dt 0 0 M SM cpt xl
+2 dv D sc
+1 0 M -1 0 l
+0 1 M 0 -1 l
+Ast}{XY D X Y dt 0 0 M SM cpt xl
+2 dv D sc
+1 0 M -1 0 l
+Ast}{4.5 Aos
+1 0 M -1 0 l
+0 1 M 0 -1 l
+2 0 M 0 0 2 0 360 arc
+Ast}{4.5 Aos
+1 0 M -1 0 l
+2 0 M 0 0 2 0 360 arc
+Ast}{2.25 Ath}{1.5 Ath}{1 Ath}{2.25 Aeq}{1.5 Aeq}{1 Aeq}{OrA 1 16 dv D sc
+0 -1 M 0 0 l 16 0 l 16 -1 l SM st}{5 Aos
+1 -1 M -1 -1 l
+0 2 M 0 -2 l
+Ast}{5 Aos
+1 -1 M -1 -1 l
+1 1 M -1 1 l
+0 2 M 0 -2 l
+Ast}{4.5 Aos
+1 0 M -1 0 l
+0 1 M 0 -1 l
+Ast}{4.5 Aos
+1 0 M -1 0 l
+Ast}{gRc}{gRr}{Rc blf}{Rr blf}{Ac blf}{Ov blf}{Asc DLB -1 -1 sc DLB gs whf gr
+np 90 ro DLB -1 -1 sc DLB blf}{Asc gs -1 -1 sc ZLB blf gr
+gs 3.6 12 sc Cr whf gr
+ZLB blf}{Asc gs -1 -1 sc ZLB whf gr
+gs 3.6 12 sc Cr blf gr
+ZLB whf}{Asc LB gs whf gr
+np -0.4 -0.4 sc LB blf}{Asc LB gs f gr gs SM st gr
+np -0.4 -0.4 sc LB whf}{Asc LB blf}{Asc LB gs f gr gs SM st gr
+np -1 -1 sc LB whf}{Ac whf}{OrA gAc}{Ac blf}{Ov whf}
+{OrA 1 .4 sc gOv}{Ov blf}{(Rac)Ach}{(Abs)Ach}{(Rel)Ach}
+}e 39 s g xc gr}ie}b/DS{np M l st}b
+/DD{gs dL DS gr}b/DB{gs 12 OB bW sl np 0 0 M 0 l st gr}b/ap{e 3 ix a
+e 2 ix a}b/PT{D 2 4 gi al P OP D 1 sc
+o length 6 gt{P 6 g}{e P 8 dv}ie
+D lW 2 m lt{P lW 2 m}if
+0 e
+0 0
+3 -1 r s 3 1 r e s e
+0 0 M 1 0 l
+0 0 ap M 1 0 ap l
+e n e n
+0 0 ap M 1 0 ap l
+P P}b/DT{gs np PT SM st gr}b
+/NH{lW s D hS dv ru
+cvi D 0 eq{P 1}if/nH x
+D hS nH m s
+D 0 lt{P .1 s nH dv}{nH 2 a dv D 0 xl 2 m s nH dv}ie}b
+/Bd{D type/arraytype ne{bs e g}if{{P}{{{DS}{DD}{gs 12 OB np
+bW 2 dv/bd x
+lW 2 dv e D NH e{D bd M bd n l}for
+st gr}{gs 12 OB np
+lW 2 dv 0 xl NH 1 sc
+bW 2 dv wF m nH 1 a dv/bd x
+0 1 nH
+{D 1 a bd m o o M n l}for SM st gr}{P}{DB}{gs 12 OB
+np 0 lW 2 dv o o n M l bW 2 dv
+wF m o o l n l
+cp f gr}{P}{gs 12 OB/bL x
+bW 2 dv D lW lt{P lW}if/bd x np 0 0 M
+bL bd 4 m dv ru 2 o o lt{e}if P cvi/nSq x
+bL nSq 2 m dv D sc
+nSq{.135 .667 .865 .667 1 0 rcurveto
+.135 -.667 .865 -.667 1 0 rcurveto}rp SM st gr}{gs 12 OB
+np 0 lW 2 dv o o n M l bW 2 dv
+wF m o o l n l
+cp SM lW 0.8 m sl st gr}{P}{4 2 r gs OP/rad x 1 SA DA gr}{P}
+}o 1 g 1 s g e 2 4 gi al P
+5 -1 r xc}{al P 8 ix 1 eq{DD}{DS}ie 5 -1 r 2 eq{DB}{DS}ie P}{DT}}o 0 g g xc}b
+/ed{gs cpt np cw 2 dv 0 360 arc f gr}b
+/SPe{gs 0 e xl 1 1 S dv D n sc CMT currentmatrix P lW sl 4.0 setmiterlimit
+np}b/ws{Wd 0 32 4 -1 roll widthshow}b/blank/Times-Roman findfont/CharStrings
+g/space g d/mv 256 array d/NUL/SOH/STX/ETX/EOT/ENQ/ACK/BEL/BS/HT/LF/VT
+/FF/CR/SO/SI
+/DLE/DC1/DC2/DC3/DC4/NAK/SYN/ETB/CAN/EM/SUB/ESC/FS/GS/RS/US
+mv 0 32 gi as P
+mv 32/Times-Roman findfont/Encoding get
+32 96 gi putinterval
+mv 39/quotesingle put
+mv 96/grave put/unknown/unknown/quotesinglbase/florin/quotedblbase/ellipsis
+/dagger/daggerdbl
+/circumflex/perthousand/Scaron/guilsinglleft/OE/unknown/unknown/unknown
+/unknown/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash
+/emdash
+/tilde/trademark/scaron/guilsinglright/oe/unknown/unknown/Ydieresis
+/blank/exclamdown/cent/sterling/currency/yen/brokenbar/section
+/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered
+/macron
+/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph
+/periodcentered
+/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf
+/threequarters/questiondown
+/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
+/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
+/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
+/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
+/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
+mv 128 128 gi as P/fSt 50 string d(ChemDraw)fSt copy P/fD{D/Symbol eq{
+findfont[1 0 0 -1 0 0]makefont}{D {findfont}stopped{/Helvetica findfont}if
+D length dict/newdict x{
+1 index/FID ne{1 index/FontMatrix eq{[1 0 0 -1 0 0]matrix concatmatrix}if
+newdict 3 1 r put}{P P}ie}forall
+newdict/Encoding mv put
+fSt 8 fSt length 8 sub gi cvs length 8 add
+fSt 0 rot gi cvn newdict definefont}ie}b/ts{gs xl ro 0 0 M}b
+/nl{0 e xl 0 0 M}b/tx{ft e g e sf m rot D 96 and 0 ne{
+64 and 0 ne{-0.5}{0.25}ie e 0.75 m}{P 0 e}ie
+D 4 -1 r e scalefont setfont m cpt P e M}b
+end
+%%EndProcSet
+%%EndProlog
+
+chemdict30 begin
+/cW 40 def
+/bW 80 def
+/lW 20 def
+/hS 54 def
+/sh true def
+388 SPe[
+/Helvetica
+fD]/ft x
+240 1000 M
+10080 1000 l
+10080 6760 l
+240 6760 l
+cp clip np
+65535 65535
+65535 sBg
+0 252 2283 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(R)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+936 2195 M
+930 2205 l
+924 2215 l
+421 2215 l
+421 2195 l
+cp
+f
+gr
+0 1152 1763 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1131 1765 M
+1148 1775 l
+897 2210 l
+880 2200 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1193 1801 M
+1210 1811 l
+959 2246 l
+942 2236 l
+cp
+f
+gr
+0 1152 2803 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(OEt)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1188 2632 M
+1171 2642
+l
+924 2215 l
+930 2205 l
+936 2195 l
+cp
+f
+gr
+0 1530 2226 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(+)show
+gr
+0 2115 2248 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(e)show
+64 12
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+3330 2177 2550 2177 2 Ar
+gr
+0 3432 2283 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(R)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4104 2195 M
+4110 2205 l
+4104 2215 l
+3601 2215 l
+3601 2195 l
+cp
+f
+gr
+0 4332 1763 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4342 1783 M
+4359 1793 l
+4122 2205 l
+4110 2205 l
+4104 2195 l
+cp
+f
+gr
+0 4332 2803 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(OEt)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4368 2632 M
+4351 2642
+l
+4104 2215 l
+4110 2205 l
+4122 2205 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+4035 2055 4035 2205 63 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6414 1640 M
+6420 1650 l
+6410 1660 l
+5820 1660 l
+5820 1640 l
+cp
+f
+gr
+0 6642 1208 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6652 1228 M
+6669 1238 l
+6435 1644 l
+6420 1650 l
+6414 1640 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6430 2790 M
+6420 2805 l
+6410 2795 l
+6410 1660 l
+6420 1650 l
+6430 1663 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+5820 2815 M
+5820 2795 l
+6410 2795 l
+6420 2805 l
+6416 2815 l
+cp
+f
+gr
+0 6766 3307 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6774 3145 M
+6760 3159 l
+6416 2815 l
+6420 2805 l
+6438 2809 l
+cp
+f
+gr
+0 6896 2653 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(OEt)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6866 2610 M
+6873 2628
+l
+6438 2809 l
+6420 2805 l
+6430 2790 l
+cp
+f
+gr
+0 6921 1883 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(OEt)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6897 1767 M
+6892 1787
+l
+6430 1663 l
+6420 1650 l
+6435 1644 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+7331 2407 7026 2585 32 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+7262 1902 6932 1815 32 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+8745 4920 8745 3825 2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8785 2541 M
+8775 2535 l
+8765 2529 l
+8765 1941 l
+8775 1935 l
+8785 1929 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8250 1644 M
+8260 1626 l
+8785 1929 l
+8775 1935 l
+8765 1941 l
+cp
+f
+gr
+0 9216 2913 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9223 2741 M
+9213 2758 l
+8770 2502 l
+8780 2485 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9187 2803 M
+9177 2820 l
+8734 2564 l
+8744 2547 l
+cp
+f
+gr
+0 9216 1713 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9172 1653 M
+9182 1670 l
+8744 1923 l
+8734 1906 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9208 1715 M
+9218 1732 l
+8780 1985 l
+8770 1968 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8260 2844 M
+8250 2826 l
+8765 2529 l
+8775 2535 l
+8785 2541 l
+cp
+f
+gr
+0 9015 4365 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(e)show
+64 12
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8785 6021 M
+8775 6015 l
+8765 6009 l
+8765 5421 l
+8775 5415 l
+8785 5421 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8250 5124 M
+8260 5106 l
+8775 5403 l
+8775 5415 l
+8765 5421 l
+cp
+f
+gr
+0 9216 6393 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9223 6221 M
+9213 6238 l
+8770 5982 l
+8780 5965 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9187 6283 M
+9177 6300 l
+8734 6044 l
+8744 6027 l
+cp
+f
+gr
+0 9216 5193 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+9190 5164 M
+9200 5181 l
+8785 5421 l
+8775 5415 l
+8775 5403 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+8260 6324 M
+8250 6306 l
+8765 6009 l
+8775 6015 l
+8785 6021 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+8775 5359 8625 5359 63 Ar
+gr
+0 7560 5633 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(e)show
+64 12
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6400 6084 M
+6390 6090 l
+6380 6084 l
+6380 5496 l
+6390 5490 l
+6400 5496 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+5865 5199 M
+5875 5181 l
+6390 5478 l
+6390 5490 l
+6380 5496 l
+cp
+f
+gr
+0 6831 6468 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6820 6327 M
+6810 6344 l
+6390 6102 l
+6390 6090 l
+6400 6084 l
+cp
+f
+gr
+0 6831 5268 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+6805 5239 M
+6815 5256 l
+6400 5496 l
+6390 5490 l
+6390 5478 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+5875 6399 M
+5865 6381 l
+6380 6084 l
+6390 6090 l
+6390 6102 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+6390 5434 6240 5434 63 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+6405 6255
+6405 6405 63 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4390 6024 M
+4380 6030 l
+4370 6024 l
+4370 5436 l
+4380 5430 l
+4390 5436 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4462 5988 M
+4442 5988 l
+4442 5472 l
+4462 5472 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+3855 5139 M
+3865 5121 l
+4380 5418 l
+4380 5430 l
+4370 5436 l
+cp
+f
+gr
+0 4821 6408 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4810 6267 M
+4800 6284 l
+4380 6042 l
+4380 6030 l
+4390 6024 l
+cp
+f
+gr
+0 4821 5208 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+64 10
+0 tx
+(-)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+4795 5179 M
+4805 5196 l
+4390 5436 l
+4380 5430 l
+4380 5418 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+3865 6339 M
+3855 6321 l
+4370 6024 l
+4380 6030 l
+4380 6042 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+5490 2177 4710 2177 2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+8220 2177
+7440 2177 2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+7200 5828 7980 5828
+2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+5085 5828 5865 5828 2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+3105 5828 3885 5828 2 Ar
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+2020 6084 M
+2010 6090 l
+2000 6084 l
+2000 5496 l
+2010 5490 l
+2020 5484 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1485 5199 M
+1495 5181 l
+2020 5484 l
+2010 5490 l
+2000 5496 l
+cp
+f
+gr
+0 2451 6468 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(OH)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+2440 6327 M
+2430 6344
+l
+2010 6102 l
+2010 6090 l
+2020 6084 l
+cp
+f
+gr
+0 2451 5268 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 10
+0 tx
+(O)show
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+2407 5208 M
+2417 5225 l
+1979 5478 l
+1969 5461 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+2443 5270 M
+2453 5287 l
+2015 5540 l
+2005 5523 l
+cp
+f
+gr
+gs
+0.0000 0.0000 0.0000 1.0000 sk
+np
+1495 6399 M
+1485 6381 l
+2000 6084 l
+2010 6090 l
+2010 6102 l
+cp
+f
+gr
+0 3338 5722 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(H)show
+64 12
+0 tx
+(+)show
+gr
+0 675 3281 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(?et{:rester;1})show
+gr
+0 3840 3274 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0
+12
+0 tx
+(?et{:rradanion;2})show
+gr
+0 6390 3281 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0
+12
+0 tx
+(?et{:rdianion;3})show
+gr
+0 8715 3281 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0
+12
+0 tx
+(?et{:rdiket;4})show
+gr
+0 8625 6683 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0
+12
+0 tx
+(?et{:rrada;5})show
+gr
+0 6285 6690 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0 12
+0 tx
+(?et{:rdiadirad;6})show
+gr
+0 4290 6690 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0
+12
+0 tx
+(?et{:rdianion2;7})show
+gr
+0 1890 6690 ts
+0.0000 0.0000 0.0000 1.0000 sk
+0
+12
+0 tx
+(?et{:rproduct;8})show
+gr
+gr end
+%%Trailer
+showpage
+
diff --git a/support/konwerter/Makefile b/support/konwerter/Makefile
new file mode 100644
index 0000000000..bbeb9ade3d
--- /dev/null
+++ b/support/konwerter/Makefile
@@ -0,0 +1,26 @@
+all:konwerter
+CC=g++
+INCLUDE=.
+DESTDIR=/usr/local/bin
+CFLAGS=-Wall -g
+konwerter: konwerter.o operacje.o czyt_zapis.o num_na_etyk.o prz_string.o operacje_na_tex.o system_zapisu.o
+ $(CC) $(CFLAGS) -o konwerter konwerter.o operacje.o czyt_zapis.o num_na_etyk.o prz_string.o operacje_na_tex.o system_zapisu.o
+operacje.o: operacje.cc operacje.h czyt_zapis.h dl_wiersza.h system_zapisu.h
+ $(CC) -c -I$(INCLUDE) $(CFLAGS) operacje.cc
+konwerter.o: konwerter.cc operacje.h dl_wiersza.h system_zapisu.h
+ $(CC) -c -I$(INCLUDE) $(CFLAGS) konwerter.cc
+czyt_zapis.o: czyt_zapis.cc czyt_zapis.h
+ $(CC) -c -I$(INCLUDE) $(CFLAGS) czyt_zapis.cc
+num_na_etyk.o: num_na_etyk.cc num_na_etyk.h
+ $(CC) -c -I$(INCLUDE) $(CFLAGS) num_na_etyk.cc
+prz_string.o: prz_string.cc prz_string.h
+ $(CC) -c -I$(INCLUDE) $(CFLAGS) prz_string.cc
+operacje_na_tex.o: operacje_na_tex.cc operacje_na_tex.h
+ $(CC) -c -I$(INCLUDE) $(CFLAGS) operacje_na_tex.cc
+system_zapisu.o: system_zapisu.cc system_zapisu.h
+ $(CC) -c -I$(INCLUDE) $(CFLAGS) system_zapisu.cc
+clean:
+ -rm *.o konwerter
+install: konwerter
+ cp konwerter $(DESTDIR)
+ ln -s $(DESTDIR)/konwerter $(DESTDIR)/etykietuj
diff --git a/support/konwerter/README b/support/konwerter/README
new file mode 100644
index 0000000000..5b13e4645b
--- /dev/null
+++ b/support/konwerter/README
@@ -0,0 +1,263 @@
+Konwerter-0.2.4
+
+INTRODUCTION
+
+Quite often during writing longer texts using a wonderful high-quality typesetting
+program called LaTeX, there appears necessity to include pictures
+containing objects which should be numbered and additionally, should be called (reffered) in
+the text using these numbers. Such a situation is typical for chemical
+publications, which contain many chemical schemes with many compounds
+in every of them. Up to now, the author of the publication had to number
+every object (formula) manually which was both time consuming and unpleasant
+work. Consider, what would happened if at the end of writing it is
+necessary to add a new compound just at the beginning of a document. If you are
+lucky you can add any letter index at the number, but in the worst case you
+have to renumber all the schemes.
+
+The konwerter program solves this problem. Using it one doesn't
+number any object in graphics anymore, but gives them names
+called labels. These labels are used instead of numbers, both in a text
+and in figures. When the text is ready, the start-up of the konwerter program
+on the main tex file will just replace all labels with proper numbers both in
+the graphics and in the text. The numbers order depends on the order of labels in
+the graphic files. The label which appeared earlier will have lower number. User has a
+possibility to use five types of numbering:
+- Arabic numbers
+- small Roman numbers
+- capital Roman numbers
+- small letters
+- capital letters
+
+All these types of numbers can be used at the same time in a
+document. Additionally there can appeared letter indexes (e.g.
+1a, 2b, 3a etc) but they are not set automatically. This is author
+who decides how the index looks like by creating the label in a
+special way.
+
+The converter program supports only graphics in eps format. See
+the compatibility list.
+
+WHAT IS NECESSARY FOR COMPILATION
+
+GNU make
+g++ in version 3.0 or higher
+
+COMPILATION
+
+Compilation doesn't differ from a typical compilation for the unix
+systems. The first step is the edition of Makefile, in which one must
+set the DESTDIR variable. This variable shows where will the program
+be installed. By default it is /usr/local/bin and that is the place
+the program will be installed. After edition, the program should be
+compiled and installed using below commands (the second one, may
+require the superuser privileges):
+
+1. make
+2. make install
+
+HOW DOES IT WORK
+
+The konwerter program reads the tex file and searches there for graphics in
+the eps format. When any is found the next step is to look for any labels
+in the eps file. The labels are queued in a special quie and then changed to numbers.
+The second step of working is to replace all labels in a tex file. As a result
+of work a new file name.tex.auto.tex will be produced, which should be
+compiled with LaTeX once again. After that the dvi file is formed
+in which all labels are already replaced with numbers both in the text and
+graphics. It is necessary to know that during label changing process
+the eps files are also changed (the tex file stays unchanged). One can
+restore the original eps files by running the konwerter with the proper
+option on the original tex file.
+
+*********************************************************************
+IT IS STRONGLY RECOMMENDED TO DO A BACKUP COPY OF ALL FILES BEFORE THE
+USAGE OF THE KONWERTER PROGRAM.
+*********************************************************************
+
+PROGRAM USAGE
+
+The konwerter program needs a special constructed labels in eps
+files. The labels can contain any letters from the English
+alphabet and the numbers. The underline "_" is not allowed because
+it is special character for LaTeX. The dot, semicolon and colon are
+also not allowed because they have some special meaning for konwerter.
+The label can have up to 200 letters.
+
+Each label may start from a construction which controls a way
+of numbering. The lack of this construction will result in default numbering
+style. There exist five controlling constructions.
+:r - small Roman numbers
+:R - big Roman numbers
+:a - Arabic numbers
+:l - small letters
+:L - big letters
+
+Quite often chemists use letter indexes with numbers for example:
+1a, 1b, 1c etc. The konwerter program also helps the author to make
+above numbers. To get such a result it is enough to add the dot
+at the end of label and then a letter. It is not allowed to put two
+letters after the dot because the program will not
+recognize it as an index.
+
+THE EPS FILES PREPARING
+
+In the eps file every object to be numbered should be
+labeled in the following way:
+
+?et{label_name;number}
+
+- label_name - any label prepared in the way described above
+- number - any number higher than zero. The existence of this
+parameter needs small explanation. The eps files are red
+by konwerter line by line. Because of that the labels can appeared not in
+a proper order. To prevent such a situation each label in the eps should
+conain this number. When the konwerter program finds two labels
+?et{label1;1} and ?et{label2;2} it will just know, that label1 should have
+lower number that label2. The author of the eps file knows the order, the program
+doesn't - therefore it needs these parameters. If you forget to add the number,
+it will be set to 0 automatically. Please avoid putting two the same numbers
+in one figure (they can be the same in different figures) because it will
+results in errors during numbering. A few example of the proper labels are presented below:
+?et{benzene;1} - the default numbering style will be used
+?et{:Rbenzene;2} -the big Roman numbering style will be used
+?et{:rbenzene;3} - the small Roman numbering style will be used
+?et{:rbenzene.a;4} - the same number as above will be used, but
+ additionally the index 'a' will be given
+ for example: iva.
+?et{hexane.a;5} - the default numbering style will be used, and
+ additionally the index 'a' will be used, for example: 2a
+ or 4a.
+
+It is important to remember that the labels: :Rbenzene and :benzene
+are totally different and they will receive different
+number. Additionally, in case of such 2 labels: ?et{hexane.a;1} and
+?et{hexane;2} both labels will receive the same number, but the first one will
+recive the 'a' index. In this case it will be as follows: 2a and 2.
+
+THE LaTeX FILES
+
+The tex files also need a proper handling. Because not all the eps files
+contain labels and because in LaTeX doesn't exist one general method
+for pictures including, the konwerter program searches in the tex
+code for the instruction which tells in which file the labels
+should be searched for. To inform the konwerter where are labels below
+construction should be used:
+
+%?plik{filename}
+
+As one can see this is a comment in LaTeX file. The construction
+should always start from a new line. After konwerter finds such a line it
+will search for the labels in file called filename.
+
+It is worth to notice that the file named 'filename' doesn't need to be a
+real eps file. It can be any text file containing the labels prepared
+as above written.
+
+To call the label in the tex file, the special command should be
+created (the \newcommand command). By default it is \nrzw{label}, but this can
+be changed using the command line parameter. The \nrzw{label}
+construction doesn't need to start from the beginning of the line, it
+can be placed at any position. It allows us to write without thinking
+where the line should be broken (that is finally TeX business). The label
+should be the same as in eps file after semicolon and the number
+removing. Let us consider below example.
+
+If in the eps file below labels are present:
+
+?et{benzene.a;1}
+?et{:Rtoluene;2}
+?et{:rxylene;3}
+?et{benzene.b}
+
+in the tex file we should place: \nrzw{benzene.a},
+\nrzw{:Rtoluene},\nrzw{:rxylene}, \nrzw{benzene.b}. If additionally in
+the tex file we placed \nrzw{benzene} it also will be given a number
+- the same as for the 'benzene.b'. That is the result of program
+project, and according to the author, that is correct.
+
+After processing is done a new file filename.tex.auto.tex is
+produced, in which all the above labels will be changed to numbers.
+The filename.tex.auto.tex should be once again compiled with LaTeX to get dvi file.
+
+The konwerter program changes also labels to numbers in eps
+file. To restore the original eps files run the konwerter with
+the -ntl option, or using name etykietuj on the main tex file.
+
+ The konwerter program recognizes the LaTeX \input{} command which
+allows us to process documents that contained many files.
+
+It is sometimes necessary to start numbering from the beginning
+for some part of the text (for example in the new
+chapter). The konwerter program supports such a situation. To get such
+result it is enough to include in tex file one of the below
+instruction:
+
+%--set-r-to a
+%--set-R-to a
+%--set-a-to a
+%--set-l-to a
+%--set-L-to a
+
+These commands results in setting the counter for small Roman number,
+capital Roman numbers, Arabic numbers, small letters and capital
+letters to the number a. The a, should be a number for each of
+the numbering style. These command should start from the new line.
+Examples:
+%--set-R-to 12 - setting the counter for capital Roman numbers to 12
+%--set-a-to 21 - setting the counter for Arabic numbers to 21
+
+It could be sometimes useful to use another numbering style in a new chapter.
+The konwerter program supports also this feature. It is enough to place in the
+tex file below command:
+%--set-d-to K,
+where K could be: r, R, a, l, L. Beginning from this line, the default numbering
+style for new labels will be set to K.
+
+It is worth to notice that the new settings, given by above commands, will
+concern only new labels. The old ones will have the same numbers.
+
+THE LANGUAGE AND THE COMMAND LINE PARAMETERS
+
+The konwerter program supports at present two languages: English (default) and
+Polish. It also recognizes the LANG environment variable. If it is set to pl_PL,
+the konwerter will speak in polish, otherwise English will be used as default.
+Type konwerter -l en -h to see the possible parameters with short characteristic.
+
+COMPATIBILITY LIST
+The konwerter is known to work with eps files produced by:
+1) ChemDraw from ChemOffice package
+2) Xfig - vector drawing program for linux
+3) chemtool - chemical drawing software for linux
+4) BKchem - chemical drawing software for linux.
+
+EXAMPLES
+
+The program konwerter recognizes the name using which it was run.
+The konwerter name is equal to the -ltn parameter, and the etykietuj
+name is equal to the -ntl parameter.
+
+konwerter -dns R plik.tex - change labels to numbers in plik.tex file
+ using capital Roman numbers as default numbering
+ style.
+
+etykietuj -ltn plik.tex - the same as above
+
+konwerter -ntl plik.tex - change numbers to labels in eps files mentioned
+ in the plik.tex file
+
+etykietuj plik.tex - the same as above
+
+konwerter -is plik.tex - change labels to numbers in plik.tex file
+ ignoring $--set-counter-to switch
+
+konwerter -if plik.tex - change labels to numbers using default
+ numbering style for all labels. This
+ command ignores :r, :R, :a, :l, :L
+ switches
+
+For more information visit konwerter webpage: http://konwerter.exroot.org
+
+AUTHOR
+Piotr Wawrzyniak wopozka@gmail.com
+In case of any questions please contact using above address.
+Have a fun and enjoy my program.
diff --git a/support/konwerter/README.pl b/support/konwerter/README.pl
new file mode 100644
index 0000000000..db541b0476
--- /dev/null
+++ b/support/konwerter/README.pl
@@ -0,0 +1,239 @@
+Konwerter-0.2.4
+
+WSTĘP
+
+ Niejednokrotnie pisząc dłuższe teksty przy wykorzystaniu doskonałego
+systemu składu tekstu, którym jest LaTeX, pojawiała się potrzeba dodania
+do tekstu rysunków, zawierających obiekty, które wymagały odwoływania się
+do nich w tekście dokumentu poprzez numerek. Wiązało się to z koniecznością
+ręcznego ich numerowania, gdyż LaTeX, nie posiada mechanizmu
+umożliwiającego zautomatyzowanie tej czynności. Taka metoda pracy
+powodowała, że każde dodanie nowego obrazka pociągało za sobą konieczność
+przenumerowywania wszystkich pozostałych. Przysparzało to autorowi
+dużo pracy, oraz było bardzo czasochłonnym zajęciem.
+
+ Program konwerter rozwiązuje ten problem. Używając go, nie numerujesz
+obiektów na obrazkach, tylko je nazywasz. Również w tekście odnosisz się
+do nich poprzez nazwę. Gdy tekst jest gotowy, uruchomienie programu
+konwerter spowoduje zamianę nazw (zwanych dalej etykietkami) na numerki,
+zarówno w plikach eps, jak i w tekście. Numery są nadawane w zależności
+od kolejności pojawiania się w plikach eps, a do dyspozycji użytkownik
+ma 5 typów numeracji:
+- cyfry arabskie
+- cyfry rzymskie małe
+- cyfry rzymskie wielkie
+- literki małe
+- literki wielkie
+
+ Wszystkie te typy numeracji, można jednocześnie używać w jednym dokumencie.
+Dodatkowo mogą się pojawić indeksy literowe na przykład: 1a, 2b, Ia itd,
+lecz nie są one ustawiane automatycznie. O tym co będzie indeksem, decyduje
+autor tekstu.
+
+ Program pracuje tylko i wyłącznie na plikach eps. Jednak nie wszystkie
+programy produkują odpowiedni plik graficzny. Zobacz listę wspieranych
+programów, aby sprawdzić które działają.
+
+WYMAGANIA DO KOMPILACJI
+
+GNU make
+g++ w wersji 3.0 i wyższej
+
+KOMPILACJA
+
+ Kompilacja wygląda identycznie jak dla wszystkich systemów uniksowych.
+Pierwszym etapem będzie edycja pliku Makefile, w którym należy ustawić
+zmienną DESTDIR na katalog, do którego chcemy zainstalować program.
+Domyślnie jest to /usr/local/bin i jeśli nic nie zmienimy, to tam
+właśnie program zostanie zainstalowany. Po edycji należy skompilować
+zainstalować program przy pomocy poniższych komend (druga komenda,
+w zależności od DESTDIR, może wymagać uprawnień superużytkownika):
+
+1. make
+2. make install
+
+DZIAŁANIE
+
+ Program czyta plik tex, w poszukiwaniu grafik eps. W razie znalezienia
+takowej, jest ona przeszukiwana w celu znalezienia etykiet. Etykiety te
+są kolejkowane, a następnie zamieniane na numerki. Drugim etapem jest zamiana
+etykiet w pliku texowym. Użytkownik jako wynik dostaje plik nazwa.tex.auto,
+który trzeba ponownie skompilować latexem. Po tej operacji dostajemy plik
+wynikowy dvi, w którym etykiety powinny być już pozamieniane na numerki,
+zarówno w plikach eps, jak i w pliku tex. Należy zauważyć, że o ile oryginalny
+plik tex, nie jest zmieniany, o tyle pliki eps tak. Można bez problemu
+przywrócić oryginalną formę plikom eps, uruchamiając konwerter z odpowiednią
+opcją na oryginalnym pliku tex.
+
+UŻYCIE PROGRAMU
+
+ Prawidłowe działanie programu wymaga pojawienia się w plikach eps odpowiednio
+zbudowanych etykiet. Mogą one zawierać dowolne litery języka angielskiego oraz
+cyfry. Niedozwolone jest użycie kropki, średnika i dwukropka gdyż są one
+wykorzystywane w innym celu. Użycie podkreślenia "_" również nie jest wskazane
+gdyż ma on specjalne znaczenie dla LaTeXa. Nie powinno również
+powodować błędów użycie polskich liter lecz nie jest to zalecane.
+Etykieta może mieć do 200 znaków.
+
+ Każda etykieta powinna się zaczynać konstrukcją sterującą, informującą
+o sposobie jej numerowania. Brak takiej konstrukcji, powoduje że etykieta
+zostaje automatycznie ponumerowana w sposób domyślny. Istnieje pięć
+konstrukcji sterujących:
+:r - małe liczby rzymskie
+:R - wielkie liczby rzymskie
+:a - liczby arabskie
+:l - małe literki
+:L - duże literki
+ Często stosowaną metodą numerowania jest dodawanie indeksów literowych do
+liczb np. 1a, 1b, 1c itd. Konwerter również w znacznym stopniu pomaga tworzyć
+takie numerki. Aby to uzyskać, wystarczy że do etykietki dodasz na końcu kropkę,
+a po kropce literę, która tam powinna się znaleźć. Niedozwolone jest
+występowanie po kropce dwóch znaków, gdyż wtedy program nie potraktuje
+tego jako indeksu literowego.
+
+PRZYGOTOWANIE PLIKÓW EPS:
+
+ W schemacie każdy obiekt podpisujemy etykietą w następujący sposób:
+
+?et{etykieta;numer}
+
+- etykieta - dowolna etykieta stworzona według opisu powyżej;
+- numer-(dowolna liczba większa od zera).
+ Ponieważ plik eps jest czytany sekwencyjnie i etykiety niekoniecznie
+będą się pojawiać w odpowiedniej kolejności, konieczne jest ich ponumerowanie
+w pliku eps. Dzięki temu zostanie zachowana odpowiednia kolejność.
+Numery nie muszą być kolejnymi liczbami. Brak numeru spowoduje błędne
+numerowanie etykiet. Numery mogą się powtarzać ale również może to spowodować
+błędy.
+Przykład użycia
+?et{benzen;1} - użyty zostanie domyślny styl numerowania
+?et{:Rbenzen;2} - użyty zostanie styl numerowania wielkimi liczbami rzymskimi
+?et{:rbenzen;3} - użyty zostanie styl numerowania małymi liczbami rzymskimi
+?et{:rbenzen.a;4} - użyty zostanie ten sam numer co dla etykiety powyższej
+ lecz, dodatkowo zostanie dodana literka a np. ia, iia itd.
+?et{heksan.a;5} - użyty zostanie domyślny styl numerowania i dodatkowo przy
+ numerku pojawi się literka a np. 2a, 2b
+
+ Ważne jest aby pamiętać, że dla programu etykiety :Rbenzen oraz :rbenzen to
+dwie różne etykiety i będą im przydzielone różne numerki, oraz że w przypadku
+pojawienia się etykiet ?et{heksan.a;1} i ?et{heksan;2} w jednym bądź wielu
+pliku eps, obie dostaną ten sam numerek, tyle że pierwsza dodatkowo indeks
+a - czyli w tym przypadku będzie to: 2a i 2.
+
+PLIKI LaTeX
+
+ Pliki tex też wymagają dopowiedniego przygotowania. Ponieważ nie wszystkie
+pliki eps zawierają etykietki oraz z powodu tego, że w LaTeX nie ma jednej
+metody załączania rysunków do tekstu, konwerter wyszukuje w kodzie tex,
+instrukcji nakazującej mu przeszukanie pliku. Aby wskazać mu plik eps
+zawierający etykietki należy użyć konstrukcji:
+%?plik{nazwa_pliku}
+
+ Jest to komentarz dla LaTeXa i nie zostanie on wyświetlony nigdzie w tekście.
+Instrukcji tej nie mogą poprzedzać żadne inne znaki, musi to być pierwszy tekst
+w nowej linijce. Po znalezieniu tego, program konwerter będzie przeszukiwał plik
+nazwa_pliku w poszukiwaniu etykiet.
+
+ Warto zaznaczyć, że polecenie %?plik{nazwa_pliku} nie musi się odnosić
+koniecznie do pliku eps. Może to być dowolny plik tekstowy, zawierający
+odpowiednio zbudowane etykietki (patrz przygotowanie etykiet). Umożliwia nam
+to pośrednie sterowanie numeracją.
+
+ Aby odwoływać się w tekście do etykiet należy stworzyć odpowiednie polecenie.
+(\newcommand). Domyślnie jest to \nrzw{etykietka}, lecz może być to zmienione,
+poprzez użycie odpowiedniej opcji wywołania programu (patrz OPCJE WYWOŁANIA
+PROGRAMU). Konstrukcja \nrzw{etykietka} może pojawić się w dowolnym miejscu
+w linijce tekstu i nie musi być pierwszą w danym wierszu. Pozwala to na
+swobodne pisanie, bez zwracania uwagi na formatowanie (w końcu to TeX powinien
+za nas to zrobić). Etykieta ma postać dokładnie taką samą jak w pliku eps, po
+odrzuceniu numerka po średniku i samego średnika. Załóżmy na przykład że w plik
+eps wygląda następująco:
+?et{benzen.a;1}
+?et{:Rtoluen;2}
+?et{:rksylen;3}
+?et{benzen.b},
+to w tekście dokumentu należy umieścić: \nrzw{benzen.a}, \nrzw{:Rtoluen},
+\nrzw{:rksylen}, \nrzw{benzen.b}. Jeśli umieścimi dodatkowo w tekście
+\nrzw{benzen}, to również zostanie to ponumerowane, pomimo że w plikach eps
+jak do tej pory się to nie pojawiło(będzie miało ten sam numerek co etykietki
+benzen.a i benzen.b, tylko bez indeksu literowego). Wynika to ze sposobu
+działania programu i według autora jest to poprawne.
+
+ Po przetworzeniu pliku o nazwie plik.tex programem konwerter otrzymamy
+nowy plik o nazwie plik.tex.auto w którym powyższe etykiety zostaną zamienione
+na np: związek \nrzw{3} reaguje z \nrzw{4} dając... Plik plik.tex.auto należy
+przetworzyć ponownie programem latex.
+
+ Program konwerter rozpoznaje polecenie LaTeXowe \input{}, dzięki czemu możliwe
+jest przetwarzanie dokumentów składających się z wielu plików.
+
+ Czasami może być niezbędne aby, od jakiegoś miejsca w tekście (na przykład
+nowy rozdział) rozpocząć numerację od nowa. Program konwerter umożliwia i to.
+W tym celu wystarczy w pliku tex umieścić jedną z poniższych instrukcji:
+%--set-r-to a
+%--set-R-to a
+%--set-a-to a
+%--set-l-to a
+%--set-L-to a
+Spowodują one ustawienie licznika dla odpowiednio liczba rzymskich małych
+i wielkich, liczb arabskich oraz liter małych i wielkich na liczbą a. "a"
+musi być liczbą, czyli dla %--set-l-to i %--set-L-to również musi się pojawić
+liczba. O ile będzie to potrzebne, zostanie dodana możliwość ustwiania liczników
+dla liter w postaci liter. Przykłady użycia
+%--set-R-to 12 - ustawienie licznika wielkich cyfr rzymskich na 12
+%--set-a-to 21 - ustawienie licznika liczb arabskich na 21
+Powyższe instrukcje muszą zaczynać się od nowej linijki.
+ Czasami podczas pisania, może pojawić się konieczność zmiany
+domyślnego stylu numeracji, dla danego rozdziału. Konwerter wspiera
+również tę opcję. W tym celu wystarczy w pliku źródłowym tex umieścić
+polecenie:
+%--set-d-to K,
+gdzie K może być: r, R, a, l, L. Warto również zaznaczyć, że opcje te
+działają tylko na nowe etykiety. Etykiety, które pojawiły się już
+wcześniej, będą miały poprzedni numer.
+
+JĘZYK I OPCJE WYWOŁANIA PROGRAMU
+ Program konwerter obsługuje obecnie dwa języki: angielski
+(domyślnie) i polski. Język ustawiany na podstawie zmiennej
+środowiskowej LANG. Jeśli jest ona ustawiona na pl_PL, program będzie
+mówił po polsku, w przeciwnym wypadku językiem komunikatów będzie
+angielski.
+ Wpisz konwerter --help, aby zobaczyć opcje wraz z krótką charakterystyką.
+
+WSPIERANE PROGRAMY
+1) ChemDraw z pakietu ChemOffice.
+2) Xfig - program do grafiki wektorowej dla linuksa.
+3) Chemtool - program do rysowania wzorów chemicznych dla linuksa.
+4) BKchem - program do rysowania wzorów chemicznych dla linuksa.
+
+PRZYKŁADOWE UŻYCIE
+
+ Program rozpoznaje z jaką nazwą został wywołany. Wywołanie nazwą konwerter
+jest równoznaczne z wywołaniem: konwerter -ltn, natomiast wywołanie etykietuj
+jest równoznaczne z: konwerter -ntl. Oto kilka przykładów użycia:
+
+konwerter -dns R plik.tex - zamień etykiety na numery w pliku plik.tex
+ i wymienionych w nim plikach eps, stosując
+ jako domyślny styl numeracji cyfry rzymskie
+ wielkie.
+
+etykietuj -ltn -dns R plik.tex - j.w.
+
+konwerter -ntl plik.tex - zamień numery na etykiety w plikach eps
+ wymienionych w pliku plik.tex
+
+etykietuj plik.tex - j.w.
+
+konwerter -is plik.tex - zamień etykiety na numerki ignorując wystąpienia
+ $--set-counter-to
+
+konwerter -if plik.tex - zamień etykietki na numerki stosując domyślny
+ styl numeracji dla wszystkich etykiet.
+
+Aby uzyskać więcej informacji odwiedź stronę domową konwertera:
+http://piti.vsv.pl/konwerter/
+
+AUTOR
+Piotr Wawrzyniak piti@piti.vsv.pl
+W razie pytań proszę kontaktować się na powyższy adres.
+Miłego użytkowania.
diff --git a/support/konwerter/TODO b/support/konwerter/TODO
new file mode 100644
index 0000000000..0efba83309
--- /dev/null
+++ b/support/konwerter/TODO
@@ -0,0 +1,3 @@
+Umożliwić numerowanie według kolejności pojawiania się etykiet w tekście
+Co z portem na windows?
+umożliwić numerowanie z przedrostkiem dla numeru rozdziału, na przykład 1:1, 1:2 jak latexowe numery rysunków i tabel
diff --git a/support/konwerter/ZMIANY b/support/konwerter/ZMIANY
new file mode 100644
index 0000000000..3dcdcc15fb
--- /dev/null
+++ b/support/konwerter/ZMIANY
@@ -0,0 +1,36 @@
+0.2.4
+- Teraz ignorowane są białe znaki przed %?plik{
+0.2.3
+- Poprawiony błąd związany z popsutymi plikami eps, teraz wyświetla ifnormację
+- Poprawione numerowanie cyframi rzymskimi
+0.2.2
+- Dodana opcja --test która nie zmienia nic, tylko testuje poprawność etykiet
+- Uaktualnienie emaili i poprawki literówek
+0.2.1
+- Pełna obsługa języków. Teraz program mówi albo po polsku albo po angielsku.
+- Uwzględnianie zmiennej systemowej LANG.
+- Domyślny język angielski.
+- Poprawienie analizy wiersza poleceń.
+- Zamiana domyślnie tworzonego pliku na nazwa.tex.auto.tex.
+- Dodanie nowego przełącznika z poziomu pliku tex --set-d-to
+0.2.0
+- Obsługa języka angielskiego i polskiego jednocześnie.
+- Obsługa wielu sposobów numerowania jednocześnie.
+- Ustawianie liczników z poziomu dokumentu tex.
+- Nowe parametry wiersza poleceń.
+0.1.2
+- Dopisanie angielskich komentarzy i paru po polsku.
+- Usunięcie definicji DL_SCIEZKI do niczego nie potrzebnej w tym momencie.
+- Poprawienie pracy na stringach. Wyeliminowanie możliwości nadpisywania
+ innych zmiennych, co się często zdarzało i powodowało w najlepszym przypadku
+ naruszenie ochrony pamięci.
+- Usunięcie możliwości przepełnienia bufora przy podawaniu polecenia opcją -ln.
+- Umożliwienie kompilacji gcc w wersji >=3 bez komunikatu o błędach.
+- Zdefiniowanie stałej version.
+- Poprawienie błędów ortograficznych.
+0.1.1
+- Poprawienie procedury czytania z pliku latexowego (plik czyt_zapis.cc).
+ Teraz program prawidłowo odczytuje pliki do końca, czego wcześniej
+ potrafił nie robić.
+- Dostosowanie programu do kompilacji kompilatorem gcc z serii 3.
+- Dwie poprawki w pliku operacje.cc.
diff --git a/support/konwerter/czyt_zapis.cc b/support/konwerter/czyt_zapis.cc
new file mode 100644
index 0000000000..cfa797f525
--- /dev/null
+++ b/support/konwerter/czyt_zapis.cc
@@ -0,0 +1,161 @@
+/*
+Copyright (C) 2005 Piotr Wawrzyniak (piti@piti.vsv.pl)
+
+
+Tutaj zawarte są procedury odpowiedzialne za wczytanie lini z pliku
+eps (wczytaj_linie) i pliku tex (wczytaj_linie_tex).
+
+Here there are procedures that read line from eps file (wczytaj_linie)
+and tex file (wczytaj_linie_tex)
+
+*/
+#include"czyt_zapis.h"
+extern int debug_level;
+extern int language;
+int liczsobie;
+
+int wczytaj_linie(char *linia,int *dlugosc, int DL_WIERSZA, ifstream &czyt)
+{
+ //miejmy pewność że linia jest jednak naprawde wyzerowana
+ for(liczsobie=0;liczsobie<DL_WIERSZA;liczsobie++)
+ {
+ linia[liczsobie]='\0';
+ }
+
+
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"**********************************"<<endl;
+ cout<<"Funkcjon wczytaj_linie"<<endl;
+ }
+ else
+ {
+ cout<<"**********************************"<<endl;
+ cout<<"Function wczytaj_linie"<<endl;
+ }
+ }
+ char pomocnicza[DL_WIERSZA],c;
+ pomocnicza[0]=pomocnicza[1]=pomocnicza[2]='\0';
+ int licznik=0;
+ // if(czyt.eof())return 1;
+ //if(czyt) cout<<"Nie moge znale~~ pliku"<<endl;
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Czytam z pliku z pozycji "<<endl<<czyt.tellg()<<endl;
+ }
+ else
+ {
+ cout<<"I am reading from file at the position: "<<czyt.tellg()<<endl;
+ }
+ }
+ do
+ {
+ if(!czyt.get(c))
+ return 1;
+ else
+ pomocnicza[licznik++]=c;
+ pomocnicza[licznik]='\0';
+ }
+
+ while((c!='\n')&&(c!=EOF)&&(licznik<(DL_WIERSZA-17)));
+
+ *dlugosc=licznik;
+ strcpy(linia,pomocnicza);
+ linia[licznik]='\0';
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Linia została przeczytana. Pozycja w pliku: "
+ <<(czyt.tellg())<<endl
+ <<"Przeczytana linia: "<<linia<<endl
+ <<"Koniec funkcji czytającej linie."<<endl
+ <<"==========================================";
+
+ }
+ else
+ {
+ cout<<"The line is now read. The position in the file: "
+ <<(czyt.tellg())<<endl
+ <<"The read line: "<<linia<<endl
+ <<"End of reading line function."<<endl
+ <<"==========================================";
+ }
+ }
+ return 0;
+}
+
+int wczytaj_linie_tex(char *linia,int *dlugosc, int dl_WIERSZA, ifstream &czyt)
+{
+ char pomocnicza[dl_WIERSZA],c[2],b[2];
+ int licznik=0;
+
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"*************************************************"<<endl
+ <<"Funkcja wczytaj_linie_tex"<<endl;
+ }
+ else
+ {
+ cout<<"*************************************************"<<endl
+ <<"Function wczytaj_linie_tex"<<endl;
+ }
+ }
+ //wczytaj pierwszy znak ewentualnie może to być koniec pliku
+ if(!czyt.get(c[0]))
+ return 1;
+ else
+ {
+ pomocnicza[licznik++]=c[0];
+ pomocnicza[licznik]='\0';
+ }
+ int czy_skonczyc=1;
+ do
+ {
+ if(!czyt.get(c[0]))
+ return 1;
+ else
+ {
+ pomocnicza[licznik++]=c[0];
+ pomocnicza[licznik]='\0';
+ }
+ if (c[0]=='\\')
+ {
+ czy_skonczyc=0;
+ licznik--;
+ czyt.seekg(-1,ios::cur);
+ }
+ //char b[2] ;
+ if(!czyt.get(b[0]))
+ czy_skonczyc=0;
+ else
+ czyt.seekg(-1,ios::cur);
+ }
+
+ while((c[0]!='\n')&&(licznik<(dl_WIERSZA-17))&&czy_skonczyc);
+ *dlugosc=licznik;
+ strcpy(linia,pomocnicza);
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Przeczytana linia w pliku TeX: "<<linia<<endl
+ <<"Koniec funkcji wczytaj_linie_tex"<<endl
+ <<"==========================================="<<endl;
+ }
+ else
+ {
+ cout<<"Read line in TeX file: "<<linia<<endl
+ <<"The end of the wczytaj_linie_tex function"<<endl
+ <<"==========================================="<<endl;
+ }
+ }
+ linia[licznik]='\0';
+ return 0;
+}
diff --git a/support/konwerter/czyt_zapis.h b/support/konwerter/czyt_zapis.h
new file mode 100644
index 0000000000..db4a68ec12
--- /dev/null
+++ b/support/konwerter/czyt_zapis.h
@@ -0,0 +1,11 @@
+#ifndef czyt_zapis
+#define czyt_zapis
+
+#include<iostream>
+#include<fstream>
+#include<string.h>
+using namespace std;
+int wczytaj_linie(char *,int *, int, ifstream &);
+int wczytaj_linie_tex(char *,int *, int, ifstream &);
+
+#endif
diff --git a/support/konwerter/dl_wiersza.h b/support/konwerter/dl_wiersza.h
new file mode 100644
index 0000000000..343b6e7d9a
--- /dev/null
+++ b/support/konwerter/dl_wiersza.h
@@ -0,0 +1,32 @@
+#ifndef DL_L
+#define DL_L
+
+#define DL_WIERSZA 256
+#endif
+
+#ifndef KOL_W_EPS
+#define KOL_W_EPS
+
+class kol_etykiet
+{
+ public:
+ int kolejny_numer;
+ char kolejny_numer_string[DL_WIERSZA];
+ char etykieta[DL_WIERSZA];
+ kol_etykiet*nast;
+ kol_etykiet(void)
+ {
+ nast=NULL;
+ int a;
+ for(a=0;a<DL_WIERSZA;a++)
+ {
+ kolejny_numer_string[a]='\0';
+ etykieta[a]='\0';
+
+ }
+ }
+
+};
+
+#endif
+
diff --git a/support/konwerter/konwerter.cc b/support/konwerter/konwerter.cc
new file mode 100644
index 0000000000..bad948b136
--- /dev/null
+++ b/support/konwerter/konwerter.cc
@@ -0,0 +1,796 @@
+
+ /***************************************************************************
+ * *
+ * Copyright (C) 2005 Piotr Wawrzyniak (piti@piti.vsv.pl) *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+/*
+ Tutaj tylko analizuję linie poleceń i sprawdzam co należy zrobić ponumerować czy
+ wrócić do etykiet.
+
+ Here I analyze only commandline and check what is to do.
+*/
+
+#include<string.h>
+#include"operacje.h"
+#include"dl_wiersza.h"
+#include<stdlib.h>
+#include"operacje_na_tex.h"
+#include"system_zapisu.h"
+#define Def_version "0.2.4 (04.01.2008)"
+#define Def_email "wopozka@gmail.com"
+
+kol_etykiet*wierzcholek;
+
+r_numerow klasa_obslugi_etykiet(1,1,1,1,1);
+
+char numer_czy_etykieta='n';
+int zacznij_numery_od=1;
+char polecenie[DL_WIERSZA]; //what latex command will be use for label inserting
+int language=1; //language 0 - polish; 1 - english
+
+int srf=1;
+int sRf=1;
+int saf=1;
+int slf=1;
+int sLf=1;
+int dns=2;
+int test=0;
+int debug_level=0;
+int ignore_set_counter_to=0;
+int ignore_formating=0;
+int help=0;
+int version=0;
+
+void pomoc(); //help function declaration
+
+int main(int argc,char *argv[])
+{
+ char **env=environ;
+
+ while(*env)
+ {
+ if(!strncmp(*env,"LANG=pl_PL",10))
+ {
+ language=0;
+ break;
+ }
+ env++;
+ }
+
+
+ if(argc<2)
+ {
+ pomoc();
+ return 1;
+ }
+ strcpy(polecenie,"\\nrzw{");//Initialization command default is \nrzw
+ if(!strcmp(argv[0],"konwerter"))numer_czy_etykieta='n';
+ if(!strcmp(argv[0],"etykietuj"))numer_czy_etykieta='e';
+ int i;
+
+ //============================================================================
+ //Command line analyzing
+ for (i=1;i<argc&&argv[i][0]=='-';i++)
+ {
+ if(argv[i][0]=='-')
+ {
+ //Paremeters without argument
+
+ int czy_znalazlem=0;
+
+ if(!strcmp(argv[i],"-ltn")){numer_czy_etykieta='n';czy_znalazlem=1;}
+
+ if(!strcmp(argv[i],"-ntl")){numer_czy_etykieta='e';czy_znalazlem=1;}
+
+ if(!strcmp(argv[i],"--labels-to-numbers")){numer_czy_etykieta='n';czy_znalazlem=1;}
+
+ if(!strcmp(argv[i],"--numbers-to-labels")){numer_czy_etykieta='e';czy_znalazlem=1;}
+
+ if(!strcmp(argv[i],"-v")){debug_level=1;czy_znalazlem=1;}
+
+ if(!strcmp(argv[i],"--verbose")){debug_level=1;czy_znalazlem=1;}
+
+ if(!strcmp(argv[i],"-is")){ignore_set_counter_to=1;czy_znalazlem=1;}
+
+ if(!strcmp(argv[i],"--ignore-switches")){ignore_set_counter_to=1;czy_znalazlem=1;}
+
+ if(!strcmp(argv[i],"-if")){ignore_formating=1;czy_znalazlem=1;}
+
+ if(!strcmp(argv[i],"--ignore-formating")){ignore_formating=1;czy_znalazlem=1;}
+
+ if(!strcmp(argv[i],"-h")||!strcmp(argv[i],"--help")){help=1;czy_znalazlem=1;}
+
+ if(!strcmp(argv[i],"-t")||!strcmp(argv[i],"--test")){test=1;czy_znalazlem=1;}
+
+ if(!strcmp(argv[i],"--version")){version=1;czy_znalazlem=1;}
+
+
+ //**************************************************************;
+ //Parameters with argument;
+ //Start roman from analyzis;
+ if(!strcmp(argv[i],"-srf"))
+ {
+ i++;czy_znalazlem=1;
+ if(i<argc)srf=atoi(argv[i]);
+ else
+ {
+ if(language==0)
+ {
+ cout<<"Zły argument."<<endl;
+ }
+ else
+ {
+ cout<<"Wrong parameter."<<endl;
+ }
+ return 1;
+ }
+ if(srf==0)
+ {
+ if(language==0)
+ {
+ cout<<"Zły argument opcji -srf."<<endl;
+ }
+ else
+ {
+ cout<<"Wrong -srf option argument."<<endl;
+ }
+ return 1;
+ }
+ }
+
+ if(!strcmp(argv[i],"--start-roman-from"))
+ {
+ i++;czy_znalazlem=1;
+ if(i<argc)srf=atoi(argv[i]);
+ else
+ {
+ if(language==0)
+ {
+ cout<<"Zły argument."<<endl;
+ }
+ else
+ {
+ cout<<"Wrong parameter."<<endl;
+ }
+ return 1;
+ }
+ if(srf==0)
+ {
+ if(language==0)
+ {
+ cout<<"Zły argument opcji --start-roman-from."<<endl;
+ }
+ else
+ {
+ cout<<"Wrong --start-roman-from option argument."<<endl;
+ }
+ return 1;
+ }
+
+ }
+
+ //************************************************************************;
+ //Start Roman from analyzis;
+
+ if(!strcmp(argv[i],"-sRf"))
+ {
+ i++;czy_znalazlem=1;
+ if(i<argc)sRf=atoi(argv[i]);
+ else
+ {
+ if(language==0)
+ {
+ cout<<"Błąd opcji."<<endl;
+ }
+ else
+ {
+ cout<<"Wrong parameter of option."<<endl;
+ }
+ return 1;
+ }
+ if(srf==0)
+ {
+ if(language==0)
+ {
+ cout<<"Zły argument opcji -sRf."<<endl;
+ }
+ else
+ {
+ cout<<"Wrong -sRf option argument."<<endl;
+ }
+ return 1;
+ }
+ }
+
+ if(!strcmp(argv[i],"--start-Roman-from"))
+ {
+ i++;czy_znalazlem=1;
+ if(i<argc)sRf=atoi(argv[i]);
+ else
+ {
+ if(language==0)
+ {
+ cout<<"Błąd opcji."<<endl;
+ }
+ else
+ {
+ cout<<"Wrong parameter."<<endl;
+ }
+ return 1;
+ }
+ if(srf==0)
+ {
+ if(language==0)
+ {
+ cout<<"Zły argument opcji --start-Roman-from."<<endl;
+ }
+ else
+ {
+ cout<<"Wrong --start-Roman-from option argument."<<endl;
+ }
+ return 1;
+ }
+
+ }
+
+ //*****************************************;
+ //Start arabic from analyzis;
+
+ if(!strcmp(argv[i],"-saf"))
+ {
+ i++;czy_znalazlem=1;
+ if(i<argc)saf=atoi(argv[i]);
+ else
+ {
+ if(language==0)
+ {
+ cout<<"Błąd opcji."<<endl;
+ }
+ else
+ {
+ cout<<"Wrong parameter of option."<<endl;
+ }
+ return 1;
+ }
+ if(saf==0)
+ {
+ if(language==0)
+ {
+ cout<<"Zły argument opcji -saf."<<endl;
+ }
+ else
+ {
+ cout<<"Wrong -srf option argument."<<endl;
+ }
+ return 1;
+ }
+ }
+
+ if(!strcmp(argv[i],"--start-arabic-from"))
+ {
+ i++;czy_znalazlem=1;
+ if(i<argc)saf=atoi(argv[i]);
+ else
+ {
+ if(language==0)
+ {
+ cout<<"Błąd opcji."<<endl;
+ }
+ else
+ {
+ cout<<"Wrong parameter."<<endl;
+ }
+ return 1;
+ }
+ if(srf==0)
+ {
+ if(language==0)
+ {
+ cout<<"Zły argument opcji --start-arabic-from."<<endl;
+ }
+ else
+ {
+ cout<<"Wrong --start-arabic-from option argument."<<endl;
+ }
+ return 1;
+ }
+
+ }
+
+
+ //*****************************************;
+ //Start letter from
+
+ if(!strcmp(argv[i],"-slf"))
+ {
+ i++;czy_znalazlem=1;
+ if(i<argc)slf=atoi(argv[i]);
+ else
+ {
+ if(language==0)
+ {
+ cout<<"Błąd opcji."<<endl;
+ }
+ else
+ cout<<"Wrong parameter of option."<<endl;
+ return 1;
+ }
+ if(slf==0)
+ {
+ if(language==0)
+ cout<<"Zły argument opcji -slf."<<endl;
+ else
+ cout<<"Wrong -slf option argument."<<endl;
+ return 1;
+ }
+ }
+
+ if(!strcmp(argv[i],"--start-letter-from"))
+ {
+ i++;czy_znalazlem=1;
+ if(i<argc)slf=atoi(argv[i]);
+ else
+ {
+ if(language==0)
+ cout<<"Błąd opcji."<<endl;
+ else
+ cout<<"Wrong parameter."<<endl;
+ return 1;
+ }
+ if(slf==0)
+ {
+ if(language==0)
+ cout<<"Zły argument opcji --start-letter-from."<<endl;
+ else
+ cout<<"Wrong --start-letter-from option argument."<<endl;
+ return 1;
+ }
+
+ }
+
+ //*****************************************;
+ //Start Letters from;
+
+ if(!strcmp(argv[i],"-sLf"))
+ {
+ i++;czy_znalazlem=1;
+ if(i<argc)sLf=atoi(argv[i]);
+ else
+ {
+ if(language==0)
+ cout<<"Błąd opcji."<<endl;
+ else
+ cout<<"Wrong parameter of option."<<endl;
+ return 1;
+ }
+ if(sLf==0)
+ {
+ if(language==0)
+ cout<<"Zły argument opcji -sLf."<<endl;
+ else
+ cout<<"Wrong -sLf option argument."<<endl;
+ return 1;
+ }
+ }
+
+ if(!strcmp(argv[i],"--start-Letter-from"))
+ {
+ i++;czy_znalazlem=1;
+ if(i<argc)sLf=atoi(argv[i]);
+ else
+ {
+ if(language==0)
+ cout<<"Błąd opcji."<<endl;
+ else
+ cout<<"Wrong parameter."<<endl;
+ return 1;
+ }
+ if(sLf==0)
+ {
+ if(language==0)
+ cout<<"Zły argument opcji --start-Letter-from."<<endl;
+ else
+ cout<<"Wrong --start-Letter-from option argument."<<endl;
+ return 1;
+ }
+
+ }
+
+ //************************************************************;
+ //Default numbering style - dns
+
+ if(!strcmp(argv[i],"-dns")||!strcmp(argv[i],"--default-numbering-style"))
+ {
+ i++;czy_znalazlem=1;
+ if(i<argc&&strlen(argv[i])==1)
+ {
+ switch(argv[i][0])
+ {
+ case 'r':
+ dns=0;
+ break;
+ case 'R':
+ dns=1;
+ break;
+ case 'a':
+ dns=2;
+ break;
+ case 'l':
+ dns=3;
+ break;
+ case 'L':
+ dns=4;
+ break;
+ default:
+ dns=-1;
+ break;
+ }
+ }
+ else
+ {
+ if(language==0)
+ cout<<"Błąd opcji -dns/--default-numbering-style."<<endl;
+ else
+ cout<<"Wrong parameter of -dns/--default-numbering-style option."<<endl;
+ return 1;
+ }
+ }
+
+
+
+ //*************************************************************;
+ // -ln, --label-name analyzis
+ if(!strcmp(argv[i],"-ln"))
+ {
+ i++;czy_znalazlem=1;
+ if(argv[i][0]=='\\')
+ {
+ if(strlen(argv[i])>DL_WIERSZA-2)
+ {
+ if(language==0)
+ {
+ cout<<"Ha. Nie uda ci się przepełnić tutaj bufora hakerze!"
+ <<endl
+ <<"Polecenie za długie."<<endl;
+ }
+ else
+ cout<<"To long -ln option parameter"<<endl;
+ return 1;
+ }
+ else
+ {strcpy(polecenie,argv[i]);strcat(polecenie,"{");}
+ }
+ else
+ {
+ if(language==0)
+ {
+ cout<<"Jeśli w pliku LaTeX polecenie wygląda \\nrzw"<<endl
+ <<"to opcja -ln musi wyglądać \\\\nrzw"<<endl;
+ }
+ else
+ {
+ cout<<"If in LaTeX file command is \\nrzw"<<endl
+ <<"then option -ln must be \\\\nrzw"<<endl;
+ }
+ return 1;
+ }
+ }
+
+ if(!strcmp(argv[i],"--label-name"))
+ {
+ i++;czy_znalazlem=1;
+ if(argv[i][0]=='\\')
+ {
+ if(strlen(argv[i])>DL_WIERSZA-2)
+ {
+ if(language==0)
+ {
+ cout<<"Ha. Nie uda ci się przepełnić tutaj bufora hakerze!"
+ <<endl
+ <<"Polecenie za długie."<<endl;
+ }
+ else
+ cout<<"argv[i] command to long"<<endl;
+ return 1;
+ }
+ else
+ {strcpy(polecenie,argv[i]);strcat(polecenie,"{");}
+ }
+ else
+ {
+ if(language==0)
+ {
+ cout<<"Jeśli w pliku LaTeX polecenie wygląda \\nrzw"<<endl
+ <<"to opcja --label-name musi wyglądać \\\\nrzw"<<endl;
+ }
+ else
+ {
+ cout<<"If in LaTeX file command is \\nrzw"<<endl
+ <<"then option -ln must be \\\\nrzw"<<endl;
+ }
+ return 1;
+ }
+ }
+
+ //**********************************************************;
+ //language analyzis;
+ if(!strcmp(argv[i],"-l")||!strcmp(argv[i],"--language"))
+ {
+ i++;czy_znalazlem=1;
+
+ if (!strcmp(argv[i],"en")) language=1;
+ if (!strcmp(argv[i],"pl")) language=0;
+
+ }
+
+ if(!czy_znalazlem)
+ {
+ if(language==0)
+ cout<<"Nieznana opcja "<<argv[i]<<endl;
+ else
+ cout<<"Unknown option "<<argv[i]<<endl;
+ return 1;
+
+ }
+ }
+ }
+
+ //*****************************************************;
+
+ if(i<argc)
+
+ if(argv[i][0]=='-')
+ {
+ if(language==0)
+ cout<<"Brakuje argumentu opcji: "<<argv[i]<<endl;
+ else
+ cout<<"Missing option argument: "<<argv[i]<<endl;
+ return 1;
+ }
+
+ if(i>=argc&&!help&&!version)
+ {
+ if(language==0)
+ cout<<"Brak nazwy pliku"<<endl;
+ else
+ cout<<"Missing filename"<<endl;
+ return 1;
+ }
+
+
+ if(srf<=0)
+ {
+ if(language==0)
+ cout<<"Błędna opcja -srf albo --start-roman-from. Numer musi być większy od zera."<<endl;
+ else
+ cout<<"Wrong option -srf or --start-roman-from parametr. Number must be greater than 0."<<endl;
+ return 1;
+ }
+
+ if(sRf<=0)
+ {
+ if(language==0)
+ cout<<"Błędna opcja -sRf albo --start-Roman-from. Numer musi być większy od zera."<<endl;
+ else
+ cout<<"Wrong option -sRf or --start-Roman-from parametr. Number must be greater than 0."<<endl;
+ return 1;
+ }
+
+ if(saf<=0)
+ {
+ if(language==0)
+ cout<<"Błędna opcja -saf albo --start-arabic-from. Numer musi być większy od zera."<<endl;
+ else
+ cout<<"Wrong option -saf or --start-arabic-from parametr. Number must be greater than 0."<<endl;
+ return 1;
+ }
+
+ if(slf<=0)
+ {
+ if(language==0)
+ cout<<"Błędna opcja -slf albo --start-letter-from. Numer musi być większy od zera."<<endl;
+ else
+ cout<<"Wrong option -slf or --start-letter-from parametr. Number must be greater than 0."<<endl;
+ return 1;
+ }
+
+ if(sLf<=0)
+ {
+ if(language==0)
+ cout<<"Błędna opcja -sLf albo --start-Letter-from. Numer musi być większy od zera."<<endl;
+ else
+ cout<<"Wrong option -sLf or --start-Letter-from parametr. Number must be greater than 0."<<endl;
+ return 1;
+ }
+
+ if(dns<=0)
+ {
+ if(language==0)
+ {
+ cout<<"Błędna opcja -dns albo --default-numbering-style "<<endl
+ <<"Dozwolone wartości: r, R, a, l, L"<<endl;
+ }
+ else
+ {
+ cout<<"Wrong option -dns or --default-numbering-style parameter "<<endl
+ <<"Allowed values are: r, R, a, l, L"<<endl;
+ }
+ return 1;
+ }
+
+ //Maybe you would like to see version?
+ if(version)
+ {
+ cout<<"konwerter "<<Def_version<<endl;
+ return 0;
+ }
+
+ //Maybe you nead help if so, give it.
+ if(help)
+ {
+ pomoc();
+ return 0;
+ }
+
+ if(numer_czy_etykieta=='e'&&test)
+ {
+ if(language==0)
+ {
+ cout<<"Opcja -t (--test) nie jest kompatybilna z opcją -ntl (--numbers-to-labels)"<<endl;
+ }
+ else
+ {
+ cout<<"Option -t (--test) is not compatible with -ntl (--number-to-latex) option"<<endl;
+ }
+ return 1;
+
+ }
+
+ klasa_obslugi_etykiet.set_up_all(srf,sRf,saf,slf,sLf,dns);
+
+ //end of the command line analyzis
+ //========================================================================================
+
+ //Funkcja z operacje.cc. Zajmuje się przetwarzaniem pliku texowego tzn szuka etykiet
+ //sprawdza czy ma być zamiana etykiet na numery czy odwrotnie. Jeśli znajdzie etykiety
+ //w plikach eps wtedy zamienia je na numery.
+ if(przetwarzaj_plik(argv[i],/*argv[2],*/&wierzcholek))return 1;//zwrócenie 1 oznacza błąd
+
+ if(numer_czy_etykieta=='n')//czy mamy zamieniać etykiety na numery
+ {
+ if(!wierzcholek)
+ {
+ if(language==0)
+ {
+ cout<<"Nie znaleziono żadnej etykiety w plikach eps."<<endl;
+ }
+ else
+ {
+ cout<<"No label was found"<<endl;
+ }
+ return 1;
+ }
+ //zmieniamy etykiety na numery w plikach tex
+ //we change labels to numbers in tex files
+ operacje_na_tex(argv[i],wierzcholek);
+ }
+
+ //memory cleaning
+ kol_etykiet*usuwany=wierzcholek;
+ while(usuwany)
+ {
+ usuwany=wierzcholek->nast;
+ delete wierzcholek;
+ wierzcholek=usuwany;
+
+ }
+ //end of memory cleaning
+
+ if(language==0)
+ {
+ cout<<endl<<"Program zakończył się pomyślnie."<<endl;
+ }
+ else
+ {
+ cout<<"Program finished successfully"<<endl;
+ }
+ return 0;
+}
+
+void pomoc()
+{
+ if(language==0)
+ {
+ cout<<endl;
+ cout<<"Automatyczna zmiana etykiet w pliku LaTeX-owym na numery."<<endl;
+ cout<<"Wersja "<<Def_version<<". Napisany i rozpowszechniany przez Piotra Wawrzyniaka."<<endl<<endl;
+ cout<<"Jeśli podoba ci się ten program albo masz inne uwagi napisz:"<<endl;
+ cout<<Def_email<<endl<<endl;
+ cout<<"Program rozpowszechniany na licencji GPL (patrz www.gnu.org)."<<endl<<endl;
+ cout<<"PROGRAM NIE POSIADA żADNEJ GWARACJI. UżYWASZ NA WłASNE RYZYKO."<<endl<<endl;
+ cout<<"POLECAM ZROBIENIE KOPII ZAPASOWEJ PLIKU(ÓW) PRZED UżYCIEM PROGRAMU."<<endl<<endl;
+
+ cout<<"Użycie: konwerter/etykietuj [opcje] nazwa_pliku_latexowego"<<endl;
+ cout<<"Wspierane opcje [domyślne w nawiasach]"<<endl;
+ cout<<"-ltn, --labels-to-numbers zamiana etykiet na liczby [-ltn]"<<endl;
+ cout<<"-ntl, --numbers-to-labels zamiana liczb na etykiety"<<endl
+ <<" (tylko w plikach *.eps)"<<endl;
+ cout<<"-srf n, --start-roman-from n rozpocznij numerowanie małymi cyframi"<<endl
+ <<" rzymskimi od n [-srf 1]"<<endl;
+ cout<<"-sRf n, --start-Roman-from n rozpocznij numerowanie wielkimi cyframi"<<endl
+ <<" rzymskimi od n [-sRf 1]"<<endl;
+ cout<<"-saf n, --start-arabic-from n rozpocznij numerowanie cyframi arabskimi"<<endl
+ <<" od n [-saf 1]"<<endl;
+ cout<<"-slf n, --start-letter-from n rozpocznij numerowanie małymi literami"<<endl
+ <<" od n [-rlf 1]"<<endl;
+ cout<<"-sLf n, --start-Letter-from n rozpocznij numerowanie wielkimi literami"<<endl
+ <<" od n [-rLf 1]"<<endl;
+ cout<<"-dns n, --default-numbering-style n ustaw domyślny styl numeracji. Możliwe"<<endl
+ <<" wartości to :r, R, a, l, L [-dns a]"<<endl;
+ cout<<"-ln, --label-name nazwa polecenia LaTeXowego wstawiającego"<<endl
+ <<" numer [-ln \\nrzw] przy tej opcji zawsze "<<endl
+ <<" należy podawać -ln \\\\xyz"<<endl;
+ cout<<"-l, --language język komunikatów. Dostępne parametry"<<endl
+ <<" [pl] i en. Nieznany parametr traktowany"<<endl
+ <<" jako pl"<<endl;
+ cout<<"-t, --test sprawdź czy nie ma nieznanych etykiet"<<endl
+ <<" nie zmieniaj plików"<<endl;
+ cout<<"-is, --ignore-switches zignoruj przełączniki %--set-X-to"<<endl;
+ cout<<"-if, --ignore-formating użyj dla wszystkich etykiet domyślnego"<<endl
+ <<" typu formatowania"<<endl;
+ cout<<"-v, --verbose wyświetlaj dużo brzydkich komunikatów"<<endl;
+ cout<<"--version wyświetl wersję i zakończ"<<endl;
+ cout<<"-h, --help to co teraz czytasz"<<endl;
+ cout<<"Type \"konwerter -l en -h\" for help in English."<<endl;
+ }
+ else
+ {
+ cout<<endl;
+ cout<<"Automatic conversion labels in LaTeX and EPS files to numbers."<<endl;
+ cout<<"Version "<<Def_version<<". Written by Piotr Wawrzyniak."<<endl<<endl;
+ cout<<"If you like this program, or have any suggestions please sent me an e-mail to:"<<endl;
+ cout<<Def_email<<endl<<endl;
+ cout<<"Program spreads under conditions of GPL (see www.gnu.org)."<<endl<<endl;
+ cout<<"THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!"<<endl<<endl;
+ cout<<"IT IS GOOD IDEA TO DO COPY OF ALL FILES BEFORE USE."<<endl<<endl;
+ cout<<"Usage: konwerter/etykietuj [options] LaTeX_filename"<<endl;
+ cout<<"Supported options [default in brackets]:"<<endl;
+ cout<<"-ltn, --labels-to-numbers change labels to numbers [-n]"<<endl;
+ cout<<"-ntl, --numbers-to-labels change numbers to labels"<<endl
+ <<" (only in eps files)"<<endl;
+ cout<<"-srf n, --start-roman-from n start number with small Roman"<<endl
+ <<" numbers from n [-srf 1]"<<endl;
+ cout<<"-sRf n, --start-Roman-from n start number with capital Roman"<<endl
+ <<" numbers from n [-sRf 1]"<<endl;
+ cout<<"-saf n, --start-arabic-from n start number with arabic numbers"<<endl
+ <<" from n [-saf 1]"<<endl;
+ cout<<"-slf n, --start-letter-from n start number with small letters"<<endl
+ <<" from n [-rlf 1]"<<endl;
+ cout<<"-sLf n, --start-Letter-from n start number with capital letters"<<endl
+ <<" from n [-rLf 1]"<<endl;
+ cout<<"-dns n, --default-numbering-style n set default number style. Possible"<<endl
+ <<" values: r, R, a, l, L [-dns a]"<<endl;
+ cout<<"-ln, --label-name LaTeX command for numbers inserting"<<endl
+ <<" [\\nrzw]. There must be always 2"<<endl
+ <<" backslashes ie. -ln \\\\xyz"<<endl;
+ cout<<"-l, --language set language. There are 2 possible"<<endl
+ <<" parameters: [pl] and en. Unknown"<<endl
+ <<" parameter is handle as pl"<<endl;
+ cout<<"-t, --test test if there are unknown labels"<<endl
+ <<" and do not change files"<<endl;
+ cout<<"-is, --ignore-switches ignore switches %--set-X-to"<<endl;
+ cout<<"-if, --ignore-formating use for all labels default number"<<endl
+ <<" style"<<endl;
+ cout<<"-v, --verbose be verbose"<<endl;
+ cout<<"--version print version and exit"<<endl;
+ cout<<"-h, --help short help"<<endl;
+ cout<<"Wpisz \"konwerter -l pl -h\" po pomoc po polsku."<<endl;
+ }
+}
+
diff --git a/support/konwerter/num_na_etyk.cc b/support/konwerter/num_na_etyk.cc
new file mode 100644
index 0000000000..801f531667
--- /dev/null
+++ b/support/konwerter/num_na_etyk.cc
@@ -0,0 +1,157 @@
+
+ /***************************************************************************
+ * *
+ * Copyright (C) 2005 Piotr Wawrzyniak (piti@piti.vsv.pl) *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+/*procedury zamieniające pliki eps z numerami na etykiety*/
+
+#include<stdlib.h>
+#include<string.h>
+#include<iostream>
+#include<fstream>
+#include"czyt_zapis.h"
+#include<stdio.h>
+#include"dl_wiersza.h"
+#include<unistd.h>
+#include"num_na_etyk.h"
+using namespace std;
+
+int przeszukaj_linie_eps(char*,char*,int&);
+extern int language;
+
+
+
+
+int num_na_etyk(char*nazwa_pliku)
+{
+ //cout<<"Otwieram plik eps do czytania "<<endl;
+ ifstream plik_eps(nazwa_pliku);
+ if(!plik_eps)
+ {
+ if(language==0)
+ {
+ cout<<"Nie udało się otworzyć pliku "<<nazwa_pliku<<" do czytania. "<<endl<<"Sprawdź prawa."<<endl;
+ }
+ else
+ {
+ cout<<"Couldn't open "<<nazwa_pliku<<" file for reading. Check permissions."<<endl;
+ }
+ return 1;
+ }
+ //char nazwatymcz[L_tmpnam];
+ //char *nazwa_eps_tymcz;
+ char nazwa_eps_tymcz[]="konwXXXXXX";
+ //nazwa_eps_tymcz=tmpnam(nazwatymcz);
+ mkstemp(nazwa_eps_tymcz);
+ ofstream plik_tymcz_eps(nazwa_eps_tymcz);
+ if(!plik_tymcz_eps)
+ {
+ if(language==0)
+ {
+ cout<<"Nie mogę utworzyć pliku tymczasowego. Sprawdź prawa."<<endl;
+ }
+ else
+ {
+ cout<<"Couldn't open temporary file. Check permissions."<<endl;
+ }
+ return 1;
+ }
+
+ int dl_lini;
+ int kolejnosc;
+ char c[DL_WIERSZA];
+ char etykieta[DL_WIERSZA];
+ etykieta[DL_WIERSZA-1]=c[DL_WIERSZA-1]='\0';
+ while(!wczytaj_linie(c,&dl_lini,DL_WIERSZA,plik_eps))
+ {
+
+ if(przeszukaj_linie_eps(c,etykieta,kolejnosc))//jeśli zwróci 1 lub 2 oznacza że znalazł etykietę
+ {//początek if
+
+ if(*c=='%')//jeśli na początku linii z etykietą znajduje się procent
+ {
+ for(int zmienna=1;c[zmienna]!='\0';zmienna++)
+ plik_tymcz_eps<<c[zmienna];//i zapisujemy do pliku
+ wczytaj_linie(c,&dl_lini,DL_WIERSZA,plik_eps);//za tym powinien być numer więc go wczytaj i zgub
+
+ }
+ else plik_tymcz_eps<<c;//Jeśli nie ma procentu to po prosu zapisz linie
+
+
+ }
+
+ else plik_tymcz_eps<<c;//nie znalazł etykiety więc zapisuje linie
+
+ }
+
+
+ //Część kopiująca plik tymczasowy na pierwotny eps
+
+{
+
+ plik_tymcz_eps.close();//zamykanie plików
+ plik_eps.close();//zamykanie plików
+ //cout<<"otwieram plik do zapisu"<<endl;
+
+ ofstream plik_tymcz_eps(nazwa_pliku);//plik wyjściowy nie sugerować się nazwą zmiennej. Pozostawione aby nie psuć dalszych zależności.
+
+ if(!plik_tymcz_eps)
+ {
+ if(language==0)
+ {
+ cout<<"Nie mogę otworzyć pliku "<<nazwa_pliku<<" do zapisu."<<endl;
+ }
+ else
+ {
+ cout<<"Couldn't open "<<nazwa_pliku<<" file for writing."<<endl;
+ }
+ return 1;
+ }
+
+ ifstream plik_eps(nazwa_eps_tymcz);//plik wejściowy nie sugerować się nazwą zmiennej. Pozostawione aby nie psuć dalszych zależności.
+ if(language==0)
+ {
+ cout<<"Zmieniam numery na etykiety w pliku: "<<nazwa_pliku<<endl;
+ }
+ else
+ {
+ cout<<"Changing numbers to labels in "<<nazwa_pliku<<" file"<<endl;
+ }
+ if(!plik_eps)
+ {
+ if(language==0)
+ {
+ cout<<"Nie moge otworzyć pliku tymczasowego do odczytu. Coś poszło nie tak."
+ <<endl
+ <<"Zawartość pliku "<<nazwa_pliku<<" możesz znaleźć w "<<nazwa_eps_tymcz<<"."<<endl;
+ }
+ else
+ {
+ cout<<"I couldn't open temporary file for reading. Something has gone wrong."<<endl
+ <<"Content of the "<<nazwa_pliku<<" can be found in "<<nazwa_eps_tymcz<<" file."<<endl;
+ }
+ return 1;
+ }
+
+ while(!wczytaj_linie(c,&dl_lini,DL_WIERSZA,plik_eps))
+ {
+ plik_tymcz_eps<<c;
+
+ }
+
+
+ plik_eps.close();
+ plik_tymcz_eps.close();
+}
+ //cout<<nazwa_eps_tymcz<<endl;
+ unlink(nazwa_eps_tymcz);
+
+ return 0;
+
+}
diff --git a/support/konwerter/num_na_etyk.h b/support/konwerter/num_na_etyk.h
new file mode 100644
index 0000000000..cb8e18c975
--- /dev/null
+++ b/support/konwerter/num_na_etyk.h
@@ -0,0 +1,2 @@
+int num_na_etyk (char*nazwa_pliku);
+
diff --git a/support/konwerter/operacje.cc b/support/konwerter/operacje.cc
new file mode 100644
index 0000000000..229d59c967
--- /dev/null
+++ b/support/konwerter/operacje.cc
@@ -0,0 +1,1315 @@
+
+ /***************************************************************************
+ * *
+ * Copyright (C) 2005 Piotr Wawrzyniak (piti@piti.vsv.pl *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+
+#include"operacje.h"
+#include"czyt_zapis.h"
+#include"dl_wiersza.h"
+#include<stdlib.h>
+#include<ctype.h>
+#include<stdio.h>
+#include<unistd.h>
+#include"num_na_etyk.h"
+#include"prz_string.h"
+#include"system_zapisu.h"
+
+int przeszukaj_linie(char*,char*,ifstream&); //przeszukuje linie eps
+int przetworz_eps(char*,kol_etykiet**);
+int przeszukaj_linie_eps(char*,char*,int&);
+int podaj_etykiete_liczbe(char *, char *, int *);
+int zwroc_numer_etykiety(kol_etykiet*,char*,kol_etykiet**);
+int przed_etykieta_po(char,char*,char*,char*,char);
+int check_counter_to_set(char*);
+
+struct kolejka_w_eps
+{
+ int numer;
+ char etykieta[DL_WIERSZA];
+ kolejka_w_eps*nast;
+
+};
+
+int wloz_na_liste(kolejka_w_eps*,kol_etykiet**);
+
+//ifstream czyt;
+//ofstream pisz;
+
+
+extern char numer_czy_etykieta;//przyjmuje dwie wartości n-numeruje e-nadaje etykiety;
+extern int zacznij_numery_od;//od jakiej liczby zacząć numerację
+extern r_numerow klasa_obslugi_etykiet;
+extern int debug_level;
+extern int ignore_set_counter_to;
+extern int language;
+extern int test;
+
+
+//Funkcja przetwarzaj plik zajmuje się szukaniem etykiet i plików eps w pliku texowym
+//jeśli znajdzie podejmuje akcje w zależności co znalazła
+int przetwarzaj_plik(char *argv1, /*char *argv2,*/kol_etykiet **wierzcholek)
+{
+ ifstream czyt;
+ czyt.open(argv1);
+ if(!czyt)
+ {
+ if(language==0)
+ {
+ cout<<"Nie moge otworzyć pliku "<<argv1<<endl;
+ }
+ else
+ {
+ cout<<"Couldn't open file "<<argv1<<endl;
+ }
+ return 1;
+ }
+ char c[DL_WIERSZA];//zmienna zawierająca linie
+ c[DL_WIERSZA-1]='\0';//tak na wszelki wypadek aby zapobiec przepełnieniu bufora
+ int dl_lini;
+ char nazwa_pliku[DL_WIERSZA];
+ nazwa_pliku[DL_WIERSZA-1]='\0';
+ while(!wczytaj_linie(c,&dl_lini,DL_WIERSZA,czyt)) //wczytaj_linie belongs to czyt_zapis.cc
+ {
+ if(numer_czy_etykieta!='e'&&!ignore_set_counter_to)
+ check_counter_to_set(c);
+ switch(przeszukaj_linie(c,nazwa_pliku,czyt))
+ {
+ case 0://Znalazłem plik eps więc muszą go przetworzyć.
+ {
+ //odtwarzam etykiety w plikach eps
+ if(numer_czy_etykieta=='e')
+ num_na_etyk(nazwa_pliku);//change numbers to lables
+ //przetwarzam eps, tzn zamieniam etykiety na numery
+ else
+ przetworz_eps(nazwa_pliku,wierzcholek); //change labels to numbers
+ break;
+ }
+ case 6://if input command was found in tex file
+ {
+ if(przetwarzaj_plik(nazwa_pliku,/*argv2,*/wierzcholek))
+ return 1;
+ break;
+ }
+ }
+ }
+ if(!czyt.eof()) //if we did not finish reading file
+ {
+ if(language==0)
+ {
+ cout<<"Błąd czytania"<<endl;
+ }
+ else
+ {
+ cout<<"Reading error"<<endl;
+ }
+ return 1;
+ }
+ czyt.close();
+ return 0;
+}
+
+
+//function that search for tex files and input command in tex file
+int przeszukaj_linie(char *linia,char *nazwa_pliku,ifstream &czyt)
+{//1
+ char pom_nazwa_pliku[DL_WIERSZA];
+ pom_nazwa_pliku[DL_WIERSZA-1]='\0';
+ char polecenie[]="?plik";//definiuje nazwę polecenia do znalezienia
+ char polecenie2[]="input{";//definiuje nzawę do znalezienia
+ int a;// zero jeśli udało się skopiować string
+ while(isblank(*linia))
+ linia++;
+
+ if (*linia=='%')
+ { //2
+ linia++;
+ a=strncmp(linia,polecenie,5);
+ if(!a)
+ {//3
+ linia=linia+5;
+ if (*linia!='{')
+ return 1; //jeśli nie ma nawiasu zwróć błąd
+ else
+ {//4
+ linia++;
+ int licznik=0;
+ if (*linia=='}')return 2;//jeśli nie ma nazwy pliku zwróć błąd przypadek %?{}
+ int czykoniec=0;
+ do
+ {//5
+ if(*(linia+licznik)=='}')
+ {//skopiuj nazwę pliku
+ strncpy(pom_nazwa_pliku,linia,licznik);
+ pom_nazwa_pliku[licznik]='\0';
+ czykoniec=1;}
+ else
+ if(*(linia+licznik)=='\n')
+ {
+ return 3;
+ }
+ //jeśli nie ma
+ else
+ licznik++;
+ }//5
+ while(!czykoniec);
+ strcpy(nazwa_pliku,pom_nazwa_pliku);
+ nazwa_pliku[licznik]='\0';
+ return 0;//jeśli sukces to zwróć to
+ }//4
+ }//3
+ else return 4; //to nie jest polecenia
+ }//2
+ else
+ if(*linia=='\\')
+ {//6
+ linia++;
+ if(!strncmp(linia,polecenie2,6))
+ {//7
+ linia+=6;
+ int licznik=0;
+ if (*linia=='}')return 2;//jeśli nie ma nazwy pliku zwróć błąd przypadek %?{}
+ int czykoniec=0;
+ do
+ {//5
+ if(*(linia+licznik)=='}')
+ {strncpy(pom_nazwa_pliku,linia,licznik); czykoniec=1;}//skopiuj nazwę pliku
+ else
+ if(*(linia+licznik)=='\n')
+ {
+ return 3;
+ }//jeśli nie ma }
+ else
+ licznik++;
+ }//5
+ while(!czykoniec);
+ strcpy(nazwa_pliku,pom_nazwa_pliku);
+ nazwa_pliku[licznik]='\0';
+ return 6;//zwraca nazwę pliku LaTeXa
+ }//7
+ else
+ return 4;//nie rób nic
+ }//6
+ return 4;//linia nie zaczyna się od % ani backlsasha
+}//1
+
+//change labels to numbers in eps file
+int przetworz_eps(char *nazwa_pliku,kol_etykiet**wierzcholek)
+{
+ kolejka_w_eps*pierwszy_element=NULL;
+ char nazwa_eps_tymcz[]="konwXXXXXX";//temporary file name
+ mkstemp(nazwa_eps_tymcz);//creation of temporary file
+
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Plik eps jest kopiowany do pliku "<<nazwa_eps_tymcz<<endl;
+ cout<<"Otwieranie pliku tymczasowego do zapisu"<<endl;
+ }
+ else
+ {
+ cout<<"The eps file copied to "<<nazwa_eps_tymcz<<" file"<<endl;
+ cout<<"Opening the temporary file for writing"<<endl;
+ }
+
+ }
+
+ ofstream plik_tymcz(nazwa_eps_tymcz);//temporary file opening
+ if(!plik_tymcz)
+ {
+ if(language==0)
+ {
+ cout<<"Nie udało mi się otworzyć pliku tymczasowego"<<endl;
+ }
+ else
+ {
+ cout<<"Couldn't open temporary file"<<endl;
+ }
+ return 1;
+ }
+
+ ifstream plik_eps(nazwa_pliku); //eps file opening
+ if(!plik_eps)
+ {
+ if(language==0)
+ {
+ cout<<"Brakuje pliku "<<nazwa_pliku<<", lub brak praw."<< endl;
+ }
+ else
+ {
+ cout<<"Missing file "<<nazwa_pliku<<", or access forbidden"<<endl;
+ }
+ return 1;
+ }
+ if(language==0)
+ {
+ cout<<"Znalazłem plik "<<nazwa_pliku<<"."<<endl;
+ }
+ else
+ {
+ cout<<"File "<<nazwa_pliku<<" found."<<endl;
+ }
+ int dl_lini;
+ int kolejnosc;
+ char c[DL_WIERSZA];
+ char etykieta[DL_WIERSZA];
+
+
+ //local label queue building
+ while(!wczytaj_linie(c,&dl_lini,DL_WIERSZA,plik_eps))//reads line from eps file
+ {
+ //searching eps line for labels. Returning 1 means label
+ if(przeszukaj_linie_eps(c,etykieta,kolejnosc))//jeśli zwróci 1 oznacza że znalazł etykietę
+ {//początek if
+ if(*c!='%')plik_tymcz<<'%'<<c;
+ plik_tymcz<<c;
+ if(!pierwszy_element)//if 2
+ {//1
+ pierwszy_element=new kolejka_w_eps;
+ pierwszy_element->nast=NULL;
+ strcpy(pierwszy_element->etykieta,etykieta);
+ pierwszy_element->numer=kolejnosc;
+ }//1
+ //W przeciwnym wypadku jeśli lista ma już przynajmniej pierwszy element zrób to co poniżej tzn
+ else//if 2
+ {
+ kolejka_w_eps*nowy_element=new kolejka_w_eps;//tworze nowy element
+ nowy_element->numer=kolejnosc;//nadaje mu wartości początkowe - kolejność
+ nowy_element->nast=NULL;//nadaje mu wartości początkowe - następny
+ strcpy(nowy_element->etykieta,etykieta);//nadaje mu wartości początkowe - etykieta
+ //jeśli nowy element jest mniejszy lub równy pierwszemu z listy to wstaw go przed niego
+ if((nowy_element->numer)<=(pierwszy_element->numer))
+ {
+ nowy_element->nast=pierwszy_element;
+ pierwszy_element=nowy_element;
+ }
+
+ //no dobrze nie jest mniejszy ani równy wobec tego wstaw go w odpowiedie miejsce w liście
+ else//2
+ {
+ //tworze wskaźnik do zmiennej który wskazuje na pierwszy element
+ kolejka_w_eps*bierzacy_element=pierwszy_element;//pomocnicza zmnienna
+ //tworze wskaźnik to zmiennej który wskazuje na bierzacy_element
+ kolejka_w_eps*pomocnicza=bierzacy_element;//pomocnicza zmnienna
+ //do czasu aż kolejność z nowego będzie większa od kolejności z bierzącego i jednocześnie
+ //bierzący element nie będzie ostatnim wykonuj tę pętlę
+ while(((nowy_element->numer)>(bierzacy_element->numer))&&(bierzacy_element->nast))
+ {
+ pomocnicza=bierzacy_element;//pomocnicza wskazuje na 1 element bliżej niż bierz_element
+ //bierzacy_element przeskakuje o jedno pole dalej
+ bierzacy_element=bierzacy_element->nast;
+ }
+ {
+ //jeśli bierzący element jest ostatnim elementem na liście i jednocześnie jest mniejszy
+ //lub równy od nowego to nowy dostaw na końcu listy
+ if(!bierzacy_element->nast&&((bierzacy_element->numer)<=(nowy_element->numer)))
+ {
+ bierzacy_element->nast=nowy_element;
+ }
+
+ //w przeciwnym wypadku wstaw go w znalezione miejsce
+ else
+ {
+ pomocnicza->nast=nowy_element;
+ nowy_element->nast=bierzacy_element;
+ }
+ }
+ }//koniec else 2
+ }//koniec else 1
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Czytanie linii z pliku eps: "<<c<<endl;
+ cout<<"Etykietka: "<<etykieta<<endl;
+ cout<<"Numer: "<<kolejnosc<<endl;
+ }
+ else
+ {
+ cout<<"Readed line from eps file: "<<c<<endl;
+ cout<<"The label: "<<etykieta<<endl;
+ cout<<"The number: "<<kolejnosc<<endl;
+ }
+ }
+ }
+ else
+ plik_tymcz<<c;
+
+ //zerujemy wczytaną linie (zmienna c) oraz etykietę inaczej są szopki
+
+ }//koniec while;
+
+ //zakończyło się budowanie kolejki etykiet z pliku eps teraz należy je wprowadzić na listę etykiet
+ //globalnych
+ //global queue building
+ //wkładanie na globalną kolejkę etykiet
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Budowanie globalnej kolejki etykiet"<<endl;
+ }
+ else
+ {
+ cout<<"Global label queue building"<<endl;
+ }
+ }
+ {
+ kolejka_w_eps*pomocnicza=pierwszy_element;
+ while(pomocnicza)
+ {
+ wloz_na_liste(pomocnicza,wierzcholek);
+ pierwszy_element=pomocnicza;
+ pomocnicza=pomocnicza->nast;
+ delete pierwszy_element;
+ }
+ }
+
+ if(debug_level)
+ {
+ if (language==0)
+ {
+ cout<<endl<<"Budowanie globalnej kolejki etykiet: "<<endl;
+ }
+ else
+ {
+ cout<<endl<<"The global label queue printing: "<<endl;
+ }
+ kol_etykiet*pomocnicza_2=*wierzcholek;
+ while(pomocnicza_2)
+ {
+ if(language==0)
+ {
+ cout<<"Etykieta "<<pomocnicza_2->etykieta<<endl;
+ cout<<"Numer "<<pomocnicza_2->kolejny_numer<<endl;
+ cout<<"String numer "<<pomocnicza_2->kolejny_numer_string<<endl;
+ pomocnicza_2=pomocnicza_2->nast;
+
+ }
+ else
+ {
+ cout<<"Label "<<pomocnicza_2->etykieta<<endl;
+ cout<<"Number "<<pomocnicza_2->kolejny_numer<<endl;
+ cout<<"String number "<<pomocnicza_2->kolejny_numer_string<<endl;
+ pomocnicza_2=pomocnicza_2->nast;
+ }
+ }
+ if(language==0)
+ {
+ cout<<"Zakończyłem pracę z plikiem "<<nazwa_pliku<<endl;
+ }
+ else
+ {
+ cout<<"I have finished "<<nazwa_pliku<<" file"<<endl;
+ }
+ }
+ plik_eps.close();
+ plik_tymcz.close();
+
+ //Kopiowanie pliku tymczasowego na eps
+ //Copying temporary file to eps file.
+
+ if(!test)
+ {
+
+ //plik_eps.open(nazwa_eps_tymcz);
+ ifstream plik_eps(nazwa_eps_tymcz);//otwieram plik tymczasowy do odczytu aby go skopiować na pierwotny eps. Nie sugerować się nazwą zmiennej.
+ if (!plik_eps)
+ {
+ if(language==0)
+ {
+ cout<<"Nie mogę otworzyć pliku tymczasowego "<<nazwa_eps_tymcz<<" do czytania"<<endl;
+ }
+ else
+ {
+ cout<<"Couldn't open temporary file: "<<nazwa_eps_tymcz<<" for reading"<<endl;
+ }
+ return 1;
+ }
+ //plik_tymcz.open(nazwa_pliku);
+ ofstream plik_tymcz(nazwa_pliku);//otwieram plik główny eps do zapisu aby skopiować do niego zawartość pliku tymczasowego. Nie sugerować się nazwą zmiennej.
+ //Brak logiki wynika z lenistwa. Nie chciało mi się poprawiać parę linii więc jest jak jest.
+ if (!plik_tymcz)
+ {
+ if(language==0)
+ {
+ cout<<"Nie mogę otworzyć pliku "<<nazwa_pliku<<" do zapisu"<<endl;
+ }
+ else
+ {
+ cout<<"Couldn't open file: "<<nazwa_pliku<<" for writing"<<endl;
+ }
+ return 1;
+ }
+
+ int numer_etykiety;
+ char przed[DL_WIERSZA];
+ char po[DL_WIERSZA];
+ przed[DL_WIERSZA-1]=po[DL_WIERSZA-1]='\0';
+ while(!wczytaj_linie(c,&dl_lini,DL_WIERSZA,plik_eps))
+ {
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Kopiowanie pliku tymczasowego na główny eps. Przeczytana linia: "<<c<<endl;
+ }
+ else
+ {
+ cout<<"Copying the temporary file to main eps. The read line is: "<<c<<endl;
+ }
+ }
+ if(przeszukaj_linie_eps(c,etykieta,kolejnosc))//jeśli zwróci 1 oznacza że znalazł etykietę
+ {
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Odnaleziono linijkę z etykietką. Analizuję."<<endl;
+ cout<<"Zmienna etykieka wynosi: "<<etykieta<<endl;
+ cout<<"Zmienna c - linia wynosi: "<<c<<endl;
+ }
+ else
+ {
+ cout<<"I found the line with label. Analyzing."<<endl;
+ cout<<"The etykieta variable is equal: "<<etykieta<<endl;
+ cout<<"The c variable - the line is equal: "<<c<<endl;
+ }
+ }
+ kol_etykiet *zmienna_tymczasowa1;
+ kol_etykiet**zmienna_tymczasowa=&zmienna_tymczasowa1;
+ plik_tymcz<<c;//zapisz linie etykiety z %
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Sprawdzanie który numerek na etykieta. ";
+ cout<<"Dane dla wywołanie funkcji:"<<endl;
+ cout<<"*wierzcholek->etykieta: "<<(*wierzcholek)->etykieta<<endl;
+ cout<<"zmienna_tymczasowa: "<<zmienna_tymczasowa<<endl;
+ }
+ else
+ {
+ cout<<"Checking which number has the label. ";
+ cout<<"The data for function calling:"<<endl;
+ cout<<"*wierzcholek->etykieta: "<<(*wierzcholek)->etykieta<<endl;
+ cout<<"zmienna_tymczasowa: "<<zmienna_tymczasowa<<endl;
+ }
+ }
+ numer_etykiety=zwroc_numer_etykiety(*wierzcholek,etykieta,zmienna_tymczasowa);
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Numer został sprawdzony i wynosi: "<<numer_etykiety<<endl<<endl;
+ }
+ else
+ {
+ cout<<"The number was checked and is equal: "<<numer_etykiety<<endl<<endl;
+ }
+ }
+ if(przed_etykieta_po('{',c,przed,po,'}')) numer_etykiety=0;//jeśli funkcja zwróci 1 to oznacza błąd
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Funkcj przed_etykieta_po sprawdziła etykietkę.Zmienna kolejny_numer_string wynosi: "
+ <<(*zmienna_tymczasowa)->kolejny_numer_string<<endl;
+ }
+ else
+ {
+ cout<<"Function przed_etykieta_po has checked the label. Variable kolejny_numer_string is equal: "
+ <<(*zmienna_tymczasowa)->kolejny_numer_string<<endl;
+ }
+ }
+
+ if(numer_etykiety)//jeśli numer_etykiety=0 oznacza to że nie znalazł etykiety na liście
+ {//początek if
+ char przed1[DL_WIERSZA];
+ int taka_sobie=strlen(przed);
+ strncpy(przed1,przed,taka_sobie-4);
+ przed1[taka_sobie-4]='\0';
+ //char *po1=&po[1];
+ char *po1=&po[1];
+ if(debug_level)
+ {
+
+ if(language==0)
+ {
+ cout<<"Następująca linia jest zapisywana do pliku eps:"<<endl
+ <<"przed1: "<<przed<<endl
+ <<"(*zmienna_tymczasowa)->kolejny_numer_string: "
+ <<(*zmienna_tymczasowa)->kolejny_numer_string<<endl
+ <<"po1: "<<po1<<endl;
+ }
+ else
+ {
+ cout<<"The following line is saved in eps file:"<<endl
+ <<"przed1: "<<przed<<endl
+ <<"(*zmienna_tymczasowa)->kolejny_numer_string: "
+ <<(*zmienna_tymczasowa)->kolejny_numer_string<<endl
+ <<"po1: "<<po1<<endl;
+ }
+ }
+
+ plik_tymcz<<przed1<<(*zmienna_tymczasowa)->kolejny_numer_string<<po1;//zapisz numer etykiety
+ wczytaj_linie(c,&dl_lini,DL_WIERSZA,plik_eps);//w pliku pom za etykietą z % jest zwykła
+ //więc ją wont
+ /**************************************************************************/
+
+ }//koniec if
+ else //jeśli nie zalazłeś etykiety na liście zapisz jej nazwę do pliku. Nazwa ukryta pod zmienną c
+ {
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Etykietka nie została znalezionalist. Writing all in eps file."<<endl
+ <<"Writing the following line "<<c<<endl;
+ }
+ else
+ {
+ cout<<"The label was not found on the list. Writing all in eps file."<<endl
+ <<"Writing the following line "<<c<<endl;
+ }
+ }
+ char*ggg=c;
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Zmienna ggg wynosi: "<<ggg<<endl;
+ }
+ else
+ {
+ cout<<"The ggg variable: "<<ggg<<endl;
+ }
+ }
+ ggg++;
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Zmienna ggg++ wynosi: "<<ggg<<endl;
+ }
+ else
+ {
+ cout<<"The ggg++ variable: "<<ggg<<endl;
+ }
+ }
+ plik_tymcz<<ggg;
+ }
+ }
+ else
+ {
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Etykietka nie została znaleziona. Zapisywanie do pliku eps linii:"<<endl
+ <<"linia c: "<<c<<endl;
+ }
+ else
+ {
+ cout<<"The label was not found. Writing to eps file line:"<<endl
+ <<"linia c: "<<c<<endl;
+ }
+ }
+ plik_tymcz<<c;//jeśli nie ma etykiety to zapisz linie
+ }
+ }
+ plik_tymcz.close();
+ plik_eps.close();
+ }
+ unlink(nazwa_eps_tymcz);
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Zakończone kopiowanie pliku tymczasowego eps na główny eps."<<endl;
+ }
+ else
+ {
+ cout<<"The copying of temporary file to main eps is finished."<<endl;
+ }
+ }
+ return 0;
+}
+
+int przeszukaj_linie_eps(char *linia, char *etykieta, int &kolejnosc)
+{
+ /*funkcja zwróci wartość 0, jeśli nie znajdzie etykiety w linii
+ funkcja zwróci wartość 1, jeśli znajdzie etykietę w linii. Etykieta nie była komentarzem
+ funkcja zwróci wartość 2, jeśli znajdzie etykietę w linii. Etykieta była komentarzem.*/
+ int czy_znalazlem;
+
+ /*funkcja bm() jest funkcją obecną w pliku prz_string.cc. Jej zadaniem jest szukanie wzorca w stringu.
+ jeśli znajdzie zwraca pozycję w której się znajduje, jeśli nie to zwraca -1*/
+ czy_znalazlem=bm("?et{",linia);//zwraca numer na którym znalazł wzorzec zaczyna od 0
+ if(czy_znalazlem>-1)
+ {
+ int *taka_sobie_zmienna=&kolejnosc;
+ if(podaj_etykiete_liczbe(linia,etykieta,taka_sobie_zmienna))
+ {
+ if(language==0)
+ {
+ cout<<"****************************************************************"<<endl
+ <<"Znalazłem niepoprawne etykiety w tym pliku. Proszę je sprawdzić."<<endl
+ <<"Typowe błędy to różne fonty w etykiecie, brak } na końcu,"<<endl
+ <<"albo litery po średniku zamiast cyfr"<<endl
+ <<"***************************************************************"<<endl<<endl;
+ }
+ else
+ {
+ cout<<"**************************************************************"<<endl
+ <<"I have found incorrect labels in this file. Please check them."<<endl
+ <<"Typical mistakes can be different fonts in label, } missing"<<endl
+ <<"or the letters after semicolon instead of numbers"<<endl
+ <<"***************************************************************"<<endl<<endl;
+
+ }
+
+ return 0;
+ }
+ else
+ return 1;
+ }
+ else
+ return 0;
+}
+
+int podaj_etykiete_liczbe(char *linia, char *etykieta, int *kolejnosc)
+{
+ //funkcja zwraca 0 w przypadku gdy znalazła poprawną etykietę i 1 gdy była niepoprawna
+ char pomocnicza[DL_WIERSZA];
+ pomocnicza[DL_WIERSZA-1]='\0';
+ int pozycja=0;
+ int if_bracket_found=0;
+
+ strcpy(pomocnicza,linia);
+ int n=0;
+ while(pomocnicza[n]!='{')
+ n++;
+ n++;
+ while((pomocnicza[n]!=';')&&(pomocnicza[n]!='}')&&(pomocnicza[n]!=')')&&(pomocnicza[n]!='\0'))
+ {
+ etykieta[pozycja]=pomocnicza[n];
+ n++;
+ pozycja++;
+ //if found ) bracket, that means that there was something wront with label
+ if(pomocnicza[n]==')')
+ if_bracket_found=1;
+ }
+ etykieta[pozycja]='\0';
+ //check if the label has any length or if maybe ) was found instead of ; or }
+ if (pozycja==0||if_bracket_found==1)
+ return 1;
+ //check if this bracket } was found if so, than label does not have any nuber after ; so return 0
+ if (pomocnicza[n]=='}')
+ return 0;
+
+ n++;
+ *kolejnosc=0;
+ while(pomocnicza[n]!='}'&&isdigit(pomocnicza[n]))
+ {
+ *kolejnosc=*kolejnosc*10+pomocnicza[n]-'0';
+ n++;
+ //the label must end with correct right }
+ if(pomocnicza[n]=='}')
+ if_bracket_found=1;
+ }
+ if(if_bracket_found==1)
+ return 0;
+ else
+ return 1;
+}
+
+
+//function that puts label to label queue
+int wloz_na_liste(kolejka_w_eps*rekord,kol_etykiet**wierzcholek)
+{
+ //Putting label into global label queue
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Wkładanie etykity na globalną kolejkę etykiet."<<endl;
+ cout<<"Etykietka: "<<rekord->etykieta<<endl;
+ }
+ else
+ {
+ cout<<"Putting the label to the global label queue."<<endl;
+ cout<<"The label: "<<rekord->etykieta<<endl;
+ }
+ }
+
+ if(!*wierzcholek)//There is no global label queue
+ {
+ //pobieramy numerek etykietki
+ //we are taking label number
+ //after function klasa_obslugi_etykiet.zwroc_numer_etykiety() will be ready
+ //one can find label in klasa_obslugi_etykiet.numer_etykietki variable
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Nie znaleziono jeszcze żadnej etykiety na liście. Wkładam pierwszą tetykietkę."<<endl;
+ cout<<"Etykietka: "<<rekord->etykieta<<" została włożona."<<endl;
+ }
+ else
+ {
+ cout<<"No label in the list. The first label will be placed."<<endl;
+ cout<<"The label: "<<rekord->etykieta<<" is placed."<<endl;
+ }
+ }
+ klasa_obslugi_etykiet.ustaw_zmienna_numer_etykietki(rekord->etykieta);
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Ustawianie zmiennej klasaa_obslugi_etykiet.numer_etykietki: "
+ <<klasa_obslugi_etykiet.numer_etykietki<<endl;
+ }
+ else
+ {
+ cout<<"Setting the klasa_obslugi_etykiet.numer_etykietki variable: "
+ <<klasa_obslugi_etykiet.numer_etykietki<<endl;
+ }
+ }
+
+ kol_etykiet*wierzcholek1=new kol_etykiet;
+ //check, if labels looks like :mbla.a.The label must be longer that 5 leters: :ba.d
+ int dlugosc=strlen(rekord->etykieta);
+ if(rekord->etykieta[dlugosc-2]=='.'&&dlugosc>=5)
+ {
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Etykietka wygląda następująco: mblah.a."<<endl;
+ cout<<"Wkładanie rdzenia etykietki do kolejki."<<endl;
+ }
+ else
+ {
+ cout<<"The label looks like: :mblah.a."<<endl;
+ cout<<"Putting the core to the queue"<<endl;
+ }
+ }
+ wierzcholek1->kolejny_numer=zacznij_numery_od;//historical meaning, to delete soon
+ //copy label to global label queue
+ strncpy(wierzcholek1->etykieta,rekord->etykieta,dlugosc-2);
+ //copy number as a string to global label queue
+ strcpy(wierzcholek1->kolejny_numer_string,klasa_obslugi_etykiet.numer_etykietki);
+ wierzcholek1->nast=NULL;
+ *wierzcholek=wierzcholek1;
+
+ //Włożony do kolejki rdzeń etykiety, tzn :ba, teraz czas włożyć całą etykietę:
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Rdzeń etykietki już istnieje na globalnej liście."<<endl;
+ cout<<"Czas włożyć tam całą atykietkę."<<endl;
+ }
+ else
+ {
+ cout<<"The core of the label is already there."<<endl;
+ cout<<"Time to put there all label"<<endl;
+ }
+ }
+ kol_etykiet*dada=wierzcholek1;
+ //kol_etykiet*wierzcholek1=new kol_etykiet;
+ wierzcholek1=new kol_etykiet;
+ dada->nast=wierzcholek1;
+ wierzcholek1->nast=NULL;
+
+ wierzcholek1->kolejny_numer=zacznij_numery_od;
+ strcpy(wierzcholek1->etykieta,rekord->etykieta);
+ strcpy(wierzcholek1->kolejny_numer_string,klasa_obslugi_etykiet.numer_etykietki);
+
+ //Jak na razie numer numer jest bez literki, czas ją dodać
+ char pom[3];
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Dokładanie literki do etykietki."<<endl;
+ }
+ else
+ {
+ cout<<"Adding the letter to the label"<<endl;
+ }
+ }
+ pom[0]=rekord->etykieta[dlugosc-1];pom[1]='\0';
+ strcat(wierzcholek1->kolejny_numer_string,pom);
+ }
+ else
+ {
+ wierzcholek1->kolejny_numer=zacznij_numery_od;
+ strcpy(wierzcholek1->etykieta,rekord->etykieta);
+ strcpy(wierzcholek1->kolejny_numer_string,klasa_obslugi_etykiet.numer_etykietki);
+ *wierzcholek=wierzcholek1;
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"************************************************************"<<endl;
+ cout<<"Etykietka ma więcej niż 3 literki i nie istnieje na globalnej kolejce etykiet."<<endl;
+ cout<<"Oto co jest wkładane:"<<endl;
+ cout<<"Numer: "<<wierzcholek1->kolejny_numer<<endl;
+ cout<<"Etukieta: "<<wierzcholek1->etykieta<<endl;
+ cout<<"Kolejny numer string: "<<wierzcholek1->kolejny_numer_string<<endl;
+ cout<<"============================================================"<<endl;
+ }
+ else
+ {
+ cout<<"************************************************************"<<endl;
+ cout<<"Label has more than 3 letters and doesn't exist on the list."<<endl;
+ cout<<"That what is putted:"<<endl;
+ cout<<"Number: "<<wierzcholek1->kolejny_numer<<endl;
+ cout<<"Label: "<<wierzcholek1->etykieta<<endl;
+ cout<<"Next string number: "<<wierzcholek1->kolejny_numer_string<<endl;
+ cout<<"============================================================"<<endl;
+ }
+ }
+ }
+ }
+
+ else
+ {//początek else
+
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"W kolejce istneją już etykiety. Wkładam następną"<<endl;
+ }
+ else
+ {
+ cout<<"There are already labels in the list. Building forward."<<endl;
+ }
+ }
+ //Lets look if the label exists in global label queue
+ kol_etykiet*nowy_element=*wierzcholek;
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Szukanie etykiety: "<<rekord->etykieta<<" na globalnej kolejce etykiet."<<endl;
+ }
+ else
+ {
+ cout<<"Looking if the label: "<<rekord->etykieta<<" exists ini the lobal label queue."<<endl;
+ }
+ }
+ while(strcmp(nowy_element->etykieta,rekord->etykieta)&&nowy_element->nast)
+ nowy_element=nowy_element->nast;
+ if(!strcmp(nowy_element->etykieta,rekord->etykieta))
+ {
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Etykieta: "<<rekord->etykieta<<" została znaleziona na globalnej liście. Opuszczam funkcję."<<endl;
+ }
+ else
+ {
+ cout<<"Label: "<<rekord->etykieta<<" found in the global label queue. Leaving function."<<endl;
+ }
+ }
+ return 0;
+ }
+ //find the last queue element
+ kol_etykiet*ostatni_element=*wierzcholek;
+ while(ostatni_element->nast)
+ ostatni_element=ostatni_element->nast;
+
+ //So we didn't find a label in global label queue, so lets put it there
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Etykieta: "<<rekord->etykieta<<" nie została znaleziona na liście. Wkładam ją tam"<<endl;
+ }
+ else
+ {
+ cout<<"The label: "<<rekord->etykieta<<" not found in the queue. Inserting."<<endl;
+ }
+ }
+ if(!nowy_element->nast)
+ {
+ int dlugosc=strlen(rekord->etykieta);
+ //Lets look how does label look like
+ //the label can be as: blach.a
+ if(dlugosc>=3&&rekord->etykieta[dlugosc-2]=='.')
+ {
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"****************************"<<endl;
+ cout<<"Etykietak ma postać: blach.a"<<endl;
+ }
+ else
+ {
+ cout<<"****************************"<<endl;
+ cout<<"The label looks like blach.a"<<endl;
+ }
+ }
+ char root_label[dlugosc];
+ strncpy(root_label,rekord->etykieta,dlugosc-2);
+ root_label[dlugosc-2]='\0';
+
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"root_label wygląda: "<<root_label<<endl;
+ cout<<"==========================="<<endl;
+ }
+ else
+ {
+ cout<<"root_label looks like: "<<root_label<<endl;
+ cout<<"==========================="<<endl;
+ }
+ }
+ //wyszukaj root_label na globalnej kolejce etykiet
+ kol_etykiet*iteruj=*wierzcholek;
+ while(strcmp(iteruj->etykieta,root_label)&&iteruj->nast)
+ iteruj=iteruj->nast;
+ //znalazłeś, czy skończyła się kolejka
+ //załóżmy że znalazłeś, więc pobierz jej numer, a nową dodaj do końca kolejki
+ if(!strcmp(iteruj->etykieta,root_label))
+ {
+ kol_etykiet*dodaj=new kol_etykiet;
+ dodaj->nast=NULL;
+ strcpy(dodaj->etykieta,rekord->etykieta);
+ strcpy(dodaj->kolejny_numer_string,iteruj->kolejny_numer_string);
+ dodaj->kolejny_numer_string[strlen(dodaj->kolejny_numer_string)]=rekord->etykieta[dlugosc-1];
+ ostatni_element->nast=dodaj;
+ if(debug_level)
+ cout<<"The label: "<<rekord->etykieta<<" found in the global label quere. Its number was copied."<<endl;
+ }
+
+ else //nie znaleźliśmy, więc trzeba dodać dwie: root_label i tę nową rozszerzoną
+ {
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"****************************************************************"<<endl;
+ cout<<"Etykietka nie istnieje na globalnej liście. Musi zostać dodana."<<endl;
+ }
+ else
+ {
+ cout<<"****************************************************************"<<endl;
+ cout<<"The label doesn't exist in the global list. Must be added."<<endl;
+ }
+ }
+ klasa_obslugi_etykiet.ustaw_zmienna_numer_etykietki(rekord->etykieta);
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Etykietka została pobrana używając funkcji ustaw_zmienną_numer_etykietki"<<endl;
+ cout<<"Oto rezultat klasa_obslugi_etykiet.numer_etykietki: "
+ <<klasa_obslugi_etykiet.numer_etykietki<<endl;
+ cout<<"================================================================"<<endl;
+ }
+ else
+ {
+ cout<<"The label number was taken using function ustaw_zmienną_numer_etykietki"<<endl;
+ cout<<"That is the result klasa_obslugi_etykiet.numer_etykietki: "
+ <<klasa_obslugi_etykiet.numer_etykietki<<endl;
+ cout<<"================================================================"<<endl;
+ }
+ }
+
+ kol_etykiet*dodaj=new kol_etykiet;
+ dodaj->nast=NULL;
+ strcpy(dodaj->etykieta,root_label);
+ strcpy(dodaj->kolejny_numer_string, klasa_obslugi_etykiet.numer_etykietki);
+ ostatni_element->nast=dodaj;
+ ostatni_element=dodaj;
+ dodaj=new kol_etykiet;
+ strcpy(dodaj->etykieta,rekord->etykieta);
+ strcpy(dodaj->kolejny_numer_string,ostatni_element->kolejny_numer_string);
+ dodaj->kolejny_numer_string[strlen(dodaj->kolejny_numer_string)]=rekord->etykieta[dlugosc-1];
+ ostatni_element->nast=dodaj;
+ }
+ }
+ //the label doesn't have dot there at proper place
+ else
+ {
+ kol_etykiet*dodaj=new kol_etykiet;
+ klasa_obslugi_etykiet.ustaw_zmienna_numer_etykietki(rekord->etykieta);
+ strcpy(dodaj->etykieta,rekord->etykieta);
+ strcpy(dodaj->kolejny_numer_string,klasa_obslugi_etykiet.numer_etykietki);
+ nowy_element->nast=dodaj;
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"****************************************************************"<<endl;
+ cout<<"Etykietka ma postać blach"<<endl;
+ cout<<"Etykietka nie istnieje na globalnej liście.Musi zostać dodana."<<endl;
+ cout<<"Numer etykietki został ustalony używając funkcji ustaw_zmienna_numer_etykietki"<<endl;
+ cout<<"Here is what klasa_obslugi_etykiet.numer_etykietki looks like: "
+ <<klasa_obslugi_etykiet.numer_etykietki<<endl;
+ cout<<"================================================================"<<endl;
+ }
+ else
+ {
+ cout<<"****************************************************************"<<endl;
+ cout<<"The label looks like blach"<<endl;
+ cout<<"The label doesn't exist in the global queue. Must be added."<<endl;
+ cout<<"The number of the label was taken using ustaw_zmienna_numer_etykietki function"<<endl;
+ cout<<"Here is what klasa_obslugi_etykiet.numer_etykietki looks like: "
+ <<klasa_obslugi_etykiet.numer_etykietki<<endl;
+ cout<<"================================================================"<<endl;
+ }
+ }
+ }
+ }
+ }//koniec else
+ return 0;
+}
+
+//function that returns label number
+int zwroc_numer_etykiety(kol_etykiet*wierzcholek,char*etykieta,kol_etykiet**zmienna_tymczasowa)
+{
+ kol_etykiet*bierzacy=wierzcholek;
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<endl<<endl<<endl;
+ cout<<"***********************************************"<<endl;
+ cout<<"Tu funkcja zwroc_numer_etykiety. Poniżej argumenty z którymi mnie wywołano:"<<endl;
+ cout<<"bierzacy->etykieta: "<<bierzacy->etykieta<<endl;
+ cout<<"etykieta: "<<etykieta<<endl;
+ }
+ else
+ {
+ cout<<endl<<endl<<endl;
+ cout<<"***********************************************"<<endl;
+ cout<<"The function zwroc_numer_etykiety is speaking. Below the arguments I got:"<<endl;
+ cout<<"bierzacy->etykieta: "<<bierzacy->etykieta<<endl;
+ cout<<"etykieta: "<<etykieta<<endl;
+ }
+ }
+ while(strcmp(bierzacy->etykieta,etykieta)&&bierzacy->nast)
+ bierzacy=bierzacy->nast;
+
+ if(strcmp(bierzacy->etykieta,etykieta))
+ {
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Wychodzę z funkcji zwroc_numer_etykiety z błędem 0."<<endl;
+ cout<<"=========================================="<<endl;
+ }
+ else
+ {
+ cout<<"Leaving function zwroc_numer_etykiety with 0 error."<<endl;
+ cout<<"=========================================="<<endl;
+ }
+ }
+ return 0;
+ }
+ else
+ {
+ //return bierzacy->kolejny_numer;
+ (*zmienna_tymczasowa)=bierzacy;
+ if(debug_level)
+ {
+ if(language==0)
+ {
+ cout<<"Wychodzę z funkcji zwroc_numer_etykiety z błędem 1."<<endl;
+ cout<<"=========================================="<<endl;
+ }
+ else
+ {
+ cout<<"Leaving function zwroc_numer_etykiety with 1 error."<<endl;
+ cout<<"=========================================="<<endl;
+ }
+ }
+ return 1;
+ }
+
+}
+
+
+//funkcja zwracająca string który był przed etykietą
+int przed_etykieta_po(char zn_przed,char*linia,char*przed,char*po,char zn_po)
+{
+ char pomocnicza[DL_WIERSZA];
+ char pprzed[DL_WIERSZA];
+ char ppo[DL_WIERSZA];
+ int q=DL_WIERSZA-1;
+ pomocnicza[q]=pprzed[q]=ppo[q]='\0';
+ strcpy(pomocnicza,linia);
+ int i=1;
+ int dl_linii=strlen(linia);
+ while(pomocnicza[i]!=zn_przed)
+ {
+ pprzed[i-1]=pomocnicza[i];
+ i++;
+ if(i>dl_linii) return 1;
+ }
+ pprzed[i-1]=zn_przed;//dopisz nawias do pomocniczej
+ pprzed[i]='\0';//dopisz koniec linii do pomocniczej
+ i++;
+ while(pomocnicza[i]!=zn_po)
+ {
+ i++;
+ if (i>dl_linii)return 1;
+ }
+ int i_dwa=0;
+ while(pomocnicza[i]!='\0')
+ {
+ ppo[i_dwa]=pomocnicza[i];
+ i++; i_dwa++;
+ }
+ ppo[i_dwa]='\0';
+ strcpy(przed,pprzed);
+ strcpy(po,ppo);
+ return 0;
+}
+
+//checking if we shuld change label counters
+int check_counter_to_set(char*linia)
+{
+ int counter;
+ // counter=0 %--set-r-to
+ // counter=1 %--set-R-to
+ // counter=2 %--set-a-to
+ // counter=3 %--set-l-to
+ // counter=4 %--set-L-to
+ // counter=5 %--set-d-to
+ char switches[6][12]={"%--set-r-to", "%--set-R-to", "%--set-a-to", "%--set-l-to", "%--set-L-to", "%--set-d-to"};
+ char *tymcz;
+ char *checking;
+ int dlugosc=strlen(linia);
+ //tymcz=new char[dlugosc];
+ if(dlugosc>=13&&linia[11]==' ')
+ {
+ tymcz=new char[dlugosc];
+ for(counter=0;counter<6;counter++)
+ {
+ if(!strncmp(linia,switches[counter],11))
+ break;
+ }
+ if(counter==6)
+ return 1;
+ for(int a=12;a<dlugosc;a++)
+ {
+ if (linia[a]=='\n')
+ tymcz[a-12]='\0';
+ else
+ tymcz[a-12]=linia[a];
+ }
+ //we don't nead dlugosc variable anymore, so we can use it for other purpose
+ if(counter==5)
+ {
+ switch (tymcz[0])
+ {
+ case 'r':
+ klasa_obslugi_etykiet.set_up_all(5,0);
+ break;
+ case 'R':
+ klasa_obslugi_etykiet.set_up_all(5,1);
+ break;
+ case 'a':
+ klasa_obslugi_etykiet.set_up_all(5,2);
+ break;
+ case 'l':
+ klasa_obslugi_etykiet.set_up_all(5,3);
+ break;
+ case 'L':
+ klasa_obslugi_etykiet.set_up_all(5,4);
+ break;
+ default:
+ {
+ if(language==0)
+ {
+ cout<<"****************Error**********"<<endl;
+ cout<<"Podałeś opcję "<<switches[counter]<<" ale ze złym argumentem: "<<tymcz<<endl;
+ cout<<"*******************************"<<endl;
+ }
+ else
+ {
+ cout<<endl<<"***************Error******************"<<endl;
+ cout<<"You have given "<<switches[counter]<<" option, but wrong argument: "<<tymcz<<endl;
+ cout<<"**************************************"<<endl;
+ }
+ return 1;
+ }
+ }
+ }
+ else
+ {
+ dlugosc=strtol(tymcz,&checking,10);
+ if(*checking!='\0'||dlugosc<=0)
+ {
+ if(language==0)
+ {
+ cout<<"****************Error**********"<<endl;
+ cout<<"Podałeś opcję"<<switches[counter]<<" ale ze złym argumentem: "<<tymcz<<endl;
+ cout<<"*******************************"<<endl;
+ }
+ else
+ {
+ cout<<endl<<"***************Error******************"<<endl;
+ cout<<"You have given "<<switches[counter]<<" option, but wrong argument: "<<tymcz<<endl;
+ cout<<"**************************************"<<endl;
+ }
+ return 1;
+ }
+ klasa_obslugi_etykiet.set_up_all(counter,dlugosc);
+ }
+ delete tymcz;
+ return 0;
+ }
+
+/*
+ switch(counter)
+ {
+ case 0:
+ {
+
+ break;
+ }
+ case 1:
+ {
+
+
+ break;
+ }
+ case 2:
+ {
+
+
+ break;
+ }
+ case 4:
+ {
+
+
+ break;
+ }
+ default:
+ return 0;
+ }
+ */
+
+ return 0;
+}
diff --git a/support/konwerter/operacje.h b/support/konwerter/operacje.h
new file mode 100644
index 0000000000..e425bc8df4
--- /dev/null
+++ b/support/konwerter/operacje.h
@@ -0,0 +1,10 @@
+#include<iostream>
+#include<fstream>
+#include<string>
+#include<stdlib.h>
+#include"dl_wiersza.h"
+using namespace std;
+//int wczytaj_linie(char*,int*,int);
+//int zapisz_linie(char*,int,ofstream &);
+//int przeszukaj_linie(char*,char*,int);
+int przetwarzaj_plik(char*,/*char*,*/kol_etykiet**);
diff --git a/support/konwerter/operacje_na_tex.cc b/support/konwerter/operacje_na_tex.cc
new file mode 100644
index 0000000000..a47a179330
--- /dev/null
+++ b/support/konwerter/operacje_na_tex.cc
@@ -0,0 +1,151 @@
+
+ /***************************************************************************
+ * *
+ * Copyright (C) 2005 Piotr Wawrzyniak (piti@piti.vsv.pl *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+
+#include"operacje_na_tex.h"
+#include"czyt_zapis.h"
+#include"prz_string.h"
+
+int przeszukaj_linie_tex(char*);
+int przed_etykieta_po(char,char*,char*,char*,char);
+int podaj_etykiete_liczbe(char *, char *, int *);//linia etykieta kolejnosc
+int zwroc_numer_etykiety(kol_etykiet*,char*,kol_etykiet**);
+extern int language;
+extern char polecenie[DL_WIERSZA];
+extern int test;
+
+int operacje_na_tex(char *nazwa_pliku, kol_etykiet*wierzcholek)
+{
+ char drugi_plik_tex[DL_WIERSZA];
+ drugi_plik_tex[DL_WIERSZA-1]=drugi_plik_tex[0]=drugi_plik_tex[1]='\0';
+
+ strcat(drugi_plik_tex,nazwa_pliku);
+ strcat(drugi_plik_tex,".auto.tex");
+
+
+ ofstream plik_tex_wy(drugi_plik_tex);
+ if(!plik_tex_wy)
+ {
+ if(language==0)
+ {
+ cout<<"Nie mogłem otworzyć pliku wyjściowego"<<endl;
+ }
+ else
+ {
+ cout<<"I couldn't open "<<drugi_plik_tex<<"file."<<endl;
+ }
+ return 1;
+ }
+
+ ifstream plik_tex_we(nazwa_pliku);
+ if(!plik_tex_we)
+ {
+ if(language==0)
+ {
+ cout<<"Nie mogłem otworzyć pliku wejściowego"<<endl;
+ }
+ else
+ {
+ cout<<"I couldn't open "<<nazwa_pliku<<" file."<<endl;
+ }
+ return 1;
+ }
+
+ char c[DL_WIERSZA];
+ c[DL_WIERSZA-1]='\0';
+ int dl_lini;
+
+ while(!wczytaj_linie_tex(c,&dl_lini,DL_WIERSZA,plik_tex_we))
+ {
+ switch(przeszukaj_linie_tex(c))
+ {
+ case 0:{plik_tex_wy<<c;break;}
+ case 1://znalazł etykietę
+ {
+ char przed[DL_WIERSZA];
+ char po[DL_WIERSZA];
+ char etykieta[DL_WIERSZA];
+ przed[DL_WIERSZA-1]=po[DL_WIERSZA-1]=etykieta[DL_WIERSZA-1]='\0';
+ int kolejnosc;
+ podaj_etykiete_liczbe(c,etykieta,&kolejnosc);//zwraca etykietę
+ kol_etykiet *zmienna_tymczasowa1;
+ kol_etykiet**zmienna_tymczasowa=&zmienna_tymczasowa1;
+ kolejnosc=zwroc_numer_etykiety(wierzcholek,etykieta,zmienna_tymczasowa);//zwraca numer etykiety
+ if(kolejnosc==0)
+ {
+ if(language==0)
+ {
+ cout<<endl<<"Nieznana etykieta: "<<etykieta<<endl;
+ cout<<"Pozostawiam niezmienione."<<endl;
+ }
+ else
+ {
+ cout<<"Unknown label in tex file: "<<etykieta<<endl
+ <<"Leaving unchanged."<<endl;
+ }
+ plik_tex_wy<<c;
+ }
+ else
+ {
+ przed_etykieta_po('{',c,przed,po,'}');//zwraca co jest przed a co po etykiecie
+
+ //to późnej będzie można usunąć
+ //cout<<przed<<kolejnosc<<po<<endl;
+
+ //plik_tex_wy<<'\\'<<przed<<kolejnosc<<po;
+ plik_tex_wy<<'\\'<<przed<<(*zmienna_tymczasowa)->kolejny_numer_string<<po;
+ }
+ break;
+ }
+ case 2://znalazł nazwę pliku
+ {
+ char nazwa_pliku[DL_WIERSZA];
+ int kolejnosc;
+ char przed[DL_WIERSZA];
+ char po[DL_WIERSZA];
+ nazwa_pliku[DL_WIERSZA-1]=przed[DL_WIERSZA-1]=po[DL_WIERSZA-1]='\0';
+ podaj_etykiete_liczbe(c,nazwa_pliku,&kolejnosc);
+ przed_etykieta_po('{',c,przed,po,'}');
+ operacje_na_tex(nazwa_pliku,wierzcholek);
+ plik_tex_wy<<'\\'<<przed<<nazwa_pliku<<".auto.tex"<<po;
+ break;
+ }
+ }
+
+ }
+
+
+
+
+
+ plik_tex_we.close();
+ plik_tex_wy.close();
+
+ if(test)
+ unlink(drugi_plik_tex);
+
+ return 0;
+}
+
+int przeszukaj_linie_tex(char *linia)
+{
+
+ if(bm(polecenie,linia)==0)
+ {
+ return 1;
+ }
+
+ else
+ if(bm("\\input{",linia)==0)return 2;
+
+return 0;
+
+}
diff --git a/support/konwerter/operacje_na_tex.h b/support/konwerter/operacje_na_tex.h
new file mode 100644
index 0000000000..eb80b588fb
--- /dev/null
+++ b/support/konwerter/operacje_na_tex.h
@@ -0,0 +1,7 @@
+#include<iostream>
+#include<fstream>
+#include<string>
+#include"dl_wiersza.h"
+using namespace std;
+
+int operacje_na_tex(char*,kol_etykiet*);
diff --git a/support/konwerter/prz_string.cc b/support/konwerter/prz_string.cc
new file mode 100644
index 0000000000..fcd527a78b
--- /dev/null
+++ b/support/konwerter/prz_string.cc
@@ -0,0 +1,91 @@
+
+ /***************************************************************************
+ * *
+ * Copyright (C) 2005 Piotr Wawrzyniak (piti@piti.vsv.pl *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+
+/*
+ W tym pliku zawarta jest procedura odpowiedzialna za przeszukiwanie
+ stringu. Procedure przepisana wprost z książki z algorytmami.
+ In this file there is procedure that looks for any patern in given
+ string. Procedure taken directry from book.
+*/
+
+
+
+#include<iostream>
+#include<string.h>
+#include<ctype.h>
+#include"prz_string.h"
+using namespace std;
+
+//const int K=26*2+2*2+1+1+1;// znaki ASCII+polskie litery+spacja+dwukropek+srednik
+const int K=256;
+
+int shift[K];
+//-------------------------------------------------------
+int indeks(char c)
+{
+switch(c)
+ {
+ case ' ':return 0; // spacja=0
+ case '.':return 46;
+ case 'ę':return 53;
+ case 'Ę':return 54; // polskie litery
+ case 'ł':return 55;
+ case 'Ł':return 56; // itd. dla pozostałych polskich liter
+ case '?':return 63;
+ case ':':return 58;
+ case ';':return 59;
+ case '{':return 123;
+ case '}':return 125;
+ default:
+ if(islower(c))
+ return c-'a'+1;
+ else return c-'A'+27;
+ }
+}
+//-------------------------------------------------------
+int init_shifts(char *w)
+{
+int M=strlen(w);
+for(int i=0;i<K;i++) shift[i]=M;
+for(int i=0;i<M;i++)
+ shift[indeks(w[i])]=M-i-1;
+ return 0;
+}
+//-------------------------------------------------------
+int bm(char *w,char *t)
+{
+init_shifts(w);
+int i, j,N=strlen(t),M=strlen(w);
+for(i=M-1,j=M-1;j>0;i--,j--)
+ while(t[i]!=w[j])
+ {
+ int x=shift[indeks(t[i])];
+ if(M-j>x) i+=M-j;else
+ i+=x;
+ if (i>=N) return -1;
+ j=M-1;
+ }
+return i;
+}
+//-------------------------------------------------------
+/*void main()
+ {
+ char *t,*w;
+ cout<<"Napisz tekst do przeszukania ";
+ cin>>t;
+ cout<<"Napisz wzorzec do znalezienia ";
+ cin>>w;
+
+ cout << "Wynik poszukiwań="<<bm(w,t)<<endl;
+ }
+
+*/
diff --git a/support/konwerter/prz_string.h b/support/konwerter/prz_string.h
new file mode 100644
index 0000000000..5ac0ac5288
--- /dev/null
+++ b/support/konwerter/prz_string.h
@@ -0,0 +1 @@
+int bm(char *,char *);
diff --git a/support/konwerter/system_zapisu.cc b/support/konwerter/system_zapisu.cc
new file mode 100644
index 0000000000..3c00602511
--- /dev/null
+++ b/support/konwerter/system_zapisu.cc
@@ -0,0 +1,414 @@
+
+ /***************************************************************************
+ * *
+ * Copyright (C) 2005 Piotr Wawrzyniak (piti@piti.vsv.pl *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+
+//The class and functions responsible for conversions to various numbering styles
+
+#include"system_zapisu.h"
+#include <iostream>
+using namespace std;
+extern int ignore_formating;
+extern int language;
+//constructor
+r_numerow::r_numerow(int a, int b, int c, int d, int e)
+{
+ zwroc_num_etykiet[0]=a;
+ zwroc_num_etykiet[1]=b;
+ zwroc_num_etykiet[2]=c;
+ zwroc_num_etykiet[3]=d;
+ zwroc_num_etykiet[4]=e;
+ domyslny_styl_numeracji=2;
+}
+
+int r_numerow::ustaw_zmienna_numer_etykietki(char *etykieta)
+{
+
+ if(etykieta[0]==':'&&strlen(etykieta)>=3&&!ignore_formating)
+ {
+ switch (etykieta[1])
+ {
+ case 'r':
+ zwroc_numer_etykiety(0);
+ break;
+ case 'R':
+ zwroc_numer_etykiety(1);
+ break;
+ case 'a':
+ zwroc_numer_etykiety(2);
+ break;
+ case 'l':
+ zwroc_numer_etykiety(3);
+ break;
+ case 'L':
+ zwroc_numer_etykiety(4);
+ break;
+ default:
+ zwroc_numer_etykiety(domyslny_styl_numeracji);
+ }
+ }
+ else
+ zwroc_numer_etykiety(domyslny_styl_numeracji);
+ return 0;
+}
+
+
+int r_numerow::set_up_all(int roman,int Roman,int arabic,int letters,int Letters,int def)
+{
+ zwroc_num_etykiet[0]=roman;
+ zwroc_num_etykiet[1]=Roman;
+ zwroc_num_etykiet[2]=arabic;
+ zwroc_num_etykiet[3]=letters;
+ zwroc_num_etykiet[4]=Letters;
+ domyslny_styl_numeracji=def;
+
+ return 0;
+}
+
+int r_numerow::set_up_all(int what, int what_number)
+{
+ if(what==5)
+ {
+ domyslny_styl_numeracji=what_number;
+ return 0;
+ }
+ else
+ {
+ zwroc_num_etykiet[what]=what_number;
+ return 0;
+ }
+}
+
+int r_numerow::zwroc_numer_etykiety(int numer)
+{
+
+ zeruj_numer_etykietki();
+ //wartosci_num_etykiet[numer]++;
+ // zwroc_num_etykiet[numer]++;
+ switch(numer)
+ {
+ case 0:
+ if(int_na_rom_char(zwroc_num_etykiet[0],0))
+ return 2;;//Był problem z zalokowaniem pamięci
+ break;
+ case 1:
+ if(int_na_rom_char(zwroc_num_etykiet[1],1))
+ return 2;;//Był problem z zalokowaniem pamięci
+ break;
+ case 2:
+ if(int_na_char(zwroc_num_etykiet[2]))
+ return 2;//Był problem z zaalokowaniem pamięci
+ break;
+ case 3:
+ if(int_na_lit_char(zwroc_num_etykiet[3],0))
+ return 2;//Był problem z zaalokowaniem pamięci
+ break;
+ case 4:
+ if(int_na_lit_char(zwroc_num_etykiet[4],1))
+ return 2;//Był problem z zaalokowaniem pamięci
+ break;
+ };
+ zwroc_num_etykiet[numer]++;
+ return 0;
+}
+
+int r_numerow::int_na_char(int a)
+
+{
+ kol_liczb *pierwszy=NULL;
+ kol_liczb *ostatni=NULL;
+ kol_liczb *pomocnicza=NULL;
+ // kol_liczb *poprzedni=NULL;
+
+
+ int b=a;
+ int d;
+
+ float c;
+
+ while(b>0.1)
+ {
+ c=b/10;
+ pomocnicza=new kol_liczb;
+ if (!pomocnicza)
+ {
+ if(language==0)
+ {
+ cout<<"Problem z zaalokowaniem wolnej pamięci"<<endl;
+ }
+ else
+ {
+ cout<<"Error! Couldn't allocate free memory."<<endl;
+ }
+ return 1;//Błąd alokacji pamięci
+ }
+
+ if(!pierwszy)
+ {
+ pierwszy=ostatni=pomocnicza;
+ pierwszy->next=pierwszy->prev=NULL;
+ }
+
+ else
+ {
+
+ ostatni->next=pomocnicza;
+ pomocnicza->prev=ostatni;
+ pomocnicza->next=NULL;
+ ostatni=pomocnicza;
+
+ }
+
+ d=(int)c;
+ pomocnicza->liczba=b-d*10;
+ //cout<<pomocnicza->liczba<<endl;
+ b=d;
+
+ }
+
+ pomocnicza=ostatni;
+ b=0;
+ while(pomocnicza)
+ {
+ // cout<<pomocnicza->liczba<<endl;
+ switch (pomocnicza->liczba)
+ {
+ case 0:
+ numer_etykietki[b]='0';
+ numer_etykietki[b+1]='\0';
+ break;
+ case 1:
+ numer_etykietki[b]='1';
+ numer_etykietki[b+1]='\0';
+ break;
+ case 2:
+ numer_etykietki[b]='2';
+ numer_etykietki[b+1]='\0';
+ break;
+ case 3:
+ numer_etykietki[b]='3';
+ numer_etykietki[b+1]='\0';
+ break;
+ case 4:
+ numer_etykietki[b]='4';
+ numer_etykietki[b+1]='\0';
+ break;
+ case 5:
+ numer_etykietki[b]='5';
+ numer_etykietki[b+1]='\0';
+ break;
+ case 6:
+ numer_etykietki[b]='6';
+ numer_etykietki[b+1]='\0';
+ break;
+ case 7:
+ numer_etykietki[b]='7';
+ numer_etykietki[b+1]='\0';
+ break;
+ case 8:
+ numer_etykietki[b]='8';
+ numer_etykietki[b+1]='\0';
+ break;
+ case 9:
+ numer_etykietki[b]='9';
+ numer_etykietki[b+1]='\0';
+ break;
+ };
+ pierwszy=pomocnicza;
+ pomocnicza=pomocnicza->prev;
+ delete pierwszy;
+ b++;
+ }
+
+ return 0;
+}
+
+int r_numerow::int_na_rom_char(int liczba,int mal_duz)
+{
+ char tablica_liczb_rzymskich[33][5]={"i","ii","iii","iv","v","vi","vii","viii","ix","x","x","xx","xxx","xl","l","lx","lxx","lxxx","xc","c","c","cc","ccc","cd","d","dc","dcc","dccc","cm","m","m","mm","mmm"};
+
+
+ int ile_cyfr=0;
+ kol_liczb *pierwszy=NULL;
+ kol_liczb *ostatni=NULL;
+ kol_liczb *pomocnicza=NULL;
+ // kol_liczb *poprzedni=NULL;
+
+ int b=liczba;
+ int d;
+ float c;
+ if(liczba>3899)
+ {
+ if(language==0)
+ {
+ cout<<"Przekroczony maksymalny zakres dla liczb rzymskich. Maksymalnie można przypisać 3899"<<endl;
+ }
+ else
+ {
+ cout<<"Maximal range for Roman numbers is 3899. Yours numbers are to high. Sorry dude.";
+ }
+ return 1;
+
+ }
+ while(b>0.1)
+ {
+ c=b/10;
+ pomocnicza=new kol_liczb;
+ if (!pomocnicza)
+ {
+ if(language==0)
+ {
+ cout<<"Bład!. Problemy z zaalokowaniem pamięci!"<<endl;
+ }
+ else
+ {
+ cout<<"Error!. Memory allocation problem.!"<<endl;
+ }
+ return 1;
+ }
+ if(!pierwszy)
+ {
+ pierwszy=ostatni=pomocnicza;
+ pierwszy->next=pierwszy->prev=NULL;
+ }
+
+ else
+ {
+
+ ostatni->next=pomocnicza;
+ pomocnicza->prev=ostatni;
+ pomocnicza->next=NULL;
+ ostatni=pomocnicza;
+
+ }
+
+ ile_cyfr++;
+ d=(int)c;
+ pomocnicza->liczba=b-d*10;
+
+ //cout<<pomocnicza->liczba<<endl;
+ b=d;
+
+ }
+
+ pomocnicza=ostatni;
+ while(pomocnicza)
+ {
+ //cout<<pomocnicza->liczba;
+ // cout<<(ile_cyfr-1)*10+pomocnicza->liczba;
+ if(pomocnicza->liczba)//Tutaj tak musi być bo jeśli liczba wychodziła 0 to były szopki
+ //cout<<tablica_liczb_rzymskich[(ile_cyfr-1)*10+pomocnicza->liczba-1];
+ strcat(numer_etykietki,tablica_liczb_rzymskich[(ile_cyfr-1)*10+pomocnicza->liczba-1]);
+
+ // cout<<pomocnicza->liczba;
+ pierwszy=pomocnicza;
+ pomocnicza=pomocnicza->prev;
+ delete pierwszy;
+ ile_cyfr--;
+
+ }
+
+ //If mal_duz=1 then change small roman number to capital ones
+ if (mal_duz==1)
+ {
+ int unsigned dupa=0;
+ while(dupa<strlen(numer_etykietki))
+ {
+ numer_etykietki[dupa]-=('a'-'A');
+ dupa++;
+ }
+ }
+ return 0;
+}
+
+int r_numerow::int_na_lit_char(int liczba,int mal_duz)
+{
+
+char tablica_liter[26][2]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
+
+//char liczba_rzymska[256];
+//int ile_cyfr=0;
+
+
+ //for(int aaa=0;aaa<10;aaa++)
+ // { cout<<tablica_liter[aaa]<<endl;}
+
+ kol_liczb *pierwszy=NULL;
+ kol_liczb *ostatni=NULL;
+ kol_liczb *pomocnicza=NULL;
+ // kol_liczb *poprzedni=NULL;
+
+ int b=liczba;
+ b--;//trzeba znmiejszyć o 1 bo wychodzą bzdury. Problem z konwersją system dziesiętny - dwódziestoszóstkowy
+ int d;
+ float c;
+ do
+ {
+ c=b/26;
+ pomocnicza=new kol_liczb;
+ if (!pomocnicza)
+ {
+ if(language==0)
+ {
+ cout<<"Bład!. Problemy z zaalokowaniem pamięci!"<<endl;
+ }
+ else
+ {
+ cout<<"Error!. Memory allocation problem.!"<<endl;
+ }
+ return 1;
+ }
+ if(!pierwszy)
+ {
+ pierwszy=ostatni=pomocnicza;
+ pierwszy->next=pierwszy->prev=NULL;
+ }
+
+ else
+ {
+ ostatni->next=pomocnicza;
+ pomocnicza->prev=ostatni;
+ pomocnicza->next=NULL;
+ ostatni=pomocnicza;
+ }
+
+ d=(int)c;
+
+ pomocnicza->liczba=b-d*26;
+
+ b=d;
+
+ }
+ while(b>1/26);
+
+pomocnicza=ostatni;
+while(pomocnicza)
+{
+
+ strcat(numer_etykietki,tablica_liter[pomocnicza->liczba]);
+ pierwszy=pomocnicza;
+ pomocnicza=pomocnicza->prev;
+ delete pierwszy;
+
+}
+
+//If mal_duz=1 then change small letter r to capital ones
+ if(mal_duz==1)
+ {
+ int unsigned dupa=0;
+ while(dupa<strlen(numer_etykietki))
+ {
+ numer_etykietki[dupa]-=('a'-'A');
+ dupa++;
+ }
+ }
+
+ return 0;
+}
diff --git a/support/konwerter/system_zapisu.h b/support/konwerter/system_zapisu.h
new file mode 100644
index 0000000000..6dae381546
--- /dev/null
+++ b/support/konwerter/system_zapisu.h
@@ -0,0 +1,80 @@
+/*
+Copyright (C) 2004 Piotr Wawrzyniak (piti@piti.vsv.pl)
+
+Plik zawiera definicję klasy przechowującej informacje i funkcje,
+które będą definiowały odpowiednie numerowanie
+
+In this file, there is class defined, that handles number types.
+I know that this can be made much easies, without class definition etc,
+but I wanted to write alittle with classes to lern them allitle.
+
+*/
+
+#include<string.h>
+
+struct kol_liczb{
+ int liczba;
+ kol_liczb* next;
+ kol_liczb* prev;
+};
+
+
+
+ const int dl=20;//długość linii przechowującej numerk kolejnej etykietki
+//klasa rekord_numerow zawierające kolejne numery dla poszczegolnych składowych
+class r_numerow{
+
+ public:
+ char numer_etykietki[dl]; //np 111, ab, XV, xv itd.
+ int set_up_all(int,int,int,int,int,int);
+ int set_up_all(int, int);
+
+ /*
+ zwróci numerek etykiety w liczbach rzymskich, arabskich czy literkach
+ dokładnie to tylko zmodyfikuje wartość numer_etykietki[], którą trzeba
+ będzie odzielnie odczytać po wywołaniu tej funkcji na rzecz etykietki.
+ Przy czym dozwolone wartości są następujące"
+ 0 - roman numbers small :r
+ 1 - roman numbers bigg :R
+ 2 - arabic numbers :a
+ 3 - small letters :l
+ 4 - big letters :L
+ */
+
+ int zwroc_numer_etykiety(int numer);
+ int domyslny_styl_numeracji;
+ r_numerow(int,int,int,int,int);//konstruktor, constructor
+ int ustaw_zmienna_numer_etykietki(char *);
+ private:
+
+ /*
+ default numbering scheme. There are 5 possible values
+ 0 - roman numbers small :r
+ 1 - roman numbers bigg :R
+ 2 - arabic numbers :a
+ 3 - small letters :l
+ 4 - big letters :L
+ */
+
+ /*
+ tablica przechowująca kolejny numer dla każdej etykietki
+ table that contains the last number for given group of labels
+ */
+ int zwroc_num_etykiet[5];
+
+ int int_na_rom_char(int,int);//zamiana numeru na romanski mały i duzy, change to roman small and big
+ int int_na_char(int); //zamiana numeru na char zawierający numer, change int to char
+ int int_na_lit_char(int,int);//zamiana numeru na litery male i duże, change to small and capital letters
+
+ /*
+ The inline function that fill in with zeros the variable numer_etykietki
+ Generally it is better to have everywhere there zeros.
+ */
+ int zeruj_numer_etykietki()
+ {
+ for(int dupa=0;dupa<dl;dupa++)
+ numer_etykietki[dupa]='\0';
+ return 0;
+ }
+
+};