Bounding box for latex \includegraphics command


Type in a terminal window:
gs -sDEVICE=bbox -dNOPAUSE -dBATCH file.pdf (or file.ps)
you must have ghostscript installed of course. This command produces an output similar to this:

GPL Ghostscript 8.62 (2008-02-29)
Copyright (C) 2008 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading NimbusRomNo9L-Regu font from /usr/local/share/ghostscript/fonts/n021003l.pfb... 2395104 1083573 3646208 1812428 1 done.
%%BoundingBox: 203 545 350 699
%%HiResBoundingBox: 203.356189 545.703241 349.560341 698.957486
Then in the latex manuscript you can include the graphic by using
\includegraphics[bb = 203 545 350 699]{pathToTheFile/File}
The four numbers correspond to the bottom-left corner (203,545) and the top-right one (350,699). You can clip or pad the picture by changing this numbers, for example, if you need to cut the bottom part, change ’545′ by say ’570′ and add the ‘clip’ option to the includegraphics command as
\includegraphics[bb = 203 570 350 699,clip]{pathToTheFile/File}
That would do.

Latex SPACE SAVING IDEAS — fox SIGIR Paper

1. SPACE SAVING IDEAS:
A. An idea on how to obtain additional room on your submission, you can combine the subsections heads of Categories (ACM Classifiers), General Terms, and Authors’ Keywords with the body text and a colon, such as:
vspace{1mm}
noindent
{bf Categories and Subject Descriptors:} B.X.X {[Your Choice]}: {The Third Field Here}
vspace{1mm}
noindent
{bf General Terms:} Enter your choices of the 16 terms.
vspace{1mm}
noindent
{bf Keywords:} Enter your choices.
B. By making the references 8 or 8-1/2 pt size: 
Coding to change the references to 8 pt:
begin{thebibliography}{50}
vspace*{0.5mm}
scriptsize


2. Adding or Including More than 3 Authors on the First Page, please see: http://www.acm.org/sigs/pubs/proceed/sigfaq.htm#a18  (SEE ALSO ITEM #5 below)


3. For Type 1 font problems see: http://www.acm.org/sigs/pubs/proceed/sigfaq.htm#a14

4. Force balancing the last page of references: use vfilleject between bibitems. For example:
bibitem{nowka}
K.~Nowka {it et al},
newblock “A 32-bit PowerPC System-on-a-chip with Support for Dynamic
Voltage Scaling and Dynamic Frequency Scaling,”
newblock {it ACM Proceedings of DAC 2003}, 2002.
vfilleject
bibitem{semeraro}
G.~Semeraro et al,
newblock “Energy-Efficient Processor Design Using Multiple
Clock Domains with Dynamic Voltage and Frequency Scaling,”
newblock {it High Performance Computer Architecture}, 2002.


5. Correct coding for multiple authors (this coding gives you the correct fonts and font sizes using the ACM class files)

3 Authors2 AuthorsMore than One author with the Same affiliation
numberofauthors{3}
author{
alignauthor Author First Last \
affaddr{SIG Services} \
affaddr{ACM} \
affaddr{New York, NY} \
email{griscti@hq.acm.org}
alignauthor Author Second Last \
affaddr{Pubs Dept.} \
affaddr{ACM} \
affaddr{New York, NY} \
email{murray@hq.acm.org}
alignauthor Author Third Last \
affaddr{Pubs Dept.} \
affaddr{ACM} \
affaddr{New York, NY} \
email{rous@hq.acm.org}
}
numberofauthors{2}
author{
alignauthor Author First Last \
affaddr{SIG Services} \
affaddr{ACM} \
affaddr{New York, NY} \
email{griscti@hq.acm.org}
alignauthor Author Second Last \
affaddr{Pubs Dept.} \
affaddr{ACM} \
affaddr{New York, NY} \
email{murray@hq.acm.org}
}
numberofauthors{1}
author{alignauthor Bernard Rous, Sally Smith, Jack Sheridan, and Bill Jones \
affaddr{Dept. of Computer Science, University of Greendell} \ affaddr{ City, State, Country} \
email{br@cs.cxcc.edu, ss@cs.cxcx.edu, js@cs.cxcs.edu, bj@ccxc.com}
} 




6. Some Other Helpful Links that Deal with pdflatex

Highlight text changes in LaTeX

Highlight text changes in LaTeX

When you highlight a textual snippet or show your readers what you have changed in latex, you can use the "soul" package.

Just follow the following steps: 
  • Download the LaTeX package named "soul". You can find it by searching attug.org
  • Install that package
  • Include a statement like this in the preamble of your document so you can use the package:
    \usepackage{soul}
  • Mark your text with a \hl command wherever you want it highlighted, like this:
    this is some \hl{highlighted text} blah blah


That's it. Use the soul package, and mark your text with the \hl command. (Note that the letters in this command are the lowercase versions of the letters 'H' and 'L', respectively.)
I've read where this command has problems occassionally, but I have not experienced those. Read the PDF that comes with the soul package for more information and other uses.

fix problems in ubuntu kile: multirow.sty’ not found

The problems such as multirow.sty’ not found can be fixed via the following command (Ubuntu system):
sudo apt-get install texlive-latex-extra
I seems that some packages are missing in the default setting of kile. It will take you a lot time to download the extra packages via the above command.

Notes on BibTeX

1. References and citations are best handled in a consistent way by using BibTeX. In this method, you supply all the relevant information about references in a “.bib file” without regard to ordering or style. Then you let BibTeX format all citations and reference entries according to the chosen bibliographic style, and you don’t have to sweat all the font and punctuation and ordering details yourself.
2. You can find .bib entries for major publications with a simple Google search.
3. The reference/bibliography section usually appears at the end of an publication. In your LaTeX file, these two commands insert the reference section:
 bibliographystyle{xxx}
 bibliography{yyy}
4. Some commonly used bibliography styles
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
5. The file biblio.bib is not read directly by the latex program. Instead, the command bibtex extracts only the needed references from the *.bibfile(s) and converts them (in the indicated style) to LaTeX form in a new file MyDoc.bbl. LaTeX can then use the contents of MyDoc.bbl directly.
6. biblio sample
@ARTICLE{Bay1,
   author = "A. Bayliss and C. I. Goldstein and E. Turkel",
   title = "An iterative method for the {H}elmholtz equation",
   journal = "J. Comp. Phys.",
   volume = 49,
   pages = "443--457",
   year = 1983
   }

@TECHREPORT{Ernst,
   author = "O. Ernst and G. Golub",
   title = "A domain decomposition approach to solving the {H}elmholtz
  equation with a radiation boundary condition",
   number = "NA-92-08",
   school = "Stanford University, Computer Science Department",
   year = "August 1992"
   }

Other reference information

(1) An FAQ regarding multiple author names; In a bib file you list all the authors’ names together joined with word “and”, e.g.,
author = "Jane Smith and E. B. Johnson and Strunk, Jr., William",
BibTeX then does the appropriate things to names and initials and punctuation, according to the chosen bibliographic style.
(2) When using BibTeX, the interaction between names and accenting is somewhat tricky. You should use `G{“o}del’ or `G{“{o}}del’, and not `{G{“{o}}del}’ or `{G”{o}del}’. (Thanks to Dana Jacobsen for this tip.)
(3) STANDARD ENTRY TYPES:
@article
An article from a journal or magazine
@book
A book with an explicit publisher
@booklet
A work that is printed and bound, but without a named publisher or sponsoring institution
@conference
The same as inproceedings
@inbook
A part of a book, which may be a chapter (or section or whatever) and/or a range of pages
@incollection
A part of a book having its own title
@inproceedings
An article in a conference proceedings
@manual
Technical documentation
@mastersthesis
A Master’s thesis
@misc
Use this type when nothing else fits
@phdthesis
A PhD thesis
@proceedings
The proceedings of a conference
@techreport
A report published by a school or other institution, usually numbered within a series
@unpublished
A document having an author and title, but not formally published
@collection
Not a standard entry type. Use proceedings instead.
@patent
Not a standard entry type.
(4) STANDARD FIELDS
address
Usually the address of the publisher or other type of institution. For major publishing houses, van Leunen recommends omitting the information entirely. For small publishers, on the other hand, you can help the reader by giving the complete address.
annote
An annotation. It is not used by the standard bibliography styles, but may be used by others that produce an annotated bibliography.
author
The name(s) of the author(s), in the format described in the LaTeX book.
booktitle
Title of a book, part of which is being cited. See the LaTeX book for how to type titles. For book entries, use the title field instead.
chapter
A chapter (or section or whatever) number.
crossref
The database key of the entry being cross referenced. Any fields that are missing from the current record are inherited from the field being cross referenced.
edition
The edition of a book—for example, “Second”. This should be an ordinal, and should have the first letter capitalized, as shown here; the standard styles convert to lower case when necessary.
editor
Name(s) of editor(s), typed as indicated in the LaTeX book. If there is also an author field, then the editor field gives the editor of the book or collection in which the reference appears.
howpublished
How something strange has been published. The first word should be capitalized.
institution
The sponsoring institution of a technical report.
journal
A journal name. Abbreviations are provided for many journals.
key
Used for alphabetizing, cross referencing, and creating a label when the “author” information is missing. This field should not be confused with the key that appears in the cite command and at the beginning of the database entry.
month
The month in which the work was published or, for an unpublished work, in which it was written. You should use the standard three-letter abbreviation, as described in Appendix B.1.3 of the LaTeX book.
note
Any additional information that can help the reader. The first word should be capitalized.
number
The number of a journal, magazine, technical report, or of a work in a series. An issue of a journal or magazine is usually identified by its volume and number; the organization that issues a technical report usually gives it a number; and sometimes books are given numbers in a named series.
organization
The organization that sponsors a conference or that publishes a manual.
pages
One or more page numbers or range of numbers, such as 42--111 or 7,41,73--97 or 43+ (the `+‘ in this last example indicates pages following that don’t form a simple range). To make it easier to maintain Scribe-compatible databases, the standard styles convert a single dash (as in 7-33) to the double dash used in TeX to denote number ranges (as in 7--33).
publisher
The publisher’s name.
school
The name of the school where a thesis was written.
series
The name of a series or set of books. When citing an entire book, the the title field gives its title and an optional series field gives the name of a series or multi-volume set in which the book is published.
title
The work’s title, typed as explained in the LaTeX book.
type
The type of a technical report—for example, “Research Note”.
volume
The volume of a journal or multi-volume book.
year
The year of publication or, for an unpublished work, the year it was written. Generally it should consist of four numerals, such as 1984, although the standard styles can handle any year whose last four nonpunctuation characters are numerals, such as `hbox{(about 1984)}’.

Other (nonstandard) fields

affiliation
The authors affiliation.
abstract
An abstract of the work.
contents
A Table of Contents
copyright
Copyright information.
ISBN
The International Standard Book Number.
ISSN
The International Standard Serial Number. Used to identify a journal.
keywords
Key words used for searching or possibly for annotation.
language
The language the document is in.
location
A location associated with the entry, such as the city in which a conference took place.
LCCN
The Library of Congress Call Number.
mrnumber
The Mathematical Reviews number.
URL
The WWW Universal Resource Locator that points to the item being referenced. This often is used for technical reports to point to the ftp site where the postscript source of the report is located.

BibTeX & “undefined control sequence”

If the tex and bib files are setup correctly, then running LaTeX followed by BibTeX will produce a bbl file (in the same directory as the tex and bib files). It is from the bbl file that LaTeX will insert the references into the document.
Open the bbl file with a text editor. If it looks meaningful, then compiling the document again with LaTeX should give a dvi with references. If the bbl file contains nonsense (or is not created at all), then we will have to try other things.

pdflatex To Use US. Letter Size Paper

Telling pdflatex To Use Letter Size Paper

Pdflatex is using the wrong margins. How can I fix it?
This problem is sometimes caused by the PDF page height and width not being specified correctly. Put the following right after your begin{document} command:
special{papersize=8.5in,11in}
setlength{pdfpageheight}{paperheight}
setlength{pdfpagewidth}{paperwidth}
% You may need to change the horizontal offset to do what you
% want.  Setting hoffset to a negative value moves all printed
% material to the left on all pages; setting it to a positive value
% moves all printed material to the right on all pages; not setting
% it keeps all printed material in it's default position.  voffset
% is the vertical offset: use negative value for up; don't set if
% you want to use default position; use positive for down.
% hoffset = -0.2truein
% voffset = -0.2truein




% Thomas Esser, 2004. public domain.
pdfoutput=1
pdfpagewidth=8.5in
pdfpageheight=11in
%pdfpagewidth=210 true mm
%pdfpageheight=297 true mm
pdfpkresolution=600
endinput
There is an easier approach for TeTex users: the texconfig-sys program can be used to configure default paper size and other settings.

Popular Posts