TeXnik - Tips TeX and LaTeX

Welcome to the TeXnik website (under construction)

TUG logo

Main page

Search CTAN:


Google c.t.t.

Google d.c.t.t.



Bib manager (GUI) |  bib-file test |  Bibliography as Footnotes |  Bibliography in TOC |  Bibliography with No Label |  BibTeX-Software | 
Changing Bibliography/References-name |  Citation with no reference | 
Default Path for bib-files | 
Editing BibTex-stylefiles |  Examples for bibentries | 
footbib | 
Harvard-Style |  Heading numbered |  Heading title |  Heading title name changing | 
No Label in Bibliography | 
Multiple citations | 
Natbib Demo |  Numbered heading | 
overcite | 
paranthesis in citation or bibliography |  Path for bib-files |  "pnamed" BibTeXstyle |  Preamble |  Printing all bibfile entries | 
Spacing | 
Testing a bib-file |  Title  | 
URL's in bibentries  | 
Vertical Spacing  | 

BiBTeX manager and tools

Bibtex Manager | BibDB | Bookcase | JabREF | Java BibTeX | Pybliographer | refDB | Document Database | ZNote | tkBibTeX | Barracuda | GBib |

Changing the Bibliography Title
Write just at the place where the bib should be printed.
    \vskip 40\p@
  \bibliographystyle{< the bibstyle >}
  \bibliography{< the database >}
Changing only the bibliography name go

Citations with natbib
demo bib file

Citation of an Url
Look at the
example file for different possibilities of an bibtex entry for an URL. The dinat.bst supports printing of URL's in an excellent way:

Another example.

Default Path for *.bib files
You can define a default searchpath for the bibfiles:
export BIBINPUTS=/home/foo/bib:  (in .bashrc if you use bash)
setenv BIBINPUTS /home/foo/bib: (in .tcshrc if you use tcsh)

in Latex Preamble and insert the bibliography with bibstyle "jphysicsB".

the possible styles for harvard are:

-rwxr-xr-x   1 root     root        25549 Feb 29  2000 agsm.bst
-rwxr-xr-x   1 root     root        25357 Feb 29  2000 apsr.bst
-rwxr-xr-x   1 root     root        25741 Feb 29  2000 jmr.bst
-rwxr-xr-x   1 root     root        24428 Feb 29  2000 jphysicsB.bst
-rwxr-xr-x   1 root     root        24967 Feb 29  2000 kluwer.bst
-rwxr-xr-x   1 root     root        38053 Feb 29  2000 nederlands.bst

Multiple Citations
If you do not like [1,2,3,4,5], you can get [1-5] by using package cite. cite.sty maybe part of your local TeX installtion, otherwise get it at CTAN.

No Labels in Bibliography


in latex preamble you'll get a biblist with no labels (dvi-view)

Editing BibTeX-stylefiles
All BibTeX-stylefiles have the suffix ".bst" and located in /usr/share/texmf/bibtex/bst/
Changing a stylefile is possible by hacking it. For example, we want to change the word "and" between two authors to ",".

in every bst-file is a function for the names. here you can change the word. In all other bst-files you'll find this function, too. For example we change it in the standard bst-file plain.bst, located in /usr/share/texmf/bibtex/bst/base/plain.bst

FUNCTION {format.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
      nameptr #1 >
        { namesleft #1 >
            { ", " * t * }
            { numnames #2 >
                { "," * }
              t "others" =
                { " et~al." * }
                { " and " * t * }  %<----- change " and " to " , "
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=

Numbered Heading
By default the bib heading is a \chapter* -style, a chapter heading-style without numbering and without part of the TOC. Changing this to a nonstar-chapter is very easy for all koma-classes. For the standard book-class the bibliography environment has to be completely rewritten. Also in latex preamble:
     {\chapter{\bibname%  for article class:    {\section{\refname%
%        \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}
      \@clubpenalty \clubpenalty
       {\@latex@warning{Empty `thebibliography' environment}}%

Changing Heading title
Write in LaTeX-preamble or anywhere else.
  • For book-classes:
    \renewcommand\bibname{your heading for bibliography}
  • For article-classes:
    \renewcommand\refname{your heading for bibliography}

  • If you don't like a heading title for your Bibliography/References:
    \renewcommand\bibname{ }
    with a space between the paranthesis! Same for \refname.

    This does not work if you load any specific language package, like german. These packages overwrite all language specific commands. In this case write

    \AtBeginDocument{\renewcommand\bibname{your heading for bibliography}}
    Same for \refname

    If you work with different languages in your text, use the following commands, otherwise your definitions are overwritten by babel:
         {your figure-refname}%

    Testing a bibtex-file
    you can test a bibtex-file in an easy way. In the document write only
    and then insert the bibtex data base as usual.Run LaTeX and you'll see all available entries.

    the overcite.sty is very similiar to cite.sty. therefore it's possible to get citation in overcite-mode in the text and in standard-mode in footnote. in fact of the variables it's a little bit strange to get an easy solution:

    in latex preamble

    \newcommand{\cd}{% overcite-mode
    \newcommand{\cf}{% defaultcite - mode
    \cd %like overcite
    citations in footnotes:

    a) BEFORE the citation in tex (red):

    b) BEHIND the citation, in tex (red) too:

    Citation with no reference
    with \nocite{myBibKey} the bibentry with the bibkey "myBibKey" is part of the bibliography without any citation-reference in the text. This is an excellent way to list the whole contents of a bib-file. With \nocite{*} all entries in the specified bib-file are listed.

    Paranthesis in Citation or Bibliography

    To change the style of the paranthesis in bib-labels and bibliography-numerating the following commands are needed:
    (the star "*" stands for anything, e.g. {, [ or / and the same for },] or /. the first * is the first character and the second star the second one ... if you use the commands in this form with the star, biblabels look like *Meyer00* ;-))

    \renewcommand{\@cite}[2]{*{#1\if@tempswa , #2\fi}*}  % for text-labels
    \renewcommand{\@biblabel}[1]{*#1*}    % für bib-numbering
    changing only the label-style another possibility is using package "cite"
    \usepackage{cite}           % all in latex preamble
    for the star "*" any character can be choosen.
  • local time: Sat Jul 11 18:37:53 CEST 2020 ; file is: 384.330300925926 days old
    contact webmaster _at_ TeXnik.de