semprag / biblatex-sp-unified

An opinionated biblatex implementation of the Unified Stylesheet for Linguistics Journals
LaTeX Project Public License v1.3c
39 stars 12 forks source link

Can't find where to install the files #34

Closed NaoBerlin closed 6 years ago

NaoBerlin commented 7 years ago

Hello, I'm new to LaTeX, so please excuse me for this simple question. I do not understand WHERE to put the two files. It says "where your TeX system can find them" and I'm working on Mac OSX 10.10.5, but not with MacTeX distribution (as far as I know) and I don't even understand what "create the directory structure: mkdir -p $(kpsewhich -var-value TEXMFHOME)/tex/latex/biblatex" means...

Thank you very much for your help!

alecshaw commented 7 years ago

Hi there, You should run the following commands from the terminal and perform the remaining steps:

  1. mkdir -p $(kpsewhich -var-value TEXMFHOME)/tex/latex/biblatex – This will create the directory structure you need, presumably at ~/Library/texmf/
  2. open ~/Library/texmf/tex/latex/biblatex
  3. Copy the folders bbx and cbx into the now open biblatex folder
  4. Add the following to the MastersDoctoralThesis.cls, removing any other bibliography-related packages.
    \usepackage[backend=biber,
            bibstyle=biblatex-sp-unified,
            citestyle=sp-authoryear-comp,
            maxcitenames=3,
            maxbibnames=99]{biblatex}

    – You are free to choose how many names appear in a citation (maxcitenames) in the text versus how many are printed in the bibliography (maxbibnames).

  5. In your main .tex file, place \addbibresource{path/to/refs/<refs>.bib}. Assuming your .bib file is in the same folder as your main .tex file, you need only write <refs>.bib.
NaoBerlin commented 7 years ago

Thanks Alex for your quick response! It helped me to do it step by step and it approximately worked. Still having three issues:

Thanks again for your help (not urgent, though)!

alecshaw commented 7 years ago

Alright, for your first point, have you loaded hyperref after biblatex? I recommend loading hyperref as your final package in the .cls file.

I'm afraid I can't reproduce your other two points. Both code snippets, as you've set them, work for me. As a recommendation, move \newcommand{\citess}[1]{\citeauthor{#1}'s\ (\citeyear{#1})} after your package declarations, if they're not there.

If you have not cited anything, the bibliography will also not appear. Try \nocite{*} before \printbibliography to print all entries in the .bib file.

adamliter commented 7 years ago

@NaoBerlin Dunno if this would be helpful, but I did an impromptu workshop on LaTeX at the Chicago Linguistic Institute, and there's a handout/document from that workshop available here. It talks about how to set up a local texmf folder (and also why), which is what you just did with that mkdir command.

Parts of the document are currently outdated (e.g., the information on the forest package is for the 1.x versions of the package, but 2.x has since been released, which broke backward compatability), but I do plan on updating it soon. Other than the outdated forest info, I think everything else should still be correct and (hopefully!) helpful (feedback is welcome, too).

NaoBerlin commented 7 years ago

@alecshaw I have not forgotten you but I still did not have the time to try what you suggested in your message - for now, I really need to write, even though the bibliography might not look nice ;) I will tell you how it looks like, sorry for the delay!

@adamliter Thank you so much, it looks very interesting indeed!

I am really amazed, the LaTeX community is so helpful and friendly :)

adamliter commented 7 years ago

@NaoBerlin No problem. If you do read it and have feedback, like I said, please let me know. I'm open to adding things if you think there's something that I didn't cover that would be helpful, and I'd also appreciate feedback if something isn't clear, so I can improve it.

NaoBerlin commented 7 years ago

@alecshaw Sorry for replying so late. I have loaded \usepackage[backend=biber, bibstyle=biblatex-sp-unified, citestyle=sp-authoryear-comp, maxcitenames=3, maxbibnames=99]{biblatex} at the end of the .cls file as you suggested and it resolved the issue about clicking on a reference to directly come to the bibliography section. Thank you!

Unfortunately I still have two main problems: Firstly, the package does not recognize this citation: (\citealp[2]{grunert_untersuchungen_1974}, quoted by \citealp[4]{feldman_introduction_1998}) even though the previous one, which did not work before (\newcommand{\citess}[1]{\citeauthor{#1}'s\ (\citeyear{#1})}) now displays properly. Clearly I must confess I have no idea where I found this command for multiple citations and I know that there is currently no new command for this one in my main file. I have tried \newcommand\citealp[1]{\citeauthor{#1}\ (\citeyear{#1})} but this does not work.

Secondly, some information appears in the references that is not usual for the Unified Style Sheet for Linguistic Journals (as I used it back then with Word and Zotero), typically the language ("de" here) and the Google Book ID: Adamzik, Kirsten. 2004. Textlinguistik. Eine einführende Darstellung. de. Google-Books- ID: ioImMNMzCjAC. Tübingen: Max Niemeyer Verlag. There are also many other problems, e.g. pages missing in a book chapter reference: Amossy, Ruth. 2002b. Ethos. Patrick Charaudeau & Dominique. Maingueneau (eds.). Paris. Or the dates sometimes appearing after a doi, sometimes not, URL sometimes missing, sometimes not... Of course I have checked that my references are correct and they are. I have no clue why the bibliography looks so random.

Thank you very much in advance for your help and greetings from sunny Berlin!

patrl commented 7 years ago

@NaoBerlin Fellow biblatex-sp-unified user here. It's sounds like there are some issues with your .bib file. Biblatex bibliographies are slightly different to bibtex bibliographies. It might help to consult the biblatex documentation: http://ctan.mackichan.com/macros/latex/contrib/biblatex/doc/biblatex.pdf, there are certain options you can pass to biblatex to either display the url or not, etc.

I'm also a Berlin-based linguist (and also writing up my dissertation!), so more than happy to meet and help work through latex issues in person, which might be easier. Just send me a message.

NaoBerlin commented 7 years ago

@patrl Thanks for the documentation! I couldn't find anything specifically related to my specific problems because I used the package available to download on this page and did not add any option myself... and normally, there are no mentions of the language in the Unified Style Sheet, which is why I'm surprised.

But let's meet over a coffee! :) Thanks for the offer.

adamliter commented 7 years ago

@NaoBerlin As @patrl says, the "problem" here is probably with your .bib file. The biblatex-sp-unified style is built in top of the default authoryear style in biblatex. By default, this style shows basically all of the information in the .bib file. So any information in your .bib file above and beyond what the Unified Style Guidelines actually call for will nonetheless show up.

Unfortunately, in some cases, the best solution is to remove the extra info from your .bib file. Depending on what the information is, there might be hooks that you can use to disable the displaying of that information as @patrl suggested, but this might not be true for all of the extra information you might have in your .bib file.

It's hard to say more without a concrete example, but hopefully @patrl can help. Otherwise I'm also happy to help more if you could provide a minimal example.

On May 18, 2017, at 08:20, NaoBerlin notifications@github.com wrote:

@patrl Thanks for the documentation! I couldn't find anything specifically related to my specific problems because I used the package available to download on this page and did not add any option myself... and normally, there are no mentions of the language in the Unified Style Sheet, which is why I'm surprised.

But let's meet over a coffee! :) Thanks for the offer.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

NaoBerlin commented 7 years ago

Hello @adamliter thank you! I appreciate your help. I provided two examples from the bibliography that do not display properly: 1) Language ("de" here) and the Google Book ID: Adamzik, Kirsten. 2004. Textlinguistik. Eine einführende Darstellung. de. Google-Books- ID: ioImMNMzCjAC. Tübingen: Max Niemeyer Verlag. 2) Pages missing in a book chapter reference: Amossy, Ruth. 2002b. Ethos. Patrick Charaudeau & Dominique. Maingueneau (eds.). Paris.

I cannot provide other examples right now since I recompiled the document according to natbib.

Finally, this type of citation (as it appears in the LaTeX file, e.g. in the text) is not compiled by the PDF file: (\citealp[2]{grunert_untersuchungen_1974}, quoted by \citealp[4]{feldman_introduction_1998}). I assume I need to define a new command in the main file (it was not necessary with natbib, though) but I am fully unable to create a new command at this stage.

I keep in mind this solution: "Unfortunately, in some cases, the best solution is to remove the extra info from your .bib file.", but it would be very time-consuming, since I have over 3000 references (maybe not in my thesis, but in Zotero for sure). I will begin to delete extra info little by little ;)

alecshaw commented 7 years ago

@NaoBerlin I'm glad that some of the earlier suggestions have helped.

Perhaps @adamliter and @patrl have a better method for accomplishing this, but based on (\citealp[2]{grunert_untersuchungen_1974}, quoted by \citealp[4]{feldman_introduction_1998}), I think what you want is something like:

... (Grunert 1974: 2, quoted by Feldman 1998: 4).

To my mind, the best solution I can come up with straight away is: (\cite[2]{grunert_untersuchungen_1974}, quoted by \cite[4]{feldman_introduction_1998})

Alternatively, you can include the natbib package option to load the natbib compatibility mode with BibLaTeX (see section 3.8.9 in the BibLaTeX manual):

\usepackage[backend=biber,
            bibstyle=biblatex-sp-unified,
            citestyle=sp-authoryear-comp,
            maxcitenames=3,
            maxbibnames=99,
            natbib]{biblatex}

Apparently, \citealp is a natbib command which does not include parentheses. So \citealp{grunert_untersuchungen_1974} should produce:

Grunert et al., 1974

I don't recommend this, as the Unified Stylesheet does not set in-text citations with a comma between the authors and the year.

As for the entries you want to fix, as @patrl and @adamliter have mentioned, I would recommend the following (this is how I would include them in the .bib file):

@book{adamzik:04,
  author = {Kirsten Adamzik},
  title = {Textlinguistik},
  subtitle = {Eine einführende {Darstellung}},
  date = {2004},
  series = {Germanistische Arbeitshefte},
  publisher = {De Gruyter},
  location = {Berlin}
}
@incollection{amossy:02,
  author = {Ruth Amossy},
  title = {Ethos},
  date = {2002},
  booktitle = {Dictionnaire d'analyse du discours},
  editor = {Patrick Charaudeau and Dominique Maingueneau},
  pages = {<appropriate pages>},
  publisher = {Seuil},
  location = {Paris}
}

Okay, this is longer than I had wanted it to be, but short of manually editing your entries, you can do this to stop certain fields from being printed (from https://tex.stackexchange.com/questions/208441/suppress-the-note-field-using-biblatex#208447):

[EDIT] Alright, I was playing around with using the above to try and suppress the language field, but it didn't work for me. I'll try and get back to it this weekend.

NaoBerlin commented 7 years ago

Hello everyone! Thank you very much for your help.

About the command that is not recognized with the Unified Style Sheet: with natbib, it gives something like that when the document is compiled: (McEnery andWilson, 1996, p. 1; quoted by Baker, 2006, p. 1). "... (Grunert 1974: 2, quoted by Feldman 1998: 4)": this is what I want, @alecshaw! :)

The first solution you suggested (replace it with \citet) appears complicated at this stage because I have already written about 100 pages and I would rather add a new command than change all the references. Or I can just look for \citeealp and replace it by \citet and now use \citet exclusively.

You're right to say that \citealp is a natbib command which does not include parentheses, so I will not consider the second option since you think it might cause conflicts with the Unified Style Sheet.

About the references: maybe I should precise that the references are exported from Zotero with BetterBibTex. I never change the references manually in the .bib file (I might do it in Zotero though and then upload the corrected .bib file). I actually thought it was the point with LaTeX: avoiding repetitive tasks and layout problems! So I am really surprised if the best solution is to correct the references manually.

This is how the first reference looks like in my .bib file:

@book{adamzik_textlinguistik._2004, address = {T{\"u}bingen}, title = {{Textlinguistik. Eine einf{\"u}hrende Darstellung}}, isbn = {978-3-11-094664-2}, shorttitle = {{Textlinguistik}}, abstract = {Seit dem Entstehen der modernen Textlinguistik in den 1960er Jahren ist eine Vielzahl z.T. hoch spezialisierter Analyseans{\"a}tze in diesem Bereich entwickelt worden, die auch in diversen Einf{\"u}hrungen schon aufbereitet worden sind. Anliegen dieses Arbeitsheftes ist es, Grundlagen linguistischer Textanalyse vorzustellen, wie sie insbesondere Studierende philologischer F{\"a}cher bei der Analyse literarischer und anspruchsvoller Sachtexte ben{\"o}tigen. Textlinguistik wird dabei nicht als eine Sonderdisziplin der Sprachwissenschaft aufgefa{\ss}t, die sich nur mit der "obersten" Beschreibungsebene befa{\ss}t, sondern im Sinne der von Peter Hartmann konzipierten "verwendungsorientierten Sprachwissenschaft". Besonderer Wert wird darauf gelegt, die "neue" Textlinguistik auch in die Tradition fr{\"u}herer Bem{\"u}hungen um den Gegenstand einzuordnen (Rhetorik, Hermeneutik, Literaturwissenschaft, vorstrukturalistische Grammatik). Das Schwergewicht der Darstellung liegt auf der mit vielen Beispielen angereicherten Erl{\"a}uterung der vier zentralen Beschreibungsdimensionen: situativer Kontext, Funktion, Thema, sprachliche Gestalt. Hier werden nicht nur die den Textzusammenhalt gew{\"a}hrleistenden Koh{\"a}sionsmittel besprochen, sondern die Gesamtheit der sprachlichen Mittel, v.a. auf der Ebene von Lexik und Grammatik. Ziel ist es, die Verbindung zwischen Variationslinguistik und Textlinguistik zu verdeutlichen: Zu den Aufgaben der letzteren geh{\"o}rt es, die Soll- und Ist-Normen von Variet{\"a}ten und Textsorten zu beschreiben.}, language = {de}, timestamp = {2016-12-28T11:28:16Z}, publisher = {{Max Niemeyer Verlag}}, author = {Adamzik, Kirsten}, year = {2004}, note = {Google-Books-ID: ioImMNMzCjAC}, keywords = {Foreign Language Study / German,Language Arts \& Disciplines / Linguistics / General}, groups = {GENRE \& TEXT LINGUISTICS} }

NB: The key is created automatically by Zotero.

Moreover, this still does not explain why some correct references are not properly displayed according to the standards of the Unified Style Sheet, as for instance:

@misc{amossy_ethos_2002, address = {Paris}, title = {Ethos}, timestamp = {2017-02-01T13:24:57Z}, journal = {Dictionnaire d'Analyse du Discours}, publisher = {{Seuil}}, author = {Amossy, Ruth}, editor = {Charaudeau, Patrick and Maingueneau, Dominique.}, year = {2002}, pages = {238--240}, groups = {ETHOS \& FOOTING \& STANCE} }

As you can see, the pages are indicated but in the bibliography, there are missing even though they are expected according to the Unified Style Sheet:

Pages missing in a book chapter reference: Amossy, Ruth. 2002b. Ethos. Patrick Charaudeau & Dominique. Maingueneau (eds.). Paris.

For now these two problems make the Unified Style Sheet impossible for me to use. I could consider taking some extra time to avoid \citealp references (even though I would very much appreciate not having to do it by inserting a new natbib command in the main file without having problems with commas), but I certainly don't understand why the pages are not displayed in some references (idem with doi, url... the bibliography was really not good!).

Sorry for the long post! I hope I am clear. As you know, I am still new to LaTeX and I hope I use words understandable by the community. Otherwise just ask! :)

NaoBerlin commented 7 years ago

@alecshaw @adamliter @patrl PS: Still struggling to understand the difference between Biblatex bibliographies and bibtex bibliographies and which one I am actually using (without even knowing it), but I will take time this week-end to go through the documentation. So sorry if my questions are irrelevant because of that!

alecshaw commented 7 years ago

Hi again, The thing that immediately jumps out at me for the second entry which does not display the page range is the entry type @misc. Given the text source, it should be @incollection. To fix this in Zotero, I believe you change "Item type" to "Book section", but I don't use Zotero to make .bib files.

Personally, I believe there's a lot of value in writing your own .bib files.

Just changing @misc to @incollection won't solve all of your problems, however. Here is how the entry is set by changing the entry type.

@incollection{amossy_ethos_2002,
  address = {Paris},
  title = {Ethos},
  timestamp = {2017-02-01T13:24:57Z},
  journal = {Dictionnaire d'Analyse du Discours},
  publisher = {{Seuil}},
  author = {Amossy, Ruth},
  editor = {Charaudeau, Patrick and Maingueneau, Dominique.},
  year = {2002},
  pages = {238--240},
  groups = {ETHOS & FOOTING & STANCE}
}

screen shot 2017-05-19 at 13 48 46

Okay, we get a page range. However, the editors look wrong, and where's the book title? So I would change a few things:

  1. journal to booktitle
  2. The ordering of the editor and author fields. Also removing the final period in the editor field.

So now:

@incollection{amossy_ethos_2002,
  address = {Paris},
  title = {Ethos},
  timestamp = {2017-02-01T13:24:57Z},
  booktitle = {Dictionnaire d'Analyse du Discours},
  publisher = {{Seuil}},
  author = {Ruth Amossy},
  editor = {Patrick Charaudeau and Dominique Maingueneau},
  year = {2002},
  pages = {238--240},
  groups = {ETHOS & FOOTING & STANCE}
}

screen shot 2017-05-19 at 13 52 19

Just a note: if you're only going through Zotero, don't worry about the curly brackets wrapping "Seuil" in the publisher field, but they aren't necessary, and I would have removed them.

Let's look at the second entry. As you provided it, here's what I see:

@book{adamzik_textlinguistik._2004,
  address = {T{+"u}bingen},
  title = {{Textlinguistik. Eine einf{"u}hrende Darstellung}},
  isbn = {978-3-11-094664-2},
  shorttitle = {{Textlinguistik}},
  language = {de},
  timestamp = {2016-12-28T11:28:16Z},
  publisher = {{Max Niemeyer Verlag}},
  author = {Adamzik, Kirsten},
  year = {2004},
  note = {Google-Books-ID: ioImMNMzCjAC},
  keywords = {Foreign Language Study / German,Language Arts & Disciplines / Linguistics / General},
  groups = {GENRE & TEXT LINGUISTICS}
}

screen shot 2017-05-19 at 13 56 43

As I would clean it up, in the .bib file:

@book{adamzik_textlinguistik._2004,
  address = {T{\"u}bingen},
  title = {Textlinguistik},
  subtitle = {Eine einf{\"u}hrende {Darstellung}},
  isbn = {978-3-11-094664-2},
  shorttitle = {Textlinguistik},
  timestamp = {2016-12-28T11:28:16Z},
  publisher = {Max Niemeyer Verlag},
  author = {Kirsten Adamzik},
  year = {2004},
  note = {Google-Books-ID: ioImMNMzCjAC},
  keywords = {Foreign Language Study / German,Language Arts & Disciplines / Linguistics / General},
  groups = {GENRE & TEXT LINGUISTICS}
}

screen shot 2017-05-19 at 14 06 46

In the main .tex file preamble, this suppresses the note field with the Google Books info.

\AtEveryBibitem{
  \clearfield{note}
}

As for the commands, I recommend search & replace of your \citealp commands with the BibLaTeX command \cite, not the \citet command.

BibLaTeX is what you're using with the Unified Stylesheet. Certain commands are backwards compatible with BibTeX which preceded BibLaTeX (the address and year entry fields, for example).

NaoBerlin commented 7 years ago

@alecshaw Thank you very much! I will try this week-end. I am just a little bit confused: Are you suggesting that I should manually correct the reference in the .bib file?

I believe there's a lot of value in writing your own .bib files.

I do not deny this might better to write the .bib files in general. But as I said, I have over 3000 references and I have been working with Zotero for years, which I really like (all my annotations are inside, so it's not just about the references). Thus, I cannot imagine to correct all the references manually during the writing process, which moreover will certainly cause more problems than solutions (because I will certainly make mistakes while Zotero does not). The example I provided is only one example among many. I still hope there is another solution.

The \clearfield idea is a good idea, thank you! I will try as well.

alecshaw commented 7 years ago

I think that it is best to check what the type of each entry is in Zotero and change it from Miscellaneous to something else to see if this fixes your problem.

In the case of individual entries that don't appear as you want them, if you're not able to get Zotero to format them the way you would like, I recommend manually editing just those entries giving you trouble, and not all 3000 entries.

chbrown commented 6 years ago

95fb52c incorporates most of the generally-applicable advice from this thread into the README.

Thanks to everyone for chipping in and helping @NaoBerlin!