Thursday, December 2, 2010

Enabling Home Based BSNL wifi on your Wifi Mobile Phones

Few Days Back I bought a new Samsung Wave 525 phone. It is having Wifi I got excited and without wasting any time I enabled its Wifi. My modem Wifi was detected and connected to but even then I was not able to access the Internet. This made me very upset and I started thinking that I wasted my money. After this I started searching the Internet regarding my problem. Earlier I was thinking that problem is due to some settings might not right in mobile phone. But I was wrong Configuration of modem was needed to setup. So I found a useful link that let you setup your modem according to your mobile and then you will be able to run internet simultaneously on laptop, mobile & P.C.

I am having two type of Modems at two different places (one at my home in Ludhiana and another one at Barnala)

Firstly I ll show you how to setup BSNL ZTE Modem:-

Setting up your Computers IP:-

Please make sure to set your IP, Subnet and Gateway along with DNS Server as according:-
  1. I.P. = 192.168.1.10
  2. Subnet Mask = 255.255.255.0
  3. Gateway = 192.168.1.1
  4. Preffered DNS Server = 61.0.0.5
  5. Alternate DNS Server = 61.1.96.69 and 61.1.96.71
Making Wireless Connection Secure:-
  1. First login to your DSL Router setup at http://192.168.1.1
  2. Then on Left Panel Go to Wireless->Security
  3. Let SSID value unchanged.
  4. Select Network Authentication= WPA-PSK
  5. WPA Encryption= TKIP
  6. Save and Apply (Let Rest of values remain unchanged)
Setting Up LAN and WAN for Multiple Use:-
  1. Again Go to home page of http://192.168.1.1
  2. Select Advanced Setup from Left Option Panel
  3. You will se the very first connection setting named service= pppoe_0_0_35_1
  4. Click on Edit option corresponding to this service
  5. Put Port=0, VPI=0, VCI=0 (Rest not changed) then Click on Next
  6. Selct Connection type= PPPoE and Encapsulation mode= LLC/SNAP-BRIDGING. Then click on next
  7. Now enter the password and username which your ISP provided you. In PPPoE service name you can put anything as I am putting here PPPoE Service Name = dataone. Leave Rest of things unchanged. Click on Next
  8. Make a check on Enable NAT, Enable Firewall, Enable WAN Service. Click on Next
  9. Cross Check the values you put down and make changes if they have been inserted wrongly. At last Click on Save.
  10. After that Come to default page of http://192.168.1.1 and then Go to Management->Save/Reboot. Click on Save/Reboot. It will take around about 2 minutes to restart modem with newly configured settings and thats it. You are now able to run multiple PC on same connection.
Using Wireless Service:-
  1. Just On your Wifi in your Mobile or Laptop.
  2. Enter Passcode. Thats It.
If you are not having your Modem of the type I explained you can also check out following link for configuration of your Modem.

So check out the link and set your broadband modem and enjoy!!!!!!!!!!

http://www.calcutta.bsnl.co.in/dataoneinstall/menu.html

Saturday, November 6, 2010

Go Programming Language

The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.

For Installation Direction Follow:-


Check this out too:-

Wednesday, September 29, 2010

eyeOS Translation Done


EyeOS-Cloud Computing
eyeOS is an open source web desktop following the cloud computing concept that leverages collaboration and communication among users. It is mainl
y written in PHP, XML, and JavaScript. It acts as a platform for web applications written using the eyeOS Toolkit. It includes a Desktop environment with 67 applications and system utilities. It is accessible by portable devices via its mobile front end.
eyeOS is browser based operating system based on cloud computing. It can do all that jobs which a real operating system can do. One can save his data and work on-line ad can access his a
ll the data from anywhere.
eyeOS is a desruptive Desktop entirely usable fro
m a web browser. It includes some office suite and and some collaboration applications, as well as a full framework to develop new web applications as they were web applications. Its Free and Open-source so you can host you own system, keeping all your data under your own control.
Website: http://www.eyeos.org/
eyeOS in Hindi
In eyeOS 2.0 its translations in different languages will also be available. I also have deployed it in our college. I made eyeOS avialable in our college serevr during my training. And after my training I got an email from Mr. Jordi Collel (Team Leader for Translation of eyeOS). So I came in the contact with the ey
eOS developers and translated all the eyeOS in Hindi. But this translation will be available in is next release. I alone did all the translation for it in Hindi Language. I also suggest my closest friend Parveen to translate it to Punjabi. He did a great job.
Here is the link to use eyeOS at college dummy server. http://202.164.53.116/eyeos/
Just Create a new user here and use it.
and to the translation http://translate.eyeos.org/.See the following image showing the translation done by me that will be available soon to everyone.
This is the task done by me. You can clearly see the contents being displayed.d in Hindi language. So soon you will be also able to view eyeOS in Hindi. It was quite atedious job but yaa interseting too.



Certificate from eyeOS Developers
I also got the Certificate from the Developers of eyeOS from Barcelona(Spain) for doing this translation ion Punjabi and for taking part in opensource Project.Give a Look at my Certificate shown Below.

Friday, September 24, 2010

Barnala Map Ready At Open Street Map

I am feeling very happy to announce that Map of MY Home Town is finally ready (with just few detailing left) after two months. Indeed I took a quite much time but yet I was single person to map the whole districts with one of my student Sukhakashdeep Singh (+1 Inter arts) resident of Barnala too. He helped me a lot while collecting the GPS Data. Before I was doing my project when I made to see my Barnala Map by my mentor Dr. H.S. Rai, I was just shocked to see, not even boundary of city has been drawn earlier by anybody. From that very I decided that I will myself complete this map alone whether one should interested or not to help me. And Finally I got the result. You can clearly See What my Home town was earlier and What it is at present.

MY Home Town Before Mapping Done by me
My Home town After Mapping Done by me :)

So you can clearly see what a lot has been changed in Barnala Map at osm.org. Even the name of city was not displaying earlier. All thanx to my mentor Dr. H.S. Rai who gave me full support and also couraged me time to time. He provided me VGPS (for taking GPS data). And yes also to my Dad, he also supported me a lot. He covered the boundary with me in Car. Yet I am working on streets and all minor details along with some error correction if found. You can also take a look at iframe of my home town as shown below:

View Larger Map

Monday, September 20, 2010

Convert Your Ubuntu10.04 into a Complete MacBook's Look

Now you can change the Graphics of your Linux(Ubuntu10.04) into a Complete MacBook's Look just with some simple commands given below.Mac OS X Transformation Pack. Similar to Mac4Lin but dedicated to Ubuntu Linux. It can also be used in other OS based on Debian/GTK. Package includes all necessary system components to mimic Mac OS X appearance on Ubuntu Linux.
Important: While Running these commands you will be asked to do changes on your current working Environment.
Mac Ubuntu

Installation:








wget https://downloads.sourceforge.net/project/macbuntu/macbuntu-10.04/v2.0/Macbuntu-10.04.tar.gz -O /tmp/Macbuntu-10.04.tar.gz
tar xzvf /tmp/Macbuntu-10.04.tar.gz -C /tmp
cd /tmp/Macbuntu-10.04/ 
$ ./install.sh

Thursday, September 2, 2010

Installing GIMP Scripts

First you have to decide if you are going to make this script available for all users as a Global script or just a single user as a local script. If you don't have access to create files in the Global location then you can only install them as a local script.

Microsoft Windows and Linux use different file system structures so they require you to save the files in completely different locations. The default file locations are as follows:

Windows


  • User: Download the file to C:\Documents and settings\\.gimp-2.2\scripts
  • Global: Download the file to C:\Program Files\GIMP-2.0\share\gimp\2.0\scripts
Linux

  • User:Download the file to ~/.gimp-2.2/scripts
  • Global:Download the file to /usr/share/gimp/2.0/scripts

Where did the script go?

Often you have just installed the script and now you can't find it. There are several reasons for this and I will explain how to find the new script.

First, when GIMP starts it reads both the Global and user script locations. So if you have added the script while The GIMP was running you will not see it, yet. One solution is to close GIMP and re-open it allowing it to read and add the new script. Another is to manually tell GIMP to read the script locations while it is still running. To do this just go / Xtns / Script-Fu / Refresh scripts

Ok, GIMP has read the script where do I find it?

GIMP scripts can be placed by the author anywhere they want. The two main locations are in the main GIMP window or in the menus in the Image window.

As a general rule scripts that alter the image are placed on the image menus and ones that create a new image from scratch are placed in the menus on the main GIMP window.

Wednesday, August 25, 2010

How to turn a jpeg image into a sketch in Gimp

  1. Start gimp on your computer and load the jpeg image you'd like to work with into the gimp.
  2. Go to colors; then desaturate-average.
  3. Go to filter and select edge.
  4. Now, got to colors and select invert.
  5. You now have a sketch of your photo. Now go to colors, then levels and play with the values until you are satisfied with the intensity of the sketch.
  6. Save your image and your done!

Saturday, August 14, 2010

Activating the User's public_html Directory with userdirectory (Using Apache2 )


Create a directory (folder) called "public_html" in your home directory, with your file browser or the command below. Do NOT use the sudo command.
me@myhost$ mkdir public_html

I have found that on a simple development machine, it is easier to have your work all within your own home directory and not have to worry about permissions and folders owned by the root user. What it gets you is the ability to access your websites in your home directory by a URL in the form http://localhost/~USER_NAME. We can improve upon this with fake domains, but first things first.
There are only two commands you need to enter to activate the User Directory feature, and then one command to reload the configuration files. The last command includes an absolute path, so it doesn't matter where you execute it from. The first two "ln" commands assume you are in the directory /etc/apache2/mods-enabled. What you need to do is create two symbolic links (soft links, symlinks) in the stated directory pointing to the corresponding module in /etc/apache2/mods-available. So, if "$" is your prompt,
me@myhost$ cd /etc/apache2/mods-enabled
me@myhost$ sudo ln -s ../mods-available/userdir.conf userdir.conf
me@myhost$ sudo ln -s ../mods-available/userdir.load userdir.load
me@myhost$ sudo /etc/init.d/apache2 restart
me@myhost$ sudo gedit /etc/apache2/mods-available/php5.conf
you will see a file like the one below :



SetHandler application/x-httpd-php


SetHandler application/x-httpd-php-source

# To re-enable php in user directories comment the following lines
# (from to .) Do NOT set it to On as it
# prevents .htaccess files from disabling it.


php_admin_value engine Off




Now change it to look like the one below and then save it :



SetHandler application/x-httpd-php


SetHandler application/x-httpd-php-source

# To re-enable php in user directories comment the following lines
# (from to .) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
#
#
#php_admin_value engine Off
#

#

#



Monday, August 9, 2010

Backup MySQL Database to a file

Backing up your database is a very important system administration task, and should generally be run from a cron job at scheduled intervals. We will use the mysqldump utility included with mysql to dump the contents of the database to a text file that can be easily re-imported.
Syntax:
mysqldump -h localhost -u root -pmypassword databasename > dumpfile.sql
Example:
mysqldump -h localhost -u root -p2Uad7as9 database01 > dumpfile.sql
This will give you a text file containing all the commands required to recreate the database.

Install an RPM Package on Ubuntu Linux

Installing software on Ubuntu usually entails using Synaptic or by using an apt-get command from the terminal. Unfortunately, there are still a number of packages out there that are only distributed in RPM format.


There’s a utility called Alien that converts packages from one format to the other. This doesn’t always mean that an rpm will work on your system, though. You will need to install some prerequisite software packages in order to install alien, however. These packages include gcc and make.
Run this command to install alien and other necessary packages:
sudo apt-get install alien dpkg-dev debhelper build-essential
To convert a package from rpm to debian format, use this command syntax. The sudo may not be necessary, but we’ll include it just in case.
sudo alien packagename.rpm
To install the package, you’ll use the dpkg utility, which is the internal package management tool behind debian and Ubuntu.
sudo dpkg -i packagename.deb
The package should now be installed, providing it’s compatible with your system.

Sunday, August 8, 2010

Red Eye Removal using Gimp

See an example of red eyed picture over here::
chris  and tori with red eyes
Launch GIMP and then open your photo. Select the rectangle tool.
    gimp  rectangle tool
    Draw a rectangle around the red eyes.
gimp  rectangle tool selecting red eyes
Now select Filters -> Enhance -> Red Eye Removal…
    gimp filter  for removing red eye
    The Red Eye Removal tool will pop up. Use the Threshold scroll bar to adjust the eye color as you see fit. Click OK when you’re done.
gimp  red eye removal threshold
The changes will be applied to your photo.
    gimp  red eye removal
    Use the Zoom feature if you need to remove red eyes from someone who also has red hair (or a wig
    ) that’s getting in the way. You can even select one eye at a time.
      gimp  red eye removal closeup
      And the finished product –
      no  more red eyes

Sunday, August 1, 2010

Problems during Compilation of LaTeX files

Hello to all, I am sorry for not posting this message earlier. But when Now I prepared my synopsis and make its template and send to others then I came to know that i forgot to tell about how to include extra packages to be used in LaTeX file.

For that you just need to create directory structure as shown below in your home folder:
/home/username/texmf/tex/latex
and after that now you have to install extra packages. Note down .sty file error which terminal gives you when you are compiling your .tex file. Now search the Internet for that .sty file named package like if I have demo.sty file error then I will look for demo latex package. After you download this package you need to install it on the system. Just placed the folder(demo say) under latex folder. Then go to terminal & type:
$sudo -s
#cd /texmf/tex/latex
#texhash demo(in place of demo you can have package name)
That's it file will be updated and your package will be installed.

Thursday, July 29, 2010

Designing Graphics in LaTeX through Web

Today I started another topic of my project. Although the training is over now but the task regarding project is still pending. To design Graphics in LaTeX i need a script that run latex compiling commands from web browser and a php code that calls the script and last a .tex file to be compiled containing graphics code.

For the script that run latex commands do following:
Got to terminal
$cd /var/www/
$sudo mkdir demo
$cat > script.bat
cd /var/www/demo
latex slide.tex
dvips slide -o
ps2pdf slide.ps
^z
Now to design the php code that runs the script:
Go to terminal again
$cd /var/www/demo
$sudo -s
#vi index.php
$command = "sh script.bat";
exec($command, $output=array());
?>
:wq!
#exit
Now give the permissions to whole demo folder so that script can create some other files during latex file compilation without any difficulty.

Sunday, July 11, 2010

Feng Office

As according to my project i need to work and to do analysis of following:
1)Using LaTeX to design a report and presentation.
That i have done using pdfscreen package and also i have used endfloat package to make figures.
2)Automation of selection of template in OpenOffice using Some python script
3)Using css@media to have print and screen view
4)To have an online office suite.
I need to do all these 4 tasks and need to compare all these means their pros and cons.
My second and third task are still pending but curently i am working on 4th task.
Regarding this I earlier used O3Spaces which is online suite that provides workspace for managing the documents online , uploading document from your localsystem maintaing it online and also downloading document from your o3 workspace. But It was having limitation that i have already discussed.
So, Now i am going to try some another office suite that i can provide online.
First amongest them is fengoffice
feng office provides you to have your own online office suite and it's quite easy to install it.
  • Manage your projects and business services
  • Collaborate with your team and your customers
  • Organize and share documents and files
for more just follow here

Saturday, July 10, 2010

LaTeX endfloat package

Hello Everyone , I want to discuss about you regarding a special package available in LaTeX called endfloat package by including this package in preamble all the figures and tables present in your middle or starting of package just float towards end of document and they all get placed at end of document.

I am hereby discussing with you people because sometimes when we have to submit journals,conference papers it is mandatory to include all table and figures at last of your document. In that case endfloat package in LaTeX works wonder. If you don't want to place your pictures and tables to end of document just comment out the line
\usepackage{endfloat}

Thursday, July 8, 2010

Installing O3space on your linux system

I am making here documentation for how to install o3workspace so that any visitor on this site can have full fledge process of installation, otherwise one has to wander from one site to another as i did.

1) first of all you need to have O3spaces.deb package . For that just go to www.o3spaces.org. There you find Register section Register under Communtiy edition (it is completely free).After Go to your mail activate your account on o3space. as soon as account is activated you will get another mail having username and password.With this username and password log on to o3spaces and after that download .deb package.
2) For O3space to work you need sun-java-6-jdk and sun-java-6-jre.
To install it Got to terminal and type:
$sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$sudo apt-get update
$sudo apt-get install sun-java6-jdk
3) After that follow step and when installed. Go to Application Menu then System and open java console and enable a server either localhostor remote one.
4)After that run o3space.deb package to install your o3space on ubuntu.
after completion. Go to browser type http://localhost:8095/Spaces or type
http://localhost:8095/Studio (Command line is here for o3spaces).You will something see like this when use Spaces.

You can also change your ip from localhost to your own ip. Means you can also have http://myip:8095/Studio or http://myip:8095/Spaces. So, For that you first need to shutdown your tomcat server. With o3spaces.deb tomcat get installed simultaneously.
For shutdown Go to terminal and type:
$sudo -s
#cd /opt/O3Spaces/tomcat/bin
#./shutdown.sh
But remember before executing script ./shutdown.sh you need to do some changes in shutdown.sh
#gedit /opt/O3Spaces/tomcat/bin/shutdown.sh
Caution!!find somewhat written like sun-java-1.6.3. and replace it by sun-java6-jdk Save it same changes you need to make it in startup.sh also.
This will stop your tomcat. After that go to terminal again and type.
#gedit /opt/O3Spaces/tomcat/conf/server.xml
Here find localhost and replace it with your server domain and then restart tomacat server. And then you can access o3spaces from your desired ip.

Tuesday, July 6, 2010

Making Online LaTeX Compiler

Today was a good rainy day and quite motivating one. One idea struck to my mind today that what about if latex code will compiled online means no need to install latex code on our system we can access latex compiler through online.
Various Online Latex Compiler are working today. You can go for following link for online latex compiler.
www.scribtex.com
http://webtex.scoditti.com/
And many more just search in google. so it's great means no need of latex installation, no worry about compilation , you just put code and output is yours.
I am user of latexusergroup at googlegroups.com and there i asked for help regarding some logicto made script that can help me to do this task.
But one the user Peter Flynn provide me script and html form to which i made some necessary changes according to me.
You can have it just click below:
form
script

Monday, July 5, 2010

How to insert Python Script in OOwriter as macro

Python being an object oriented language has great benefit in designing the API but in case you want to automate the oowriter you need to compromise in terms of ease of coding as is provided with openoffice.org basic.But Good news is that this problem occur only if you want to write Macros in Python but if you want to design API to OpenOffice using UNO (Universal Network Object) than python programming is great.But as i already said that the major disadvantage of doing python scripting in oowriter is that you cann't write script directly into your openoffice.

Instead we need to use a separate text editor you may use any and write down your code within file with extension .py.
After that if you wish to add this script in oowriter as macro just do the following:

Script Location

Scripts to be excuted in OpenOffice.org can be stored within the following locations:

OpenOffice.org's user directory

This is the standard place for self written python scripts. The script files are simply stored within the file system.
On windows, the directory can typically be found in:
windows - C:\Documents and Settings\Application Data\OpenOffice.org 2.0\user\Scripts\python
unix - ~/.openoffice.org.2.0/user/Scripts/python
Note, that the last python subdirectory may need to be created initially. Make sure, the python is completely written lowercase. You can add arbitrary deeply nested subdirectories, the names of these directories are reflected in the UI.
Example: The dynamicDialog.py file can simply be placed in the above directory. Afterwards, open the
->Tools->Macros->Run macro dialog and navigate to the position shown in the above picture.
Click on Run to execute the python script, which opens another dialog with a push button and a label field. Clicking the button will increase the number within the label field. The dialog can be closed by pressing ESC.

OpenOffice.org's share directory


Scripts that shall be shared throughout all users of a concrete OpenOffice.org installation can be stored with the share directory. All default scripts coming with OpenOffice.org are located here. In general, this directory should not be used for script deployment (see later uno-packages).
The script files are simply stored within the file system. The directory can typically be found in
windows C:\Program Files\OpenOffice.org 2.0\share\Scripts\python
unix /usr/lib/openoffice/share/Scripts/python

Sunday, July 4, 2010

CUSTOMIZING TOOLBAR IN OOWRITER

Open Office Being open source provides you the functionality with which you can customize any tool bar, can assign new tools with some script working over there. That's What i am going to do in my projects. I need to design some sort of script (preferably in python) that let me choose my style of presentation and report with total ease.

Making Tools in OOwriter.

Making new tools is easy in Open Office Writer.

1) Open your OOwriter. Go to Tools->Customize. You will see a window like here:



2) Click On New to make a new toolbar in your open office. And Click on Add to add a new macro, script as a new tool in your tooolbar as shown.After selecting your macro click on add. See below:


3) After that you can assign an icon to newly designed tool and can be modified again & again.

In OOwriter For writing macros there are provided 4 languages:
a) OpenOffice.org Basic
b) Bean Shell
c) Python
d) Javascript as shown:

We can use any of them but preferably i am going to use Python for designing macros so as to customize the selection of styles and formatting in oowriter. But before going in details let me introduce you to python:

Python is a general-purpose high-level programming language whose design philosophy emphasizes code readability. Python aims to combine "remarkable power with very clear syntax", and its standard library is large and comprehensive.

Python supports multiple programming paradigms, primarily but not limited to object oriented, imperative and, to a lesser extent, functional programming styles. It features a fully dynamic type system and automatic memory management, similar to that of Scheme, Ruby, Perl, and Tcl. Like other dynamic languages, Python is often used as a scripting language, but is also used in a wide range of non-scripting contexts.

If you want to go into details of python regarding its syntax and all that click here.

Using the OpenOffice UNO Bridge

OpenOffice has language bindings for C++, Java, JavaScript and Python. On Windows, OpenOffice can also be manipulated in Pascal via COM Automation (see below), but there is currently no easy way of using OpenOffice's UNO (Universal Network Objects) from Pascal on OS X and Linux but from Python we can easily use it. If you're interested in developing an OO "bridge" for Pascal, please refer to these links for more information (caution: these links are quite techie in true Sun fashion):

>api.openoffice.org

About_Bridges

Attempting to use Python to manipulate OpenOffice

Since OpenOffice includes support for Python, it would seem possible to run Python scripts so as to manipulate OO. Here are the steps for one possible approach to doing this:

1. Test UNO via Python macro run within OO
2. Test UNO via Python standalone script

Step 1. Test UNO via Python macro run within OO

OO has tools for creating JavaScript macros, but not Python macros, so use a text editor to save the following script to file test_macro.py and place it in OO's user macro folder. On Windows, this folder is:

C:\Document and Setting\\Application Data\OpenOffice.org2\user\Scripts\python\Library1

On Mac OS X, this folder is:

~/Library/Preferences/NeoOffice-2.2/user/Scripts/python/Library1

On Linux this folder is:

$ cd \usr\share\openoffice\programs\...

On both platforms, you'll need to create the python/Library1 folder

But no need to create folder in Linux/Unix based system just place script in program folder as mentioned above.

Here is the code for test_macro.py, adapted from the OO Pascal example above:

# Python macro that tests UNO by creating new document and inserting some text.

import uno

def TestNewDoc():
ctx = uno.getComponentContext()
smgr = ctx.ServiceManager
desktop = smgr.createInstance('com.sun.star.frame.Desktop')
doc = desktop.loadComponentFromURL('private:factory/swriter', '_blank', 0, ())
textCursor = doc.Text.createTextCursor()
doc.Text.insertString(textCursor, 'Hello World', 0)

In OO, choose Tools | Macros | Organize Macros | Python and run the macro to make sure it works.

Step 2. Test UNO via Python standalone script

Here is the same code as a standalone script:

# Python script that tests UNO by creating new document and inserting some text.

import sys

if sys.platform == 'darwin':
sys.path.append('/Applications/NeoOffice.app/Contents/MacOS')

import officehelper

ctx = officehelper.bootstrap()
smgr = ctx.ServiceManager
desktop = smgr.createInstance('com.sun.star.frame.Desktop')
doc = desktop.loadComponentFromURL('private:factory/swriter', '_blank', 0, ())
textCursor = doc.Text.createTextCursor()
doc.Text.insertString(textCursor, 'Hello World', 0)

Save this to file test.py and run it like this on Windows from a command line. Note: On Windows and Linux, use the version of Python included with OO; on Mac OS X, use the system's Python 2.3.

"\program files\openoffice.org 2.3\program\python" test.py

On Mac OS X, run the script like this from a Terminal window:

#!/bin/sh
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH":/Applications/NeoOffice.app/Contents/MacOS"
python2.3 test.py

On Linux

$ python test.py

Tuesday, June 29, 2010

Using Conditional Paragraphs

The conditional Paragraphs works in the same manner as a piece of code with some condition works in C++.
Here also in Open Office we need to specify some sort of condition So, that a paragraph is hide and if condition goes wrong other paragraph will be hide.
BUT We want to have whole text in report and some of the text need not to be there in my presentation.
So, for that Go to OOwriter and after that
Select the paragraph which you want to hide. Then,
Go to
1)Insert->Section
You will see a screen as follow:

2)Make a section
3)Insert some condition that hides your paragraph
i.e. here insert condition Doc!=Report
4)Then click on Insert.
Making The Condition True / False
For making condition True / False so as to hide or unhide the paragraph You need to :
1) Go to Insert->Fields->Other
You will be prompted to following window:

2) Click on Variable tab after that allot name to your variable . Here we need variable Doc.
3) After that select format which is to be text.
4)Next enter value for variable which is Report if you want report and presentation if you want presentation. Check Invisible Box otherwise it will insert variable too.
After that you need to change just this value for report / presentation.

Thursday, June 24, 2010

Using Styles & Formatting, Conditional paragraphs in OOwriter

OK Friends till now whatever i had discussed i think is new for you. Even when i heard about LaTeX i can not even pronounce it in write way. But i think it is a great thing means how easy it is by changing just a single option you can have both your report as well as presentation in no time.

You can have most complicated equations in your document also. See below:

But, This all can be done in Open Office. Means you can change your report to presentation using just oowriter.

In Open Office writer there is option in,

Format->Styles&Formatting

where you will find different styles you can opt.

We need not to define font size,type and extra characteristics for a page title.
Just choose style Title and after that when enter is pressed automatically subtitle starts with it's different style and after that your text body goes on with normal 12 pt. size and so on. This is what you need to choose some sort of styles.

You can opt for presentation style for your your presentation.

2) The second part includes conditional paragraph which is good feature that is used when document is to be made look at different conditions.

Means we can set different paragraphs for documents that seems to be more elaborated.

and for presentation some what text can set different which is more precise.

This weightage of the contents is controlled by conditional paragraphs.

Wednesday, June 23, 2010

Using pdfscreen package in LaTeX

Today i am going to discuss with you that how you are able to get both print form and screen viewable document by changing single option in this pdfscreen package. You just need to include following code in preamble part:-

\documentclass[a4paper,11pt]{article}
\usepackage{xspace,colortbl}
\usepackage[screen,panelleft,gray,paneltoc,sectionbreak]{pdfscreen}
\margins{.75in}{.75in}{.75in}{.75in}
\screensize{6.25in}{8in}
\overlay{lightsteelblue.pdf }
\begin{document}
in the very third line if you change screen to print format it will make a form called print which acts as your report format.
\screensize is used when you need to view it on your screen or in short you can say that you want to make presentation.
\sectionbreak is used so that a pagebreak can be inserted in your screen view after you write each section.
If you want to view example click on PRINT and SCREEN
But let me clear you one thing if you are going to compile it on texmaker it will surely give you problem you may try but each time you will not get desired
output see my output which i got when i was using texmaker SEE.
So, from my this experience i will prefer to use console mode for tex compilation rather than gui softwares for compiling tex files.
So, follow the same command which i discussed on the JUNE 4 i.e.
using command $pdflatex file.tex
Then you will get desired output. Also preferably use Acro reader in ubuntu to view your pdf files.

Sunday, June 20, 2010

DruTeX


DruTeX is a powerful LaTeX module for Drupal. It can be used to display mathematics written in LaTeX as images inline with other text, or separately as a downloadable pdf.

It is having following features:

* rendering of maths or arbitrary LaTeX via latex + ImageMagic / dvipng
* support of classical LaTeX-math environments like $x^2$, \[ x^2 \]
* some plain latex2html and html2latex facilities (no external program
needed)
* pdf generation of nodes (with LaTeX)
* highly-configurable input formats
* security-enhanced modes (to allow even anonymous users to write latex)
* Drupal / LaTeX UTF-8 (utf8) support
* Able to remotely render LaTeX on a foreign server if your primary server doesn't support LaTeX

Click Here for download DruTeX module

Friday, June 18, 2010

LaTeX Online compiler

Till now I had discussed how to Use LaTeX by installing LaTeX based gui softwares on your sytem. but you can also have Online LaTeX compilers for getting pdf outputs from your LaTeX code.

See Here::

Go To LaTeX Online Compiler

Wednesday, June 16, 2010

HOW TO CREATE REPORT AND PRESENTATION OF A SAME TOPIC IN SHORT TIME


Hello Everyone here i am going to discuss with you people that how to create a report of topic and more than that how to create presentation from that report..

I am discussing the task given to me by my Prof. Dr. H.S. Rai during summer training 2010. I was allowed to do use any software any script. But i selected the Latex..

As I had already discussed about the basic of LaTeX typesetting system and if you forgot you can refer to above posts..

So, To do this task you firstly need..(Remember i am using Ubuntu 10.04 )

1) A LaTeX based graphical editor I installed Texmaker. You can Download from here....

2) After that you have to create your .tex file in this editor that lokks like a report. Get its code from here..

3) Quick build it using F1 key.. You can have your .dvi file from which you can make pdf file for your report that look like here..

4) Hence Your Report is prepared... Yes if someone thinks that there is lt of botheration about commands then don't panic LaTeX editor will help you and if still think then remember one thing you just need to change only one or two commands to make a presenation no text copying, no resetting...

For any difficulties and question make a comment and you will be serviced.

5) Now to make presentation the very first requirement is to install \documentclass{beamer}.

Install it using command in terminal
sudo apt-get install latex-beamer

Now you are all set download presenation file source code in .tex format from here

Here you can see in slide.tex we have insert

\documentclass{beamer} which is used to make your presentation..

\frame is used to start a new slide

if you want to write something in the slide then there is

\frame{
\frametitle{titlename}
\begin{}
your data goes here
\end{}}

Rest of things are same as of report format . You just need to change only above information.
Save it and compile to have .dvi and .pdf file
See the output file here

Saturday, June 12, 2010

EXTRACTING YOUR DOCUMENT FILE


Have You ever tried to extract your .doc or .odt or any document file. Obviously Ans is No. Because we can't imagine that a single document file can contain so many files and folders.. But yes it is true....

(I am using Ubuntu here so discussed accordingly Ubuntu)
1) Say you have made a file named sample.odt
2) Right click on it select Open with archive manager and extract all files..

See snapshot below

You can find a number of files named .xml these are all eXtensible Markup Language file these files include your data as well as style sheet in xml format
once you have changed style sheet and zipped the files back you can get new file with entire different structure...

Friday, June 11, 2010

PROS AND CONS OF LaTeX


Ok I had showed you hoe LaTeX worked and now i am going to discuss the pros and cons of LaTeX::

PROS:- Firstly Discussing the pros, I would like to mention that why i loved to do work in LaTeX because of::

1) TeX has the beauty in its output

Yes it is true that we are not able to get the output simultaneously means output is shown only at end of file.. but indeed it has best output than those heavy word processors..

a) Kerning is used to measure out the beauty of your document

Kerning

is the process of selectively adjusting the spacing between letters pairs to improve the overall appearance of text. Examples of letter pairs that need kerning treatment are AV, AY, PA, and AT.Popular word processors either lack support for kerning tables or disable kerning by default..

See below::

Produced by Word

Produced by LaTeX

b) Common ligatures

A good typesetting programme should always use contextual intelligence and substitution tables to determine whether ligatures are needed. Common ligatures are essential to professionally typeset text.

See below::

Correct use of Ligatures by LaTeX

Incorrect use of Ligatures by word processors

c)Transparency

The fonstpec package allows you to set font transparency in your XƎTeX source.

See below::

Alpha transparency

2)TeX is fast.

3)The output can be anything that is you can have input in any format it may be html, rtf, pdf or even device independent..

4)TeX is free

5)TeX runs anywhere

6)TeX is the standard.

7)TeX is stable

Thursday, June 10, 2010

Detailed Command Set of LaTeX


Now after I had done the basics of LaTeX I also want to discuss the enlarged version of various commonly used commands which are described below:::

Click Here for Command List

You can also view the power of Latex by seeing the document on this below link....

Example

The document you have seen is made in Latex that is completely coded not made in any type of word processor, ppt softwares, drawing tools etc. All the mathematical Tools and symbols have been designed using LaTeX codes....

So, Major Idea Behind Use of LaTeX is to reduce the overhead of copying information frm one software to other when you need conversion between various formats.
But using LaTeX you can do that without any overhead. Some of you might think that "How the overhed is get reduced although code is to be written so long with so many commands??????".
But Let me clear one thing it doesn't really when we are talking of say 1 or 2 pages but it matters really when you are about going to change structure of your document of nearly say 100-200 pages like mostly your e-books..... So, instead of the shifting of your doc you can just simply Type your document using commands of LaTeX and get a device independent file. Isn't it amazing.

Ok If till now i would not be able to set your mind towards Latex, Let me show you another thing which surely change ur mind setup:::

That is Graphical Version Of LaTeX..........

Also See Link below that alows you to create ppt from a simple file using LaTeX

See Link Below


Wednesday, June 9, 2010

Structure and Command Set Of LaTeX


After the Installation and overview i am going to discuss some of the basic commands that are used to desing your document using latex
Given below is small structure code is
%%Remember every command should start with a backslash
%%this doc is produced from latex %%comment section
\documentclass{type}[optional] %%type tells what type of doc. whether article,journal etc. and optional part tells about various options like article size etc.
\usepackage{package_name} %% to include some of the packages needed for additional functions to be performed.....
\begin{section} %%this section begins your major piece of document
\begin{subsection1}
\begin{subsection2} %%subsection starts here
\end{subsection2} %%corresponding subsection starts here
\end{subsection1}
\end{section} %%main section ends here
Above discussed is just a simple basic structure of your Latex Program and produce .dvi file when is compiled. I am writing here a simple code in .tex format
which you can copy and can compile to Let know about basic idea behind LaTeX use.
%%Program to write code for printing String Helloin C++ using LaTeX
\documentclass{article}[a4paper]
\begin{Program}
\textbf{Program 1:- to write code for printing String Hello in C++ using LaTeX}
\begin{itemize}
\item \#include\textless iostream.h\textgreater
\item \#include\textless conio.h \textgreater
\item void main()
\item \{
\item cout\textless\textless ``Helloo... Word";
\item getch();
\item \}
\end{itemize}
\end{Program}
After that copy it save it using gedit in test.tex format and then using command

latex test.tex

then .dvi file is made and after that made pdf from that. (I have discussed earlier)

Tuesday, June 8, 2010

Installing LaTeX and How To use LaTeX

After the Introduction we are ready to go through LaTeX. Install any linux distribution you want.. (I am hereby using Ubuntu 10.04 Lucid Lynx).Follow the Following steps to get the desired document in various formats without much effort done.

1) Go to terminal and type
$ sudo apt-get install texlive-latex-base

2) your Latex will be installed on your system and you can check for manual page by typing man latex in terminal.

3) To do very next step now we should stick this to our mind that the document we are going to produce is written in any type of editor whether it may be your most common usable editor Gedit or you can use emac by installing first emac into your system using command
$ sudo apt-get install emac


4) After you have written your document it is to be embedded with some set of commands that Latex uses so as to give a structure to your Piece written.
Note that whenever you wish your document to be looked into some other style just change these set of commands.

5) When you have done all these things save your piece of code with .tex format say test.tex

6) Go to terminal type latex path of the file test.tex
Or pdflatex path of the file test.tex
for producing pdf file simultaneously.


7) If you see something like this then 3 more files will be created namely test.dvi, test.aux and test.log
8) test.dvi is viewable and is device independent(dvi) from dvi means whether you open this file for screen viewing or for printing doesn't matter...
9)After that we can have pdf image format or postscript format .ps from this .dvi file, you just need to type in terminal
$ dvipdf hello.dvi hello.pdf for .dvi to pdf conversion.
$ dvips hello.dvi -o hello.psfor .dvi to .ps file.
$ ps2pdf hello.ps hello.pdf for .ps to pdf conversion

Monday, June 7, 2010

It's the very first day for me to work on project and i am quite excited to do it with full efforts. The thing i found that a document that we usually use to write in word processors like open office, ms office are basiccaly consisted of two parts
1) Document Contents
2) Style sheet of Doucument

The Style Sheet of Document is sheet consisting of all the different formatting options like whether a line is bold or italicised etc.

So, If we are able to edit that sheet than we can make a simple text document to a charming and graphically enhanced presentation and that too without copying text into your presentation softwares.

One question arises that how can we able to edit a css(cascading style sheet) for a document. This solution has been provided by Mr. Donald Knuth who developed a language called TEX(pronounced /ˈtɛx/ as in Greek, often /tɛk/ in English)which provides a typesetting system that allows you to write your document as well as presentation from it by just changing commands not the text.

Latex(pronounced /ˈleɪtɛk/, /ˈleɪtɛx/, /ˈlɑːtɛx/, or /ˈlɑːtɛk/) is document markup language based on typesetting system. I hereby discuss how to use latex and its various commands that let you design your document of your own choice.

We all have studied Mathematics in Secondary levels. Had you ever noticed that how sign of integration, psi and chi etc. are used. Check it out your any word processor you can find only limited set of mathematical symbols. To overcome this problem Latex was designed and now it has become so popular that most of publisher uses it when they need typesetting of a document.

For a moment click on LOGO given below to see a logo created with latex::::

LOGO

With simple wordprocessor you cant create such a logo for this there is Latex.
Make your .tex file with Latex file get it compiled by latex tool in your system and then convert to format of your choice. the .tex file contains some set of commands that describe the structure of the logo.

So, You have to make effort only once while designing your .tex file with suitable editor. After that if you want to change your file view like you want your file look like presentation you just need to change some commands, recompile it and get output. No Need of Changing text, no need of moving text, no need of copying and pasting. So, It's quite useful.