Showing posts with label Tips. Show all posts
Showing posts with label Tips. Show all posts

March 04, 2009

Latex tips: Hyperref colours


Hyperref in Latex refer to \cite (for my references), \ref (link to figures, chapters,etc) and others. When I ran my thesis, I could see all these links are in blue colour. All this while, I didn't really pay much attention to this matter as I normally printed out them in B&W. However, when I printed out my thesis in colour on certain pages, then I saw a problem that I need to find a solution. Yes... all the links are not in black but blue. I am sure if Pa*l sees this, he'll ask me to do something.

As a matter of fact, now the problem is solved. How??? Again... thanks to Google where u can find every single solution for any problems. I just type "color reference in LaTex and tadaaa..... Here is where I found the solution. For my quick reference, I copy & paste them here:

Hyperref package
The hyperref package is useful to make internal (\ref, \cite,...) and external (\url, ...) links clickable, which is quite useful when reading documents. Moreover, it provides options and commands to customize the generated PDF when using PDFLaTeX and specify PDF metadata such as title or author information.

For the impatient: Just try the following command and see whether it fits your needs:

\usepackage[bookmarks, pdftitle={your title here}, pdfauthor={Your name here}, colorlinks=true, linkcolor=black, citecolor=black, urlcolor=black]{hyperref}



So, I opened my .cls file and search the same exact lines as above and change the link, url, ref color from blue to black. Done!!! I am so happy with my achievement, hikhikhikhik.

Anyway, I gave Pa*l my complete draft to him & will wait until he comes back to me. I am positive, I still need to do corrections but deep in my heart, I hope not too many & I can submit to the school soon. Basically, I gave him a copy that look like a real thesis from front to back. Will see what he says, huhuhuhu.


So, as usual whenever I feel like I've achieved something, even a tiny achievement, I always reward myself. How??? Will blog about it later :). Ooooh, I just wanted to share something about it here. yesterday, during lunch, a fren asked me about my writing. So, whenever ppl ask me themselves how am I doing, I always tell them the truth. I may not talk about my feeling/stuff openly (except to syawal of course) but if ppl ask, I never hid anything & keep things to myself. For me, I don't like ppl to talk at my back as I don't like to talk about other ppl at their back as well. If you want to know something, ask urself!!. ***What am I bluffing here????***. Ok, back to our conversation. She asked me didn't I feel tense? My answer.. no. I seriously never felt tense when I'm writing. What I forgot to mention is... I am really2 scared. Scared of everything but mostly what if I screw up?? Aaarghhh. Life is so scary and I just give myself to Allah s.w.t.

February 05, 2009

Latex tip


Landscape in LaTex. For further reading, click here

How to change the page layout of single pages?

Option 1
The lscape-package provides according possiblities:

\usepackage{lscape}

With

\begin{landscape}



\end{landscape}

you define the section of your document to be set to “landscape”, e.g. a large table or figure. This will not automatically rotate the page in the PDF and is useful if the document is destined for printing.

Option 2
If you want to make appear the left side up, better readable on screen, the pdflscape-package will do it:

\usepackage{pdflscape}

and again:

\begin{landscape}



\end{landscape}

for the page to be “landscape”, while the rest will remain in “portrait” orientation. Nevertheless, the header/footer will also be changed in orientation.

**** I used Option 2 for larger picture in my thesis

January 28, 2009

LaTeX tips


Yup... since my 18 mths report, I've used LaTeX instead of MsWord for my report writing. Yes, it isn't easy to use LaTeX but the outcome that make you want to stick with it. No turning back to MsWord. It was really a pain in the ass when I started using it, but not anymore. Thanks to my dear frens, Bash & Pong who helped me a lot that time. The good thing is they have a lot of resources on the net. So, whenever I am stucked, just google it & I could easily find the solution.

Anyway I just found this useful website esp. for beginners. For my reference as I may need them in the future. The tutorial is taken from here.

Latex FAQ
1. How do I do a citation in LaTeX?
2. How do I put in a trademark/registered/copyrighted sign in LaTeX?
3. How do I get an angstrom sign in LaTeX?
4. How do I get a percent sign in LaTeX?
5. How do I get table cells to auto-wrap?
6. How do I label things and reference them?
7. How do I get a degree sign?
8. How do I get "a choose b"?
9. How do I get a square/cube/n-th power root?
10. How do I get nicely numbered equations?
11. How do I reference numbered equations?
12. How do I reference numbered figures?
13. How do I stop latex from putting an extra space after Ms. ?
14. How do I include a package?
15. How do I create a subsection?
16. How do I superscript?
17. How do I draw the double-barred Z (representing all integers), R (all reals), or Q (all rationals) in LaTeX?
18. How do I do italics in LaTeX?
19. How do I get the "for all" symbol (upside down A)
20. How do I include an image?
21. How do I rotate or resize an included graphic?
22. What does Unable to read an entire line---bufsize=3000. Please alter the configuration file. mean?


ANSWERS

1. How do I do a citation in LaTeX?

\cite{sourcename}

2. How do I put in a trademark/registered/copyrighted sign in LaTeX?

\textregistered for (R)
\copyright for (C)
\texttrademark for (TM)

3. How do I get an angstrom sign in LaTeX?

\AA

4. How do I get a percent sign in LaTeX?

\%

5. How do I get table cells to auto-wrap?

Use p{dimen} as the column specification. That wraps them to that width specified by dimen. Example: \begin{tabular}{llrp{2in}}

6. How do I label things and reference them?

\label{labelname} to label
\ref{labelname} to reference
For tables and figures make sure the \label{} comes inside \caption{}

7. How do I get a degree sign?

^\circ (in math mode).

8. How do I get "a choose b"?

{ a \choose b } in math mode

N.B. If you are using the amsmath package, using \choose will cause a Package amsmath Warning complaining about the \atopwithdelims control sequence. Just ignore this warning.

9. How do I get a square/cube/n-th power root?

\sqrt{k} for a square root of k
\sqrt[n]{k} for an n-th power root of k

10. How do I get nicely numbered equations?

Use the equation style:

\begin{equation}
E=mc^{2}
\end{equation}Note: Numbered equations are almost always preferable to unnumbered equations, for which you can use \begin{displaymath} \end{displaymath}.
11. How do I reference numbered equations?

When you write the equation,

\begin{equation}
E=mc^2
\label{eqn:Einstein}
\end{equation}And then when you wish to reference the equation in the prose,
Applying the mass-energy relations given in (\ref{eqn:Einstein}),
we find that...Note: the eqn: in the label is not formally necessary, but will make your code more readable.
12. How do I reference numbered figures?

When you insert the figure the equation,

\begin{figure}
\includegraphics{poodles.eps}
\caption{Commuting canine movements}
\label{fig:poodles}
\end{figure}And then when you wish to reference the figure in the prose,
As seen in Figure \ref{fig:poodles}, the hunting patterns...13. How do I stop LaTeX from putting an extra space after Ms. ?

use Ms.~Name

14. How do I include a package?

\usepackage{packagename} before \begin{document}
Useful package: amssymb -- mathematical symbols and fonts

15. How do I create a subsection?

\subsection{subsectionname} for subsections
\subsubsection{subsubsectionname} for subsubsections

16. How do I superscript?

$E = mc^{2}$

$1024 = 2^{10}$

17. How do I draw the double-barred Z (representing all integers), R (all reals), or Q (all rationals) in LaTeX?

\mathbb{Z}, \mathbb{R}, \mathbb{Q} (you must be using the amssymb or amsmath package)

18. How do I do italics in LaTeX?

\emph{}

19. How do I get the "for all" symbol (upside down A)

\forall in math mode

20. How do I include an image?


\begin{figure}
\includegraphics{imagename.eps}
\caption{Lovely caption}
\label{fig:somethin-you-will-remember}
\end{figure}
21. How do I rotate or resize an included graphic?

use the angle attribute to \includegraphics. For example, \includegraphics[angle=45]{foo.ps} to rotate counterclockwise by 45 degrees. Other possible attributes are:


\includegraphics[width=5in]{foo.ps}
\includegraphics[width=\textwidth]{foo.ps} % scale to the width of the page
\includegraphics[height=5in]{foo.ps}
\includegraphics[scale=0.5]{foo.ps} % scale to 50%
If you want it to be just as wide as the text, use width=\textwidth.

22. What does Unable to read an entire line---bufsize=3000. Please alter the configuration file. mean?

Most likely, you are trying to include an image that is not in PostScript format. Or it may be that your image is PostScript generated on a Macintosh, in which case typing

athena% clg filename.eps

should solve the problem.

23. How do I convert a graphic to EPS?

See here. (I use diff. method for this one)

August 07, 2008

Perfecto!!!

Yup.... now I am happy with my blog skin & really hope it will stay longer than my previous skins. (Finger crossed). Basically, all the issues from the previous skin have been resolved & really proud of myself. Why??? One thing... it's not as easy as it looks. Second... I had to lots of eyerolling to do that. Third....the blog thingy really took my time off from my PhD work *huh* (not good, really not good)

Well, including this skin, I think I've used for 4 different skins since I started blogging March last year. What actually is my criteria for the skin?? One thing for sure, it must be SIMPLE but attractive. I mean really2 simple. The first time I learnt about those coding was when I tried my first skin that used classic blogger template.  With this template, any widget/application can only be done by toggling the codes.  Later that I found about blog skin that uses XML codes, which I found much easier to edit.  What I don't like about my previous skin is, even though it's beautiful but it's not neat, especially in the log-in mode; sore eyes. Also, I wanted the Previous Post section at the side bar. Tried to do it again and again & I've Googled it everywhere but no luck. Finally I got fed up with it. To cut the story short, I tried another skin with about the same layout but has Previous Post section. It wasn't work at first though but managed to sort it out & learnt a new thing, feed url burner. Actually, I wanted to do something else but it fixed the Previous Post thing. I really found it so cooooool, me as an amateur in all this blog thingy.

The next thing that I really want in my blog is older and newer posts link at the bottom of the page. Why is the feature is very important for me??? Well, this explains the main reason of me blogging. I created this blog for me, totally. I like to read all my previous entries & sometimes, it really fascinates me of my story telling. With this older/newer post, it could spare me sometimes rather then using archive link. OK... how I fix this problem in my blog. Here comes the story. I look at my HTML/XML codes, scanned every single lines to find the code about the footer's setting. I did find some codes that I thought must be what I was looking for. Did some Googling by putting that exact codes as the keywords and tadaaaaa, I found the solution.

I also have put all my addiction on one page.... this blog, my photoblog and my facebook.  The blog is the place that I could express my feelings & it really makes me happy, because whenever I feel sad, happy, etc,etc I have a place to turn into, besides syawal.  It's more to my private  stuff but never planned to put password protected. The photoblog is where I put all our pictures and share it with others.  The main purpose of this photoblog is we want our family in M'sia to view/see us even though we are far away from them.  My latest addiction is the facebook, a place where I can keep in touch with all my friends (old & new).  Believe it or not..... I've met some of my old friends.  My aim is to gather as many old friends as possible.  So... if you know (or not) me, do 'facebook' me using my email add as shown at the sidebar :). 

Now I feel more excited with this blogger coding thingy. The thing is I do all this by myself... & and of course with Google help, you can find every single solution in it...


p/s: Going out soon..... have to get ready now. where??? The clue: eat, eat and eat *BigGrin*

July 15, 2008

Cooking tip..

I read the tip from this blog. Very simple tip & hope I could practise it everytime I cook.

Before cooking (any dishes), read Bismillahirrahmanirrahim and selawat to our prophet Muhammad s.a.w together with Al-Fatihah. Pray so that your spouse/partner will like anything you cook & receive a bless livelihood/prosperity (mendapat rezeki yang diberkati).

BTW, I am now hook to her blog, plus other uncounted blogs that I read. Oh no!!!. My reading list is getting longer....Her blog is somehow interesting to read & since yesterday, I am trying to read all her entries (from the beginning) to know her better b'cause ......... only me knows. Luckily, she just started blogging & about to finish them all *phooh*. Unlike RedMummy & JoeBangla blogs, it took me several days (or weeks??) to read their blogs from the beginning to to-date.