4

I need to get the .bbl file from the .bib and so need to compile the .tex in LaTex, but I have included PDF graphics which can be compiled in LaTex using natwidth, natheight params.

\begin{figure}
  \centering
  \includegraphics[width=0.55\columnwidth,natwidth=10.57,natheight=7.44]{a.pdf}
  \caption{description}
  \label{fig1}
\end{figure}

10.57 and 7.44 I took from PDF document details which is inches, but what metrics is used in the mentioned params? Do I need to convert inches to something?

Stepan
  • 41
  • Welcome to TeX.SX! Do you need to specify natwidth and natheight? I can't understand what you mean by "I need to get the .bbl file". – egreg Apr 09 '14 at 16:30
  • I don't know to be honest, I just found this answer - http://tex.stackexchange.com/questions/17734/cannot-determine-size-of-graphic – Stepan Apr 09 '14 at 16:31

1 Answers1

6

You should almost never specify natwidth and natheight (especially for pdf files) but if you do specify them they should Be lengths ie have units 10in or 5cm or whatever. If you omit the units it defaults to bp for compatibility with BoundingBox syntax.

The intention of those keys was to tell (classic) LaTeX the size of image files that it could not read. That does not apply to pdflatex including pdf files.

David Carlisle
  • 757,742
  • I agree, in pdflatex I don't need it at all. But I need to compile using LaTex. – Stepan Apr 09 '14 at 16:46
  • @Stepan Why should you need to compile with latex and not with pdflatex? – egreg Apr 09 '14 at 16:47
  • because I need to generate .bbl file from .bib file. – Stepan Apr 09 '14 at 16:48
  • @Stepan generation of bbl has absolutely nothing to do with pdflatex/latex differences, they will generate identical bbl files (but it is bibtex that generates that not latex at all) – David Carlisle Apr 09 '14 at 16:49
  • @Stepan perhaps you should step back and say what you are trying to do, nothing in the code parts of the question has any connection with bibliographies? – David Carlisle Apr 09 '14 at 16:51
  • Not true, if I compile with pdflatex, I don't get a bbl file. – Stepan Apr 09 '14 at 16:52
  • @Stepan The vast majority of latex documents using bibliographies are set with pdflatex. If you are not getting a bbl file you may have an error somewhere but nothing you have shown so far would help anyone find the error.The only part latex has in bbl generation is writing the aux file which is read by bibtex to generate the bbl. That is identical code whether running in pdflatex or latex. – David Carlisle Apr 09 '14 at 16:55
  • can I send you email with minimal working example, because here I can not upload attachments so you will see yourself that bib file is not generated and I don't have any errors by compiling with pdflatex: stepan.shevchenko88@gmail.com – Stepan Apr 09 '14 at 17:00
  • @Stepan Have you run bibtex? Neither latex nor pdflatex ever generate bbl files. – David Carlisle Apr 09 '14 at 17:01
  • When I compile .tex file with bibtex, nothing happens. I remember some said that I have to compile aux file with bibtex? Just checked: even if I compile aux file, no results, says: "Done!" – Stepan Apr 09 '14 at 17:03
  • you must omit the extension: pdflatex file; bibtex file; pdflatex file; pdflatex file (or replacing pdflatex by latex) – David Carlisle Apr 09 '14 at 17:04
  • Alright, so compiling in this sequence, nothing changes, no bbl file appeared. What do you mean omit extension? in linux terminal I can either omit or not the extension and it is fine in both cases. – Stepan Apr 09 '14 at 17:05
  • @Stepan I mean if your file is file.tex just use file as the argument.You need to(a) accept this answer as it answers the question asked, then make a new question about bibliographies with a small (6 or 7 line) document and bib file that you think should make a bibliography but fails. the stack exchange system will shortly start complaining about the length of this comment thread. It prefers specific question/answer format. – David Carlisle Apr 09 '14 at 17:10
  • @Stepan But I think instead you should copy the code from the question here and follow the instructions in the answers http://tex.stackexchange.com/questions/63852/question-mark-instead-of-citation-number – David Carlisle Apr 09 '14 at 17:11