Featured Book

LaTeX Beginners Guide

Who is online

In total there are 10 users online :: 1 registered, 0 hidden and 9 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: Google [Bot] and 9 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

Collapsing and superscripting of citations

Add tags Information and discussion about specific document classes and how to create your own document classes.

Collapsing and superscripting of citations

Postby J Walker on Sun May 11th, 2008

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?
J Walker
 
Posts: 3
Joined: Sun May 11th, 2008

Re: Collapsing and superscripting of citations

Postby gmedina on Mon May 12th, 2008

Using the cite package with the super option should be enough to achieve what you desire. Take a look at the following example:
Code: Select all  •  Open in writeLaTeX
\documentclass{article}
\usepackage[super]{cite}

\begin{document}

As it was noticed in\cite{mifflin,winter.periaux.ea,billups.watson}

\nocite{*}

\bibliographystyle{unsrt}
\bibliography{biblio}

\end{document
}

File biblio.bib:
Code: Select all  •  Open in writeLaTeX
@article{mifflin,
        author    = "R. Mifflin",
        title     = "Semismooth and semiconvex functions in constrained
               optimization",
        journal   = "Siam Journal on Control",
        year      = "1977",
        volume    = "15",
        pages     = "957--972"
}

@book{winter.periaux.ea,
        author    = "G. Winter and J. Periaux and M. Galan and P. Cuesta",
        title     = "Genetic Algorithms in Engineering and Computer
                 Science",
        publisher = "John Wiley and Sons",
        address   = "Chickester, England",
        year      = "1995"
}

@techreport{billups.watson,
        author    = "S. C. Billups and L. T. Watson",
        title     = "A probability-one homotopy algorithm for nonsmooth equations  
              and mixed complementarity problems",
        institution = "University of Colorado at Denver",
        year      = "2000",
        month     = "September",
        address   = "Denver, Colorado",
        type      = "UCD/CCM Report No.",                    
        number    = "165"
}

@techreport{savic.walters,
        author    = "D. A. Savic and G. A. Walters",
        title     = "Genetic Algorithm Techniques for Calibrating Network
              Models",
        institution  = " University of Exeter",
        year      = "1995",
        number         = "95/12"
}
                 
@inproceedings{anderson,
        author    = "E. J. Anderson",
        title     = "A New Primal Algorithm for Semi-Infinite Linear
                 Programming",
        booktitle = "Proceedings of an International Symposium on Infinite
                 Dimensional Linear Programming, Cambridge, September
                 1984",
        year      = "1985",
        editor =       "E. J. Anderson and A. B. Philpott",
        publisher =    "Springer-Verlag",
        address =      "Berlin"
}

@proceedings{conn.scheinberg.ea,
        author = "A. R. Conn and K. Scheinberg and Ph. L. Toint",
        title  = "Recent progress in unconstrained nonlinear optimization without  
              derivatives",
        booktitle  = "Mathematical Programming",
        year       = "1997",
        editor     = "Thomas M. Liebling and Dominique de Werra",
        publisher  = "Mathematical Programming Society",
        address    = "North-Holland"
}

@phdthesis{dearaujo,
        author  = "Jose Vicente Granato de Araujo",
        title   = "A Statistically Based Procedure for Calibration of Water
              Distribution Systems",
        school  = "Oklahoma State University",
        year    = "1992",
        address = "Stillwater, Oklahoma",
        month   = "May"
}


Remark: do not load the cite and natbib packages simultaneously.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
gmedina
 
Posts: 2313
Joined: Wed Jul 11th, 2007
Location: Colombia

Re: Collapsing and superscripting of citations

Postby gmedina on Mon May 12th, 2008

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,...
User avatar
gmedina
 
Posts: 2313
Joined: Wed Jul 11th, 2007
Location: Colombia

Re: Collapsing and superscripting of citations

Postby J Walker on Wed May 14th, 2008

Thanks for the help. I got it working.
J Walker
 
Posts: 3
Joined: Sun May 11th, 2008

Re: Collapsing and superscripting of citations

Postby J Walker on Wed May 14th, 2008

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.
J Walker
 
Posts: 3
Joined: Sun May 11th, 2008


Return to Document Classes

Who is online

Users browsing this forum: Google [Bot] and 9 guests