1

I have problem with bibliography and citation with this document

\documentclass[12pt, french, fancyChapter, fancyPart, squeezeCommittee]{these}
\usepackage[utf8]{inputenc}
\usepackage{mwe}
\usepackage{subfig}
\usepackage[T1]{fontenc}
\usepackage{refcount}
\usepackage{textcomp}
\usepackage{caption}
\geometry{inner=3.15cm, outer=3.15cm, top=2.5cm, bottom=2.5cm}
\geometry{inner=3cm, outer=3cm, top=2.5cm, bottom=2.5cm}
\usepackage{rotating}
\usepackage{palatino} % times, palatino, 
\RequirePackage[bookmarks,%
                colorlinks=false,
                urlcolor=blue,%
                citecolor=blue,%
                linkcolor=blue,%
                hyperfigures,%
                pagebackref,%
                pdfcreator=LaTeX,
                breaklinks=true,%
                pdfpagelayout=SinglePage,%
                bookmarksopen=true,%
                bookmarksopenlevel=2]{hyperref}
\DeclareGraphicsExtensions{.png}
\graphicspath{{./logos/}}
\usepackage[pdftex]{color}
\usepackage[font=footnotesize,labelfont=bf]{caption}
\usepackage[font=footnotesize,labelfont=bf]{subcaption}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage[labelfont=bf,justification=raggedright,singlelinecheck=false]{caption}
\captionsetup[figure]{name=Figure ,labelsep=period}
\renewcommand*{\figureautorefname}{Fig.}
\usepackage{subcaption}
\usepackage{cleveref}
\usepackage[showframe]{geometry}
\renewcommand*{\equationautorefname}{equ.}
\usepackage[Latin,Greek]{ucharclasses}
\usepackage{subfigure}
\usepackage{apalike}
\usepackage[hyphens]{url}
\usepackage[colorlinks,allcolors=blue]{hyperref} 
%\usepackage[style=numeric,backend=biber]{biblatex}
\usepackage[
   natbib=true
    sorting=none
]{biblatex}
\usepackage[authoryear,square]{natbib}
\setcitestyle{citesep={,},aysep={}}
%\usepackage[sort&compress,numbers]{natbib}

\newcommand*{\myeqref}[2][Eq.~]{%
  \hyperref[{#2}]{#1(\ref*{#2})}%
}
\def\equationautorefname#1#2\null{%
  Eq.#1(#2\null)%
}

\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
\AddThinSpaceBeforeFootnotes 
\FrenchFootnotes
\addbibresource{bibliography.bib}
\begin{document}
\ayse{ foresee1997gauss}
\end{document}

Update: I tested many codes but they dont work. For example :

\documentclass{article}

\usepackage{filecontents} \begin{filecontents}{Dadsetani.bib}
@article{Hvala,
    author = {Hvala, B.},
    title = {Generalized derivations in rings},
    journal = {Comm. Algebra},
    volume = 26,
    pages = {1147--1166},
    year = 1998,
}

@inproceedings{Birkenmeier,
    author = {Birkenmeier, G. F. and Heatherly, H. E. and Lee, E. K.},
    title = {Completely prime ideals and radicals in Near-rings},
    booktitle = {Proceedings of Near-rings and Near-Fields},
    publisher = {Kluwer},
    year = 1995,
    pages = {63--73},
    editor = {Fong, Y. and others},
}
\end{filecontents}

\usepackage{natbib}

\begin{document}

\citep{Hvala}, \citep{Birkenmeier}

\bibliographystyle{apalike}
\bibliography{Dadsetani}

\end{document}

All I get is (?) (?)

My used editor is TeXmaker, I use windows and MiKTeX.

Mensch
  • 65,388

1 Answers1

2

Your given first code shows a lot of errors you must get while compiling it. Usually package hyperref should be called as last package, but in your case package cleverref has to be called after hyperref. Call packages only once and keep an eye on the correct order ...

One problem with the first code is that you are mixing the usages of bibtex, natbib, apalike and biblatex and biber.

Please do only copy code from files you got from the internet you understand. Do not use code you do not understand!

The following MWE shows you what you need to run bibtex and natbib. Copy it to your computer and use the name mwe.tex for it:

\RequirePackage{filecontents} 
\begin{filecontents}{\jobname.bib}
@article{Hvala,
    author = {Hvala, B.},
    title = {Generalized derivations in rings},
    journal = {Comm. Algebra},
    volume = 26,
    pages = {1147--1166},
    year = 1998,
}
@inproceedings{Birkenmeier,
    author = {Birkenmeier, G. F. and Heatherly, H. E. and Lee, E. K.},
    title = {Completely prime ideals and radicals in Near-rings},
    booktitle = {Proceedings of Near-rings and Near-Fields},
    publisher = {Kluwer},
    year = 1995,
    pages = {63--73},
    editor = {Fong, Y. and others},
}
\end{filecontents}


\documentclass{article}

\usepackage[authoryear,square]{natbib}

\begin{document}

\citep{Hvala}, \citep{Birkenmeier}

\bibliographystyle{apalike}
\bibliography{\jobname}

\end{document} 

Open the terminal/console and use the compiling chain:

pdflatex mwe.tex
bibtex mwe.aux
pdflatex mwe.tex
pdflatex mwe.tex

Then you will get the result:

enter image description here

The following MWE is for the usage of biblatex:

\RequirePackage{filecontents} 
\begin{filecontents}{\jobname.bib}
@article{Hvala,
    author = {Hvala, B.},
    title = {Generalized derivations in rings},
    journal = {Comm. Algebra},
    volume = 26,
    pages = {1147--1166},
    year = 1998,
}
@inproceedings{Birkenmeier,
    author = {Birkenmeier, G. F. and Heatherly, H. E. and Lee, E. K.},
    title = {Completely prime ideals and radicals in Near-rings},
    booktitle = {Proceedings of Near-rings and Near-Fields},
    publisher = {Kluwer},
    year = 1995,
    pages = {63--73},
    editor = {Fong, Y. and others},
}
\end{filecontents}


\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{csquotes}
\usepackage[
  natbib=true,
% sorting=none,
  style=authoryear,
  backend=biber
]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}

\citep{Hvala}, \citep{Birkenmeier}

\printbibliography

\end{document}

Follow again the compiling chain, but instead bibtex mwe.aux use biber mwe.aux. The result is:

enter image description here

Please study the differences of both codes.

Mensch
  • 65,388
  • again [?], [?]!!!!!!!! I already work with elsarticle document class, it was good! – demoiselleN Nov 04 '17 at 02:17
  • Thank you it works now but using bibtex mwe.aux instead of, as you recommended, biber mwe.aux ! I updated jabref (maybe this was the problem i dont know) . Now, i changed to \usepackage[ natbib=true, % sorting=none, style=authoryear-icomp,maxbibnames=9, maxcitenames=2, uniquelist=false, backend=biber]{biblatex} for (author. et al, year) but i dont know how to change the use the color tealblue for all the citation not just the year i tested \usepackage{xcolor} \usepackage[colorlinks]{hyperref} \hypersetup{ colorlinks = true, %Colours links instead of ugly boxes urlcolor = red, %Colour for exter – demoiselleN Nov 04 '17 at 16:14
  • yes sorry, when installing texmaker i set options as described in https://lc.cx/xdve . I'm not very familar with latex i use it for thesis (obliged) and citation color and link are of instruction. Thank you so mutch – demoiselleN Nov 05 '17 at 19:00