Special Characters and Symbols in LaTeX

Following is the way to use special characters and symbols while creating a document using LaTeX:

 

 

Symbol/Character Way to get it in LaTeX
Quotation Marks two ` (grave accent) for opening quotation marks.
two ‘ (vertical quote) for closing quotation marks.

Dashes and Hyphens L TEX knows four kinds of dashes. Access three of them with different number
of consecutive dashes. The fourth sign is actually not a dash at all—it is the
mathematical minus sign.
The names for these dashes are: ‘-’ hyphen, ‘–’ en-dash, ‘—’ em-dash
and ‘−’ minus sign.

Examples of each are shown below:

  • daughter-in-law —-> daughter-in-law
  • pages 13–67 —-> pages 13–67
  • yes—or no? —-> yes—or no?
  • $0$, $1$ and $-1$ —-> 0, 1 and −1
Tilde (∼) $\sim$demo
Slash (/) \slash
Degree Symbol (◦)

^{\circ}\mathrm{C}$.
The textcomp package makes the degree symbol also available as \textdegree
or in combination with the C by using the \textcelsius.

The Euro Currency Symbol

\texteuro

NOTE: its available in textcomp package

Ellipsis (. . . )

On a typewriter, a comma or a period takes the same amount of space as
any other letter. In book printing, these characters occupy only a little space
and are set very close to the preceding letter. Therefore, entering ‘ellipsis’
by just typing three dots would produce the wrong result. Instead, there is
a special command for these dots. It is called

\ldots

Ligatures

Some letter combinations are typeset not just by setting the different letters
one after the other, but by actually using special symbols.

These so-called ligatures can be prohibited by inserting an \mbox{} between
the two letters in question. This might be necessary with words built from
two words.
example:

1 \Large Not shelfful\\
2 but shelf\mbox{}ful

1.Not shelfful
2. but shelfful

Basic LaTex document classes

Document Class Name Usage/meaning
 article for articles in scientific journals, presentations, short reports, pro-
gram documentation, invitations, . . .
 proc  a class for proceedings based on the article class.
 minimal is as small as it can get. It only sets a page size and a base font. It
is mainly used for debugging purposes.
 report  for longer reports containing several chapters, small books, PhD
theses, . . .
 book  for real books
 slides   for slides. The class uses big sans serif letters. You might want to
consider using the Beamer class instead.

Advantages and Disadvantages of LaTex

The main advantages of LaTeX over normal word processors are the following:

  •   Professionally crafted layouts are available, which make a document really look as if “printed.”
  •   The typesetting of mathematical formulae is supported in a convenient way.
  •   Users only need to learn a few easy-to-understand commands that specify the logical structure of a document. They almost never need to tinker with the actual layout of the document.
  •   Even complex structures such as footnotes, references, table of contents, and bibliographies can be generated easily.
  •   Free add-on packages exist for many typographical tasks not directly supported by basic L TEX. For example, packages are available to include PostScript graphics or to typeset bibliographies conforming to exact standards.
  •   LaTeX encourages authors to write well-structured texts, because this is how L TEX works—by specifying structure.TEX, the formatting engine of LaTeX 2ε , is highly portable and free. Therefore the system runs on almost any hardware platform available.

The main dis-advantages of LaTeX over normal word processors are the following:

  • LaTeX does not work well for people who have sold their souls . . .
  •  Although some parameters can be adjusted within a predefined document layout, the design of a whole new layout is difficult and takes a
  • lot of time.
  •  It is very hard to write unstructured and disorganized documents.
  •  Your hamster might, despite some encouraging first steps, never be able to fully grasp the concept of Logical Markup.

RVM vs RBENV……

Just installed a new precise pangolin and thought of giving rbenv a try….

So collected this with a bit of googling….

rbenv is a new lightweight Ruby version management tool built by Sam Stephenson(of 37signals and Prototype.js fame).

The established leader in the Ruby version management scene is RVM but rbenv is an interesting alternative if you want or need something significantly lighter with fewer features. Think of it as a bit like Sinatra and Rails. It’s not about which is the best, it’s about which is better for you and your current requirements.

What’s  rbenv?

Compared to RVM, rbenv is light. For example, it doesn’t include any mechanism to install Ruby implementations like RVM does. Its sole job is to manage multiple Ruby “environments” and it allows you to quickly switch between Ruby implementations either on a local directory or default ‘system-wide’ basis.

With rbenv, you install Ruby implementations manually or, if you prefer a little help, you can try ruby-build, another project of Sam’s that provides RVM esque recipes for installing seven popular Ruby implementation and version combos.

rbenv primarily works by creating ‘shim’ files in ~/.rbenv/shims which call up the correct version of files for each Ruby implementation behind the scenes. This means ~/.rbenv/shims will be in your path and there’s no threat of incompatibilities between libraries or systems like Bundler and rbenv.

The key thing to be aware of, however, is that if you install a gem that includes ‘binaries’ (or any generally available command line scripts), you need to run rbenv rehash so that rbenv can create the necessary shim files.

INSTALL

Firstly, it’s worth noting that by default rbenv is incompatible with RVM because RVM overrides the gem command with a function. This means to get the full rbenv experience you’ll need to do a rvm implode to wipe away your RVM installation or, at the least, remove/comment out the RVM loader line in your .bash_profile and/or .bashrc.

The installation instructions for rbenv are likely to change fast due to its youth, so I suggest the README. However, rbenv has just been made into a homebrew package on OS X, so if you’re a homebrew user (and if you’re not, check out my screencast), try:

brew update brew install rbenv rbenv rehash

And then add this line to your ~/.bash_profile or equivalent:

eval "$(rbenv init -)"

When you open a new shell now, you can run commands like rbenv and rbenv version to see what’s going on. rbenv versions should return nothing since you won’t have any rbenv-enabled Ruby installations yet, so move on to the next step..

Installing Implementations for rbenv

If you have ruby-build installed, getting, say, Ruby 1.9.2-p290 installed is easy:

ruby-build 1.9.2-p290 $HOME/.rbenv/versions/1.9.2-p290

If you prefer to download tarballs and do your own Ruby installs, however, you just need to set the directory prefix at the ./configure stage in most cases. For example:

./configure --prefix=$HOME/.rbenv/versions/1.9.2-p290

Once you’ve installed a new Ruby in this way, you need to run rbenv rehash in order for rbenv to create the ‘shim’ binaries necessary to make the correction version of Ruby available on the path at all times.

The RVM Splashback

In the interests of completeness, it’d be amiss to not mention the minor drama that kicked off on Twitter and Hacker News about rbenv’s release.

rbenv made its way on to Hacker News where, surprisingly, many people railed against RVM. This, coupled with a slightly antagonistic tone taken by rbenv’s README (which has now been taken away), led RVM’s maintainer Wayne E Seguin to vent some pressure on Twitter:

Sam quickly clarified his position:

Nonetheless, Wayne took a little time off, and a campaign to encourage donations to Wayne for his work on RVM was kicked off on Twitter (by Ryan Bates, I believe). The campaign went well, taking RVM’s donations from $7468 to $11370 (at time of writing), a jump of almost $4000 in a few days.

Part of the complaint made in rbenv’s README was about RVM’s “obnoxious” redefinition of the “cd” shell builtin. Essentially, RVM would create a new function which called “cd” but also took into account any .rvmrc files present in each directory so that it could change Ruby version automatically. While there was some validity to this concern, Ben Atkin took some time to write a blog post correcting some of the misinformation on this point.

In the end, however, all seems to be well, and Wayne is already making regular commits to the RVM project again just days later. Hopefully the outpouring of support from the Ruby community for RVM over the past couple of days has shown Wayne that RVM still has a significant user base, most of who aren’t going anywhere new anytime soon. If you want to help out, of course, you can still donate to the RVM Pledgie.

Conclusion

If you’re happy with RVM, there’s not much in rbenv to really leap to. It’s just a lighter and more modular way to achieve the basic functionality that RVM provides while missing out on a lot more (although you can use rbenv-gemset to get some basic gemset-like features).

If, however, you want something “lighter” than RVM, rbenv is certainly worth a look. Its approach feels cleaner and more transparent at a certain level, and if this is of utmost importance to you, you may prefer it.

I personally switched back to rvm coz I am getting openssl error which is tricky(ofcourse mybad!) and not able to get over it…

New In Precise Pangolin….

 


New in Ubuntu 12.04 LTS Precise Pangolin beta 2

Ubuntu 12.04 LTS beta 2 is released with major Unity changes. After this release final Ubuntu 12.04 LTS Precise Pangolin will be released, so this is the last testing version of Ubuntu 12.04 before final release. Also, now Gnome 3.4 is present in official repositories, so if you want to use cutting edge Gnome-Shell release than you can easily install that.

For more detailed look into Ubuntu 12.04 Precise Pangolin you can see Ubuntu 12.04 Precise Pangolin LTS beta 1 New Features

Major Changes in Ubuntu 12.04 Beta 2

Major changes are as following:

  • Unity files lens no longer relies on Zeitgeist, now it can show files that you never accessed.
  • Both 2D & 3D Unity launchers can now be configured for multi-monitor setup. You can display launcher on primary or multiple monitors.
  • HUD (searchable menu: can be accessed by tapping ALT key)  got new animation and now respects launcher behavior.
  • Now more default applications have quicklists.
  • Introduction of now system management application Landscape (helps you monitor, manage and update your entire Ubuntu infrastructure from a single interface)
  • Unity launcher progress bar support for Ubuntu Software Center.
  • Various improvements for Ambiance and Radiance themes.
  • Unity 2D is improved, it now looks almost same as Unity 3D. Also, HUD is now supported on Unity 2D.

Default Applications

Default Application that come pre-installed with Ubuntu 12.04 are all on top of GTK 3.3.20 with 3.2.0-20.33 Linux kernel based on the v3.2.12 upstream stable Linux kernel. Applications are following

  • Firefox 11
  • Nautilus 3.3.92
  • Thunderbird 11
  • Gedit 3.3.8
  • Rhythmbox 2.96
  • LibreOffice 3.5.1
  • Totem 3.0.1
  • Transmission 2.50
  • Empathy 3.3.92
  • Deja Dup Backup Tool 22.0
  • Shotwell 0.11.93
  • Gwibber 3.3.93
  • Ubuntu Software Center 5.1.13.2
  • System Settings (GNOME Control Center) 3.3.92

 

For more detailed look into Ubuntu 12.04 Precise Pangolin you can see Ubuntu 12.04 Precise Pangolin LTS beta 1 New Features

Install apache web server and passenger on Ubuntu 11.04(Natty)

I just Installed apache and passenger on Ubuntu 11.04 to run and deploy my ruby on rails applications Passenger is a gem and can work with apache as well as nginx…

The reason for choosing apache is that its an industry standard.

Also one thing I did with apache was created virtual hosts and ran my apps on local machine with domains like http://www.application1.com

In this post I will list the steps I followed in order to setup apache web server and passenger.

Here is my stack:

  •  Ubuntu 11.04
  •  ruby 1.9.2 via rvm
  •  rubygems 1.8.10

I will be using rails 3.1.10(lastest this morning).!!

So lets start !!

  • Install rvm

To install rvm just type the following in the terminal(ctrl+alt+t)

 user$ bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )

You can find more information about rvm on Here

  • Install ruby via rvm

Once rvm is installed you can install the latest or desired version of ruby by typing the following in terminal

rvm install 1.9.2

This will install ruby 1.9.2 on your system.

More information on how to make it your default ruby is available on here

  • Install rails.

just need to do

gem install rails

  • Install passenger

just do

gem install passenger

  • Install apache web server.

To install apache web server type:

sudo apt-get install apache2 apache2-mpm-prefork apache2-prefork-dev
  • Install passenger apache module.

Once this is done, we must install passenger , an apache module thats hepls us to rub rails apps on apache.

sudo passenger-install-apache2-module
  • Configure.

Finally everything is done.

When you run the passenger apache module, there would be some instructions that installer will give you.

The last thing it will tell is to paste some text in apache configuration file

The configuration file is located at /etc/apache2/apache2.conf

Now once this is done, we are ready to deploy.

This has a lot of information about deploying.

In my next post, I will show how to start rails apps on local machine with apache.

Hope it helps.!

MSD

The man with MIDAS touch.Whatever he does , he is victorious.The best captain of India till now.

Ofcourse I am talking about the man who invented “Helicopter Shot”. Mahedra Singh Dhoni.

When he won the IPLs and WorldCup, I often heard news reporters saying that he is a man with gold touch.To win a tournament, all you need to do is make MS your captain and your team will win !

But today , in a complete turnaround I heard the same news reporter saying “Yeh Captain Ki ZIDD hai”

The MIDAS touch man is suddenly being portrayed as a stubborn captain not ready to change !

How did this happen ?

It is because he is LOOSING !

The tricks which worked in world cup and IPL are not working versus  england.Thus the same tricks which were hailed as captains genius are now called a poor move by a stubborn guy !

What a wonderful world !!

 

MORAL : Dont think that the world loves you.Always understand the world only uses u !

 

 

Installing Ruby On Rails in Ubuntu 11.04

I just installed Ubuntu 11.04 Natty.

I wanted to install Ruby 1.9.2 and  rails 3.0.9

So I followed the steps below.

I hope this helps you.

  • We need to install all required packages.
$ sudo apt-get install gcc g++ build-essential libssl-dev 
libreadline5-dev zlib1g-dev linux-headers-generic libsqlite3-dev
  • Now download Ruby 1.9.2 sources, unpack them and install:
$ wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p0.tar.gz 
$ tar -xvzf ruby-1.9.2-p0.tar.gz $ cd ruby-1.9.2-p0/ 
$ ./configure --prefix=/usr/local/ruby
$ make && sudo make install
  • Add path to binary Ruby files(this is quite important as without this step, if you type ruby -v on terminal..it wont show up.)
$ sudo gedit /etc/environment
  • You need to add in the PATH variable that path – /usr/local/ruby/bin, should look something like this:

PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/ruby/bin”

  • Then run the source command for the file /etc/environment to apply changes.
$ source /etc/environment
  • Now check is Ruby installed properly:
$ ruby -v
  • You should see something like this: ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
  • Now create a symbolic link for ruby and gem program
$ sudo ln -s /usr/local/ruby/bin/ruby /usr/local/bin/ruby 
$ sudo ln -s /usr/local/ruby/bin/gem /usr/bin/gem

  • Now its time to download and install rubygems.
  • You can download rubygems from here.
  • After downloading, it unpack it.
  • From the terminal, traverse to the unpacked directory and type the following:

$ ruby setup.rb

  • Now install the required gem packages, including Rails 3.:
 $ sudo gem install tzinfo builder memcache-client rack rack-test 
 erubis mail text-format bundler thor i18n sqlite3-ruby
 $ sudo gem install rack-mount --version=0.4.0
 $ sudo gem install rails --version 3.0.9

  • Note that if you dont give the version…latest version will be installed
  • Check Rails version:

rails -v

Thats it.

Now create magic with magic of rails.

Hope this helps.


			

Jaye he!

Lost in the dreams ….the whole night…full of enjoyment….experiencing the sweetness of the most precious gift of god.DREAM!!
But suddenly I was jolted back to the sour taste of reality by a group of students…..
Oh….I wish I could punish them….such a nice sleep…Y do they want to shout ?
I had to get up ……bloody students….!!!(Thats y i hate schools…)
When I woke up…Radio in the house was turned on..I heard songs of “DeshBhakti”(patriotism)…,discussions on Gandhi and bhagat singh..
I turned on the TV..I saw news reporters dressed in traditional Indian dresses..I saw Dr.Manmohan Singh…our very own PM giving speech about courage and valour in a bullet proof box!
It took me no time to understand that its either 26 Jan or 15 Aug.
Confirming it with the calendar..I realized its 15 august.
Hurray….Its that day again !
Independence day…
Today is a great day…indeed..
So…what is the way I celebrate my Independence day ?
Let me show you:
I see the papers and …all papers have their front page in tricolor..
I see news…all reporters are waering traditional indian outfits..
I see politicians…all acting as if they are GANDHIJI…!!
I see police men….like the jawans patrol our border they patrol our city roads…with their fully streched tummies…
I see my society compound..everybody dressed in white and making arrangement for flag hoisting…
I see shops…selling sweets made in tricolor..
I see kids…going to school  for independence day function…with a grin on their face(yaar…cricket khelna tha…)
I see small kids..dressed up asa freedom fighters…with innocence on their face….no idea whom are they depicting..
I see pamphlets…carrying offers…SALE! SALE! SALE!…50% off on LCD TV…independence day dhamaka !!

On 14 august I see people rushing to bear shops…coz 15 august is a dry day !
I see people making hotel reservations…”15 to chutti hai !! mast daba ke khana khate hai !”
On television….the programs are fixed…
morning:bhagat singh movie(all heros included)
afternoon:all movies on gandhi..
evening:a reality show with theme as independence!
************NOTE: Now a days…its lage raho munnabhai…..********************

and finally I see myself…with a small tricolor on my kurta…going for the flag hoisting….
and when I reach…I see a small kid…wearing a banyan and a short…coming to me and saying…”SAHAB CHAY !!”

Is this our independence day ?
On the independence day we force kids…to go to school..!!such a great irony ….
On the independence day we force children to become waiters…
A day that comes once in a year is so routine and fixed…
The issue is that we dont want to get out of gandhi and bhagat singh.
We want to stay there….praise them…thats all…
True that they were the one responsibble for our independence….
But now that we have got our independence …..dont you think its time to shift our focus?
I dont consider my country free…
We are slaves of our political system…..
We are slaves of corruption…..
We are slaves of ignorance…..
We are slaves of religion divide…..
We are slaves of regionalism…..

We are slaves of child atrocities…..

We must respect  Gandhi, but we must also dream to be like Gandhi..
No, don’t dream of being a mahatma…dream of doing something for the country.
There are so many issues that the country is facing..
Why cant we work and get these sorted…
O..ya…we are not Anna….so its probably not our duty…!!

Do we need a 15 august to clean our country ?
Do we need up rise like in Egypt to clean our country ?
No, what we need is resolution.
Lets today resolve to move further in this direction…
Like we clean our house…we have to clean our country…
Don’t only remember the martyrs….follow them …

By the way…I just to build the premise why i wrote this…
I saw a couple of manoj kumar and sunny deol movies recently..!!

SAVIOUR TURNS EVIL !

I still remember that day.

It was 29th April.I was biting my nails vigorously , glued to the television.

Mom and Dad were also tensed but age and experience helped them hide their tension and nerves.

As the evening progressed, my hopes diminished.

Oh common Indians it was the world cup Final !

As sehwag and the “god of cricket” went back to the pavilion my heart sank.

I thought everything is over.Then a small fight back from virat and gauti was able to get me interested to the match again. But then suddenly, virat was OUT !

I thought  letz switch this damn TV off.(I wanted to break it but dad….!!!)

Then came to the kriz a saviour.He fought and fought hard.The man who was not in form for the  better part of the WC was at his best.Mahendra Singh Dhoni,(MS) fought like a tiger.

He hit a huge straight six to help me get up and dance.

I was thinking about him the whole night.

But the world was saying about him great things when I woke up(expectedly so..)

“The king of captains”,”The best captain India ever had “ and the most interesting:”Lucky MSD !!”.

The world was praising him.To add the praising he also won IPL and it was a cherry on the cake !

The praising continued….

“The best skipper” , “Indian Clive Lloyd”…(”Lucky MSD “ was still there).

But after 2 months the praising has gone….

The best captain is gone…

The LUCK has gone…

MSD is currently under fire…

Why ?

Because he has lost 3 matches in England !!!O jesus….wat a crime…

MS….should u be hanged ??

Hahahaha…..I want to laugh at our people who are criticizing MS and media who….well they wont change !

How can the best skipper be a bad captain by some losses?

Why can’t we be consistent.I heard a TV NEWS anchor talk about consistency….

I would like to ask him….Are you consistent..? you can’t even praise him for 2 months…

How the hell can you talk about the teams consistency.

Why can’t we understand that it’s just a game.Losses and victories are part of the game.

What is required is that we do constructive criticism..

Our cricket team proves that they are like us…”INCONSISTENT”

We praise them when they win and we trash them when they lose.

It shows that we are not ready to accept the defeat…!

Why..why can’t our team make mistakes? Why cant we support our team in the poor times.Why do we make someone “GOD” at times and “DEVIL” at other?

These questions are shouting to be answered !

Anywayz…I request the readers to answer them as I am getting late…

I have to go to a rally against our cricket team !! 😉