0

so I'm finishing up with my project and realized that I have to change the style of my citations to something like this:

% Biblatex {{{
\usepackage[
    style=alphabetic,
    backend=biber,
    %backref=true
    ]{biblatex}               % Biblatex mit alphabetischem Style und biber.
\addbibresource{\jobname.bib} % Dateiname der bib-Datei.
\DeclareFieldFormat*{title}{
    \mkbibemph{#1}}         % Make titles italics
% }}}

Which should produce something like this in the text:

citation in the text

Now I have been apparently working with a complete different solution which looks like this:

\documentclass[
  fontsize=12pt,
  headings=small,
  parskip=half,      % Ersetzt manuelles setzten von parskip/parindent.
  bibliography=totoc,
  numbers=noenddot,    % Entfernt den letzten Punkt der Kapitelnummern.
  %open=any,        % Kapitel kann auf jeder Seite beginnen.
%  final          % Entfernt alle todonotes und den Entwurfstempel.
  ]{scrreprt}
\usepackage[
  a4paper,
  margin=2.54cm,
  marginparwidth=2.0cm,
  footskip=1.0cm
  ]{geometry}  
\usepackage[utf8]{inputenc}
\usepackage[german,ngerman]{babel}

%%gegen möchliche Warnmeldungen bezüglich underfull \hbox wenn in der *.bbl file zu lange URLs sind
\usepackage{etoolbox}
\apptocmd{\thebibliography}{\raggedright}{}{}

%   % fuer Literaturverweise
\usepackage[numbers,square]{natbib}
\bibpunct{[}{]}{;}{a}{}{;} % Natbib konfigurieren, so da� im text [M�ller 2006] erscheint und keine runden Klammern o.�.
    \renewcommand{\cite}{\citep} % \cite zu \citep umwandeln, so dass im Text \cite{Mueller.2006} f�r Referenzen verwendet werden kann.
%
%   %% Verhindert, dass im Literaturverzeichnis nach der Nennung von [Mueller 2006] die Seite umgebrochen wird und die Autoren + Buchtitel etc. auf der n�chsten Seite landen
%   %% Es wurde daher \noparagraphbreak in der natdin.bst bei der Ausgabe der Elemente erg�nzt
%   %% siehe http://groups.google.de/group/de.comp.text.tex/browse_thread/thread/9ca4c681e2063fbd/f7eb3eec044b058e
    \makeatletter
    \def\noparagraphbreak{\interlinepenalty10000
     \@itempenalty-\@highpenalty}
    \makeatother 


\begin{document}
\newpage
\begin{singlespace}
\chapter{Einleitung}
\label{chap:Einleitung}
\end{singlespace}


Some text \citep[S.27-29{Magnusson2007}. 

\phantomsection % benötigt für korrekte pdf-darstellung
\addcontentsline{toc}{chapter}{Literaturverzeichnis}
\bibliographystyle{natdin} % Din 1505 nach Lorenzen (Das konkrete Aussehen des Litverzeichnisses ist im header festgelegt)
\interlinepenalty=10000 %sorgt dafür, dass Liteinträge nicht Seiten übergreifend sind
\bibliography{bibliography/library} % Pfad zur *.bib-Datei (Dateiendung wird weggelassen)

\end{document}

Which gives me citations in the text looking like this:

enter image description here

My problem is that I have tried to change it and simply use biblatex....but unfortunately I'm getting only errors....what am I missing? Maybe its important to mention that I've been using the \citep[S.27-29]{some citation} command like this and have tried to include the pages where to find specific citations....

Any help is appreciated :)

Mico
  • 506,678
  • In your current set-up you use natbib, so you run BibTeX. With the biblatex code snippet you need to run Biber instead. See https://tex.stackexchange.com/q/154751/35864. A bit of background can be found in https://tex.stackexchange.com/q/25701/35864. You'll need to follow the steps in https://tex.stackexchange.com/q/5091/35864 if you want to use biblatex. – moewe Mar 15 '18 at 16:07
  • If you want to keep on using \citep (instead of \parencite) with biblatex you will also need to enable the natbib compatibility mode by adding natbib=true to the biblatex loading options. – moewe Mar 15 '18 at 16:12
  • Hi Mico, thanks for your reply I've tried to follow the steps for the last hours and am running in one problem after another e.g. miktex didnt have biber so I added it and updated the FNDB, then I tried to setup my TexStudio, but it just wasn't working....so i decided to go back to my old setting, which work just fine. ==> My question now is can I somehow use my current settings to make it look like the citation I actually would like to have? – user1670184 Mar 15 '18 at 17:00
  • https://tex.stackexchange.com/q/35306/ suggests natbib does not have a compatible alphabetic style. The documentation says natbib is for author-year and numeric citation and does not mention alphabetic citations. But you can switch to cite and alpha style: \documentclass{scrartcl}\usepackage{cite}\bibliographystyle{alpha}\begin{document}Lorem~\cite{sigfridsson}.\bibliography{mybibfile}\end{document} I would, however, advise you to use biblatex and Biber. If you install Biber via MikTeX's package manager there should be no problem. What did you try exactly and how did it not work? – moewe Mar 15 '18 at 17:10
  • Hi moewe, Ok I tried it again....I installed the package using the miktex tool as suggested from you, this worked fine. Then I changed the code in my latex project adding the biblatex info and setting biber as background. I changed the settings in TexStudio as described to biber....==> first it compiled with an error "...bbl not created by bibtex..." or something like that....so i renamed the bbl file, but not it doesnt create a new one, doesnt set any citations and no bibliography – user1670184 Mar 15 '18 at 17:48
  • oh yeah and running the "compile bibliography" command (F8 in Texstudio) gives me this : Fehler: Eine Kommandoersetzung ungültig Eltern-Befehl: bibliography Hauptbefehl: bibliography – user1670184 Mar 15 '18 at 17:49
  • Can you make sure that Biber is actually installed and working? What do you get if you type biber --version in the command line? Have a look at https://tex.stackexchange.com/q/286706/35864. See also https://golatex.de/biblatex-gibt-fehlermeldungen-problem-mit-packageeinbindung-t18954.html – moewe Mar 15 '18 at 17:54
  • I get 2.11 as a result...biber seems to be installed and working – user1670184 Mar 15 '18 at 18:01
  • Good. Double check your settings against https://tex.stackexchange.com/q/154751/35864. What error do you get? Still the one about "ungültige Eltern-Befehle"? Try to compile the entire document from the command line (you seem to speak German, so have a look at https://texwelt.de/wissen/fragen/3461/wie-kompiliere-ich-in-der-eingabeaufforderung-im-terminal) – moewe Mar 15 '18 at 20:30
  • Any news here? Did you manage to get Biber up and running? – moewe Mar 17 '18 at 06:38
  • Any news here? Could you get things going? – moewe Mar 19 '18 at 11:34
  • Any news here? It's been almost two weeks with no reaction now. – moewe Mar 28 '18 at 09:45

0 Answers0