How to add name in bib file in latex - latex

I have a name like Catherine de Palo Drid . I want its reference like
Drid C de P
I add like that
author={Drid, Catherine, de, Palo}
I have changed many times the arrangement, but neither works.
Can anyone help?
THANKS

From the BibTeX documentation (btxdoc.pdf, p. 15/16):
Each name consists of four parts: First, von, Last, and Jr;
BibTeX allows three possible forms for the name:
"First von Last"
"von Last, First"
"von Last, Jr, First"
You want to treat "Catherine de Palo" as First and "Drid" as Last, since abbreviating names is only done in First. In that case I would use
author = {Drid, Catherine {de} Palo}
where the braces around "de" tell BibTeX to not alter that token.

Related

Incorrect translations when implementing pluralization in ICU message format. I'm using react-intl (format.js)

It seems like using pluralization in ICU message format is not dependable when combined with static text.
Take the following example:
Please see the {itemCount, plural,
one {message}
other {messages}
} in your inbox.
In Spanish, the word "the" changes depending on whether or not it's plural. The correct translations in Spanish should be:
one: "Por favor vea el mensaje en su bandeja de entrada"
other: "Por favor vea los mensajes en su bandeja de entrada"
The way to solve this would be to include "the" in the conditional.
Developers are obviously not going to be fluent in every language their app supports. If you don't speak Spanish, you wouldn't know to include "the" in the conditional.
It seems irresponsible to allow this type of syntax. Format.js even promotes using pluralization like this in their examples: https://formatjs.io/docs/core-concepts/icu-syntax/#plural-format
It seems to me that an error should be thrown when attempting to combine static text with dynamic plural text. The entire sentence should be required in the conditional.
My question is: Am I missing something? Should I prohibit my developers from entering values like this?
I can't be the first person that noticed this. Is there a way to enforce this through a setting in Format.js?
Looking at the documentation it looks as though your confusing the {selectordinal} with the message.
By way of an example the Spanish format based on what you have provided would be:
Por favor vea {itemCount, plural,
one {el mensaje}
other {los mensajes}
} en su bandeja de entrada.
Even so that is a relatively simple example as you may also have additional words later in the sentence affected by ordinal number, gender, or both so you may have to have multiple arguments in the sentence.
Declension is quite the fun linguistic topic for developers to get their heads around.
Edit: To add to this, that would give you something like:
const messages = {
en: {
INBOX: 'Please see the {itemCount, plural,
one {message}
other {messages}
} in your inbox.',
},
es: {
INBOX: 'Por favor vea {itemCount, plural,
one {el mensaje}
other {los mensajes}
} en su bandeja de entrada.',
},
}
So for the Spanish it is necessary to move the 'the' into the argument, but not for the English. It is really down to the syntax and the person creating localised messages to utilise that syntax for whatever gendered or ordinal conditions they need to be aware of.

Mendeley-Overleaf Double Brace Issue

I am not sure if this is the appropriate place for this post, please let me know if I should post this somewhere else.
So I am using Overleaf and Mendeley to write my paper. I am using the online version of Mendeley and I sync my references into Overleaf mostly without any issues. But some of the references generated have double an extra set of {}, an example of this is given below:
#incollection{Alberts2002TheProtein,
title = {{The shape and structure of protein}},
year = {2002},
booktitle = { Molecular Biology of the Cell},
author = {Alberts, Bruce and Johnson, Alexander and Lewis, Julian and Raff, Martin and Roberts, Keith and Walter, Peter},
edition = {4},
month = {3},
volume = {},
publisher = {Garland Science}}
As you can see in the title attribute an extra set of parentheses was added by Mendeley. Whenever this happens I get a warning from Overleaf stating BibTeX: "{Essential" isn't a brace-balanced string for entry Alberts2010EssentialBiology. This happens only for a few of my references.
Since I am syncing my references to Overleaf I can't edit the .bib file in Overleaf and remove the extra set of parenthesis. Is there any way to remove it directly on the Mendeley website? Or set a style or preference?
I know I can download my references and then add them to a file and upload that file to Overleaf, I am trying to find a better alternative. Thank you for reading this.
Edit: Reproducible Example, you can add the following details on Mendeley and then try to get the BibTex citation code:
Type: Book Section
Book Title: Molecular Biology of the Cell
Title: The shape and structure of protein
Authors: (Last name, First name)
1. Alberts, Bruce
2. Johnson, Alexander
3. Lewis, Julian
4. Raff, Martin
5. Roberts, Keith
6. Walter, Peter
Edition: 4
Month:3
Publisher: Garland Science
Year =2002
I get the code I have posted above with two parentheses around title.
Edit: Removing the extra Pair of parenthesis resolves the warning.

Rails 5: 'humanize' phrases that start with an accented character doesn't capitalize them

Localization is working fine, as per the official documentation. However I have found that Rails' humanize method doesn't correctly capitalize the first character of a sentence if it's accented.
For example, if I have in config/locales/fr.yml:
fr:
about_me: "à propos de moi"
... and in the view:
<%= t("about_me").humanize %>
... the output in the browser is
à propos de moi
... whereas it should be
A propos de moi
If I change the à to a, humanize works as expected.
Note that in French accents on capital letters are sometimes omitted but let's leave that aside. I'd be happy with:
À propos de moi
Do I just need to hardcode the capital letters in the YAML files to work around this? Naturally I'd prefer not to resort to this.
I'd recommend doing it in the YAML, capitalization depends on the language and the context; for example, German capitalizes all nouns but English only capitalizes proper nouns and the accent issue in French that you're already aware of, the relationship between ß and SS in German, etc. Getting things right though simple-minded string manipulation is very error prone. You're better off treating human-readable strings as opaque and immutable pieces of data that you pull out of your I18N/L10N string database and give to the user as-is.
This is more work but being correct is sort of important.

Extracting text from APA citation

I have a spreadsheet containing APA citation style text and I want to split them into author(s), date, and title.
An example of a citation would be:
Parikka, J. (2010). Insect Media: An Archaeology of Animals and Technology. Minneapolis: Univ Of Minnesota Press.
Given this string is in field I2 I managed to do the following:
Name: =LEFT(I2, FIND("(", I2)-1) yields Parikka, J.
Date: =MID(I2,FIND("(",I2)+1,FIND(")",I2)-FIND("(",I2)-1) yields 2010
However, I am stuck at extracting the name of the title Insect Media: An Archaeology of Animals and Technology.
My current formula =MID(I2,FIND(").",I2)+2,FIND(").",I2)-FIND(".",I2)) only returns the title partially - the output should show every character between ).and the following ..
I tried =REGEXEXTRACT(I2, "\)\.\s(.*[^\.])\.\s" ) and this generally works but does not stop at the first ". " - Like with this example:
Sanders, E. B.-N., Brandt, E., & Binder, T. (2010). A framework for organizing the tools and techniques of participatory design. In Proceedings of the 11th biennial participatory design conference (pp. 195–198). ACM. Retrieved from http://dl.acm.org/citation.cfm?id=1900476
Where is the mistake?
The title can be found (in the two examples you've given, at least) with this:
=MID(I2,find("). ",I2)+3,find(". ",I2,find("). ",I2)+3)-(find("). ",I2)+3)+1)
In English: Get the substring starting after the first occurrence of )., up to and including the first occurrence of . following.
If you wish to use REGEXEXTRACT, then this works (on your two examples). (You can also see a Regex101 demo.):
=REGEXEXTRACT(I3,"(?:.*\(\d{4}\)\.\s)([^.]*\.)(?: .*)")
Where is the mistake?
In your expression, you were capturing (.*[^\.]), which greedily includes any number of characters followed by a character in the character class not (backslash or dot), which means that multiple sentences can be captured. The expression finished with \.\s, which wasn't captured, so the capture group would end before a period-then-space, rather than including it.
Try:
=split(SUBSTITUTE(SUBSTITUTE(I2, "(",""), ")", ""),".")
If you don't replace the parentheses around 2010, it thinks it is a negative number -2010.
For your Title try adding index split to your existing formula:
=index(split(REGEXEXTRACT(A5, "\)\.\s(.*[^\.])\.\s" ),"."),0,1)&"."

Titleize with roman numerals, dashes, apostrophes, etc. in Ruby on Rails

I'm simply trying to convert uppercased company names into proper names.
Company names can include:
Dashes
Apostrophes
Roman Numerals
Text like LLC, LP, INC which should stay uppercase.
I thought I might be able to use acronyms like this:
ACRONYMS = %W( LP III IV VI VII VIII IX GI)
ActiveSupport::Inflector.inflections(:en) do |inflect|
ACRONYMS.each { |a| inflect.acronym(a) }
end
However, the conversion does not take into account word breaks, so having VI and VII does not work. For example, the conversion of "ADVISORS".titleize is "Ad VI Sors", as the VI becomes a whole word.
Dashes get removed.
It seems like there should be a generic gem for this generic problem, but I didn't find one. Is this problem really not that common? What's the best solution besides completely hacking the current inflection library?
Company names are a little odd, since a lot of times they're Marks (as in Service Mark) more than proper names. That means precise capitalization might actually matter, and trying to titleize might not be worth it.
In any case, here's a pattern that might work. Build your list of tokens to "keep", then manually split the string up and titleize the non-token parts.
# Make sure you put long strings before short (VII before VI)
word_tokens = %w{VII VI IX XI}
# Special characters need to be separate, since they never appear as "part" of another word
special_tokens = %w{-}
# Builds a regex like /(\bVII\b|\bVI\b|-|)/ that wraps "word tokens" in a word boundary check
token_regex = /(#{word_tokens.map{|t| /\b#{t}\b/}.join("|")}|#{special_tokens.join("|")})/
title = "ADVISORS-XI"
title.split(token_regex).map{|s| s =~ token_regex ? s : s.titleize}.join

Resources