if you want to draw a block diagram or a flow chart or any kind of drawings the
best package you can use is called ticks you can also pronounce a to take Z but
in order to use the tics package you have to write a lengthy code and put a
lot of options in many applications you just need to convey a simple idea using
a block diagram like this in your presentation or theses are in a book so
in this video you will learn how you can do this sometimes even with a single
line of code so let's get started so the package which we are going to use
instead of a tix package is called smart diagram and the package smart diagram is
built on top of text so it loads a few libraries on auto when you use smart
diagrams package and it uses all these libraries we want to use later but we
don't want to put too much code so therefore in this situation smart
diagrams is a wonderful package so this package provides us a few types of
diagrams like this is called a circular diagram so when you create this diagram
you just put it like a list so within the curly brackets you put these four
elements so it will draw the circular diagram because the package knows what
is a circular diagram in the beginning this will automatically assign colors to
these elements but you can change those colors similarly this is a circular
diagram again but this time we are using circular elements each of the element is
also a circle so this package also allows you to change the shape of the
element ellipse is another shape you can use the second type of diagram the
package offers us is called flow diagram another type of diagram this package
offers is a descriptive diagram in which you have two portions on the left hand
side you can put any title and on the right hand side you can put a
description so this is also very helpful to convey some ideas if you want to put
in a presentation then there is a sequence diagram which has
two flavors you can have sequences in different colors or you can have a
uniform color of all the sequences so we will see how we can make this diagram
and this is the little bit modification of the flow diagram so we can modify
this flow diagram using some additional elements by using another library which
is called addition so let's see how we can code all these examples so here is a
little program if you start later on your computer you can type these four
lines of code and this is a standard minimum code actually three lines are
minimum for any latech program and then this package we are using here which is
called smart diagram and therefore these are the four lines if you have installed
latex you can quickly type these and you can start doing what I am typing here
and you can quickly see the result as well so if you are new to latex and you
don't know anything about latex and you are watching this video then there is
another video which I have made where I show how to install a tech oolitic has
three components get a distribution then this editor in which I am typing right
now and then the PDF viewer Acrobat which you are all familiar so the only
thing you need is the latex distribution you have to install and all of these
three things are free so I will put a link to a video in this video so you can
watch those videos how to install a tech and then you can just open your editor
and type these four lines and you will be with us so now let us see how we can
draw this circular diagram the first one the default one so what you have to type
here backslash smart diagram and inside the square bracket you will type
circular diagram and then you will put the elements whatever you want the
elements for example if you look here these are four elements so whatever text
you want in these elements you will put in a list fashion very simple
so I will just put text 1 X 2 X 3 and text fold very simple and now if I
compile this it is not centered but it will draw the
diagram with simple one line of code here is our diagram so how cool it is as
you can see that it is very simple just one line of code and you can quickly
draw this diagram in your latex document the best way is to Center this diagram
so for that what we can do is and use a center environment begin Center and send
so now the diagram will be centered if you look at this diagram this is
counterclockwise now let us see how we can make this diagram crop wise so to
make this clockwise you simply have to put up what clockwise here with after a
colon clockwise and no if you compile the diagram would be clockwise diagram
no it is centered and it is clockwise and now what we want to do is we want to
do a little bit of customizations so I will just copy this paste it here for
customization we have to use a command called
smart diagram set and then you start the curly brackets and within these curly
brackets you put your options for example I want to change the circular
distance so I would say circular distance equals whatever distance I want
to have 4 centimeter if I want to change the font I would say found equals
backslash large as you use phones in latex if you want to change the text
width you would say text width equals to 0.5 centimeter if you want to change at
all those elements are called modules so modules minimum width you can specify
module minimum width you can put a little more than text for example let's
say 3 point 5 centimeter then you can have module minimum height
there's a 1.5 send images and then you can have option for arrow tip arrow tip
equals 2 this is the the simplest option so if you want to see more options of
these arrow tips so you can have a look at section sixteen point four of this
pgf manual this is a document of pgf package you can find this on c10 website
and if you want even more options then you read this section sixteen point five
in this there is a library called arrows dot matter if you use this library like
this use PDF library like this then you can have even more options you can see
here there are lot of options here so you can have many arrow types all
these are available in section sixteen point five so no these are the options
which we have changed and another change I want to do is put another fifth
element or module so now if I compile this so this there is an error we don't
want font backslash here recompile and now we have a circular diagram in which
we have five modules and now you can see that we have five elements our circular
distance has increased and the fifth color has been automatically assigned to
the number five module and know what I want to show you is that you can use a
library called a smart diagram Library Edition so by using that library you
will be able to annotate your diagrams so how can we do that in the preamble
before the begin document you put this statement use smart diagram library and
within the curly brackets you put additions just double check the
Spelling's and everything is fine so now we can add some annotations which I have
already shown to you let's have a look again these are called annotations which
are external editions you can also call it editions we will do this annotations
later but first we want to the shape of this rectangle instead of
rectangle we want circle and diamonds our ellipse this type of shapes so how
to use that option so if you want to change the shapes then then you have to
use another library which is tix library and which is called shapes shapes nor
geometric what we put here is use takes library and then within the curly
brackets you put church-door geometric and now
you can have more shapes in your diagrams so let us copy the last one and
paste it here and now we can have one more option and I have to copy this
option as well so just copy these options paste it here and the extra
option we get here is called module shape equals let's start with diamond
comma and then rest of the options are same so I just want to change the shape
of the module so if I compile now and know this we have the diamond shape so
you can also have a circle and ellipse shapes which I am NOT going to do so let
us see how we can make this a flow diagram very quickly so we can just copy
this again paste it here and instead of circular diagram no we say flow diagram
a flow diagram can be horizontal or vertical like circular diagram can be
clockwise and anti-clockwise so we have to tell the program what type of flow
diagram we want so let us say we want horizonte and instead of test1 test2 we
want step one and so on
and now our flow diagram is ready but there is one more thing you should
understand here that this option command smart diagram set command is affecting
not only this work but all the subsequent diagrams
therefore we have to make these options comment so that you can see how our
default flow diagram will look like so this is no default because there are no
option commands here so everything is in the default mode so I first compile this
and now all these diagrams are in default mode and this is the word
default flow diagram and now you can of course customize it and there are many
options available so what I do know is because this video is becoming too long
so what I will do is I will put a block of code here and then I will explain
because now you know how these diagrams are working so I will just copy from one
of my files and I paste this code here close this and now I explain everything
in here so this is our flow diagram so the next diagram is the sequence diagram
so first let me compile this whole code and then I will explain what this all
means
so know everything is in the default mode as you can see here and this is our
default sequence diagram and this is our customized sequence diagram so there
must be a set command in between these two and then this is the description
diagram and finally we will modify a flow diagram using additions library so
these are called additions and annotations so let me explain how this
all works so the first command is here is the sequence diagram so you just
change the name of the diagram type in this first square brackets and then the
rest is saying whatever text you want inside the sequence come on you can put
it here and this command is the option command which is changing the option of
this sequence and making it black and white or gray and white you can say text
is white but other thing is gray and white so what are these okay so what are
these options the first option is uniform sequence color true so it means
that we want a sequence diagram which has uniform
of all modules then we have an option sequence item watercolor so this is the
border Cullen of this watercolor is black and then the text color is white
so border color is black know the font size is footnote sighs so footnote size
is a letter command which sets font size a little bit smaller than the normal so
as you can see that this font is smaller than the normal phone then sequence item
text color is white and what this is doing is setting the text color of these
sequence modules the sequence items and now then we put this sequence diagram
command and all these options are applicable to this command so this is
what is happening here this is the default and then after options this
changes to this one so this is the description diagram and as you can see
that all these modules I have only one piece of text inside so
this module has step one step two and the modules of a sequence diagram have
also only one part of the text one part text but this description diagram one
module is this whole thing it has two parts so how we take up this in the
descriptive diagram so this is the descriptive diagram and if you look here
the difference is that this is the curly brackets of descriptive diagram and each
of this bracket has three subsets brackets so this is first subset which
has the contents of the first element the title and the description and this
is the second element so basically what is different in the descriptive diagram
is that you have to put an extra bracket inside for every element because every
element has two components and now what are these options these options are for
the additions so within these two curly brackets all these options applied to
the additions and these options apply to the dry ground so this is the difference
you should note you will form color list gray this applies to this gray so these
are the main module items and these are
additions so all the items within this bracket which is highlighted all these
items which says these additions are additional item all these are applicable
to only this part this border color this arrow color the arrow shape and all
these options so all these options are within a separate bracket and within the
blend bracket we have option for the flow diagram so this is a modified flow
diagram which is a vertical flow diagram so now let's look at the options so we
are seeing a uniform color list this is the color type and if you don't know why
we are writing color like this then there is a video about colors which I
will put a link here in this video you can watch that video that is the
retarder of the video is colored simulated or something like that and for
three items for three items means we have three items of the main flow
diagram so additional item offset one-centimeter
you see the distance between these two so this is the additional term offset
from this one centimeter then additional item border color is green as you can
see this is motor color is green then the arrow color is red arrow clip is
stealth which I have already shown you section 16.4 of the manual EGF manual
then additional arrow line width is one point you can increase the width of the
line of the arrow thick arrow I mean you can increase this to two point arrow
will be thicker and then additional connections disabled is equal to four
what does this mean if the don't put there then these
additional things will not be connected to this diagram in some situations you
might want these to be separate you just want to put this beside this but no
arrow so if you want something like that then you will just make this option true
and it will not be connected but here we want connected so therefore we are
putting this air force and then instead of smart diagram the second thing
is that when we previously we were putting this some our diagram come on
but no we are putting a different command which is called smart diagram at
it means this will plot the smart diagram as well as all the additions all
the additional things so now this command will plot this and also this
thing so this is a separate command for this type of situation so which is
called smart diagram 8 and the last bit of this code is this part and what this
part is doing is it has two pair of curly braces so the first part is just
the elements of your diagram which are the text in these three modules you have
to put this text with this separated with commas no the last part is if you
look here there are few positions left of module one so it means that you want
to put your addition left of module one so module one is the keyword so you
cannot put this M capital for example this is a keyword so left of module 1
then you put this slash and whatever text you want to put in your additional
block in our case we want this low level so this is left of this module 1 so
there is nothing on the left of module 2 and then we have left of module 3 some
other text and this is what is happening here there is comma and then left over
duel 3 we have a text and some text so this is how you use this ad smart
diagram add command it has to clear of curly braces on the first view put the
elements or more use of the main diagram and in the second pair of curly brackets
you put the positions left or right of whatever more you will do here so in a
nutshell in this video what you learn is you learn few commands so mod diagram ad
smart diagram of set and samar diagram so these are the three commands you
learn then you learned how to use these two libraries by losing these two
commands and how to use this summer diagram package and if you watch this
video carefully and then you read the manual of this package and you should be
able to make all types of flow charts and block
diagrams very easy so we have already compiled this and we have seen that this
is the output of this file so that is it for this video thanks for watching