Ena Aplo Paradeigma SGML
Matt Welsh,
[email protected]
v1.0, 28 Martioy 1994
Ayto to keimeno apotelei ena suntomo paradeigma xrhshs toy Linuxdoc-
SGML DTD. (S.t.M. Apotelei metafrash alla kai prosarmogh sta ellhnika
dedomena toy arxikou keimenoy poy perilambanetai sta sgml-tools.
Prokophs Prokopidhs,
[email protected], Septembrios 1999)
______________________________________________________________________
Table of Contents
1. Eisagwgh
2. O kwdikas
3. Merika paradeigmata
3.1 Ayth einai mia ypoenothta
3.1.1 Ayth einai mia an8ypoenothta
3.2 Keimeno poy xrhsimopoieitai ws paradeigma
3.3 Parapompes se alla shmeia toy keimenoy
3.4 Xrhsh twn grammatoseirwn
3.5 Listes
______________________________________________________________________
1. Eisagwgh
Ayto einai ena paradeigma SGML me th xrhsh toy Linuxdoc-SGML DTD.
Mporeite na to morfopoihsete xrhsimopoiwntas thn entolh
% sgml2html example.sgml
poy 8a paragagei HTML selides. Mporeite epishs na paragagete LaTeX,
.txt kai GNU info arxeia. (S.t.M. Me orismenoys periorismous gia ta
Ellhnika. H metatroph se HTML doyleuei xwris kanena problhma kai sta
Ellhnika.)
2. O kwdikas
Ejetazontas ton kwdika apo ayto to arxeio 8a ma8ete pws na
xrhsimopoieite polles apo tis domes toy Linuxdoc-SGML. 8a prepei
epishs na diabaste to Linuxdoc-SGML User's Guide, sto arxeio
guide.sgml poy perilambanetai sth dianomh twn sgml-tools.
O kwdikas, opws 8a deite, moiazei me ton kwdika toy LaTeX. Oi
paragrafoi xwrizontai me kenes grammes, oi makroentoles perikleiontai
se agkules. Prokeitai gia arketa aplo kwdika.
3. Merika paradeigmata
Akoloy8oun paradeigmata orismenwn pragmatwn poy 8a xreiasteite ston
kwdika. Prwta as kateboume se mia ypoenothta:
3.1. Ayth einai mia ypoenothta
Opws leei kai o titlos ths. Prosejte oti einai aparaithto na
xrhsimopoihsete thn entolh p gia na arxisete to kyriws meros ths
enothtas, meta apo thn entolh sect1. Akoloy8ei mia an8ypoenothta:
3.1.1. Ayth einai mia an8ypoenothta
Wraia. Exete sth dia8esh sas 5 epipeda enothtwn. Xrhsimopoihste tis
entoles sect, sect1, sect2, sect3, kai sect4 gia na ta
ekmetalleyteite. Ayto to keimeno xrhsimopoiei to styl keimenoy article
(ar8ro), poy einai katallhlo gia HOWTO kai alla paromoia keimena to
styl report (texnikh anafora) poy perilambanei thn entolh enothtas
chapt (kefalaio) 8a prepei na to xrhsimopoieite gia ta keimena toy
Linux Documentation Project.
3.2. Keimeno poy xrhsimopoieitai ws paradeigma
As ypo8esoyme loipon oti, ka8ws synexizete to gracimo, 8elete na
enswmatwsete sto keimeno sas ton kwdika, thn eisodo, h thn ejodo enos
programmatos. Se tetoies periptwseis xrhsimopoihste ta
``periballonta'' code h verb, perikleiontas ta se ena periballon
tscreen, opws sto paradeigma:
This is an example for environment verb.
Epishs:
______________________________________________________________________
This is an example for environment code.
______________________________________________________________________
To periballon tscreen aplws orizei mikrotero mege8os grammatoseiras
kai frontizei gia th swsth stoixish. Den einai aparaithto gia th xrhsh
twn verb h code, pantws egw sas to synistw.
To keimeno Linuxdoc-SGML User's Guide ejhgei poioys eidikous
xarakthres mporeite kai poioys den mporeite na xrhsimopoihsete sta
periballonta verb and code.
3.3. Parapompes se alla shmeia toy keimenoy
8elete kai parapompes se alla shmeia toy keimenoy; Ayth h enothta exei
markaristei me thn entolh label. Xrhsimopoiwntas thn entolh ref 8a
dhmioyrghsete mia parapomph, opws sto paradeigma ``Deite thn Enothta
``'' gia perissoteres plhrofories''.
Gia thn wra oi parampompes de doyleuoyn kata th metafrash (me th xrhsh
toy groff) se aplo ASCII keimeno. Doyleuoyn swsta otan paragete LaTeX
h HTML.
3.4. Xrhsh twn grammatoseirwn
An 8elete grammatoseires, exoyme ki ap' aytes. Fysika de 8a tis
blepete sto aplo keimeno ASCII, alla 8a emfanistoun oles sta diafora
format poy 8a paragagete: boldface (entona), emphasis (gia emfash),
sans serif (xwris oyres), slanted (plagia), typewriter (grafomhxanhs),
and italics (``italakia'').
3.5. Listes
Oi listes einai epishs eukoles. Aplws xrhsimopoihste to stoixeio
itemize me tis entoles item opws emfanizontai parakatw:
� Ayth einai mia lista.
� Tipote to fobero edw.
� Epishs yposthrizontai pollapla epipeda.
� Kai pali, kamia ekplhjh.
1. Oi ari8mhmenes listes me th xrhsh toy enum epishs doyleuoyn.
2. To periballon perigrafhs, me th xrhsh twn descrip kai tag einai
epishs dia8esimo, opws fainetai ki edw.
Prwto stoixeio.
Na ena stoixeio.
Deutero stoixeio.
Na ki allo ena.
Trito stoixeio.
Pame kai gia to trito.
� Kai gia kerasaki sthn tourta, ena teleytaio stoixeio.
Kalucame sxedon ka8eti poy xreiazeste gia na jekinhsete me to gracimo
keimenwn SGML xrhsimopoiwntas to linuxdoc-sgml DTD. Sas parakalw na me
eidopoihsete an nomizete oti kati prepei na allajei h na proste8ei se
ayto to keimeno.