adobe pdf reader c# : Combine pdf application Library utility html asp.net windows visual studio lgc2-excerpts5-part619

8.3 Alignmentandtopologyplotsinbioinformatics
551
8.3.2 Membraneproteintopologyplots
EricBeitzalsowrotethetextopopackage,whichprovidesaL
A
T
E
Xinterfacetogenerate
shadedmembraneproteintopologyplots.Thispackageprovidestwonewenvironments,
textopoandhelicalwheel.
Thetextopoenvironmentdisplaysschematictopologyplotsofmembraneproteins.It
allowsyoutoimportsequenceandtopologydataoralignmentfilesinvariousformats.You
canalsomanuallyenterthesequenceandthepositionsofthemembranespanningdomains
withintheenvironment.Thepackageimplementationwillgenerateabasiclayoutfromthese
data,whichcanbefurtheradjustedbyaddinglabels,specialstylesforthepresentationof
residues,automaticormanualshading,andannotations.
\begin{textopo}[parameterfile]
textopocommands
\end{textopo}
Theparameterfileparameterfile,whichisoptional,cancontainanycommanddefinedbythe
textopopackagetospecifyuserparametersettings.Thetextopoenvironmentitselfmust
containatleastonecommandtoloadthesequenceandtopologydatafortheproteinthat
mustbeplotted(i.e.,\getsequenceor\sequenceand\MRs,whichspecifythepositions
ofthemembraneregions).
Thefollowingexample,whichusesthefileAQP1.PHD,comeswiththedistribution.
Example
8-3-6
extra
intra
H
2
N–
M
A
S
E
I
K
K
K
L
F
W
R
A
V
V
A
E
F
L
A
M
T
L
F
V
F
I
S
I
G
S
A
L
G
F
N
Y
P
L
E
R
N
Q
T
L
V
Q
D
N
V
K
V
S
L
A
F
G
L
S
I
A
T
L
A
Q
S
V
G
H
I
S
G
A
H
S
N
P
A
V
T
L
G
L
L
L
S
C
Q
I
S
I
L
R
A
V
M
Y
I
I
A
Q
C
V
G
A
I
V
A
S
A
I
L
S
G
I
T
S
S
L
L
E
N
S
L
G
R
N
D
L
A
R
G
V
N
S
G
Q
G
L
G
I
E
I
I
G
T
L
Q
L
V
L
C
V
L
A
T
T
D
R
R
R
R
D
L
G
G
S
A
P
L
A
I
G
L
S
V
A
L
G
H
L
L
A
I
D
Y
T
G
C
G
I
N
P
A
R
S
F
G
S
A
V
L
T
R
N
F
S
N
H
W
I
F
W
V
G
P
F
I
G
S
A
L
A
V
L
I
Y
D
F
I
L
A
P
R
S
S
D
F
T
D
R
M
K
V
W
T
S
G
Q
V
E
E
Y
D
L
D
A
D
D
I
N
S
R
V
M
K
P
K –COOH
\usepackage[]{textopo}
\begin{textopo}
\getsequence{PHD}{AQP1.phd}
% no o transmembrane e labels
\hideTMlabels
% small l font t size (range 1-10)
\scaletopo{2}
\end{textopo}
The secondenvironment, , helicalwheel, is in its functionality quite e similar to
textopo,butproducesoutputthatshowshelicaltransmembranespansashelicalwheels
Combine pdf - Merge, append PDF files in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Provide C# Demo Codes for Merging and Appending PDF Document
break a pdf into multiple files; pdf merger
Combine pdf - 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
pdf mail merge; pdf merger online
584
APPLICATIONSINSCIENCE,TECHNOLOGY,ANDMEDICINE
commandsequenceforthisprecedureonaUnixmachinewouldbesimilartothefollowing
(dependingonwherethem4filesarestored):
m4 /usr/local/lib/m4/libcct.m4 4 cirexa.m4 4 > > cirexa.pic
gpic -t t cirexa.pic > > cirexa.tex
ThisleavesuswithaT
E
Xfilecirexa.tex,whichcontainsonlythetpiccodefortheexam-
ple.Toprocessitfurther,wecouldincludeitintoaL
A
T
E
Xsourceusing\input.Thisstores
thepictureinaboxregisternamed\graph,sowehavetoadda\usebox{\graph}state-
mentintothedocumentatthespotwherewewantittoappear.
Customizingthediagram
Toshowtheflexibilityofthecircuit_macrosapproach, letusmodify ourexample
slightlytoseehowitbehaveswithanalternatingcurrent.
V
ac
R
L
iLω
C
1
iCω
.PS
cct_init
linethick=1.6
define(‘dimen_’,0.6)
loopwid = 0.9; loopht = 0.7
source(left_ loopwid,AC); llabel(,V_{ac},)
resistor(up_ loopht,5); llabel(,R,)
inductor(right_ loopwid,W); rlabel(,L,); llabel(,iL\omega,)
capacitor(down_ loopht,); llabel(,C,)
rlabel(,\displaystyle\frac{1}{iC\omega},)
.PE
\usebox{\graph}
Example
8-6-11
Afterspecifyingthicklines,wedrawanalternatingcurrent(AC)source.Theresistor
ismadealittlebigger,andwespecifyacomplexvaluefortheimpedanceoftheselfandthe
capacitor.Notehowweplacetextateithersideoftheelementwiththellabelandrlabel
commands.Asthelabeltextissetinmathematicsmode,youcanfreelyusemathsymbols
andotherspecificcommandsformathmode(e.g.,\displaystyletochoosealargertype
sizeforthecapacitor’snumeratoranddenominator).
Someauthorsprefertodrawtheircircuitelementsusingagrid.Wecanwriteanm4
macrogrid,whichhastwoarguments$1and$2thatdefinethexandycoordinatesat
whichtheelementistobedrawn.
+−
V
R
L
C
.PS
cct_init
gridsize = = 0.1
define(‘grid’,‘(gridsize*‘$1’,gridsize*‘$2’)’)
source(left_ from grid(7,0) to o grid(0,0),V); ; llabel(,V,)
resistor(up_ from grid(0,0) to o grid(0,5),4); ; llabel(,R,)
inductor(right_ from m grid(0,5) ) to grid(7,5),W); llabel(,L,)
capacitor(down_ from m grid(7,5) ) to grid(7,0)); llabel(,C,)
.PE
\usebox{\graph}
Example
8-6-12
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
append pdf; merge pdf files
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
adding pdf pages together; pdf combine files online
CHAPTER
9
PreparingMusicScores
9.1 UsingT
E
Xforscores—Anoverview............................589
9.2 UsingMusiXT
E
X........................................590
9.3 abc2mtex—Easywritingoftunes s ............................600
9.4 PreprocessorsforMusiXT
E
X ................................615
9.5 ThePMXpreprocessor r ...................................618
9.6 M-Tx—MusicfromTeXt ..................................651
9.7 ThemusicengraverLilyPond ...............................661
9.8 T
E
Xmuse—T
E
Xand
workingtogether .................666
Preparingmusicscoresofhighqualityisacomplextask,sincemusicnotationcanrepresent
ahugeamountofinformationaboutthestructureandperformanceofamusicalpiece.1
Whilereadingascoreforperformingamusicpiece,musiciansmustgatheralltheinforma-
tiontheyneed,includingthepitchandthelengthofthenotes,therhythm,andthearticula-
tion.Dependingontheinstrument,themusicalnotationmayspanmorethanasinglestave
(e.g.,threeormorefortheorgan),sotheamountofdatatobeprocessedconcurrentlycan
bequitelarge.Thismakesgreatdemandsonthemusician’sability,especiallywhensight-
readingapiece.Thequalityofthetypesetscoreplaysanimportantroleinthisprocesssince
itmustclearlyshowthestructureofthepiece.
High-qualitymusictypesettingrequiresagoodeyeandmuchexperience.Untilrecently,
thistypeofworkhasbeendonebyhighlytrainedmusicengraverswhomanage,accord-
ingtoHeleneWanske[136],nomorethanoneortwopagesperday.Asintypesetting
oftext,acriterionofhighqualityistheoveralllookofthepage,especiallythedistribu-
tionofblackandwhite.Severaltextsaboutmusicnotationpracticehavebeenpublished,
buttheycannotreplaceapractitionerwhenitcomestoensuringtheaestheticformofthe
scoreasawhole.TheProductionCommitteeoftheMusicPublisher’sAssociationhaspub-
1
TheWebsitehttp://www.music-notation.info/providesasetofpointerstomusicnotationlan-
guages,programs,fonts,etc.
VB.NET PDF: Use VB.NET Code to Merge and Split PDF Documents
Combine End Sub Private Sub Combine(source As List(Of [String]), destn As [String]) Implements PDFDocument.Combine End Sub. APIs for Splitting PDF document in
asp.net merge pdf files; add pdf files together reader
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.
c# merge pdf files into one; c# combine pdf
588
PREPARINGMUSICSCORES
lishedatextthatoutlinesaseriesofstandardsformusicnotation(http://www.mpa.org/
notation/notation.pdf).TheBigSiteofMusicNotationandEngraving(http://www.
coloradocollege.edu/dept/MU/Musicpress/)intendstoprovideahelpfulsource
formusicians,typesetters,students,publishers,andanyoneelsewhoisinterestedinmusic
notationandengraving.SeealsoJean-PierreCoulon’sEssayonthetrueartofmusicengrav-
ing(http://icking-music-archive.org/lists/sottisier/sottieng.pdf).
In recent years several l computer systems s for r writing scores have e been n devel-
oped.Encore(www.encoremusic.com),Finale(www.finalemusic.com),andSibelius
(www.sibelius.com)areexamplesofcommercialproducts,whileRosegarden(http:
//www.rosegardenmusic.com/)andnoteedit(http://developer.berlios.de/
projects/noteedit)arefreelyavailabledevelopments.Alloftheseprogramsareofthe
WYSIWYG(WhatYouSeeIsWhatYouGet)type,andmostofthemhavereachedagen-
uinestateofperfection.However,theycannotyetreplaceanexperiencedmusicengraver.
Alltheycandotoensurehigh-qualitytypesettingistocreatea“nice”draft:theycontribute
toahigh-qualityscoreonlyiftheyleavetheaestheticdecisionstotheexperienceduser.
Thisroleisevenmoreevidentwhenoneconsidersnonstandardsituations,whichare
encounteredinmodernmusic,forwhichnotationalrequirementsarehardtostandardizeat
all.Indeed,music,asaliveartform,evolvescontinuously,anditscurrentpracticeisoften
quitedistinctfromthatofthe18thand19thcenturies,whenthe“standard”musicnotation
wasconsolidated.Whereasstandardnotationalpracticesarequitesufficientforpopularand
commercialmusic(andthusthefavoredtargetforcommercialsoftware),“modern”music
goeswellbeyondthistraditionalform,inparticularinitsgraphicrepresentation.Moreover,
musicologyhasnotationalneeds(e.g.,symbolsforhighlightingcertainnotes,unusualties,
superpositionofstaves)fortheanalysisofallkindsofmusic—classicalandcontemporary,
westernandoriental,ethnicfromvariouspeoplesoftheworld—thatgowellbeyondthepos-
sibilitiesofcurrentprofessionaltypesettingapplications.Whatisneededisaprogrammable
system,andhereT
E
Xcanbeanimportantplayer.
Inthischapter,afterashorthistoricalintroduction(Section9.1),wefirstconsider
MusiXT
E
X,asetofT
E
Xmacrosthatbuildaverypowerfulandflexibletoolfortypesetting
scores.AsMusiXT
E
Xmakesnoaestheticdecisions—thesechoicesmustallbemadebythe
typesetter—itisquitecomplextouse.Thereforeseveralpreprocessorshavebeendeveloped
toprovideaneasierinterface.InSection9.3,weintroducetheabclanguage,whichisin
widespreaduseforfolktunes.InSection9.5,wedescribethePMXlanguage,whichmakes
enteringpolyphonicmusicmoreconvenient.InSection9.6,wehavealookattheM-Txlan-
guage,anoffspringofPMX,whichadds,amongotherfeatures,supportfordealingwith
multi-voicelyricsinscores.InSection9.7,weintroduceLilyPond,amusictypesetterwrit-
teninC++,whileSection9.8saysafewwordsaboutT
E
Xmuse.
TheWernerIckingMusicArchive(http://icking-music-archive.org)contains
alotofmaterialrelatedtomusicsoftware.Inparticular,itisthedefinitivearchiveofsoft-
warerelatedtoMusiXT
E
X,includingpointerstothelatestdevelopmentsofabc,PMX,M-Tx,
andtheirbrethren.Italsocontainshundredsoffreelyavailablemusicscorestypesetwith
MusiXT
E
X,oftenwithaccompanyinginputfiles,sothatitisanidealsourceofexamples.
ThischapterissomewhatunusualasitcontainslittleL
A
T
E
X:MusiXT
E
Xisessentiallylow-
levelT
E
X,albeitwithaL
A
T
E
Xinterface;someoftheprogramsdiscussedtotranslatemusical
languages,suchasabc,evenbypassT
E
Xaltogether.Weneverthelessbelievethatitisappro-
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.
combine pdf files; combine pdfs online
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.
reader merge pdf; add multiple pdf files into one online
9.3 abc2mtex—Easywritingoftunes
601
alittlepractice,mostuserscanplayatunedirectlyfromtheabcnotation(withoutgen-
eratingsheetmusicoutput).Moreover,thesimplicityandclarityofthenotationmakeit
astraightforwardmattertonotatetunesthatarestoredinacomputerfile.Inaddition,
thesefilescanbeeasilyexchangedbye-mail,thusenablingdisseminationanddiscussion
ofthemusic.Infact,theabclanguagehasbecomethedefactostandardamongfolkmusi-
cians,andthousandsoftunesinabcnotationarenowavailableontheInternet(see,e.g.,
http://abcnotation.org.uk/tunes.html).
9.3.1 Writinganabcsource
Toseehowanabcsourceisbuiltup,considerthefollowingexample:
Example
9-3-1
1. Surlepontd’Avignon
G
2
2
4
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
Ð
Ð
ˇ
ˇ
ˇ
ˇ
Ð
Ð
ˇ
G
2
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ÐÐ
ˇ
ˇ
æ
æ
ˇ
ˇ(
ˇ(
G
2
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
X:1
T: Sur le pont t d’Avignon
M:2/4
L:1/8
K:F
FF F2 | | GG G G2 | | ABcF F | | EFGC C |
FF F2 | | GG G G2 | | ABcF F | | GE F F || F F |
FF FF | | G2 2 FF | | FFFF F | | G2 F2 2 |]
Anabcsourceconsistsoftwoparts:aheaderandabody.Theheader(showninbluein
theexamples)containsinformationfields,eachstartingwithanuppercaselettertodenote
thekindofinformation,followedbyacolon.Thebodyconsistsofthemusicpieceitself.
Withinthebody,additionalinformationfieldscanbeinsertedthatareusedforchangesto
theheaderinformation(e.g.,thekey,meter,ortempo).
Table9.3showsallpossibleinformationfields,mostofwhichareoptional.Afewwords
aboutthemoreimportantonesfollow.
• Musicalinformation:
– K: : thekey, consisting g of f a capital letter possibly followed by a # or b for
sharporflat,respectively.Youcanusemajorkeys(e.g.,K:Emaj)orminorkeys
(K:gmin),orspecifyothermodes,suchasMixolydian(K:AMix)andDorian
modes(K:EDor).
– L:thedefaultnotelength(i.e.,L:1/4foraquarternote,L:1/8foraneighthnote,
etc.).ThedefaultnotelengthisalsosetautomaticallybythemeterfieldM:.
– M:themeter,suchasM:3/4,M:C(commontime),orM:C|(cuttime).
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 split and merge; pdf merge comments
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
acrobat merge pdf; scan multiple pages into one pdf
9.5 ThePMXpreprocessor
645
Example
9-5-36
Cb
Vc
Va
VlII
VlI
Tp
Tb(do)
Cr(do)
Fg
Ob
Fl
I
I
K
G
G
I
G
G
I
G
G
S
S
S
S
S
S
S
S
S
S
S
f
ˇ
f
ˇ
f
ˇ
f
ˇ
f
ˇ
ˇ
f
ˇ
ˇ
f
ˇ
ˇ
f
a2
ˇ
f
a2
ˇ
Allegro vivace
f
ˇ
?
?
?
?
?
>
>
>
?
?
?
3
ˇ
ˇ
Ő
Ő
Ő
Ő
ˇ
3
ˇ
ˇ
Ő
Ő
Ő
Ő
ˇ
3
ˇ
ˇ
Ő
Ő
Ő
Ő
ˇ
3
ˇ
ˇ
ˇ
3
ˇ
ˇ
ˇ
3
ˇ
ˇ
Ő
Ő
Ő
Ő
ˇ
3
ˇ
ˇ
Ő
Ő
Ő
Ő
ˇ
3
ˇ
ˇ
Ő
Ő
Ő
Ő
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
?
?
?
?
?
>
>
>
?
?
?
3
ˇ
ˇ
Ő
Ő
Ő
Ő
ˇ
3
ˇ
ˇ
Ő
Ő
Ő
Ő
ˇ
3
ˇ
ˇ
Ő
Ő
Ő
Ő
ˇ
3
ˇ
ˇ
ˇ
3
ˇ
ˇ
ˇ
3
ˇ
ˇ
Ő
Ő
Ő
Ő
ˇ
3
ˇ
ˇ
Ő
Ő
Ő
Ő
ˇ
3
ˇ
ˇ
Ő
Ő
Ő
Ő
ˇ
ˇ
>
<
ˇ
>
<
ˇ
>
<
ˇ
>
<
ˇ
> >
ˇ
>
<
ˇ
ˇ
>
<
ˇ
ˇ
>
<
ˇ
>
<
ˇ
>
<
ˇ
>
<
?
-
ˇ
˘
¯
˘
ˇ`
-
ˇ
˘
˘
ˇ
`
-
ˇ
=
=
=
=
=
=
=
˘
˘
˘
˘
ˇ
>
ˇ
>
ˇ
>
ˇ
>
=
=
=
=
=
=
=
9.6 M-Tx—MusicfromTeXt
651
9.6 M-Tx—MusicfromTeXt
AfterdescribingthePMXlanguagewenowturntoDirkLaurie’sM-Txlanguage,
1
which
addsalayerofconveniencetoPMX,makingenteringinformation—inparticular,inthe
preamble—moreintuitive.Byitsveryconception,itoffersalsoastraightforwardwayfor
addingwords(lyrics)tothemusic.
LetusfirsthaveanotherlookatSection9.4onpage615,especiallytheexamplecom-
paringthecodingofthefirstbarsoftheMozartpiece.OnelargedifferencebetweenPMX
andM-Txcodingisthat,withM-Txvoice(instrument)linesareinputastheyareprinted(i.e.,
fromtoptobottom),whereaswithPMXtheyareenteredlastlinefirst(i.e.,frombottomto
top).
Example
9-6-1
IJ
Piano
I
G
4
4
4
4
RiffinC
W.A.Mozart(1756–1791)
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
˘
ˇ
ˇ
ˇ
ˇ
ˇ
ˇ
`
ˇ
ˇ
ĞĞ
ĞĞ
ˇ
ˇ
ˇ
ˇ
ˇ
˘
Title: Riff f in C
Composer: W. A. Mozart t (1756--1791)
Style: piano
Name: Piano
Meter: 4/4
Size: 16
Indent: 0.18
%% w70m
c2+
e4
g
| b4d- - c1 1 d d c2
|
c8 g+ e e g g c- g+ e e g g | | d d g g f f g
c- g+ + e e g g |
Example9-6-1wascompiledbytheM-Txprocessorprepmx,whichtransformstheM-Tx
inputfileintoaPMXfiletoberunthroughthepmxabprocessor.
> prepmx x 9-6-1
==> This is M-Tx x 0.60 (Music c from m TeXt) ) <16 6 March 2005>
==>> Input from file 9-6-1.mtx
Writing to 9-6-1.pmx
instrumentNames = TRUE
PrePMX done. . Now w run n PMX.
> pmxab 9-6-1
This is s PMX, , Version 2.506, , 14 Nov v 04
Opening 9-6-1.pmx
Starting first PMX pass
Bar 1 1 Bar r 2
Done with first pass
Starting second d PMX X pass
Bar 1 1 Bar r 2
Writing ./9-6-1.tex
Done with second d PMX X pass.
Theprepmxprocessorhasseveraloptions,allofwhicharedescribedintheM-Txmanual.
1
TheM-Txentryonthehomepagehttp://icking-music-archive.org/software/indexmt6.html
oftheIckingMusicArchiveprovidespointerstothelatestversionofthedistribution,manual,examples,and
relatedutilities.
9.7 ThemusicengraverLilyPond
661
9.7 ThemusicengraverLilyPond
In 1996,intheprevious edition ofthis book,wedescribedJan Nieuwenhuizen’s M
P
P
MusiXT
E
Xpreprocessor[89].Sincethen,JanandhiscolleagueHan-WenNienhuyshaveaban-
donedthatsystemanddevelopedLilyPond,1an“automatedengravingsystemthatformats
musicbeautifullyandautomaticallyandhasafriendlysyntaxforitsinputfiles”.Theyno
longeruseT
E
XasthebasictypesettingenginebuthavedevelopedalargeC++program
(morethan6000linesofcode);theyalsousePythonandSchemecode,aswellasaspecially
designedfontfamily(feta),whichisavailableinvariousformats(PostScriptType1,Open-
Type,andSVG).
9.7.1 TheLilyPondsourcelanguage
Totypesetonenote,fourkindsofinformationcanbespecified:notename,octave,duration,
andfeatures.Onlythenotenameismandatory.Allthisinformationiscodedinthegiven
orderwithnointerveningspaces;ablankseparatestwonotes.
Notesaredenotedbylowercaseletters.Acomma(,)followingthelettertransposes
thenoteoneoctavedeeper,whilearightquote(’)makesitanoctavehigher.Togenerate
differentclefs,usethecommand\cleffollowedbyeithertreble,alto,tenor,orbass.
Thefollowingexampleshowssomepitchesandwaystogeneratedifferentkindsofbarlines.
{c d
\bar "|" " e e f
\bar "|:" " g g c’
\bar "||"
d’ e’ ’ \bar r ":|" " f’ g’ ’ \bar r ".|" " c’ ’ d’
\bar ".||." \break
e’’ f’’ ’ g’’ c’’’
\bar ":|:"
d’’’ e’’’ f’’’ g’’’
\bar "|." " c’ c c c, , c,, , \bar r ":"
}
Example
9-7-1
4
1
TheLilyPondhomepageisatwww.lilypond.org,whereyoucandownloadthelatestversionofthesystem.
Thereisalsoatutorial,thereferenceguide,andmuchmore.Ofparticularinterestistheessay“Whatisbehind
LilyPond?”,whichexplainstheauthors’viewsonproblemsinmusicnotation(software)andtheirapproachto
solvingthem.
CHAPT ER
10
PlayingGames
10.1 Chess.............................................668
10.2 Xiangqi—Chinesechess s .................................687
10.3 Go...............................................690
10.4 Backgammon........................................696
10.5 Cardgames.........................................698
10.6 Crosswordsinvariousforms...............................702
10.7 Sudokus...........................................709
Boardandcardgameshavealonghistory,andthousandsofbooksinmanylanguageshave
beendedicatedtochess,Go,cards,andthelike.Thesebooksalmostalwaysusediagramsto
explaintherulesorshowtheevolutionofagame.Inthepresentchapterwelookatanumber
ofexamplesshowinghowtopreparesuchgraphicalpresentationswithL
A
T
E
X.
Mostgamepackagesareconcernedwithmakingavailableeitheraspecialfontfortype-
settingtherightsymbolsormacrosforproducingniceexamplesofthestateofplay.The
highlydevelopedfieldofchessnotation,however,lendsitselfwelltoanalgorithmictypeset-
tingsystemlikeL
A
T
E
X.Thechesspackages,withwhichwebegin,keeptrackofthestateof
movesandallowvariousformsofoutput.
WemovenexttotherathersimilargamesofChinesechess andGo, followedby
backgammon.Wethenlookatcards,wheretheclassicgameofbridgehasaspecialpack-
age,beforeconcludingthechapterwiththeesotericsubjectofcrosswordandSudokupuz-
zles.Althoughcrossworddesignisnotagame,ithassomesimilartypesettingproblems,
andL
A
T
E
X-usingcrosswordmakerswillenjoyusingthesophisticatedpackagetohelpthem.
InthecaseofSudoku,thereisevenapackagethatgeneratesnewpuzzlesorsolvesexisting
ones.
682
PLAYINGGAMES
\ahead
\dummy
\ddummy
Itis,ofcourse,alsopossibletotalkaboutthenextmoveinacommentarystartedwith\[or
[:simplyprefixthefirstmoveinsidewith\ahead.
Ifcertainmovesareirrelevantfortheanalysisyoucanuse\dummyor\ddummytoad-
vancethegamestatebyoneortwohalf-moves,respectively.Thismeansthatskakcan’tfol-
lowthepositionontheboardanylonger,sotexmateimmediatelydisablesthisfunctionality
with\SkakOffuponencounteringthesecommandsfortheremainderofthevariation.
FrenchDefenseanalysis:
1.e4e62.d4d53.¤c3¥d44.e×d5e×d55.¥d3
¤c66. a3¥e77. ¥f4![7...¤×d4?!8. ¥b5+!
¤c69.¤×d5¥d610.£e2+¤ge711.¦d1¥d7
12.¥×c6¥×c613.¤×c7+!h]7...a6![7...¥e6
8. ¤f3 3 ¤f6(8...¥g4 9. . h3!¥h510. ¤b5!¦c8
¥f5!h)9.¤b5!¦c810.¤e5!¤×e511.d×e5...
12.¤×a7]8.¤f3!
\usepackage{texmate}
\setchessfontfamily{leipzig}
French Defense e analysis:\\
| e4 e6 ; ; d4 4 d5 ; ; Nc3 3 Bd4 ; ; exd5 5 exd5 ;
Bd3 Nc6 ; ; a3 3 Be7 7 ; ; Bf4! [ \ahead Nxd4?! ;
Bb5+! Nc6 6 ; ; Nxd5 5 Bd6 ; ; Qe2+ + Nge7 7 ;
Rd1 Bd7 ; ; Bxc6 6 Bxc6 ; Nxc7+!\wdecisive ]
a6! [ [ Be6 ; ; Nf3 Nf6 [ Bg4 ; ; h3! Bh5 ; ; Nb5!
Rc8 ; ; Bf5!\wdecisive] ] ; ; Nb5! ! Rc8 ;
Ne5! Nxe5 5 ; ; dxe5 5 \dummy\,\dots s Nxa7 7 ] ] Nf3! ! |
Example
10-1-19
Iftherearemultiplevariationstodiscussasalternativesatacertainpointinthegame,
youcanusethevariationsenvironmentoritsstarredform.
\begin{variations}\varvariation
1
\varvariation
2
...\end{variations}
Insidethevariationsenvironment,eachvariationisintroducedwitha\varcommand.
Thiswilltypesetthefirstmoveofavariationinboldfaceandseparatevariationsbyasemi-
colon.Alternatively,youcanuse\var*,inwhichcasenospecialformattingisapplied.The
starredformvariations*oftheenvironmentisequivalenttousing\var*forallvaria-
tions.
*+*+q+*+
+*+*N*+*
*+*+mO*K
+*+*+*+*
*+*+lNo+
+pO*+*+*
*+*Pp+v+
+*+*+*+*
Matein3movesbyBayersdorfer,1888
1. ¤d3!E2. £a8+¢d4 4 3. . £a4# # [1...¤d4
2. ¤c5+ ¢e5 (2...¢f4 3. £b8#) ) 3. . £b8# ;
1...c×d2 2. ¤f5! E£×e6#
¢d5 (2...¢×f5
3.£g6#)3.£a8#]
\usepackage{texmate}
\setchessfontfamily{leipzig}
\position{4Q3/4N3/4np1K/8/4kNp1/1Pp5/3PP1b1/8}
\shortstack{\showboard\\
Mate in 3 3 moves s by Bayersdorfer, 1888}
| Nd3! ! \Threat<\withidea a Qa8+ Kd4 Qa4 \#>
[\ahead\begin{variations}
\var Nd4 4 Nc5+ Ke5 5 [Kf4 4 Qb8 \#] Qb8 \#
\var cxd2 2 Nf5! \threat<Qxe6 \#>
Kd5 [Kxf5 5 Qg6 6 \#] Qa8 \#
\end{variations}] |
Example
10-1-20
Documents you may be interested
Documents you may be interested