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.

7
  • Why do you once \RequirePackage{hyperref} and once \usepackage{hyperref}? And the \RequirePackage seems a bit early.
    – Skillmon
    Commented Oct 24, 2017 at 21:15
  • ok. Thank you. But my problem is with biblography! Commented Oct 24, 2017 at 21:48
  • 2
    But what is this problem? Most of us aren't telepaths…
    – Bernard
    Commented Oct 24, 2017 at 22:51
  • oh sorry (this is my first with latex and with the forum )! yes i show you here commands and packages used in writing my thesis. i would like to have citation like author year in color blue ( foresee 1997). I tried \bibliographystyle{apalike} with \usepackage{natbib} \setcitestyle{aysep={}} but doesnt works Commented Oct 24, 2017 at 23:21
  • thank you for replaying me. I testes many codes but it doesn works. For example : Commented Nov 3, 2017 at 23:59

1 Answer 1

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.

3
  • again [?], [?]!!!!!!!! I already work with elsarticle document class, it was good! Commented Nov 4, 2017 at 2: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 Commented Nov 4, 2017 at 16:14
  • yes sorry, when installing texmaker i set options as described in 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 Commented Nov 5, 2017 at 19:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .