Showing posts with label LaTeX. Show all posts
Showing posts with label LaTeX. Show all posts

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.

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}

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

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.

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)