Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bibtex problems #6

Closed
baderas opened this issue Aug 10, 2016 · 13 comments
Closed

bibtex problems #6

baderas opened this issue Aug 10, 2016 · 13 comments
Assignees

Comments

@baderas
Copy link

baderas commented Aug 10, 2016

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
Copy link
Member

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

@sieversMartin sieversMartin self-assigned this Aug 10, 2016
@baderas
Copy link
Author

baderas commented Aug 10, 2016

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

jabref3

@sieversMartin
Copy link
Member

Okay, thank you. I'll check.

@baderas
Copy link
Author

baderas commented Aug 25, 2016

Any news? Did you check it?

@sieversMartin
Copy link
Member

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:
#6 (comment)

@baderas
Copy link
Author

baderas commented Sep 2, 2016

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
Copy link
Member

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
Copy link
Member

koppor commented Oct 7, 2016

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
Copy link
Member

koppor commented Nov 16, 2016

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

koppor added a commit to latextemplates/LNI that referenced this issue Mar 31, 2017
Move declaration of \citeauthor to the cbx-file
@white-gecko
Copy link
Contributor

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
Copy link
Member

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
Copy link
Member

koppor commented May 9, 2017 via email

@ytzemih
Copy link

ytzemih commented Oct 11, 2019

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants