4

I would like to get the bibliography style of the Kelley's book General Topology: enter image description here enter image description here

I've been reading the options that LaTeX has here and there is no one like Kelley's book apparently.

Is it possible to get what I want?

Thanks

PD: I haven't said it but it is supposed to use the standard bibtex, i.e. data_base.bib + style_file.bst, but I don't mind if I would need extra packages. @AlanMunn says with that option is difficult. Please fell free to give another solution. I'm focus on only in the style, not in the way.

Addendum.

Following @moewe's advice I'm going to highlight what is the main part I want to recreate. It is obviously the format

Author (in sc) Cite (indented and restarted with each new atuthor).

The format of the proper cite doesn't mind. For example, I would like

Title (Edition), Editorial, Country (Year). Notes

for books and maybe

Title, Journal, Volume (in bf) Pages (year) for journals,

but it doesn't matter at all.

What I would like to have a field subtitle to be able to write subtitles right, because sometimes they are written in note fields.

And finally, if I use \cite{kuratowski:topologie2}, I want to obtain Kuratowski [2] automatically.

Thanks.

Dog_69
  • 981
  • 1
    Well, "the standard bibtex" with \bibliography{bib_data_base} is not biblatex with which you tagged your question and which you included in the title... If this is indeed a requirement, please retag and edit the title. – gusbrs Feb 20 '18 at 22:30
  • No, it has been a mistake, sorry. I have the packages isolated in another file, so when I've looked the main document I've only seen the \bibliography{bib_data_base} command. I'm going to delete that part. I mean the bibtex, i. e. file.bib + file.bst. – Dog_69 Feb 20 '18 at 22:41
  • I meant you are not intending to use biblatex at all, as it seems. \bibliography{bib_data_base} would be appropriate for bibtex with style.bst. So I was not asking you to reformulate your question, but simply to substitute biblatex in your tags and in your title for bibtex so that people are not mislead by them. – gusbrs Feb 20 '18 at 22:46
  • Oh, you're completely right. I was thinking in bibtex all the time, I didn't realize I had written biblatex. My apologies. I'll change the tag inmediately. – Dog_69 Feb 20 '18 at 22:48
  • Ok, I think now it shoul be correct. – Dog_69 Feb 20 '18 at 22:49
  • Thanks. As a byproduct, the chance of you getting the attention of the right people, just increased. :) – gusbrs Feb 20 '18 at 22:51
  • I wonder if I'm the only person here who used that book as a graduate text, before almost anyone else here was born. –  Feb 21 '18 at 00:51
  • @gusbrs: It seems no experte in bibtexlikes my question... :( – Dog_69 Feb 24 '18 at 19:06
  • @Dog_69, it is not a question of liking it. It looks hard. I don't know how I would do it with biblatex, which I know better, and which is much more flexible and customizable than standard bibtex. I wonder how hard that might be within bibtex. Second, you did not provide folks with a MWE, and thus did not show what you had attempted. This may be a deal breaker to many. I suggest you three (non excluding) possibilities. 1) provide a MWE, that would increase the chance of getting an answer and would also bump the question; (continues...) – gusbrs Feb 24 '18 at 19:13
  • (continued) 2) flexibilize the bibtex requirement, biblatex indeed has more potential for customization; 3) add a bounty to your question. – gusbrs Feb 24 '18 at 19:13
  • 6
    The reason it doesn't have a LaTeX equivalent might probably be because this is a terrible style. – percusse Feb 24 '18 at 19:20
  • @percusse: Really? I love it. It seems me very beautiful. Why do you hate it? – Dog_69 Feb 24 '18 at 19:22
  • 3
    biblatex-philosophy's philosophy-modern style looks very, very remotely like this (if you squint really hard and close one one completely). It's quite different, but it shows that something like this is not entirely impossible. The biggest problem with a style like this is that it is so very unusual. People know and can deal with author-year citations and they know numeric citation styles. They even know numeric citation styles that add the author. But the fact that the number resets for each author is definitely unusual at first. – moewe Feb 24 '18 at 19:33
  • 2
    It's subjective of course but few obvious ones are; can't handle same- or similar-named authors (load on the reader for no good reason), can't handle citing multiple authors and so on. – percusse Feb 24 '18 at 19:38
  • 1
    You may want to emphasise in your question what particularly it is about this style that you want to recreate. Writing a complete style is a huge ask, and such requests are not really suitable on this site. You may have a better chance of getting an answer if you focus on one particular abstract question. Note that the style is inconsistent when it comes to punctuation: Compare an contrast Kuratowski [1] and Landau [1]. – moewe Feb 24 '18 at 19:46
  • I would be very surprised if you'll find anyone willing to do this for you using standard .bst methods. At best some of the biblatex folk might be willing to try a biblatex solution, but if that's not acceptable to you, then you should tell us, because the style has very little practical use other than recreating this particular text. – Alan Munn Feb 26 '18 at 18:06
  • 1
    @AlanMunn: I accepts every possible answer that recreates the style. I don't mind if the solution uses bibtex, biblatex, an extra package... – Dog_69 Feb 26 '18 at 18:53
  • maybe https://tex.stackexchange.com/questions/961/bibtex-style-that-groups-by-author/5057 could help – samcarter_is_at_topanswers.xyz Feb 26 '18 at 19:21
  • @Dog_69 Ok, thanks for clarifying. – Alan Munn Feb 26 '18 at 19:26
  • @samcarter: Yes. In fact if I could change the format to get [1] instead of [2018] it would already be. Do you think I should modify my question or delete it and ask a new question to modify that? Thanks. – Dog_69 Feb 27 '18 at 02:06
  • 1
    I think your question is as clear as it's going to get, and as @moewe already pointed out, this format is kind of like philosophy-modern which is the same as the style Sam linked to. So I don't think there's much to be gained from adding that code here. The issue of sub-numbering the items per author is the main one, and anyone who's reading this by now understands that. – Alan Munn Feb 27 '18 at 02:17

1 Answers1

14

I focused on the 'interesting' bit of the style: The author+number citation and rough bibliography layout. The remaining tweaks should be doable with a bit of research on this site.

If we base our style on biblatex-philosophy's philosophy-modern we only need to make sure that citations are not 'author year', but 'author number' instead.

I can't think of a simple way to do that at the moment (feature request is out: https://github.com/plk/biblatex/issues/718), so I came up with the following. We pretend that we use an alphabetic style that uses only the author names in its label. Normally style=alphabetic uses only bits of the author name and the year (e.g. SR98, Knu84). If a label is ambiguous, Biber calculates an extraalpha value (e.g. Knu86a, Knu86b). Since our labels are the names only, extraalpha would get us 'Nussbaum' (if there is no other work by 'Nussbaum') and 'Knutha', 'Knuthb'. That extraalpha is almost our number: If there is no extraalpha ('Nussbaum') we take 1, otherwise extraalpha is what we go with.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=philosophy-modern, backend=biber, labelalpha, giveninits, uniquename=init, mergedate=false, volnumformat=plain]{biblatex}
\addbibresource{biblatex-examples.bib}


\DeclareLabelalphaTemplate{
  \labelelement{
    \field[final]{shorthand}
    \field{label}
    \field{labelname}
  }
}

\renewbibmacro*{relateddate}{%
  \setunit*{\addspace}%
  \printtext[parens]{\printdate}}
\renewbibmacro*{commarelateddate}{\usebibmacro{relateddate}}

\DeclareFieldFormat{extraalpha}{\mkbibbrackets{#1}}
\renewbibmacro{date+extradate}{%
  \postsepyear{%
    \usebibmacro{extralabel}}}

\newbibmacro{extralabel}{%
  \iffieldundef{extraalpha}
    {\printtext[extraalpha]{1}}
    {\printfield{extraalpha}}}

\newbibmacro{cite:extralabel}{%
  \printtext[bibhyperref]{\usebibmacro{extralabel}}}

\makeatletter
\renewbibmacro*{cite:AY:noshorthand}{%
  \ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
       {\usebibmacro{cite:label}%
        \usebibmacro{cite:reinit}}
       {\iffieldequals{namehash}{\cbx@lasthash}
          {\setunit{\addcomma\space}%
           \usebibmacro{cite:extralabel}}
          {\printnames{labelname}%
           \setunit{\addspace}%
           \usebibmacro{cite:extralabel}%
           \savefield{namehash}{\cbx@lasthash}}}}
\makeatother

\DeclareNameAlias{sortname}{given-family}
\AtBeginBibliography{\renewcommand*{\mkbibnamefamily}{\textsc}}

\DeclareFieldFormat*{title}{\mkbibemph{#1}}
\DeclareFieldFormat*{journaltitle}{#1}
\DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}}

\begin{document}
\cite{sigfridsson,worman,knuth:ct:a,knuth:ct:b}
\printbibliography
\end{document}

enter image description here


biblatex 3.12 features a new extraname counter that we can use here instead of the hack with extraalpha. Simply replace extraalpha with extraname in the code above and drop \DeclareLabelalphaTemplate and the labelalpha option.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=philosophy-modern, backend=biber, giveninits, uniquename=init, mergedate=false, volnumformat=plain]{biblatex}
\addbibresource{biblatex-examples.bib}

\renewbibmacro*{relateddate}{%
  \setunit*{\addspace}%
  \printtext[parens]{\printdate}}
\renewbibmacro*{commarelateddate}{\usebibmacro{relateddate}}

\renewbibmacro{date+extradate}{%
  \postsepyear{%
    \usebibmacro{extralabel}}}

\DeclareFieldFormat{extraname}{\mkbibbrackets{#1}}
\newbibmacro{extralabel}{%
  \iffieldundef{extraname}
    {\printtext[extraname]{1}}
    {\printfield{extraname}}}

\newbibmacro{cite:extralabel}{%
  \printtext[bibhyperref]{\usebibmacro{extralabel}}}

\makeatletter
\renewbibmacro*{cite:AY:noshorthand}{%
  \ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
       {\usebibmacro{cite:label}%
        \usebibmacro{cite:reinit}}
       {\iffieldequals{namehash}{\cbx@lasthash}
          {\setunit{\addcomma\space}%
           \usebibmacro{cite:extralabel}}
          {\printnames{labelname}%
           \setunit{\addspace}%
           \usebibmacro{cite:extralabel}%
           \savefield{namehash}{\cbx@lasthash}}}}
\makeatother

\DeclareNameAlias{sortname}{given-family}
\AtBeginBibliography{\renewcommand*{\mkbibnamefamily}{\textsc}}

\DeclareFieldFormat*{title}{\mkbibemph{#1}}
\DeclareFieldFormat*{journaltitle}{#1}
\DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}}

\begin{document}
\cite{sigfridsson,worman,knuth:ct:a,knuth:ct:b}
\printbibliography
\end{document}

The output is the same.

moewe
  • 175,683
  • Very clever! I hadn't thought about using the alpha style. – Alan Munn Feb 27 '18 at 13:17
  • @AlanMunn It isn't ideal as the alphabetic style doesn't do name disambiguation as nicely as authoryear, but I couldn't think of a better way to get the numbers. – moewe Feb 27 '18 at 13:19
  • Why does it non work for me? :( . I have only replaced your bib file to my own file and cite other books. – Dog_69 Feb 28 '18 at 18:08
  • 1
    @Dog_69 Did you manage to run the exact MWE from my answer without any modifications? Since the answer requires biblatex+Biber and you used to work with BibTeX, there may be things you need to modify in your workflow. Please have a look at https://tex.stackexchange.com/q/25701/35864, https://tex.stackexchange.com/q/154751/35864, https://tex.stackexchange.com/q/63852/35864. I need to know what you tried, what exactly is not working, what warnings and errors you get. – moewe Mar 01 '18 at 07:46
  • I only change mybib file and the cited book. I'm using TeXStudio so I've follow the steps of https://tex.stackexchange.com/questions/154751/biblatex-with-biber-configuring-my-editor-to-avoid-undefined-citations but it doesn't work. An error messages appears: Found biblatex control file version 3.4, expected version 3.3. This means that your biber (2.7) and biblatex (3.10) versions are incompatible. So I don't get the bibliography list and all references appear in bold (as https://tex.stackexchange.com/questions/63852/question-mark-or-bold-citation-key-instead-of-citation-number says). – Dog_69 Mar 01 '18 at 20:21
  • I have tried to update biber with the MikTeX update but an error always happens, initexmf semms to fail. Something laike error 1 also ais shown. – Dog_69 Mar 01 '18 at 20:37
  • @Dog_69 Mhh, the initexmf error is a generic error message. We would need to know more to be able to help. What exactly did you try? Did you make sure no TeX-related processes are still running before you ran the MikTeX Update tool? Have a look at https://tex.stackexchange.com/q/108447/35864 – moewe Mar 01 '18 at 21:05
  • I tried to update miktek with the app. And I'm sure no TeXfile was runs neither open. Here is the last messages from the log file: running 'initexmf --force --mklinks --verbose' initexmf: warning: The link target "C:\Program Files\MiKTeX 2.9\miktex/bin/x64\miktex-pdfsig.exe" does not exist. Sorry, but "MiKTeX Configuration Utility" did not succeed. – Dog_69 Mar 01 '18 at 21:18
  • What app? Did you follow the steps from my last link? I.e. did you open the Package Manager, synchronise the package database and made sure that all miktex-... packages are installed? Have a look at https://github.com/MiKTeX/miktex-packaging/issues/8 – moewe Mar 01 '18 at 21:22
  • Also note that the line about "C:\Program Files\MiKTeX 2.9\miktex/bin/x64\miktex-pdfsig.exe" is only a warning. Is there an error message somewhere? Does it mention a .log file. Can you run each of the Updaters twice and see what happens? – moewe Mar 01 '18 at 21:24
  • I have just done it. Now I have been able to update everything. I have also run my tex file and it works. The bibliography looks like the yours. Thanks for all your comments with these so-valuable links. +\infty for all your work. – Dog_69 Mar 01 '18 at 21:38