Showing posts with label latex. Show all posts
Showing posts with label latex. Show all posts

Thursday, September 25, 2008

Removing / Hiding Page Numbers from Latex document (Remove / Hide)

Getting rid of page numbers from a latex document is a tricky thing to do :) sometimes you do not want page numbers in your document but the document class or style file you are using puts page numbers...

many websites/manuals/blogs suggest the use of \thispagestyle{empty} after \maketitle tag to overwrite the style file and remove the page numbers. But some style files will still print the page numbers on all pages except the first one... if this is the case then add \pagestyle{empty} tag and the page numbers from all the pages will be removed :)... the code will look like

\maketitle
\thispagestyle{empty}
\pagestyle{empty}

this trick worked in my case where i was using ieeetr.cls as document class... i hope it works for other cases as well...

************************************************************************
The following things copied from comments section may also help (I thank the people who commented):

Manhoso said...
In my case using only the command \thispagestyle{empty} worked fine!
******************
Anonymous said...
Didn't work for me. Perhaps because of the custom header package I use.

Instead I use

\renewcommand\thepage{}

to get rid of page numbers.
******************
Anonymous said...
thank you anonymous, for me too worked in the scrreprt class just \renewcommand\thepage{}
******************
Luís de Sousa said...
That is a pretty radical solution, it not only removes the numbering, but also all the remanding style, such as headers and footers. To kill a fly you do not need a bazooka. Simply use \pagenumbering{gobble} to switch off page numbering.
******************

Thursday, April 24, 2008

BibTeX and bibliography styles

A few bibliographic styles are:
1: ieeetr
2: unsrt
3: IEEE
4: ama
5: cj
6: nar
7: nature
8: phjcp
9: is-unsrt
10: plain
11: abbrv
12: acm
13: siam
14: jbact
15: amsplain
16: finplain
17: IEEEannot
18: is-abbrv
19: is-plain
20: annotation
21: plainyr
22: decsci
23: jtbnew
24: neuron
25: cell
26: jas99
27: abbrvnat
28: ametsoc
29: apalike
30: jqt1999
31: plainnat
32: jtb
33: humanbio
34: these
35: chicagoa
36: development
37: unsrtnat
38: amsalpha
39: alpha
40: annotate
41: is-alpha
42: wmaainf
43: alphanum
44: apasoft
If any of these styles is not found in latex they can be downloaded from http://www.tug.org/tex-archive/biblio/bibtex/contrib/. Each file will be of .bst extension. In order to use the style 'nar', you must have the file 'nar.bst' in your LaTeX directory, or in your current working directory, or anywhere where it is visible to LaTeX.

to see how are these styles rendered (i.e. how does a certain bib style look like?), please visit the following: http://www.cs.stir.ac.uk/~kjt/software/latex/showbst.html

Adapted from BibTeX and bibliography styles


Blogged with the Flock Browser

Friday, April 11, 2008

Hanging references in latex

If u have a long list fo references in one coloumn and 2nd column is empty or very unbalanced due to very few references, then do the following to get a balanced references page.

in bbl file write \vfill\eject before the reference which u intend to move to 2nd column (do this after running bibtex earlier). Do not run bibtex after this since it will overwrite ur bbl file and effect will not be seen. After writing the above command u only need to run latex command and then make dvi or pdf whatever u like...

Tuesday, February 26, 2008

LaTex: Fixing Wrong Figure Numbers

LaTex: Fixing Wrong Figure Numbers

The post is copied from: Terminally Incoherent


What I tell you right now may save you hours of extensive debugging, cursing under your breath, commenting out custom code dealing with figure layout and much frustration. Whenever you use figures, always (and I mean ALWAYS EVER FOREVER ALWAYS) put \caption first, and \label second like this:



\begin{figure}[htp]
\centering
\includegraphics{image.eps}
\caption{Some Image}
\label{fig:some-image}
\end{figure}
If you put the \label above \caption you will run into trouble when referencing figures inside subsections. In my case, the caption underneath the figure would say Fig. 4.2 but the output of \ref would be 4.3.10 because somehow it was picking up the section numbers wrong.

I had to submit the document today n all chapters except chapter 1 had \label above \caption n i was so *&^*&%^&$%* but i found on google search a blog Terminally Incoherent. It helped me n i m really thankful to the owner of the blog.

Blogged with Flock