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

Support romanization #29

Open
solonovamax opened this issue May 11, 2021 · 2 comments
Open

Support romanization #29

solonovamax opened this issue May 11, 2021 · 2 comments

Comments

@solonovamax
Copy link

solonovamax commented May 11, 2021

Sometimes you're in a situation where you need to cite sources that use non-roman characters in the names.
For example, I had to do an essay citing a few anime episodes a while ago.
According to the MLA standard (found online here), the correct way to stylize names is as follows:

  • In text, it must use one of the following three formats: (Note: items in italics must be italicized)

    • [transliteration] ([original characters]; "[translation]")
    • [original characters] ([transliteration]; "[translation]")
    • [translation] ([original characters]; [transliteration])
  • And when used in the bibliography, it must fit the following style:

    • [original characters] ([transliteration]; [translation])

This applies to all names:

  • series names
  • work names
  • author names
  • etc.

All this information can be verified here at the official MLA website.


I made a hacky script that does this for the project I had to use it for, and thought it might be useful. The code isn't the best,
because latex is an arcane language to work in, but whatever. Here are some examples of the output:

image
image

Honestly, the whole thing is very scuffed. I just thought I'd share it since it might be useful to some other people. No guarantees that it works, I just know that it worked for my 2 essays. (I just tinkered with it until I made it work)

In the file it says that it is under the MIT license, but (if anyone chooses to), I hereby give permission to relicense the code under the LPPL to anyone.

Here are my very scuffed romanized MLA files: romanisedmla.zip

@jmclawson
Copy link
Owner

jmclawson commented May 11, 2021

This is interesting and may be useful for people. Thanks for sharing it!

From my reading of the MLA page you've referenced, these rules should only apply to words and titles:

Note that we provide not the original script but only a transliteration for the name of a person or publisher.

Since Biblatex and Biber already support UTF8, I've taken some time this afternoon to clean up implementation of the "titleaddon" and "booktitleaddon" field to accommodate bracketed notation like what's shown on the MLA website you've linked. Unfortunately, their website renders poorly in Safari (and perhaps other browsers), and it shows some significant disagreement with references in the original PMLA article that uses these sources (link); additionally, the article seems to have its own inconsistencies in its Tolstoy sources, so I've made do with a little reverse engineering and tracking down of bibliographic details for potentially original sources.

Here's where I now am in what will be the next version of Biblatex-MLA, coming shortly.:
Screen Shot 2021-05-11 at 6 02 21 PM

The necessary documentation in .bib form is a little bit of a mess with its proliferation of brackets and emphasis, but there's discernible logic to it, along with flexibility for other use cases:

@bookinbook{tolstoy:kreutzer,
  author     = {Tolstoy, Leo},
  title      = {Крейцерова соната},
  titleaddon = {\mkbibbrackets{Kreĭtserova sonata; \emph{Kreutzer Sonata}}},
  shorttitle = {Крейцерова \emph{\mkbibbrackets{\emph{Kreutzer}}}},
  volume     = {27},
  pages      = {5-78},
  crossref   = {tolstoy:complete},
}

@incollection{tolstoy:readers,
  author     = {Tolstoy, Leo},
  title      = {К читателям},
  titleaddon = {\mkbibbrackets{K chitateliam; To Readers}},
  shorttitle = {К читателям \mkbibbrackets{To Readers}},
  volume     = {1},
  pages      = {207-209},
  crossref   = {tolstoy:complete},
}

@book{tolstoy:complete,
  author     = {Tolstoy, Leo},
  title      = {Лев Толстой: Полное cобрание cочинений},
  titleaddon = {\mkbibbrackets{Lev Tolstoĭ: Polnoe sobranie sochineniĭ; \emph{Leo Tolstoy: Complete Collected Works}}},
  shorttitle = {Лев Толстой \emph{\mkbibbrackets{Lev Tolstoĭ; \emph{Leo Tolstoy}}}},
  langid     = {other},
  volumes    = {90},
  publisher  = {Khudozhestvennaya Literatura},
  date       = {1928/1958}
}

In this example, I've avoided the addition of italics to the transliteration, because the MLA explanation isn't clear how this formatting should apply to bibliographic entries, which often have their own formatting for titles. Luckily for me, biblatex-mla leaves it up to the user to handle formatting matters in the titleaddon field.

I know my reply doesn't relate to romanization specifically, but I'm nevertheless grateful for the push to look more closely at sources in different character sets. Thank you!

@solonovamax
Copy link
Author

From my reading of the MLA page you've referenced, these rules should only apply to words and titles:

Yeah, since names technically™ can't be translated into another language, all you can do is provide a transliteration. That was what I did in my bib file. (Though, it seems I did include the code for an english name. But that's probably just because I was copy & pasting it lol)

Since Biblatex and Biber already support UTF8, I've taken some time this afternoon to clean up implementation of the "titleaddon" and "booktitleaddon" field to accommodate bracketed notation like what's shown on the MLA website you've linked. Unfortunately, their website renders poorly in Safari (and perhaps other browsers), and it shows some significant disagreement with references in the original PMLA article that uses these sources (link); additionally, the article seems to have its own inconsistencies in its Tolstoy sources, so I've made do with a little reverse engineering and tracking down of bibliographic details for potentially original sources.

this is WAY out of my scope LMAO

I just kinda read like 3 web pages on this and wrote my shitty code lol.


Also, the one thing I never manage to get working was multiple authors.

Because if you were to have multiple authors, it should style it like this:

author [author_romanized], author2 [author2_romanized], and author3 [author3_romanized], etc.

I'm not experienced enough in latex to do logic like that (god, why is it so hard to do a even a for loop in latex???), so I just decided not to do it.

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

No branches or pull requests

2 participants