Vitejte na me pocitacove strance!

MUJ FREEWAROVY SOFTWARE

Seznam meho volne sireneho softwaru se nyni nachazi na sve vlastni strance.


Chcete poradny 32bitovy multitaskovy operacni system pro Vase bajecne PC i486/i586 (z pulky 90 let)? Nainstalujte si

IBM OS/2 Warp je velice schopny operacni system s preemptivnim multitaskingem a dalsimi modernimi rysy, zahrnujicimi tez graficke uzivatelske prostredi. Umi spoustet programy pro OS/2, PM (Presentation Manager), DOS i MS-Windows (vcetne 32s), pracuje se i na W32-95NT, a to vse v preemtivnim multitaskingu, coz jeji nejvetsi konkurent, firma Microsoft, doposud nezvladla ani v nejnovejsim upgradu zvanem MickeymouSe-Windows patch-level 95.
OS/2 Warp je v soucasne dobe v prodeji ve dvou verzich:
OS/2 verze 4.0: spica, ma plno perfektnich veci, upgradujte/kupte! Umi totez co Warp Connect 3.0 (viz nize), a plno dalsiho!
OS/2 verze 3.0 zvana Warp existuje v nekolika verzich: blue s podporou MS-Windowsovskych programu zabudovanou primo do jadra OS/2, a red, ktera umoznuje MS-Windowsovske programy spoustet pomoci jiz instalovanych Windowsu. Modra a cervena verze existuje tez pro Warp Connect, coz je verze Warpa urcena pro uzivatele pracujici v (heterogennich) pocitacovych sitich a ktera se umi pripojit do siti OS/2 Peer, Novell, Lantastik, W4WGs, Samba apod. K Warpu 3.0 je tez pribalen Bonus Pak, v nemz jsou sitove programy jako telnet, ftp, WebExplorer, mail, news apod., a dale System Information tool a dalsi. Je v tom podpora pro TCP/IP pres modem, nikoliv pres ethernet kartu. Pro provozovani TCP/IP pres ethernet kartu je nutny bud program freetcp.zip z hobbes (viz prislusna partie v pokracovani), anebo Warp Connect.

Profesionalneji zpracovanou charakteristiku si muzete precist zde.

Pro OS/2 existuje velke mnozstvi programu (seznam prislusnych serveru je v pokracovani), vcetne GNU programu, jakym je napriklad i prekladac GNU C/C++ (gcc). Take DOSovske hry si z Warpa spustite. Proto se na nedostatek softwaru rozhodne stezovat neda.
K mym oblibenym Warpovskym programum patri Program Commander/2, ktery nad originalnim Warpovskym Desktopem vytvari podobne prostredi, jako maji X-Windowsy, jenze lepsi :-) Dale pouzivam prekladac gcc/emx, sazeci system TeX/LaTeX a editor EPM. No, softwaru by bylo tolik, ze by zaplacal jakkoli velky disk, cimz by se stal pocitac naprosto nepouzitelnym.

Po opusteni DOSu jsem volil mezi OS/2 a Linuxem (Windows>3.11 byla v nedohlednu, a dalo se cekat, ze novy software bude hrozne buggy), a nakonec zvitezila OS/2ka, ktera ma hezke graficke prostredi, nema takove naroky na RAMku a pritom umi poustet vse, co 16 i 32bitova OS/2, DOS, Linux, MS-Windows 3.* i X-Windows.

Tak, abych prilis neprodluzoval tuto WWW stranku, tak vas odkazi na mou

samostatnou a velikou OS/2 stranku


Tam najdete plno zajimavych i dulezitych informaci, najdete seznam FTP uzlu a WWW stranek meho oblibeneho operacniho systemu IBM OS/2 Warp, stejne jako adresu ceske OS/2kovske diskusni skupiny atd. Jsou tam tez adresy nekolika nasich i zahranicnich komercnich organizaci prodavajich OS/2 software. A tez me poznamky plynouci z pouzivani tohoto operacniho systemu, napr. TeXovani v OS/2 a konkretne zde najdete i balik pmCSTeX for EPM. A mnoho dalsiho...


TeX + LaTeX

TeX je muj oblibeny system pro pripravu textu. Plno informaci o nem pripravil CSTUG (Ceskoslovenske sdruzeni uzivatelu TeXu, Czech/Slovak TeX Users Group). Na jeho WWW strance najdete hodne linku, vcetne CSTeXu, archivu konference CSTeXu i stroj vyhledavajici v CTAN archivu. Plno souboru, podpornych programu apod. si muzete stahnout z centralniho ceskeho texovskeho archivu na ftp.muni.cz.

Vyhledavani v archivu cstexovske konference.

Jsou k dispozici tez CSTeX FAQ

Zde je odkaz na mou stranku venovanou TeXovani v OS/2 Warp. Muzete se stahnout nejnovejsi verzi meho baliku pmCSTeX pro EPM: prostredi pro vyvoj TeXovskych dokumentu v OS/dvojkovskem editoru EPM.

Pripominam link na CSTeX distribuci u pana Olsaka.

Prvni ceska verejnou betaverze dokumentu Ne prilis strucny uvod do systemu LaTeX2e se nachazi zde.

Tez jsem testoval rychlost prekladu (La)TeXovskych dokumentu pod ruznymi systemy (OS/2, DOS, Linux), muj prispevek do cstexu je zde k dispozici.

Pak tady mam par triku pro BibTeX:

Sazeni vektoru tucnou italikou

Kdyz chcete sazet vektory tucnou italikou, pak pouzijte prikaz:


\DeclareMathAlphabet{\mib}{OT1}{cmr}{bx}{it}

potom vam napr. $\mib r$ vysazi tucne sklonene r. Muzete tez predefinovat

\let\oldvec\vec \let\vec\mib
Pokud pisete ve vedeckem textu hodne vektoru, pak je (podle meho nazoru) desne neprakticke, a tez i spatne citelne psat vyrazy jako je nize uvedena definice rovinne vlny
\vec E(\vec r) = \vec E_0 \, e^{-i\vec k \vec r} ale mne se vic libi definice v preambuli
\def\bE{\vec E}
\def\bk{\vec k}
\def\br{\vec r}
...atd...
a pak uz v textu rychly a jednoduchy zapis:
\bE(\br) = \bE \, e^{-i\bk\br}
(Na matice pouzivam neco podobneho, kde pisi \matA, \matB,...)

Ve starsim LaTeXu 2.09 se na tucnou italiku muselo pouzit makro boldvec.sty, v kterem jsou i makra na vysazeni casove derivovanych vektoru (to jsem zatim v LaTeXu2e nepotreboval).

HOWTO convert png or jpeg to eps

Go to the postscript section to read how to efficiently convert a png or jpeg file into eps, so that it is small enough and compatible with dvips.

Oboustranny tisk a tisk ze zasobniku c. 2 z dvipsu

Nasledujici postup slouzi k tisknuti z dvipsu dvoustranne anebo na slajdy, aniz by bylo nutne rucne editovat postscriptovy soubor vylezly z dvipsu (vymysleno 18.1.1998):

A. Pouziti z prikazove radky:

dvips -h 2sideP.ps my_text[.dvi]
dvips -h 2sideL.ps my_text[.dvi]
dvips -h Slot2.ps my_text[.dvi]

B. Uziti z pmCSTeXu pro EPM (editor EPM pod OS/2):

na prvni radek "Master" souboru pridame:
%  ...   dvips: * -h 2sideP.ps *  ...
%  ...   dvips: * -h 2sideL.ps *  ...
%  ...   dvips: * -h Slot2.ps * ...

C. Popis vyse uvedeneho:

tisk oboustranne na papir PORTRAIT
tisk oboustranne na papir LANDSCAPE
tisk ze zasobniku cislo 2

D. Instalace: nasledujici tri soubory musi byt presunuty do adresare, kde dvips hleda data (v emTeXu je to adresar \EMTEX\data\dvips). Soubory si muzete bud stahnout odtudto, anebo si je muzete opsat odtud:

File 2sideP.ps:
% PRINT ON BOTH SIDES / TISKNUTI OBOUSTRANNE --- PORTRAIT:
[{
%%BeginFeature: Duplex DuplexNoTumble
<</Duplex true /Tumble false>> setpagedevice
%%EndFeature: Duplex
} stopped cleartomark


File 2sideL.ps:
% PRINT ON BOTH SIDES / TISKNUTI OBOUSTRANNE --- LANDSCAPE:
[{
%%BeginFeature: Duplex DuplexNoTumble
<</Duplex true /Tumble true>> setpagedevice
%%EndFeature: Duplex
} stopped cleartomark


File Slot2.ps:
% PRINT FROM SLOT NB. 2 (SLOT FOR TRANSPARENCIES, FOR INSTANCE):
[{
%%BeginFeature: *InputSlot Lower
   currentpagedevice /InputAttributes get 2 get
   dup null eq
   { pop }
   { dup length 1 add dict copy
     dup /InputAttributes
     1 dict dup /Priority [2] put
     put setpagedevice
   } ifelse
%%EndFeature
} stopped cleartomark

Zruseni LaTeXovskeho prostredi

Pokud se vam stane, ze se biji dve definice tehoz prostredi, definovane ve dvou ruznych souborech, ktere z nejakych duvodu nechcete menit (napr. nejste autorem), pak muzete pouzit ten prikaz pro vymazani prostredi:
\def\deleteenvironment#1{
\expandafter\let\csname #1\endcsname\relax
\expandafter\let\csname end#1\endcsname\relax
}

Pouziti napr.:
\deleteenvironment{equation*}

How to submit your publication with figures at the end

In document preamble (before \begin{document}), you should (always!) have this setup:
%%%%%% Setup for figures:
\setcounter{topnumber}{10}     % max. pocet floatu nahore (specifikace t)
\setcounter{bottomnumber}{10} % max. pocet floatu dole (specifikace b)
\setcounter{totalnumber}{20}   % max. pocet floatu na strance celkem
\renewcommand\topfraction{1.0}  % max podil stranky pro floaty nahore
\renewcommand\bottomfraction{1.0} % max podil stranky pro floaty dole
\renewcommand\textfraction{0.0}    % min podil stranky, ktery musi obsahovat text
%\intextsep pro ulozeni [h] floatu a \textfloatsep pro [b] or [t].
%\intextsep pro ulozeni [h] floatu a \textfloatsep pro [b] or [t].
\intextsep=6mm \textfloatsep=6mm
Then, in order to have all figures at the document end, sometimes
\usepackage{endfloats}
helps, and sometimes not (like in case of classes of some journals). In this case, and in the case the journal requires all figure captions on one page, on figures on separate pages afterwards, then it is the most easy way to put the following code towards the end of your paper:
%%%% FIGURE CAPTIONS AND FIGURES:

\iftrue
% Life of scientists would be much easier if journals don't require
% captions and figures on different pages, as in the old dark ages
% of machine typing. We use computers, nowadays!
{
  \def\includegraphics[#1]#2{}
  \gdef\mycaption#1#2{Figure \ref{#1}. #2}
  \input{paper-figs.tex}
  \clearpage
}
{
  \let\oldincludegraphics\includegraphics
  \def\includegraphics[#1]#2{\vskip4cm\oldincludegraphics[#1]{#2}}
  \gdef\mycaption#1#2{\caption{\label{#1}}\vskip6cm}
  \input{paper-figs.tex}
}
\fi
while having all figures listed in a separate file paper-figs.tex like this (note using \mycaption instead of \caption):
%%%================= FIGURE ====================
\begin{figure}[p]
\begin{center}
  \includegraphics[width=14cm]{figures/adExpScheme.eps}
\end{center}
\mycaption{Fig-Exp-Setup}{%
  Sketch of the experimental arrangement with horizontal scattering plane and
  vertical rocking axis.  GaN ELO measured at one azimuth with stripes vertical,
  GaAs samples at two mutually perpendicular azimuths (0\degdeg and 90\degdeg).
}
\end{figure}

%%%================= FIGURE ====================
\begin{figure}[p]
...

If you have any better solution, please let me know.

Miscellanous TeX-related addresses

CSTUG = Czech and Slovak TeX Users Group
TUG = TeX Users Group
(La)TeX FAQ = frequently asked questions
Prof. D.E. Knuth's page at Stanford
Bulletin CSTUGu
Tex2RTF: konvertuje z LaTeXu do RTF
PDF specification
Ceska dokumentace k metapostu


gnuplot

To je program pro kresleni grafu, ktery je skutecne kompatibilni mezi vsemi moznymi operacnimi systemy (UNIX, OS/2, VMS, DOS, Windows, Mac, Atari...)! Stahnete si nejnovejsi oficialni verzi gnuplotu 4.2.x, pokud jeste pouzivate nekterou ze starsich verzi.

My enhancements to gnuplot: please look at

my separate gnuplot page

where you find information about


ME DALSI OBLIBENE PROGRAMY

Mam rad volne sirene programy (freeware, public-domain, GNU apod.) programy. Mene uz mam rad shareware, zvlaste kdyz neprijemne vyzaduje cosi zaplatit. Takze zde mam soupis programu, ktere mam v oblibe a jez jsou zadarmo:

Programovani v C a C++

Informace ode mne

Muj konvertor C++ to LaTeX (C++2ltx).

Specialni metodu pro vypocet integralu \int_{xA}^{xB} \cos(A x) F(x) dx Filonovou metodou byl uverejnen vyse.

Pro prenos souboru mezi ruznymi OS je potreba prejmenovat C++ zdrojove soubory na priponu .cpp, .cxx ci .cc. V OS/2, DOSu i VMS jde pouzit prikaz ren *.cpp *.cxx, avsak na Unixu ne. Zdenek mi napsal takovyto unixovsky skript:


for i in *.cpp
  do mv $i `echo $i|sed s/cpp$/cxx/`
done

An anti-char * article, alias C++ Programming HOWTO, is here.

Taky jsem si vzpomnel na testy ruznych prekladacu, publikovane v casopise EDM/2 (konkretne to bylo cislo 1-5). Z toho vyplyva, ze predevsim diky pouziti metody predkompilovanych hlavicek je nejrychlejsim prekladacem Borland C/C++. Naopak nejkompaktnejsi kod produkuje Watcom, a nejrychlejsi kod dostaneme pouzitim prekladace GNU C/C++ -- to je priznive zvlaste proto, ze tento prekladac je sireny zdarma a je k dispozici na vsech operacnich systemech. IBM Visual C++ ma nejlepsi rozhrani pro navrhovani OS/2 aplikaci, prekladac Watcomu bezici v jedne z verzi pod OS/2, DOSem, Windows ci Windows NT zase umoznuje prelozit jeden a tentyz zdrojovy texty na spustitelny program pro libovolny z techto OS.

Ruzne sitove informace

All freeware and shareware C Programming programs (plus more than 23,288 others) are now on JUMBO. The Official Web Shareware Site:

Jumbo
Jumbo/prog/os2
Jumbo/prog/dos/c

C++ resource directory
g++ page and FAQ
STL: Standard Template Library
C++ info and links
Cantrip Corpus C++
imatix: SFL = Standard function library for C/C++ --- open source

GNU page
free software list

Archiv kulturniho programovani pro Web, C a C++
GNU C/C++, ANSI draft for C++

Maticovy pocet v C++

Po projiti ruznych volne sirenych implementacich maticovych knihoven jsem dospel k nasledujicimu: * V cistem Cecku existuje meschach, ovsem narazil jsem na jakesi potize kdyz jsem to zarazoval do C++. Dale tu je LAPACK++: netlib2.cs.utk.edu:netlib/c++/lapack++ (ja jsem pouzil zrcadlo netlibu na elib.ZIB-Berlin.de:netlib/*). Kontakt na spravce: netlib@research.att.com. Pouzivaji se pritom fortranske rutiny Lapacku, prevedene do C podoby prekladacem f2c a dale rucne -- viz CLapack. Lapack++ je tak dobre udelany, ze pres to, ze jde o C++, tak rychlost vypoctu je ve Fortranu (originalni lapack), C (lapack) a C++ (lapack++) stejna, nekdy spise ve prospech C/C++. V dokumentaci lapacku++ je prilozen i clanek pojednavajici o tomto testovani. Bohuzel tam dosud nebyly implementovany vsechny potrebne funkce maticoveho poctu (hlavne mi tam chybi invertovani matic). Autori to nechali jako ulohu ctenarum/programatorum...

Nakonec jsem si vybral C++ knihovnu z programu Octave. Tento program je podobny Matlabu, ovsem umi toho vic, je to verze pro X-Windows a OS/2 sirena pod GNU licenci. Program vcetne zdrojaku se da stahnout z libovolneho GNU archivu ci z hobbes ci z linuxovskych serveru. A prave knihovny z tohoto baliku se daji velice jednoduse pouzit ve vlastnich C++ programech. Podporovany jsou double a complex-ni vektory a matice, ale zase nejsou zacleneny specialni rutiny treba pro vypocet vlastnich hodnot symetrickych matic.

Lapack++ i Octave pouzivaji na vetsinu vypoctu fortranske rutiny. Ty jsou k Octavu pricleneny, anebo se daji tez stahnout z netlibu. Ovsem zjistil jsem, ze pod Borlandim C prekladacem (ani pro DOS, ani pro Winbloze) je neprelozim kvuli 64KB DGROUP limitu. Zato se to podarilo s Borland C++ for OS/2 -- OS/2 a Unixy pameti linearizuji a stupidni problemy DOSu zde neexistuji. Jinak pod gcc/emx prekladacem se to prelozilo bez problemu, vsak prilozene makefily jsou pro tento prekladac. Pro Borland bylo nutne provest vicero uprav, jez vam na pozadani zaslu.

A pokud si chcete precist kratky referat o sitove pristupnych C++ zdrojacich pro maticovy pocet, tak voditkem muze byt tohle.

Mumit's home page (Lapack++, FFTPack++, Shadow etc.)


PostScript

Welcome to my PostScript web page!

Contents of my PostScript part:

Main Postscript-related web sites

Ghostscript and ghostview are free previewers of postscript files for many operating systems. Ghostscript can raster postscript files for printing them on non-ps printers.
GhostScript and GhostView main site
Download of ghostscript and ghostview, many information about them, a lot of links.
Internet Resources for Postscript and Ghostscript
It's cool!
PostScript WWW pointers
W3/PS
Lots of PS information at quite
Internet PostScript Resources
psview
fast previewer for postscript files (small front-end for ghostscript). Available for DOS and OS/2. It is the best one for DOS!

Postscript documentation

A PostScript Tutorial and Reference
from Computing Laboratory, UKC
A First Guide to PostScript
WWW document
PS documentation by Adobe
the full list of level 2 operator descriptions at Luminous
Postscript Quick Tips
How to make watermark and more...
Zaklady PostScriptu --- zaklady, neni zde uplny popis prikazu
Thinking in PostScript by Glenn Reid, PDF version
A First Guide to PostScript
Printable PS handbook
And of course the best book is the PostScript Language Reference Manual by Adobe (costs 30 USD). There is also new Red Book on PostScript.
wisc.edu/~ghost

Postscript utililities

psutils: source, versions for OS/2 and for DOS.
very useful postscript utilities: psbook, psnup, psresize, psselect, pstops. Scripts getafm, showchar, fixing output from various programs...
epstool
calculation of Bounding box, adding/removing preview pictures from PS files. You can download my script CalcPSBB.cmd (version for OS/2) which corrects wrong Bounding box of a .ps file.
Important: if you are putting .ps files (figures, graphs...) into your a (La)TeX document, you must correct their bounding box since 99% of applications produce postscript files with wrong bounding information!
PageDraw drawing program
PageDraw is a PostScript based vector drawing program for Windows 3.1. It lets you draw, edit or transform several graphical shapes.
It's freeware, input files must be converted to AI = Adobe Illustrator format.
Its features are quite limited. Don't use it for making graphics. Xfig is the best tool.
two-side and slot2 config utilities
Do you use a printer capable of both-side (recto-verso) printing but it is not configured so that you can both-side print long documents printed on one page only? Or, you do not know how to print your slides (in a PS files) to the lower slot (with transparencies) on a network printer? Then enjoy this utility, which adds some PS setup code in the beginning of the file and makes what you want.
Even when it is said that each printer has another way to set this both side/slot2 printing, I have found that the above-mentioned utility worked for all printers I tried. Note: see also a similar section in the above TeXing part.
syntax highlighting for postscript files
if you edit postscript files in the (free) editor EPM under OS/2, then you may like colouring of the edited postscript files. This file, after necessary modification, could be of use for other editors too (nedit for X-Windows has such features).
Distillery
Distillery is a PostScript program for taking another PostScript program, and converting it so that it complies with the Adobe document structuring conventions (DSC). The advantage of this is that individual pages can be accessed randomly, without requiring all previous pages to be processed in order to correctly determine the state of the machine.

My PostScript Tricks

There are some my notes about PostScript hacking, editing, resizing, inputing into other programs...

Documetn HOWTO-Bitmap2eps describes how to efficiently convert a bitmap image into an encapsulated postscript level 2 file (for latexing and dvipsing, for example).
Results:

If you are putting your plots into a typesetting system, like TeX, then you should recalculate the Bounding box written in the header of the file. This is a general rule for nearly all PS-producing programs.

For reducing the size of a postscript file, you can make CRLF to LF conversion (DOS to Unix conversion). dvips compiled by gcc/emx produces CRLF.

Newer versions of ghostview (e.g. GSview 2.5) can show .ps.gz / .eps.gz files. You don't have to decompress them.

dvips can also include graphics in .(e)ps.gz form. However, TeX (e.g. \includegraphics in LaTeX) requires the Bounding box specification either as the parameter (in \includegraphics[bb= x1 y1 x2 y2]{..} or a .(e)ps.bb file. There is a script called psgzip that makes takes .(e)ps files and makes .bb and .gz for them. Note: dvips calls gunzip program for unzipping; so you can make script gunzip.(cmd,bat) with the command gzip -d %1.

How do I edit PS files? In editor EPM, for which I have also the syntax hilighting file (look into pmCSTeX.

How to efficiently transform a bitmap (BMP, TIFF, PCX, GIF, JPG...) file into (encapsulated) postscript? Please, do NOT just print it from PMView, XV, PaintBrush or Word! The best solution I have found is to convert the figure into JPEG format, and then convert it into postscript by jpeg2ps. (The linked file contains executables for OS/2 and DOS, and the source code. At the moment, I don't remember the homepage). Don't forget to use the option -h if you intend to include the file into TeX (using dvips). The converted .PS file is not too much larger than .JPG itself, since it uses the ability of PostScript Level 2 of decoding JPEG data.

Note: there is also a program called giftops which does GIF to PS translation, but this is very unefficient --- generated file is huge. It's better to conver GIF to JPEG and then used the jpeg2ps.

Hacking PostScript output from Adobe Driver

Here I discuss how to change the output from Adobe PostScript Driver. This is needed when you don't have the source text/picture/whatever ready, or when you get PS file for priting or including into a publication and it does not fit your printer or your needs. This driver is available for (as I know) Win 3.11 (works fine under Win-OS/2) --- it's better replacement of the default Microsoft PS driver, which is quite buggy. At least, I have found some bugs: generated PS was not PS compatible and it was not possible to print it. Story says that Adobe was so upset about the M$ driver that they offered M$ their driver as default for use in Win 9x or NT. Look into the header to see which one is it. Note: download is at www.adobe.com, section download, then PS drivers for Windows (the other are for Macintoshes).

Changing landscape/portrait or size of the plot

The structure of a postscript file produced is
...
beginning of PS file
...
/mysetup [ 0.24 0 0 -0.24 117.520 119.600 ] | 
...
Scale (thus size), angle and shift of the figure on the sheet are given by this definition of mysetup. The general notation is the following:
/mysetup [ scalex slope_baseline slope_backslanted scaley shiftx shifty ] |

where

Hacking PostScript output from Micro$oft PS driver for Win 3.11

This, sometimes buggy, is the default PS printer driver for Win 3.11. (Thus, it's default also in Win-OS/2). If you have not replaced it by the Adobe driver, see above, and want to change size or shift of a postscript file, then you may be interesting in the following. It will describe properties similar to those discussed for the Adobe driver above.

The structure of a postscript file produced by this driver is

...
beginning of PS file
...
%%EndSetup
SS
0 1 25 31 776 1169 300 SM
...
Shift and size of the figure on the sheet is given by the command SM. Its general notation is the following:
mirroring rotation  shiftx shifty  ashiftx ashifty  resolution  SM
where

Hacking PostScript output from Origin

Origin is a commercial scientific plotting program (2d graphs, 3d maps) for M$-Windows (version for 3.11 runs under OS/2 as well). Even though I do not use this program (I like gnuplot much more for its portability and speed), I'm getting plots made by this program in order to put them in publications. Some people produce figures under Win 3.11 with MS PS driver, the PS output from Origin, and the size / linestyles etc. are not convenient for you, then you may find the following information useful.

Changing landscape/portrait or size of the plot

...discussed a little bit above.

Changing linetypes directly in PS file

It may happen that you get a PS file from Origin, but the original data have been lost, or the person having them is unreachable. You desperately need to change
linetypes or linewidths
The trick is to search for lines with SP command, like
0 3 SP
General syntax is
linetype linewidth SP
where linetypes are 0 for solid; 1,2 for dashed; 3,5 for hatch; 5 for dotted line.
fonts
The trick is to search for font and SBcommands, like
32 0 0 156 156 0 1 1 50 /MSTT31c158 font
418 1030 31 (0) 31 SB
The meaning is the following:
? ? ? scaleX scaleY ? underline overline ? vertical_shift /MSTT31c158 font
x y width (text) ? SB
The values for underline, overline are 0 (no), 1 (yes). width determines the spaces (density) which is put in between characters. That crazy name /MSTT31c158 is a true type font name defined at the end of the file.
Example of putting Greek character Phi somewhere:
32 0 0 66 66 0 0 0 67 /Symbol font
1214 1737 50 (F) 50 SB

Hacking PostScript output from IDL

IDL is a scientific plotting program (2d graphs, 3d maps) for X-Windows. It is very expensive commercial program, but produces very nice maps. Here I describe some awful features of its postscript output, since I have got some PS figures from IDL to put into a publication.

fonts in IDL

That really terrible that IDL does not use PostScript fonts at all! Instead, it draws all characters by thin lines! As the result, the labels on the graph do not comply with the text used on other figures of the publications, shame on IDL! The worst thing is the these segments for characters are somewhere in the PS file undistinguishable from other curves, so that hacking is not possible at all.
Well, I never used IDL, so I do not know whether it is not possible to switch off IDL's characters and print the text using usual PS fonts with show command. If it is possible, then let me know, and shame to people not using that!

If you are putting your plots into a typesetting system, like TeX, then you should recalculate the Bounding box written in the header of the file. This is a general rule for nearly all PS-producing programs.

decreasing PS file size

Note: I was told that the latest IDL does not suffer from the problem mentioned further, so you will see whether it will work for you. Since I don't use IDL, I cannot tell you anything about its versions...
Did you notice has big are PS files representing maps? I really wonder that the authors did not look inside their creature:
  1. there are a lot of sequences x x x setrgbcolor (x is number) in black&white figures,
  2. there are trailing zeros in numbers!
Thus I wrote an awk script NoSetrgbcolorIDL.awk which takes an IDL PS file and replaces there
  1. x x x setrgbcolor strings by x K strings (K is IDL's abbreviation for setgray,
  2. x y z setrgbcolor strings by x y z k with new definition /k{setrgbcolor}bdef,
  3. 0.000 by 0, and wipes trailing zeros in decimal numbers.
This results in an enourmous reduction of the .ps file size (here I can see 25--30%, which are megabytes for large files. Quite important if you want to store the figures of the publication forever!

Hacking PostScript output from Matlab

Matlab is a system and language for numerical computations. Matlab is a commercial program.

There are several open source alternatives, where the most compatible is Octave. I use Octave, not Matlab, even though there is a multilicense for the university: I can have legal copies of Octaves on all my machines, including the home computer; Octave is a standard part of most Linux distributions; there was no Octave for OS/2 when I used heavily this OS; I find the "gset" commands for drawing more intuitive then Matlabish handles.

Počeštění poststscriptových souborů z Matlabu (přidání českého kódování)

Users reported that Czech labels cannot be used in Matlab is it has no counterpart of "set encoding iso_8859_2" command of gnuplot alias "gset encoding iso_8859_2" in Octave. For them, I solved this problem. The following patch can be applied to an (encapsulated) postscript file from Matlab. It will add ISO Latin2 and CP1250 encoding vectors (as you may find in gnuplot postscript files) and redefine either of them (according to your default selection) as the default encoding vector for the text in the postscript file.

Here is the description and patch file MatlabEpsTo-CZencodings.diff.

(Don't wonder that I wrote it even of not using Matlab...)



Vtipy

2*B||!2*B

Implementoval jsem jednu frazi Shakespearova Hamleta a nestacil jsem se divit, jaky vyznam se za tim skryva!

Pozn. 1: sdeleni bylo desifrovano pod CP 852 v OS/2 (pod DOSem by ten exac mel taky jet). Snad i na Unixu to bude vyznam tyz?

Pozn. 2: prvni digitalni verzi vyse uvedene fraze jsem videl ve fortranu, kde znela 2B.or..not.2B, coz ovsem prelozit nejde.

Různé další vtípky




Last update: August 2005. Previous: May 2004.