gi-ev / LNI

A LaTeX class for submissions to the “Lecture Notes in Informatics” (LNI) published by the German “Gesellschaft für Informatik” (GI)
https://www.ctan.org/pkg/lni
LaTeX Project Public License v1.3c
38 stars 34 forks source link

bibtex problems #6

Closed baderas closed 4 years ago

baderas commented 8 years ago

When using the following test.tex:

%% !TeX encoding = UTF-8
%% !TeX program = pdflatex
%% !BIB program = bibtex
\documentclass[english]{lni}

\begin{document}
\author[Vorname1 Name1\and Vorname2 Name 2]{Vorname1
Nachname1\footnote{Einrichtung/Universität, Abteilung, Anschrift, Postleitzahl
Ort, \email{emailadresse@author1}}\and Vorname2
Nachname2\footnote{Einrichtung/Universität, Abteilung, Anschrift, Postleitzahl
Ort, \email{emailadresse@author2}} und weitere Autorinnen und Autoren in der
gleichen Notation}
\title[Kurztitel (falls nötig)]{Titel}
\startpage{11}% Beginn der Seitenzählung für diesen Beitrag
\editor{Ich selbst}
\booktitle{Ein Test}
\year{2017}
\maketitle

\begin{abstract}
Hier kommt die Zusammenfassung hin
Add your abstract here
\end{abstract}
\begin{keywords}
Hier kommen die Keywords hin
Add your keywords here
\end{keywords}

\section{Überschrift}
Test1 \cite{CON2012,BPV2014,H2015,CBA+2015}.

\bibliography{test}
\end{document}

with the following test.bib:

% Encoding: UTF-8

@Online{CBA+2015,
  author       = {Raman Chitkara and Werner Ballhaus and Olaf Acker and Dr. Bin Song and Anand Sundaram and Maria Popova},
  title        = {The Internet of Things: The next growth engine for the semiconductor industry},
  year         = {2015},
  url          = {https://www.pwc.ie/media-centre/assets/publications/2015-pwc-iot-semicon-paper.pdf},
  organization = {PricewaterhouseCoopers AG Wirtschaftsprüfungsgesellschaf},
  month        = may,
  file         = {:CBA+2015 - The Internet of Things_ The next growth engine for the semiconductor industry.pdf:PDF},
  owner        = {andreas},
  timestamp    = {2015.12.22},
}

@TechReport{CON2012,
  author    = {INTECHNO CONSULTING},
  title     = {Sensors Markets 2016 -- Press Release},
  year      = {2012},
  subtitle  = {Major Findings of the New Report onMarkets, Strategies, Technologies},
  month     = mar,
  url       = {http://www.intechnoconsulting.com/ic/press/details/e-press-se2016-us.pdf},
  file      = {:CON2012 - Sensors Markets 2016 - Press Release.pdf:PDF},
  owner     = {andreas},
  timestamp = {2015.12.22},
}

@Online{H2015,
  author    = {Aaron Hand},
  title     = {How the Internet of Things Is Shaping the Sensor Market},
  year      = {2015},
  url       = {http://www.automationworld.com/how-internet-things-shaping-sensor-market},
  month     = aug,
  owner     = {andreas},
  timestamp = {2015.12.22},
}

@Online{BPV2014,
  author       = {Harald Bauer and Mark Patel and Jan Veira},
  title        = {The Internet of Things: Sizing up the opportunity},
  year         = {2014},
  url          = {http://www.mckinsey.com/insights/high_tech_telecoms_internet/the_internet_of_things_sizing_up_the_opportunity},
  organization = {McKinsey \& Company},
  month        = dec,
  owner        = {andreas},
  timestamp    = {2015.12.22},
}

latexmk -pdf -latexoption="-shell-escape" test returns:

------------
For rule 'bibtex test', running '&run_bibtex(  )' ...
------------
Running 'bibtex  "test"'
------------
This is BibTeX, Version 0.99d (MiKTeX 2.9 64-bit)
The top-level auxiliary file: test.aux
The style file: lni.bst
Database file #1: test.bib
ptr=1, stack=
C
---the literal stack isn't empty for entry CBA+2015
while executing---line 1206 of file lni.bst
Warning--empty institution in CON2012
ptr=1, stack=

---the literal stack isn't empty for entry CON2012
while executing---line 1271 of file lni.bst
(There were 2 error messages)
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
  bibtex test: Bibtex errors: See file 'test.blg'
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs of latex/pdflatex.
Latexmk: This is Latexmk, John Collins, 22 April 2016, version: 4.45.
sieversMartin commented 8 years ago

Yes, this can be considered a bug (see #5). However, I am not sure, whether the output is corrupt as well.

baderas commented 8 years ago

The pdf does not contain author names and the references seem to be not working correctly.

jabref3

sieversMartin commented 8 years ago

Okay, thank you. I'll check.

baderas commented 8 years ago

Any news? Did you check it?

sieversMartin commented 8 years ago

I had a quick look, but yet no time for a deeper analysis. I am on vacation at the moment and will investigate the problem next week.

Gesendet mit TypeApp

Am 25. Aug. 2016 14:51, um 14:51, Andreas Bader notifications@github.com schrieb:

Any news? Did you check it?

You are receiving this because you were assigned. Reply to this email directly or view it on GitHub: https://github.com/sieversMartin/LNI/issues/6#issuecomment-242374389

baderas commented 8 years ago

I fixed it by using the following code:

%%% biblatex
%%%
%biblatex statt bibtex
\usepackage[
style         = lni,
backend       = biber, %minalphanames only works with biber backend
sortcites     = true,
bibstyle      = alphabetic,
citestyle     = alphabetic,
firstinits    = true,
useprefix     = false, %"von, van, etc." will be printed, too. See below.
minnames      = 1,
minalphanames = 3,
maxalphanames = 4,
maxbibnames   = 99,
maxcitenames  = 3,
doi           = false, %source: http://tex.stackexchange.com/a/23118/9075
isbn          = false, %source: http://tex.stackexchange.com/a/23118/9075
url           = false,
backref       = true]{biblatex}

%Do not put "vd" in the label, but put it at "\citeauthor"
%Source: http://tex.stackexchange.com/a/30277/9075
\makeatletter
\AtBeginDocument{\toggletrue{blx@useprefix}}
\AtBeginBibliography{\togglefalse{blx@useprefix}}

%Thin spaces between initials
%http://tex.stackexchange.com/a/11083/9075
\renewrobustcmd*{\bibinitdelim}{\,}

%Keep first and last name together in the bibliography
%http://tex.stackexchange.com/a/196192/9075
\renewcommand*\bibnamedelimc{\addnbspace}
\renewcommand*\bibnamedelimd{\addnbspace}

%Replace last "and" by comma in bibliography
%See http://tex.stackexchange.com/a/41532/9075
\AtBeginBibliography{%
    \renewcommand*{\finalnamedelim}{\addcomma\space}%
}

%enable hyperlinked author names when using \citeauthor
%source: http://tex.stackexchange.com/a/75916/9075
\DeclareCiteCommand{\citeauthor}
{\boolfalse{citetracker}%
    \boolfalse{pagetracker}%
    \usebibmacro{prenote}}
{\ifciteindex
    {\indexnames{labelname}}
    {}%
    \printtext[bibhyperref]{\printnames{labelname}}}
{\multicitedelim}
{\usebibmacro{postnote}}

%natbib compatibility
\newcommand{\citep}[1]{\cite{#1}}
\newcommand{\citet}[1]{\citeauthor{#1} \cite{#1}}
%Beginning of sentence - analogous to cleveref - important for names such as "zur Muehlen"
\newcommand{\Citep}[1]{\cite{#1}}
\newcommand{\Citet}[1]{\Citeauthor{#1} \cite{#1}}
%%%

and \printbibliography[heading=bibintoc,title={References}] at the appropriate place

it comes from https://github.com/baderas/uni-stuttgart-computer-science-template/blob/template/preambel/packages_and_options.tex

sieversMartin commented 8 years ago

Thank you. However, I would like to have a bibtex solution as well. The reason is, that there are a lot of people using older distributions. Thus they don't have the latest biblatex packages or are not familiar with using biber etc.

In additionstyle=lni should be redundant as you name alphabetic explicitly.

koppor commented 7 years ago

The biblatex solution has been implemented with a huge help of @LukasCBossert and @georgd in https://github.com/latextemplates/LNI/pull/3 https://github.com/latextemplates/biblatex-lni.

The biblatex-lni style can be is packaged for CTAN. I have it as TODO: https://github.com/latextemplates/LNI/issues/4 https://www.ctan.org/pkg/biblatex-lni

koppor commented 7 years ago

We are hitting the version issues in the context of the BTW conference (http://btw-konferenz.de/), but most issues seem to be solvable by keeping his system up to date. We have hints for Windows https://github.com/latextemplates/LNI#installation-hints-for-windows and Ubuntu: https://github.com/latextemplates/LNI#installation-hints-for-ubuntu

white-gecko commented 7 years ago

I'm experiencing the same problem but could solve it using biblatex resp. biber (https://tex.stackexchange.com/questions/13509/biblatex-in-a-nutshell-for-beginners#13513).

Is this considered as the solution, that maybe it would be good to write this into the README.

sieversMartin commented 7 years ago

Well, for me and many other users, using biblatex should be considered best practise. However, there are still users not familiar with biblatex. Therefore the old bst file have to be supported.

BTW: The README contains a hint to biblatex as well.

koppor commented 7 years ago

...and the documentation, too.

In our conference 2017, approx 1/5 of the papers used biblatex all others bibtex... Also because of the high installation effort of a recent version in recent Ubuntu distris...

ytzemih commented 4 years ago

This issue has been around for quite a while. I am a biblatex/biber user whenever I can. For the sake of compatibility, I found a ridiculously easy solution in #80. Hope it is useful. Have fun!