how to open pdf file on button click in mvc : Converting pdf to html application SDK tool html wpf .net online lgc2-excerpts0-part860

TheL
A
T
E
XGraphics
Companion
SecondEdition
MichelGoossens
FrankMittelbach
SebastianRahtz
DenisRoegel
HerbertVoß
UpperSaddleRiver,NJ •Boston •Indianapolis •SanFrancisco
NewYork•Toronto •Montreal •London •Munich •Paris •Madrid
Capetown •Sydney•Tokyo •Singapore •MexicoCity
Converting pdf to html - application SDK tool:C# PDF Convert to HTML SDK: Convert PDF to html files in C#.net, ASP.NET MVC, WinForms, WPF application
How to Convert PDF to HTML Webpage with C# PDF Conversion SDK
www.rasteredge.com
Converting pdf to html - application SDK tool:VB.NET PDF Convert to HTML SDK: Convert PDF to html files in vb.net, ASP.NET MVC, WinForms, WPF application
PDF to HTML Webpage Converter SDK for VB.NET PDF to HTML Conversion
www.rasteredge.com
Manyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimed
astrademarks.Wherethosedesignationsappearinthisbook,andAddison-Wesleywasawareofa
trademarkclaim,thedesignationshavebeenprintedwithinitialcapitallettersorinallcapitals.
Theauthorsandpublisherhavetakencareinthepreparationofthisbook,butmakenoexpressedor
impliedwarrantyofanykindandassumenoresponsibilityforerrorsoromissions.Noliabilityis
assumedforincidentalorconsequentialdamagesinconnectionwithorarisingoutoftheuseofthe
informationorprogramscontainedherein.
Thepublisheroffersdiscountsonthisbookwhenorderedinquantityforbulkpurchasesandspecial
sales.Formoreinformation,pleasecontact:
U.S.CorporateandGovernmentSales
(800)382-3419
corpsales@pearsontechgroup.com
ForsalesoutsideoftheUnitedStates,pleasecontact:
InternationalSales
international@pearsoned.com
VisitAddison-WesleyontheWeb:www.awprofessional.com
LibraryofCongressCataloging-in-PublicationData
The LaTeX X Graphics companion n / / Michel Goossens ... . [et t al.]. -- 2nd ed.
p. cm.
Includes bibliographical l references and index.
ISBN 978-0-321-50892-8 8 (pbk. : : alk. . paper)
1. LaTeX X (Computer r file) 2. Computerized d typesetting. . 3. PostScript
(Computer program m language) ) 4. Scientific c illustration--Computer programs.
5. Mathematics s printing--Computer programs. 6. Technical
publishing--Computer programs. I. . Goossens, Michel.
Z253.4.L38G663 2008
686.2’2544536–dc22
2007010278
Copyright
©
2008byPearsonEducation,Inc.
Allrightsreserved.Nopartofthispublicationmaybereproduced,storedinaretrievalsystem,or
transmitted,inanyform,orbyanymeans,electronic,mechanical,photocopying,recording,or
otherwise,withoutthepriorconsentofthepublisher.
Theforegoingnotwithstanding,theexamplescontainedinthisbookandobtainableonlineon
CTANaremadeavailableundertheLAT
E
XProjectPublicLicense(forinformationontheLPPL,
seewww.latex-project.org/lppl).
Forinformationonobtainingpermissionforuseofmaterialfromthiswork,pleasesubmitawritten
requestto:
PearsonEducation,Inc.
RightsandContractsDepartment
75ArlingtonStreet,Suite300
Boston,MA02116
Fax:(617)848-7047
ISBN10:
0-321-50892-0
ISBN13: 978-0-321-50892-8
TextprintedintheUnitedStatesonrecycledpaperatCourierinWestford,Massachusetts.
Firstprinting,July2007
application SDK tool:Online Convert PDF to HTML5 files. Best free online PDF html
Creating a HTML from PDF has never been so easy! Easy converting! We try to make it as easy as possible to convert your doc files to PDF.
www.rasteredge.com
application SDK tool:C# PDF Converter Library SDK to convert PDF to other file formats
Free C#.NET SDK library and components for converting PDF file in .NET Windows applications, ASP.NET web Able to export PDF document to HTML file.
www.rasteredge.com
WededicatethisbooktothehundredsofL
A
T
E
Xdevelopers
whosecontributionsareshowcasedinit,
andwesalutetheirenthusiasmandhardwork.
Wewouldalsoliketorememberwithaffectionandthanks
DanielTaupin,whoseMusiXT
E
Xsystemisdescribedin
Chapter9,andwhopassedawayin2003,agreatlosstoourcommunity.
application SDK tool:VB.NET PDF Converter Library SDK to convert PDF to other file
For how to convert PDF to HTML document in VB a series of demo code directly for converting MicroSoft Office Word, Excel and PowerPoint document to PDF file in
www.rasteredge.com
application SDK tool:C# PDF Convert to SVG SDK: Convert PDF to SVG files in C#.net, ASP
Support converting PDF document to SVG image within C# PDFDocument(@"C:\input.pdf"); pdf.ConvertToVectorImages(ContextType Description: Convert to html/svg files
www.rasteredge.com
Rhapsodie
pourpiano
Compos´epartiellementvers1975,termin´eenaoˆut2002
DanielTAUPIN
ă
1
Piano
I
G
2
2
2
2
2
2
ff
Allegro
(
˘
= 50)
#
˛ˇ
˛ˇ
!
tr
EEEEEEE
¯
ˇ
ˇ
ă
ăă
ă
ˇ
tr
EEEEEEE
¯
ˇ
ˇ
ă
ăă
ă
ˇ
#
!
tr
EEEEEEE
¯
ˇ
ˇ
ă
ăă
ă
ˇ
tr
EEEEEEE
¯
ˇ
ˇ
ă
ăă
ă
ˇ
#
!
tr
EEEEEEE
¯
ˇ
ˇ
ă
ă
ă
ă
ˇ
tr
EEEEEEE
¯
ˇ
ˇ
ă
ă
ă
ă
ˇ
#
!
tr
EEEEEEE
¯
ˇ
ˇ
ă
ă
ă
ă
ˇ
tr
EEEEEEE
¯
ˇ
ˇ
ă
ă
ă
ă
ˇ
#
!
tr
EEEEEEE
¯
ˇ
ˇ
ă
ăă
ă
ˇ
tr
EEEEEEE
¯
ˇ
ˇ
ă
ăă
ă
ˇ
ă
6
I
G
2
2
#
!
tr
EEEEEE
¯
ˇ
ˇ
ę
ę
ę
ę
ˇ
tr
EEEEEE
¯
ˇ
ˇ
ę
ęę
ę
ˇ
#
!
tr
EEEEEE
¯
ˇ
ˇ
ę
ę
ę
ę
ˇ
tr
EEEEEE
¯
ˇ
ˇ
ę
ęę
ę
ˇ
#
!
tr
EEEEEE
¯
ˇ
ˇ
ę
ę
ę
ę
ˇ
tr
EEEEEE
¯
ˇ
ˇ
ę
ęę
ę
ˇ
#
¯
¯
˘
;
ˇ`
ě
ęě
ę
ˇ
ˇ
ˇ
ˇ
ğ
ğ
ğ
ğ
ˇ
»
»
˘`
˘
`
˘`
!
?
ˇ
-
ˇ
?
ˇ(
#
¯
¯
˘
;
ˇ`
ěě
ę
ę
ˇ
ˇ
ˇ
ˇ
ğ
ğ
ğ
ğ
ˇ
ă
12
I
G
2
2
`
`
˘`
˘`
!
?
ˇ
(
ˇ
?
ˇ(
#
¯
¯
˘
<
ˇ`
§§
ă
ă
ˇ
ˇ
ˇ
ˇ
ą
ą
ą
ą
ˇ
˘
`
˘`
˘`
!
rit.
?
ˇ
ˇ(
?
ˇ(
#
¯
¯
¯
¯
¯
|
˘
`
˘`
˘`
˘
`
4
˘
`
!
>
>
ff
atempo
#
˛ˇ
˛ˇ
!
¯
tr
EEEEEEE
¯
ˇ
ˇ
ę
ęę
ę
ˇ
tr
EEEEEEE
¯
ˇ
ˇ
ę
ęę
ę
ˇ
ă
18
I
G
2
2
#
!
¯
tr
EEEEEE
¯
ˇ
ˇ
ę
ę
ę
ę
ˇ
tr
EEEEEE
¯
ˇ
ˇ
ę
ęę
ę
ˇ
#
!
¯
tr
EEEEEE
¯
ˇ
ˇ
ę
ę
ę
ę
ˇ
tr
EEEEEE
¯
ˇ
ˇ
ę
ę
ę
ę
ˇ
#
!
¯
tr
EEEEEE
¯
ˇ
ˇ
ę
ę
ę
ę
ˇ
tr
EEEEEE
¯
ˇ
ˇ
ę
ę
ę
ę
ˇ
#
!
¯
tr
EEEEEE
¯
ˇ
ˇ
ę
ęę
ę
ˇ
tr
EEEEEE
¯
ˇ
ˇ
ę
ęę
ę
ˇ
#
!
¯
tr
EEEEEE
¯
ˇ
ˇ
ę
ęę
ę
ˇ
tr
EEEEEE
¯
ˇ
ˇ
ę
ę
ę
ę
ˇ
#
!
¯
tr
EEEEEE
¯
ˇ
ˇ
ę
ęę
ę
ˇ
tr
EEEEEE
¯
ˇ
ˇ
ę
ę
ę
ę
ˇ
ă
24
I
G
2
2
#
!
¯
tr
EEEEEEEE
¯
ˇ
ˇ
ă
ăă
ă
ˇ
tr
EEEEEEEE
¯
ˇ
ˇ
ă
ăă
ă
ˇ
#
¯
¯
˘ =
ˇ`
ą§§
ˇ
ˇ
ˇ
ˇ
ş
şş
ş
ˇ
ı
ı
˘`
˘
`
˘`
!
?
ˇ
-
ˇ
?
ˇ(
#
¯
¯
˘
˘ =
ˇ`
ś
ś
şş
ˇ
ˇ
ˇ
ˇ
ş
şş
ş
ˇ
ı
ı
˘`
˘
`
˘`
!
?
ˇ
-
ˇ
?
ˇ
ˇ(
ă
29
I
G
2
2
#
¯
¯
˘
˘
˘
˚
ˇ
`
㧧
ă
ˇ
ˇ
ˇ
ˇ
ą
ą
ą
ą
ˇ
˘
`
˘`
˘
`
!
?
ˇ
ˇ(
?
ˇ
ˇ
ˇ(
#
¯
¯
˘
4
˘
˘
˚
ˇ
`
§
ă§
ă
ˇ
\
ˇ
ˇ
ˇ
ą
ą
ą
ą
\
ˇ
˘
`
˘`
˘
`
!
rit.
?
ˇ
ˇ(
?
ˇ
\
ˇ
ˇ(
#
¯
¯
¯
¯
¯
!
|
#
˘
`
˘`
p
C
˘`
˘
`
4
˘
`
!
>
>
Rhapsodie— 26mars2003— (D.Taupin)
1
MusiccomposedbyDanielTaupinandtypesetwithMusiXT
E
X
application SDK tool:C# PDF Convert to Word SDK: Convert PDF to Word library in C#.net
Word in C#.NET. Online C#.NET Tutorial for Converting PDF to Word (.doc/ .docx) Document with .NET XDoc.PDF Library in C#.NET Class.
www.rasteredge.com
application SDK tool:C# PDF Convert to Tiff SDK: Convert PDF to tiff images in C#.net
Best C#.NET PDF converter SDK for converting PDF to Tiff in Visual Studio .NET project. C# programming sample for PDF to Tiff image converting.
www.rasteredge.com
CHAPTER
1
GraphicswithL
A
T
E
X
1.1 Graphicssystemsandtypesetting............................. . 2
1.2 Drawingtypes......................................... . 3
1.3 T
E
X’sinterfaces......................................... 6
1.4 Graphicslanguages......................................10
1.5 Choosingapackage......................................21
Thephrase“Apicturepaintsathousandwords”seemstohaveenteredtheEnglishlan-
guagethankstoFrederickR.BarnardinPrinter’sInk,8December1921,retellingaChinese
proverb.
1
However,whileL
A
T
E
Xisquitegoodattypesettingwordsinabeautifulmanner,
L
A
T
E
Xmanualsusuallytellyoulittleornothingabouthowtohandlegraphics.Thisbookat-
temptstofillthatgapbydescribingtoolsandT
E
Xniquesthatletyougenerate,manipulate,
andintegrategraphicswithyourtext.
InthesedaysofthemultimediaPC,graphicsappearinvariousplaces.Withmanyprod-
uctswegetready-to-usecollectionsofclipartgraphics;inshopswecanbuyCD-ROMswith
“thebestphotos”ofimportantplaces;andsoforth.Asweshallsee,allsuchgraphicscanbe
includedinaL
A
T
E
Xdocumentaslongastheyareavailableinasuitableformat.Fortunately,
manypopulargraphicformatseitheraredirectlysupportedorcanbeconvertedviaapro-
gramthatallowstransformationintoasupportedrepresentation.
Ifyouwanttobecomeyourowngraphicartist,youcanusestand-alonededicated
drawingtools,suchasthefreelyavailabledia(www.gnome.org/projects/dia)and
xfig(www.xfig.org/userman)onLinux,orthecommercialproductsAdobeIllustrator
(www.adobe.com/illustrator)orCorelDraw(www.corel.com/coreldraw)ona
MacorPC.Spreadsheetprograms,oroneofthemoderncalculationtoolslikeMathematica
1
PaulMartinLester(commfaculty.fullerton.edu/lester/writings/letters.html)statesthat
theliteraltranslationofthe“phony”Chineseproverbshouldratherbe“Apicture’smeaningcanexpresstenthou-
sandwords”.He,rightly,emphasizesthatpicturescannotandshouldnotreplacewords,butbotharecomple-
mentaryandcontributeequallytotheunderstandingofthemeaningofawork.
application SDK tool:VB.NET PDF Convert to Word SDK: Convert PDF to Word library in vb.
VB.NET PDF Converting DLLs for PDF-to-Word. This is an example for converting PDF to Word (.docx) file in VB.NET program. ' Load a PDF document.
www.rasteredge.com
application SDK tool:VB.NET PDF- HTML5 PDF Viewer for VB.NET Project
PDF in VB.NET, VB.NET convert PDF to HTML, VB.NET convert PDF to Word Online Guide for Viewing, Annotating And Converting PDF Document with HTML5 PDF Viewer in VB
www.rasteredge.com
2
GRAPHICSWITHLAT
E
X
(www.wolfram.com/mathematica),Maple(www.maplesoft.com/maple),andMAT-
LAB(www.mathworks.com/matlab),ortheirfreelyavailableGNUvariantOctave(www.
octave.org)anditsplottingcomplementsOctaviz(octaviz.sourceforge.net)and
Octplot(octplot.sourceforge.net),canalsoproducegraphicsbyusingoneoftheir
manygraphicaloutputrepresentations.Withthehelpofascanneroradigitalcamerayou
canproducedigitalphotos,imagesofhand-drawnpictures,orothergraphicsthatcanbe
manipulatedwiththeiraccompanyingsoftware.Inallthesecasesitiseasytogeneratefiles
thatcanbedirectlyreferencedintheL
A
T
E
Xsourcethroughthecommandsofthegraphics
packagedescribedinChapter2.
Ifneeded,L
A
T
E
Xcanalsoofferacloserintegrationwiththetypesettingsystemthanthat
possiblebysuchprograms.Suchintegrationisnecessaryifyouwanttousethesamefonts
intextandgraphics,ormoregenerallyifthe“style”ofthegraphicsshoulddependonthe
overallstyleofthedocument.Closeintegrationofgraphicswiththesurroundingtextclearly
requiresgenerationofthegraphicbythetypesettingsystemitself,becauseotherwiseany
changeinthedocumentlayoutstylerequiresextensivemanuallaborandthewholeprocess
becomesveryerror-prone.
∗ ∗ ∗
Thischapterconsidersgraphicobjectsfromdifferentangles.First.welookattherequire-
mentsthatvariousapplicationsimposeongraphicobjects.Next,weanalyzethetypesof
drawingsthatappearindocumentsandthestrategiestypicallyemployedtogenerate,in-
tegrate,andmanipulatesuchgraphics.Then,wediscusstheinterfacesofferedbyT
E
Xfor
dealingwithgraphicobjects.Armedwiththisknowledge,weendthechapterwithashort
surveyofgraphicslanguagesbuiltwithinandaroundT
E
X.Thisoverviewwillhelpyouse-
lecttherighttoolforthejobathand.Infact,thecurrentchapteralsogivessomeexamples
oflanguagesandapproachesnotcoveredindetailelsewhereinthebook.Thusthissurvey
shouldprovideyouwithenoughinformationtodecidewhetherornottofollowthepointers
andobtainsuchapackageforaparticularapplication.
1.1 Graphicssystemsandtypesetting
Whenspeakingabout“graphicobjects”,weshouldfirstdefinetheterm.Oneextremeposi-
tionistovieweverythingputonpaperasagraphicobject,includingthecharactersofthe
fontsused.Thisquiterevolutionaryviewwas,infact,adoptedinthedesignofthepagede-
scriptionlanguagePostScript,inwhichcharacterscanbecomposedandmanipulatedby
exactlythesamefunctionsasothergraphicobjects(wewillseesomeexamplesofthisin
Chapters5and6,whichdescribePSTricksanditssupportpackages).
Mosttypesettingsystems,includingT
E
X,donottrytodeploysuchageneralmodelbut
insteadrestricttheirfunctionaldomaintoasubsetofgeneralgraphicobjects—forexam-
ple,byprovidingverysophisticatedfunctionstoplacecharacters,resolveligatures,etc.,but
omittingoperatorstoproducearbitrarylines,constructandfillregions,andsoforth.Asa
resulttheterm“graphics”formostL
A
T
E
Xusersisasynonymfor“artwork”,therebyignoring
thefactthatL
A
T
E
Xalreadyhasagraphicslanguage—thepicturemode.
1.2 Drawingtypes
3
Whendiscussingthegraphicalcapabilitiesofanidealtypesettingsystem,wemustre-
memberthatdifferentapplicationshavedifferent,sometimesconflictingrequirements:
• Oneextremeistheneedforcompleteportabilitybetweenplatforms;anotheristotake
intoaccountevendifferencesinthewayprintersputinkontopaper.
• Agraphicmightneedtobecorrectlyscaledtoacertainsizedependingonfactorsofthe
visualenvironmentcreatedbythetypesettingsystem,e.g.,themeasureofthetext.
• Itisalsopossiblethatpartsofthegraphicshouldnotscalelinearly.Forexample,it
mightbeimportantforreadabilitytoensurethattextualpartsofagraphicdonotbe-
comesmallerorlargerthansomelimit.Itmightalsoberequiredthat,whenagraphic
isscaledby,say,10%tofittheline,anyincludedtextmuststaythesame,soastoavoid
makingitlargerthanthecharactersinthemaindocumentbody.
• Itmightberequiredthatthegraphicalobjectbecloselyintegratedwiththesurrounding
text,suchasbyusingthesamefontsasinotherpartsofthedocumentormoregener-
allybycontainingobjectsthatshouldchangetheirappearanceiftheoverallstyleofthe
documentischanged.(Thelatterisespeciallyimportantifthedocumentisdescribed
byitslogicalcontentratherthanbyitsvisualappearance,withtheintentionofreusing
itinvariouscontextsandforms.)
AsL
A
T
E
Xisageneral-purposetypesettingsystemusedforalltypesofapplications,thepre-
cedingrequirementsandmoremightariseinvarioussituations.Aswewillseethroughout
thisbook,alargenumberofthemcanbehandledwithgrace,ifnottoperfection.Insome
casesanappropriatesolutionwasanythingbutobviousanddevelopingthematuremacro
packagesandprogramswenowhavetookadecadeormoreofwork.
1.2 Drawingtypes
Thetypologyofgraphicsatthebeginningofthischapterfocusedonthequestionofthe
integrationwiththeL
A
T
E
Xsystem,anddividedthegraphicsintoexternallyandinternally
generatedones.Adifferentperspectivewouldbetostartfromthetypesofgraphicswemight
encounterindocumentsanddiscusspossiblewaystogenerateandincorporatethem.
AfirstclassofgraphicstobeincludedaretreatedbyL
A
T
E
Xasasingleobject,a“black
box”,withoutanaccessibleinnerstructure.L
A
T
E
X,viaitsgraphicspackage(describedin
Chapter2),isinterestedonlyintherectangulardimensionsofthegraphicimage,its“bound-
ingbox”.Thegraphicswillbeincludedintheoutput“asis”,possiblyaftersomesimplema-
nipulation,suchasscalingorrotation.OntopofthatL
A
T
E
Xcanalsoproduceacaptionand
legendtoallowproperreferencingfromwithinthedocument.Themaincategoriesareas
follows:
1. Free-handpicturesdrawnwithoutacomputer,suchasthedrawingofaglassbeadin
Figure1.1.ForuseinL
A
T
E
X,suchagraphicmusttobetransformedintoadigitalimage,
using,forexample,ascanner.
4
GRAPHICSWITHLAT
E
X
Figure1.1:Penandinkdrawingofabead
Figure1.2:Bitmapdrawingoutput
createdwithGIMP
2. “Art”graphicsdrawnwithbitmaptoolsonacomputer,suchastheexampleinFigure1.2,
whicharetosomeextentthecomputerequivalentsofpenandinkdrawings.Thisdraw-
ingwascreatedwithGIMP,theGNUImageManipulationProgram(www.gimp.org),
usingadeliberatelycrudetechnique.Thedistinctivecharacteristicofthistypeofdraw-
ingisthattheresolutionchoseninthegenerationprocesscannoteasilybechanged
withoutlossofquality(oralternativelywithoutalotofmanuallabor).Inotherrespects
suchapictureislikeafree-handdrawing:thereisgenerallynodesiretointegratethe
drawingwiththetextortoworryaboutconformityoftypefaces.
3. Photographseithercreateddirectlyusingadigitalcameraorscannedlikehand-drawn
pictures.Inthelattercasethecontinuoustonesofthephotographareconvertedinto
adistinctrangeofcolorsorgraylevels(black-and-whitephotographstreatedinthis
wayareknownashalf-tones).Full-colorreproductionrequiressophisticatedprinting
techniques,butthisissuearisesattheprintingstageanddoesnotnormallyaffectthe
typesetting.Figure1.3showshowL
A
T
E
Xcandistorttheimage.
Asecondclassofgraphicsisthe“object-oriented”type,wheretheinformationisstored
intheformofabstractobjectsthatincorporatenodevice-dependentinformation(unlike
bitmapgraphics,wherethestorageformatjustcontainsinformationaboutwhetheracer-
tainspotisblackorwhite,makingthemresolution-dependent).Thisdeviceindependence
makesiteasytoreusethegraphicwithdifferentoutputdevicesandallowsustomanipulate
individualaspectsofthegraphicduringthedesignprocess.
Thereareessentiallythreetypesofsuchgraphicssystems:oneinwhichL
A
T
E
Xmainly
remainspassive(itjusttakesintoaccounttheboundingboxofthepicture),andtwoothers
thatrelatetographicsthatcontainmorecomplextext,inparticularformulae.Forthelatter
typesitisimportanttouseL
A
T
E
Xtotypesettextwithinthegraphicbecausethesymbolsin
formulaeandtheirtypesetformcarryaprecisesemanticmeaning.Thereforeonemusttake
greatcaretoensurethattheirvisualrepresentationisidenticalinbothtextandassociated
graphics.
1. Self-containedobject-orientedgraphics.TheducksofFigure1.4,whichwasproduced
withAdobeIllustrator,werecreatedbydrawingoneobjectintermsofcurvesandthen
1.2 Drawingtypes
5
Figure1.3:Digitallytransformedimage
(verticallystretched)
HUMANIST 
rules
OK
Figure1.4:Object-orienteddrawing
copyingandrotatingitmanytimes.Thistypeofdrawingoftenalsocontainstextual
annotationscomparabletotypesettext.Althoughitisusuallypossibletoaddtextto
thegraphicwithexternaltoolssuchIllustrator,itisnotingeneralpossibletouseL
A
T
E
X
totypesetthistext(althoughpsfragprovidesasolutioninsomecircumstances).
2. Algorithmicdisplaygraphics(e.g.,histograms,graphs).Thesedrawingsarecreatedwith-
outhumaninteractionbutoftencontaintextthatshouldmatchthedocumenttext.The
scaleanddistancebetweenelementsisanessentialcharacteristicofthedrawing.
ExtensiveplottinganddiagramfacilitiesareprovidedbymanyL
A
T
E
Xpackagesbuilding
onthepicturemode,bygenericT
E
XpackagessuchasP
I
CT
E
X[139],DraTex[39],and
tikz[115];andbyPSTricks(seeChapters5and6).Allthesesolutionsletusdeploythe
fullpowerofL
A
T
E
X’stypesettingfunctionswithintextualpartsofthegraphicandthus
integrateitperfectlywithsurroundingdocumentelements.
3. Algorithmicstructuralgraphics,whichcanbederivedfromatextualrepresentation.Un-
likewiththepreviouscategory,oftenmerelythespatialrelationshipbetweenelements
isimportantwiththesegraphics,nottheelements’exactpositionorsize.Examplesare
categorydiagrams,chemicalformulae,trees,andflowcharts.Suchgraphicsarenatu-
ralcandidatesforgenerationbygraphicslanguagesinternaltoL
A
T
E
Xthatprovidehigh-
levelinterfaceswhichfocusonobjectsandrelationshipsanddecidefinalplacementand
layoutautomatically.
Ofthegeneral-purposelanguages,the
system(Chapters3and4)isper-
hapsthemostflexibleoneforthistypeofgraphics,althoughP
I
CT
E
X,X
Y
-pic(Chapter7),
PSTricks(Chapters5and6),andDraTexarealsosuitable.Theyarebasedondifferent
paradigms,anddiffergreatlyinapproach,focus,anduserinterface,buttheyallhave
foundtheirplaceintheL
A
T
E
Xworld.Wedescribesmallspecializedlanguagestailored
forspecificapplicationdomainssuchasphysics,chemistryorelectronicsdiagrams
(Chapter8),music(Chapter9),andgames(Chapter10).Forspecialapplicationssuch
astreedrawing,manyotherL
A
T
E
Xlanguagesareavailableaswell(see[13],forinstance).
6
GRAPHICSWITHLAT
E
X
Aswesee,manytypesofgraphicsexist,eachwithitsownrequirements.Thefirstthree
typesessentiallypresentthemselvesasblackboxestoL
A
T
E
XandthustheirusewithinaL
A
T
E
X
documentinvolvesnomorethantheirinclusionandinsomecasestheirmanipulationasa
whole.ThenecessaryfunctionalityisdiscussedindetailinChapter2.
Inscientifictexts,theothertypesofgraphicsarebyfarthemorecommon.Examplesin-
cludemaps[119],chemicalstructures,orcommutativediagrams.Theyareforthemostpart
basedonanobject-orientedapproach,specifyingobjectsandtheirrelationsinanabstract
wayusingasuitablelanguage.Closeintegrationwiththesurroundingtextcanbeachieved,
ifneeded,bychoosingoneofthegraphicslanguagesdescribedinthisbook.
Insomecasesinteractivedrawingprogramscanbeinstructedtooutputtheirresultsin
oneofthegraphicslanguagesbuiltdirectlyontopofL
A
T
E
X’spicturemode.Widelyusedex-
amplesunderLinuxarediaandxfig,whosepictures,althoughexternallyproduced,canbe
influencedbylayoutdecisionswithinthedocument.Note,however,thatsuchmechanically
producedL
A
T
E
Xcodeisnormallynotsuitableforfurthermanualeditingandmanipulation
ispracticallylimitedtolayoutfacilitiesimplementedbythechosengraphicslanguage.Nev-
ertheless,incertainsituationsthisapproachcanofferthebestoftwoworlds.
1.3 T
E
X’sinterfaces
Tounderstandthemeritsofthedifferentapproachestographicsasimplementedbyvari-
ouspackages,itishelpfultoconsideryetanotherpointofview:theinterfacesprovidedby
T
E
Xfordealingwiththem.Describingthemethodsbywhichgraphicscanbegenerated,in-
cluded,ormanipulatedwillgiveyousomefeelingforsuchimportantissuesasportability,
quality,andresourcerequirementsofindividualsolutions.Weassumethatthereaderhasa
reasonableunderstandingofhowT
E
Xworks—thatis,theprogressionfromsourcefiletoa
DVIfilethatisprocessedbyadrivertoproduceprintedpages.Ofcourse,theDVIstagecan
beskippedwhenusingpdflatex,butthevariouswaysofincludingthegraphicsmaterialare
stillidentical.
Inthefollowingwefirstlookatwaysofincludingexternallygeneratedgraphics(i.e.,
thosethatappearasblackboxestoT
E
X)andmethodstomanipulatethem.Thenweconsider
interfacesprovidedtobuildgraphicslanguageswithinT
E
X.
1.3.1 Methodsofintegration
T
E
X offerstwomajorfacilities for integrating graphics asa whole: oneinvolvingthe
\specialcommand,andtheotherusingthefontinterface.
Using\specialcommands
TheT
E
Xbook[70]doesnotdescribewaystodirectlyincludeexternallygeneratedgraphics.
Theonlycommandavailableisthe\specialcommand,whichbyitselfdoesnothing,but
doesenableustoaccesscapabilitiesthatmightbepresentinthepost-processor(DVIdriver
orpdflatex).ToquoteKnuth[70,page229]:
The\specialcommandenablesyoutomakeuseofspecialequipmentthatmight
beavailabletoyou,e.g.,forprintingbooksingloriousT
E
Xnicolor.
Documents you may be interested
Documents you may be interested