Do you want to run on your wonderful PC i486/i586 (from mid 90's) a modern 32-bit multitasking operating system? Install
I like
Reference to my page devoted to TeXing in OS/2. You can get the latest version of pmCSTeX for EPM here.
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
\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).
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.
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
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*}
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=6mmThen, 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} } \fiwhile 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.
is nice graph plotting program compatible between various operating systems
(UNIX, OS/2, VMS, DOS, Windows, Mac, Atari...)!
Please download the latest official version 4.2.x
if you have any previous one.
My enhancements to gnuplot: please look at
where you find information about
My conversion program from C++ to LaTeX (C++2ltx).
Special method to calculate the integral \int_{xA}^{xB} \cos(A x) F(x) dx byl the Filon method.
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.
All freeware and shareware C Programming programs (plus more than 23,288 others) are now on JUMBO. The Official Web Shareware Site:
Matrix calculations in 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.)
Contents of my PostScript part:
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.
... 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
scalex
scale in x direction. Positive number
slope_baseline
=0 (text parallel to x axis), otherwise tangent of
the slope (positive direction)
slope_backslanted
=0 (text parallel to x axis), otherwise tangent
of the slope
scaley
scale in y direction. Negative number, absolute value
equals that of scalex
shiftx
is shift (of rotated and scaled) figure to right
shifty
is shift (of rotated and scaled) figure down/up
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 SMwhere
mirroring
=0 (normal) or 1 (looking on the sheet from bottom)
rotation
=0 (portrait) or 90 or -90 (landscape)
shiftx
is shift (of rotated and scaled) figure to right;
shifty
is shift down
ashiftx
is the figure shift right, ashifty
up; does
not work when scaling (?)
resolution
corresponds to scaling. Usual value is 300 (maybe
depends on the printer settings). Increasing resolution makes the figure smaller,
decreasing resolution makes it larger.
SP
command, like
0 3 SPGeneral syntax is
linetype linewidth SPwhere linetypes are 0 for solid; 1,2 for dashed; 3,5 for hatch; 5 for dotted line.
font
and SB
commands, like
32 0 0 156 156 0 1 1 50 /MSTT31c158 font 418 1030 31 (0) 31 SBThe meaning is the following:
? ? ? scaleX scaleY ? underline overline ? vertical_shift /MSTT31c158 font x y width (text) ? SBThe 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.
32 0 0 66 66 0 0 0 67 /Symbol font 1214 1737 50 (F) 50 SB
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.
x x x setrgbcolor
(x
is number) in black&white figures,
x x x setrgbcolor
strings by x K
strings
(K
is IDL's abbreviation for setgray
,
x y z setrgbcolor
strings by x y z k
with new definition
/k{setrgbcolor}bdef
,
0.000
by 0
, and wipes trailing zeros in decimal
numbers.
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.
Here is the description and patch file MatlabEpsTo-CZencodings.diff.
(Don't wonder that I wrote it even of not using Matlab...)
Last update: August 2005. Previous: May 2004.