Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I noticed that lastchecked and URL are non-standard attributes for a bibTeX files, which is kind of strange nowadays, but that's a different matter.

I tried to use @misc{...} with itmalpha style, but my document doesn't show the two attributes. Which style can I use for it to display, which doesn't mess up my other references, which are articles and incollections (for now).

share|improve this question
2  
You might consider to switch to biblatex, where you can control which fields are printed. –  Guido Jan 3 '13 at 12:34
    
@Guido Can you point me to a good documentation (or the exact part in the manual) where I can control which fields are printed? –  cherrung Jan 3 '13 at 15:59
1  
What you can do in biblatex is to redefine some macros. For example \renewbibmacro{finentry}{\printfield{url}, \printdate{urldate}}. You can look at chapter 4 of the manual, a good intro is at tex.stackexchange.com/questions/12806/…. –  Guido Jan 4 '13 at 7:22
    
Oh. I actually found my problem. I used the lastchecked field instead of the urldate field. urldate would be the correct use in my case. Then the solution would be here: tex.stackexchange.com/questions/56904/… –  cherrung Jan 4 '13 at 10:03
add comment

2 Answers 2

up vote 4 down vote accepted

In most bibtex styles the information about url and the date when the web page has been accessed can be stored in the howpublished field (in free format).

A second alternative is to modify the itmalpha style to accommodate the two fields. The styles does not support url and lastchecked. Thus the first step is to insert these two fields in the ENTRY part of the style:

ENTRY
  { address
    ...
    lastchecked
    url
    ...
  }
  {}
  { label extra.label sort.label }

Then, we create a function to print the value of the fields. Thus we insert the following code in the file

FUNCTION {format.url.lastchecked}
{
  url empty$
    'skip$
    { "Available at: \url{" url * "}" * 
      lastchecked empty$
        'skip$
        { "Accessed on: "  lastchecked * }
      if$
    }
  if$
}

Finally, we have to use the function at the appropriate position (in the definition of misc). We can replace the definition of misc with

FUNCTION {misc}
{ output.bibitem
  author empty$                               % added by R.Bless
    { format.editors output.nonnull }          % added by R.Bless
    { format.authors "author" output.check }   % added by R.Bless
  if$
  title howpublished new.block.checkb
  format.title output
  howpublished new.block.checka
  howpublished output
  organization output
  institution output
  format.date output
  fin.entry
  format.url.lastchecked output
  new.block
  note output
  fin.entry
  empty.misc.check
}

Instead of editing the itmalpha.sty file, please make a copy, edit it, and rename it (e.g. myitmalpha.sty).

PS I have used \url{} to wrap the value of the bibtex url field, this requires to load an appropriate style, e.g., url or hyperref.

share|improve this answer
    
Thanks for all the information. I followed your advice and looked at biblatex. Still somewhat complicated, but will look more into it. Changing the styles directly is an option I guess, but too tiresome in my case, because I'm still not quite sure which style to stick with. –  cherrung Jan 3 '13 at 15:35
add comment

all styles here http://archiv.dante.de/~herbert/BibTeX/ know the fields url and urldate

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.