Capital in Bibtex - latex

I want to show some letters in Bibliography as capital. For example:
#misc{libsvm,
abstract = {LIBSVM is an implbmentation of Support vector machine (SVM).},
author = {Chang, Chih-Chung},
howpublished = {\url{http://www.csie.ntu.edu.tw/~cjlin/libsvm/}},
keywords = {svm},
posted-at = {2010-04-08 00:05:04},
priority = {2},
title = {LIBSVM.},
url = "http://www.csie.ntu.edu.tw/~cjlin/libsvm/",
year = {2008}
}
But "LIBSVM" is not shown as it is:
[3] Chih-Chung Chang. Libsvm. http://www.csie.ntu.edu.tw/ ̃cjlin/libsvm/,
2008.
How can I make the letters capital? Thanks and regards!

Generally, to keep BibTeX from turning your letters lowercase, enclose them in {}:
title = {A History Of {StudlyCaps}}
will produce "A history of StudlyCaps."
Alceu Costa is correct that all-capital abbreviations should be formatted in small capitals, but that is a different matter than this.

The \textsc is used to format the text in small capitals. You can do this in your .bib file:
title = {\textsc{LIBSVM}}

Place {} brackets around anything you want to keep in CAPS.
For example:
#type{bibkey,
title = "{M}y {B}ibliography is the {B}est!",
author = "{ABCDE}",
}

In the case of IEEEtran LaTeX Class template, one can simply do the following:
title = "{3D Open Source Framework for Something you need}"
A template can be found at the following link
http://www.ieee.org/conferences_events/conferences/publishing/templates.html

Related

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.

How could I get an editor to align vertically by a single character in selected text?

Let's say I've got a document (it happens to be a BibTeX file) filled with thousands of entries like this:
#article{hierarchy_problem_1,
title = {Dynamics of spontaneous symmetry breaking in the Weinberg-Salam theory},
author = {Susskind, Leonard},
journal = {Physical Review D},
volume = {20},
number = {10},
pages = {2619--2625},
year = {1979},
month = {November},
publisher = {American Physical Society}
}
I want to be able to select one of those, or maybe a bunch of them, and get them to change to be aligned vertically by a single character, in this case the "=" character, so it becomes something like this:
#article{hierarchy_problem_1,
title = {Dynamics of spontaneous symmetry breaking in the Weinberg-Salam theory},
author = {Susskind, Leonard},
journal = {Physical Review D},
volume = {20},
number = {10},
pages = {2619--2625},
year = {1979},
month = {November},
publisher = {American Physical Society}
}
My editor of choice is Geany just now (which has the facility to send selected text to some external, custom command -- context menu > Format > Send Selection to) but I will entertain anything. Bearing in mind that some titles of the papers can contain the "=" character, what might be a good way to do this? I would suspect at least that the "=" character in a line after some text like "journal", would be the first instance of that character, and then it gets spaces (I'd prefer to avoid tabs) added before it in order for it to end up at, say, the 30th column. What might be some way to do this?
Maybe a shell/regex expert can build a script used in a custom command.
Personally, in your situation I will :
Set tabulation to <tab> in the document
search & replace = by <tab><tab><tab><…>=
Adjust distance with a vertical selection (need the plugin Extra Selection).
Notepad++ has an align to clipboard character.

Titanic: Machine Learning from Disaster

Define function to extract titles from passenger names
def get_title(name):
title_search = re.search(' ([A-Za-z]+)\.', name)
# If the title exists, extract and return it.
if title_search:
return title_search.group(1)
return ""
title_search = re.search(' ([A-Za-z]+)\.', name) What does this mean?
The titanic dataset has names of the passenger like: Graham, Miss. Margaret Edith and Behr, Mr. Karl Howell
The titles here are Mr. and Miss.
title_search = re.search(' ([A-Za-z]+).', name)
The above line of code searches for names having titles. Mr. and Miss. are not the only ones, it could also be for example, Dr., Prof. and so on. Since we do not know before hand what are the titles but we know the pattern, which is 'alphabets followed by a period', we look for those words alone.
([A-Za-z]+). means, look for any word that starts with A-Z or a-z and end with a fullstop.
I suggest you read about regular expressions.

How to Remove a not - html tag - CID

Given text like:
This is my reply. This is paragraph one.
This is paragraph two. Capture everything before me as this is the last sentence.
[cid:0BE7856F-9507-4AEA-854D-C01A6CFAF15F]
[cid:1DA3C231-846D-4490-9458-04A2484F4294]
[cid:33225087-994A-4FAF-B74D-5D56F334F29D]
What's the best way to remove the cid tags, resulting in just:
This is my reply. This is paragraph one.
This is paragraph two. Capture everything before me as this is the last sentence.
If you want to catch that very specific format you'd do:
regex = /\[cid:[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\]/
body[0..(body =~ regex).to_i-1]
If you want to loosen it up a little you'd do:
body[0..(body =~ /\[cid:/).to_i-1]
If you aren't sure there will be content before the [cid declaration then you should pull it out and do this:
regex = # choose your expression
test = body =~ regex
body[0..(test.nil? ? -1 : test - 1)]

How to preserve quotes in BibTeX

I'm new to LaTeX and BibTeX, so excuse my ignorance. I have the following entry:
#Article{Hart,
author = {P.E. Hart, N.J. Nilsson, B. Raphael},
title = {Correction to \"A Formal Basis for the Heuristic Determination of Minimum Cost Paths\" },
journal = {SIGART Newsletter 37},
year = {1972},
pages = {28-29}
}
But this comes out as a capital letter A with diaeresis (Ä) and a ':', respectively. How do you get BibTeX to display quotes in a title?
First, quotes should be done like ``this'' (with back-ticks and apostrophes). Second, wrapping this in braces {like this} protects it from being messed with by bibtex. (You need to do this to get capital letters in article titles, for instance.

Resources