﻿
5.2ThepictureEnvironment
107
Mostdrawingcommandshaveoneofthetwoforms
\put(x,y){object}
or
\multiput(x,y)(∆x,y){n}{object}
Béziercurvesareanexception. Theyaredrawnwiththecommand
\qbezier(x
1
,y
1
)(x
2
,y
2
)(x
3
,y
3
)
5.2.2 LineSegments
\setlength{\unitlength}{5cm}
\begin{picture}(1,1)
\put(0,0){\line(0,1){1}}
\put(0,0){\line(1,0){1}}
\put(0,0){\line(1,1){1}}
\put(0,0){\line(1,2){.5}}
\put(0,0){\line(1,3){.3333}}
\put(0,0){\line(1,4){.25}}
\put(0,0){\line(1,5){.2}}
\put(0,0){\line(1,6){.1667}}
\put(0,0){\line(2,1){1}}
\put(0,0){\line(2,3){.6667}}
\put(0,0){\line(2,5){.4}}
\put(0,0){\line(3,1){1}}
\put(0,0){\line(3,2){1}}
\put(0,0){\line(3,4){.75}}
\put(0,0){\line(3,5){.6}}
\put(0,0){\line(4,1){1}}
\put(0,0){\line(4,3){1}}
\put(0,0){\line(4,5){.8}}
\put(0,0){\line(5,1){1}}
\put(0,0){\line(5,2){1}}
\put(0,0){\line(5,3){1}}
\put(0,0){\line(5,4){1}}
\put(0,0){\line(5,6){.8333}}
\put(0,0){\line(6,1){1}}
\put(0,0){\line(6,5){1}}
\end{picture}
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
(
(
(
(
(
(
(
(
(
(
(
(
(
((
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
Pdf combine - Merge, append PDF files in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Provide C# Demo Codes for Merging and Appending PDF Document
pdf combine two pages into one; combine pdf
Pdf combine - VB.NET PDF File Merge Library: Merge, append PDF files in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
VB.NET Guide and Sample Codes to Merge PDF Documents in .NET Project
batch pdf merger; c# merge pdf files into one
108
ProducingMathematical Graphics
Linesegmentsaredrawnwiththecommand
\put(x,y){\line(x
1
,y
1
){length}}
The\linecommandhastwoarguments:
2. alength.
Thecomponentsofthedirectionvectorarerestrictedtotheintegers
−6,−5,...,5,6,
andtheyhave tobecoprime(no commondivisorexcept1). . The e ﬁgure
relativeto\unitlength. Thelengthargumentistheverticalcoordinatein
thecase ofaverticalline segment,the horizontalcoordinate inallother
cases.
5.2.3 Arrows
\setlength{\unitlength}{0.75mm}
\begin{picture}(60,40)
\put(30,20){\vector(1,0){30}}
\put(30,20){\vector(4,1){20}}
\put(30,20){\vector(3,1){25}}
\put(30,20){\vector(2,1){30}}
\put(30,20){\vector(1,2){10}}
\thicklines
\put(30,20){\vector(-4,1){30}}
\put(30,20){\vector(-1,4){5}}
\thinlines
\put(30,20){\vector(-1,-1){5}}
\put(30,20){\vector(-1,-4){5}}
\end{picture}
-
:
1
*

X
X
X
X
X
X
Xy
C
C
C
C
CO


Arrowsaredrawnwiththecommand
\put(x,y){\vector(x
1
,y
1
){length}}
Forarrows,thecomponentsofthedirectionvectorareevenmorenarrowly
restrictedthanforlinesegments,namelytotheintegers
−4,−3,...,3,4.
Componentsalsohavetobecoprime(nocommondivisorexcept1).Notice
theeﬀectofthe\thicklinescommandonthetwoarrowspointingtothe
upperleft.
C# PDF: C#.NET PDF Document Merging & Splitting Control SDK
PDF Merging & Splitting Application. This C#.NET PDF document merger & splitter control toolkit is designed to help .NET developers combine PDF document files
build pdf from multiple files; add multiple pdf files into one online
Online Merge PDF files. Best free online merge PDF tool.
RasterEdge C#.NET PDF document merging toolkit (XDoc.PDF) is designed to help .NET developers combine PDF document files created by different users to one PDF
break a pdf into multiple files; pdf split and merge
5.2ThepictureEnvironment
109
5.2.4 Circles
\setlength{\unitlength}{1mm}
\begin{picture}(60, 40)
\put(20,30){\circle{1}}
\put(20,30){\circle{2}}
\put(20,30){\circle{4}}
\put(20,30){\circle{8}}
\put(20,30){\circle{16}}
\put(20,30){\circle{32}}
\put(40,30){\circle{1}}
\put(40,30){\circle{2}}
\put(40,30){\circle{3}}
\put(40,30){\circle{4}}
\put(40,30){\circle{5}}
\put(40,30){\circle{6}}
\put(40,30){\circle{7}}
\put(40,30){\circle{8}}
\put(40,30){\circle{9}}
\put(40,30){\circle{10}}
\put(40,30){\circle{11}}
\put(40,30){\circle{12}}
\put(40,30){\circle{13}}
\put(40,30){\circle{14}}
\put(15,10){\circle*{1}}
\put(20,10){\circle*{2}}
\put(25,10){\circle*{3}}
\put(30,10){\circle*{4}}
\put(35,10){\circle*{5}}
\end{picture}
bej
&
%
$& %$
behjm

"
!
#
"
!
#
&
%
$r u u x x z} Thecommand \put(x,y){\circle{diameter}} drawsacirclewithcenter(x,y)anddiameter(notradius)diameter. The pictureenvironmentonlyadmitsdiametersuptoapproximately14mm, andevenbelowthislimit, notalldiametersarepossible. . The \circle* commandproducesdisks(ﬁlledcircles). Asinthecaseof linesegments,one mayhavetoresorttoadditional packages, such aseepic orpstricks. . For r athoroughdescription of f these packages,seeTheL A T E XGraphicsCompanion[4]. Thereisalsoapossibilitywithinthepictureenvironment.Ifoneisnot afraidofdoingthenecessarycalculations(orleavingthemtoaprogram), arbitrarycirclesandellipsescanbepatchedtogetherfromquadraticBézier curves.SeeGraphicsinLAT E X2 ε [17]forexamplesandJavasourceﬁles. VB.NET PDF: Use VB.NET Code to Merge and Split PDF Documents APIs for Merging PDF Documents in VB.NET. Private Sub Combine(source As List(Of BaseDocument), destn As Stream) Implements PDFDocument.Combine End Sub Private c# merge pdf pages; reader combine pdf C# PowerPoint - Merge PowerPoint Documents in C#.NET Combine and Merge Multiple PowerPoint Files into One Using C#. This part illustrates how to combine three PowerPoint files into a new file in C# application. pdf merge documents; break pdf file into multiple files 110 ProducingMathematical Graphics 5.2.5 TextandFormulas \setlength{\unitlength}{0.8cm} \begin{picture}(6,5) \thicklines \put(1,0.5){\line(2,1){3}} \put(4,2){\line(-2,1){2}} \put(2,3){\line(-2,-5){1}} \put(0.7,0.3){$A$} \put(4.05,1.9){$B$} \put(1.7,2.95){$C$} \put(3.1,2.5){$a$} \put(1.3,1.7){$b$} \put(2.5,1.05){$c$} \put(0.3,4){$F=
\sqrt{s(s-a)(s-b)(s-c)}$} \put(3.5,0.4){$\displaystyle
s:=\frac{a+b+c}{2}$} \end{picture} H H H H H A B C a b c F= s(sa)(sb)(sc) s:= a+b+c 2 Asthisexampleshows,textandformulascanbewrittenintoapicture environmentwiththe\putcommandintheusualway. 5.2.6 \multiputand\linethickness \setlength{\unitlength}{2mm} \begin{picture}(30,20) \linethickness{0.075mm} \multiput(0,0)(1,0){26}% {\line(0,1){20}} \multiput(0,0)(0,1){21}% {\line(1,0){25}} \linethickness{0.15mm} \multiput(0,0)(5,0){6}% {\line(0,1){20}} \multiput(0,0)(0,5){5}% {\line(1,0){25}} \linethickness{0.3mm} \multiput(5,0)(10,0){2}% {\line(0,1){20}} \multiput(0,5)(0,10){2}% {\line(1,0){25}} \end{picture} Thecommand \multiput(x,y)(∆x,y){n}{object} has4arguments: thestartingpoint,thetranslationvectorfromoneobject C# Word - Merge Word Documents in C#.NET Combine and Merge Multiple Word Files into One Using C#. This part illustrates how to combine three Word files into a new file in C# application. merge pdf; split pdf into multiple files C# PDF File Split Library: Split, seperate PDF into multiple files Split PDF document by PDF bookmark and outlines. Also able to combine generated split PDF document files with other PDF files to form a new PDF file. c# combine pdf; pdf merge files 5.2ThepictureEnvironment 111 to the e next, the number of objects, and the e object t to o be drawn. . The \linethicknesscommandappliestohorizontalandverticallinesegments, butneithertoobliquelinesegments,nortocircles. Itdoes,however,apply toquadraticBéziercurves! 5.2.7 Ovals \setlength{\unitlength}{0.75cm} \begin{picture}(6,4) \linethickness{0.075mm} \multiput(0,0)(1,0){7}% {\line(0,1){4}} \multiput(0,0)(0,1){5}% {\line(1,0){6}} \thicklines \put(2,3){\oval(3,1.8)} \thinlines \put(3,2){\oval(3,1.8)} \thicklines \put(2,1){\oval(3,1.8)[tl]} \put(4,1){\oval(3,1.8)[b]} \put(4,3){\oval(3,1.8)[r]} \put(3,1.5){\oval(1.8,0.4)} \end{picture} # " ! # " ! # " ! ! Thecommand \put(x,y){\oval(w,h)} or \put(x,y){\oval(w,h)[position]} producesanovalcenteredat(x,y)andhavingwidthwandheighth.The optionalpositionargumentsb,t,l,rreferto“top”,“bottom”,“left”,“right”, andcanbecombined,astheexampleillustrates. Linethicknesscanbecontrolledbytwokindsofcommands: \linethickness{length}ontheonehand,\thinlinesand\thicklines ontheother. While\linethickness{length}appliesonlytohorizontaland verticallines(andquadraticBéziercurves),\thinlinesand\thicklines applytoobliquelinesegmentsaswellastocirclesandovals. VB.NET TIFF: Merge and Split TIFF Documents with RasterEdge .NET filePath As [String], docList As [String]()) TIFFDocument.Combine(filePath, docList) End to provide powerful & profession imaging controls, PDF document, tiff pdf merge comments; merge pdf online VB.NET PowerPoint: Merge and Split PowerPoint Document(s) with PPT Just like we need to combine PPT files, sometimes, we also want to separate a Note: If you want to see more PDF processing functions in VB.NET, please follow add pdf files together; acrobat reader merge pdf files 112 ProducingMathematical Graphics 5.2.8 MultipleUseofPredeﬁnedPicture e Boxes \setlength{\unitlength}{0.5mm} \begin{picture}(120,168) \newsavebox{\foldera} \savebox{\foldera} (40,32)[bl]{% definition \multiput(0,0)(0,28){2} {\line(1,0){40}} \multiput(0,0)(40,0){2} {\line(0,1){28}} \put(1,28){\oval(2,2)[tl]} \put(1,29){\line(1,0){5}} \put(9,29){\oval(6,6)[tl]} \put(9,32){\line(1,0){8}} \put(17,29){\oval(6,6)[tr]} \put(20,29){\line(1,0){19}} \put(39,28){\oval(2,2)[tr]} } \newsavebox{\folderb} \savebox{\folderb} (40,32)[l]{% definition \put(0,14){\line(1,0){8}} \put(8,0){\usebox{\foldera}} } \put(34,26){\line(0,1){102}} \put(14,128){\usebox{\foldera}} \multiput(34,86)(0,-37){3} {\usebox{\folderb}} \end{picture} Apictureboxcanbedeclaredbythecommand \newsavebox{name} thendeﬁnedby \savebox{name}(width,height)[position]{content} andﬁnallyarbitrarilyoftenbedrawnby \put(x,y){\usebox{name}} Theoptionalpositionparameterhastheeﬀectofdeﬁningthe‘anchor point’ofthesavebox.Intheexampleitissettoblwhichputstheanchor pointintothebottomleftcornerofthesavebox. Theotherpositionspeciﬁers aretopandright. 5.2ThepictureEnvironment 113 ThenameargumentreferstoaL A T E Xstoragebinandthereforeisofa commandnature(whichaccountsforthebackslashesinthecurrentexample). Boxedpicturescanbenested:Inthisexample,\folderaisusedwithinthe deﬁnitionof\folderb. The\ovalcommandhadtobeusedasthe\linecommanddoesnot workifthesegmentlengthislessthanabout3mm. 5.2.9 QuadraticBézierCurves \setlength{\unitlength}{0.8cm} \begin{picture}(6,4) \linethickness{0.075mm} \multiput(0,0)(1,0){7} {\line(0,1){4}} \multiput(0,0)(0,1){5} {\line(1,0){6}} \thicklines \put(0.5,0.5){\line(1,5){0.5}} \put(1,3){\line(4,1){2}} \qbezier(0.5,0.5)(1,3)(3,3.5) \thinlines \put(2.5,2){\line(2,-1){3}} \put(5.5,0.5){\line(-1,5){0.5}} \linethickness{1mm} \qbezier(2.5,2)(5.5,0.5)(5,3) \thinlines \qbezier(4,2)(4,3)(3,3) \qbezier(3,3)(2,3)(2,2) \qbezier(2,2)(2,1)(3,1) \qbezier(3,1)(4,1)(4,2) \end{picture} H H H H H H HD D D D D D Asthisexampleillustrates,splittingupacircleinto4quadraticBézier curvesisnotsatisfactory.Atleast8areneeded.Theﬁgureagainshowsthe eﬀectofthe\linethicknesscommandonhorizontalorverticallines,andof the\thinlinesandthe\thicklinescommandsonobliquelinesegments. ItalsoshowsthatbothkindsofcommandsaﬀectquadraticBéziercurves, eachcommandoverridingallpreviousones. LetP 1 =(x 1 ,y 1 ),P 2 =(x 2 ,y 2 )denotetheendpoints,andm 1 ,m 2 the respectiveslopes,ofaquadraticBéziercurve. Theintermediatecontrolpoint S=(x,y)isthengivenbytheequations rclx= m 2 x 2 m 1 x 1 −(y 2 y 1 ) m 2 m 1 , yy i +m i (xx i ) (i=1,2). (5.1) SeeGraphicsinLAT E X2 ε [17]foraJavaprogramwhichgeneratestheneces- sary\qbeziercommandline. 114 ProducingMathematical Graphics 5.2.10 Catenary \setlength{\unitlength}{1cm} \begin{picture}(4.3,3.6)(-2.5,-0.25) \put(-2,0){\vector(1,0){4.4}} \put(2.45,-.05){$x$} \put(0,0){\vector(0,1){3.2}} \put(0,3.35){\makebox(0,0){$y$}} \qbezier(0.0,0.0)(1.2384,0.0) (2.0,2.7622) \qbezier(0.0,0.0)(-1.2384,0.0) (-2.0,2.7622) \linethickness{.075mm} \multiput(-2,0)(1,0){5} {\line(0,1){3}} \multiput(-2,0)(0,1){4} {\line(1,0){4}} \linethickness{.2mm} \put( .3,.12763){\line(1,0){.4}} \put(.5,-.07237){\line(0,1){.4}} \put(-.7,.12763){\line(1,0){.4}} \put(-.5,-.07237){\line(0,1){.4}} \put(.8,.54308){\line(1,0){.4}} \put(1,.34308){\line(0,1){.4}} \put(-1.2,.54308){\line(1,0){.4}} \put(-1,.34308){\line(0,1){.4}} \put(1.3,1.35241){\line(1,0){.4}} \put(1.5,1.15241){\line(0,1){.4}} \put(-1.7,1.35241){\line(1,0){.4}} \put(-1.5,1.15241){\line(0,1){.4}} \put(-2.5,-0.25){\circle*{0.2}} \end{picture} - x 6 y u Inthisﬁgure,eachsymmetrichalf of the catenarycoshx1is approximatedbyaquadraticBéziercurve.Therighthalfofthecurveends inthepoint(2,2.7622),theslopetherehavingthevaluem=3.6269. Using againequation(5.1),wecancalculatetheintermediatecontrolpoints.They turnouttobe(1.2384,0)and(1.2384,0).Thecrossesindicatepointsof therealcatenary. Theerrorisbarelynoticeable,beinglessthanonepercent. Thisexamplepointsouttheuseoftheoptionalargumentofthe \begin{picture}command. Thepictureisdeﬁnedinconvenient“mathe- matical”coordinates,whereasbythecommand \begin{picture}(4.3,3.6)(-2.5,-0.25) itslowerleftcorner(markedbytheblackdisk)isassignedthecoordinates (−2.5,−0.25). 5.3ThePGFandTikZGraphicsPackages 115 5.2.11 RapidityintheSpecialTheoryofRelativity \setlength{\unitlength}{0.8cm} \begin{picture}(6,4)(-3,-2) \put(-2.5,0){\vector(1,0){5}} \put(2.7,-0.1){$\chi$} \put(0,-1.5){\vector(0,1){3}} \multiput(-2.5,1)(0.4,0){13} {\line(1,0){0.2}} \multiput(-2.5,-1)(0.4,0){13} {\line(1,0){0.2}} \put(0.2,1.4) {$\beta=v/c=\tanh\chi\$}
\qbezier(0,0)(0.8853,0.8853)
(2,0.9640)
\qbezier(0,0)(-0.8853,-0.8853)
(-2,-0.9640)
\put(-3,-2){\circle*{0.2}}
\end{picture}
-
χ
6
β=v/c=tanhχ
t
ThecontrolpointsofthetwoBéziercurveswerecalculatedwithformulas
(5.1). ThepositivebranchisdeterminedbyP
1
=(0,0),m
1
=1andP
2
=
(2,tanh2),m
2
=1/cosh
2
2. Again,thepictureisdeﬁnedinmathematically
convenientcoordinates,andthelowerleftcornerisassignedthemathematical
coordinates(−3,−2)(blackdisk).
5.3 ThePGFandTikZGraphicsPackages
TodayeveryLAT
E
Xoutputgenerationsystemcancreatenicevectorgraphics,
it’sjusttheinterfacesthatareratherdiverse. Thepgfpackageprovidesan
abstractionlayerovertheseinterface. Thepgf packagecomeswithalarge
manual/tutorialofitsown[18].Soweareonlygoingtoscratchthesurface
ofthepackagewiththislittlesection.
Thepgfpackagecomeswithahighlevelaccesslanguageprovidedbythe
tikzpackage. TikZprovideshighlyeﬃcientcommandstodrawgraphicsright
frominsideyourdocument. Usethetikzpictureenvironmenttowrapyour
TikZcommands.
Asmentionedabove,thereisanexcellentmanualforpgf andfriends.