LaTeX forum ⇒ Document ClassesCollapsing and superscripting of citations

Information and discussion about specific document classes and how to create your own document classes.
J Walker
Posts: 3
Joined: Sun May 11, 2008 7:58 pm

Collapsing and superscripting of citations

Postby J Walker » Sun May 11, 2008 8:12 pm

I am having great difficulty collapsing citations.

Background: MikTex 2.7 using WinEdt 5.5. I am trying to get collapsecite.sty working, but no luck. I have even tried supercite.sty and overcite.sty, but none of them see to perform their purpose (that is, citations are not superscripted). The style file tells me to insert "citecollapse" as an option in the document declaration. The files themselves are located in the same directory as the source LaTeX files.

Oh, I did refresh the File Name DataBase in WinEdt. No effect.

Here is my preamble:

\documentclass[11pt,citecollapse]{article}
\usepackage{cite}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{verbatim}
\usepackage{color}
\usepackage{booktabs}
\usepackage{natbib}
\usepackage{url}
\usepackage{fancyheadings}
\usepackage{caption}
\usepackage[toc]{appendix}
\usepackage{appendix}
\renewcommand{\appendixtocname}{Appendices}
\renewcommand{\appendixpagename}{Appendices}


Here is my bibliography declaration:

\small
\bibliographystyle{unsrt}
\bibliography{mybibfile}


Is it possible that one of the other packages I am using is conflicting with citecollapse.sty? Am I declaring the use of cite.sty and citecollapse.sty properly? Is cite.sty needed for the other style files to work?

This is driving me crazy. Any suggestions?

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Location: Colombia

Postby gmedina » Mon May 12, 2008 7:56 pm

Using the cite package with the super option should be enough to achieve what you desire. Take a look at the following example:
  1. \documentclass{article}
  2. \usepackage[super]{cite}
  3.  
  4. \begin{document}
  5.  
  6. As it was noticed in\cite{mifflin,winter.periaux.ea,billups.watson}
  7.  
  8. \nocite{*}
  9.  
  10. \bibliographystyle{unsrt}
  11. \bibliography{biblio}
  12.  
  13. \end{document}

File biblio.bib:
  1. @article{mifflin,
  2. author = "R. Mifflin",
  3. title = "Semismooth and semiconvex functions in constrained
  4. optimization",
  5. journal = "Siam Journal on Control",
  6. year = "1977",
  7. volume = "15",
  8. pages = "957--972"
  9. }
  10.  
  11. @book{winter.periaux.ea,
  12. author = "G. Winter and J. Periaux and M. Galan and P. Cuesta",
  13. title = "Genetic Algorithms in Engineering and Computer
  14. Science",
  15. publisher = "John Wiley and Sons",
  16. address = "Chickester, England",
  17. year = "1995"
  18. }
  19.  
  20. @techreport{billups.watson,
  21. author = "S. C. Billups and L. T. Watson",
  22. title = "A probability-one homotopy algorithm for nonsmooth equations
  23. and mixed complementarity problems",
  24. institution = "University of Colorado at Denver",
  25. year = "2000",
  26. month = "September",
  27. address = "Denver, Colorado",
  28. type = "UCD/CCM Report No.",
  29. number = "165"
  30. }
  31.  
  32. @techreport{savic.walters,
  33. author = "D. A. Savic and G. A. Walters",
  34. title = "Genetic Algorithm Techniques for Calibrating Network
  35. Models",
  36. institution = " University of Exeter",
  37. year = "1995",
  38. number = "95/12"
  39. }
  40.  
  41. @inproceedings{anderson,
  42. author = "E. J. Anderson",
  43. title = "A New Primal Algorithm for Semi-Infinite Linear
  44. Programming",
  45. booktitle = "Proceedings of an International Symposium on Infinite
  46. Dimensional Linear Programming, Cambridge, September
  47. 1984",
  48. year = "1985",
  49. editor = "E. J. Anderson and A. B. Philpott",
  50. publisher = "Springer-Verlag",
  51. address = "Berlin"
  52. }
  53.  
  54. @proceedings{conn.scheinberg.ea,
  55. author = "A. R. Conn and K. Scheinberg and Ph. L. Toint",
  56. title = "Recent progress in unconstrained nonlinear optimization without
  57. derivatives",
  58. booktitle = "Mathematical Programming",
  59. year = "1997",
  60. editor = "Thomas M. Liebling and Dominique de Werra",
  61. publisher = "Mathematical Programming Society",
  62. address = "North-Holland"
  63. }
  64.  
  65. @phdthesis{dearaujo,
  66. author = "Jose Vicente Granato de Araujo",
  67. title = "A Statistically Based Procedure for Calibration of Water
  68. Distribution Systems",
  69. school = "Oklahoma State University",
  70. year = "1992",
  71. address = "Stillwater, Oklahoma",
  72. month = "May"
  73. }


Remark: do not load the cite and natbib packages simultaneously.
1,1,2,3,5,8,13,21,34,55,89,144,233,...

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Location: Colombia

Postby gmedina » Mon May 12, 2008 9:27 pm

On a second read of your original post, I noticed that you are loading the now obsolete fancyheadings package; use fancyhdr instead. I also would suggest you to use the xcolor package instead of color.
1,1,2,3,5,8,13,21,34,55,89,144,233,...

Link:
BBcode:
HTML:
Hide post links
Show post links

J Walker
Posts: 3
Joined: Sun May 11, 2008 7:58 pm

Postby J Walker » Wed May 14, 2008 5:50 am

Thanks for the help. I got it working.

Link:
BBcode:
HTML:
Hide post links
Show post links

J Walker
Posts: 3
Joined: Sun May 11, 2008 7:58 pm

Postby J Walker » Wed May 14, 2008 6:25 am

Well, I thought I had it working.

I compiled and it looked great. The citation numbers showed up compressed and all. Great!

Compiled again. I get question marks instead. (Why? I have no idea.)

Okay, I returned the file back to its original state. I shouldn't get any citation compression, but at least my citation numbers should show up, right? Nope. I still get question marks.

I removed all non-.tex and non-.bib files and compiled again. Nope. I refreshed the FNDB. Nope.

So I have lost ground. What was working before no longer works. (And this appears to happen to me a lot with LaTeX.)

Crud! Well, I'll keep working on it.

Link:
BBcode:
HTML:
Hide post links
Show post links


Return to “Document Classes”

Who is online

Users browsing this forum: No registered users and 4 guests