diff options
| -rw-r--r-- | example-config.toml | 3 | ||||
| -rw-r--r-- | files/bibiman.toml | 3 | ||||
| -rw-r--r-- | src/app.rs | 5 | ||||
| -rw-r--r-- | src/bibiman.rs | 56 | ||||
| -rw-r--r-- | src/bibiman/bibisetup.rs | 2 | ||||
| -rw-r--r-- | src/cliargs.rs | 6 | ||||
| -rw-r--r-- | src/config.rs | 15 | ||||
| -rw-r--r-- | src/main.rs | 8 | ||||
| -rw-r--r-- | src/tui/ui.rs | 30 | ||||
| -rw-r--r-- | tests/biblatex-test.bib | 662 |
10 files changed, 450 insertions, 340 deletions
diff --git a/example-config.toml b/example-config.toml new file mode 100644 index 0000000..8a4aef6 --- /dev/null +++ b/example-config.toml @@ -0,0 +1,3 @@ +[general] +bibfiles = ["./tests/biblatex-test.bib"] +editor = "vi" diff --git a/files/bibiman.toml b/files/bibiman.toml deleted file mode 100644 index e24b597..0000000 --- a/files/bibiman.toml +++ /dev/null @@ -1,3 +0,0 @@ -[general] -bibfiles = ["../tests/biblatex-test.bib"] -editor = "vi" @@ -16,6 +16,7 @@ ///// use crate::bibiman::{CurrentArea, FormerArea}; +use crate::config::BibiConfig; use color_eyre::eyre::{Context, Ok, Result}; // use super::Event; use crate::cliargs::CLIArgs; @@ -46,11 +47,11 @@ pub struct App { impl App { // Constructs a new instance of [`App`]. - pub fn new(args: &CLIArgs) -> Result<Self> { + pub fn new(args: &mut CLIArgs, cfg: &mut BibiConfig) -> Result<Self> { // Self::default() let running = true; let input = Input::default(); - let bibiman = Bibiman::new(args)?; + let bibiman = Bibiman::new(args, cfg)?; Ok(Self { running, bibiman, diff --git a/src/bibiman.rs b/src/bibiman.rs index 71288ce..6aa138d 100644 --- a/src/bibiman.rs +++ b/src/bibiman.rs @@ -15,12 +15,13 @@ // along with this program. If not, see <https://www.gnu.org/licenses/>. ///// -use crate::app; use crate::bibiman::entries::EntryTableColumn; use crate::bibiman::{bibisetup::*, search::BibiSearch}; use crate::cliargs::CLIArgs; +use crate::config::BibiConfig; use crate::tui::popup::{PopupArea, PopupKind}; use crate::tui::Tui; +use crate::{app, cliargs}; use crate::{bibiman::entries::EntryTable, bibiman::keywords::TagList}; use arboard::Clipboard; use color_eyre::eyre::Result; @@ -61,7 +62,7 @@ pub enum FormerArea { #[derive(Debug)] pub struct Bibiman { // main bib file - // pub main_bibfiles: Vec<PathBuf>, + pub main_bibfiles: Vec<PathBuf>, // main bibliography pub main_biblio: BibiSetup, // search struct: @@ -82,15 +83,17 @@ pub struct Bibiman { impl Bibiman { // Constructs a new instance of [`App`]. - pub fn new(args: &CLIArgs) -> Result<Self> { - // let main_bibfiles = args.fileargs.clone(); - let main_biblio = BibiSetup::new(&args.files); + pub fn new(args: &mut CLIArgs, cfg: &mut BibiConfig) -> Result<Self> { + let mut main_bibfiles: Vec<PathBuf> = args.pos_args.clone(); + main_bibfiles.append(&mut cfg.general.bibfiles); + let main_bibfiles = cliargs::parse_files(main_bibfiles); + let main_biblio = BibiSetup::new(&main_bibfiles); let tag_list = TagList::new(main_biblio.keyword_list.clone()); let search_struct = BibiSearch::default(); let entry_table = EntryTable::new(main_biblio.entry_list.clone()); let current_area = CurrentArea::EntryArea; Ok(Self { - // main_bibfiles, + main_bibfiles, main_biblio, tag_list, search_struct, @@ -128,8 +131,8 @@ impl Bibiman { self.former_area = None; } - pub fn update_lists(&mut self, args: &CLIArgs) { - self.main_biblio = BibiSetup::new(&args.files); + pub fn update_lists(&mut self) { + self.main_biblio = BibiSetup::new(&self.main_bibfiles); self.tag_list = TagList::new(self.main_biblio.keyword_list.clone()); self.entry_table = EntryTable::new(self.main_biblio.entry_list.clone()); } @@ -338,17 +341,17 @@ impl Bibiman { // Check if multiple files were passed to bibiman and // return the correct file path - let filepath = if args.files.len() == 1 { - args.files.first().unwrap().as_os_str() + let filepath = if self.main_bibfiles.len() == 1 { + self.main_bibfiles.first().unwrap().as_os_str() } else { let mut idx = 0; - for f in &args.files { + for f in &self.main_bibfiles { if search::search_pattern_in_file(&citekey_pattern, &f).is_some() { break; } idx += 1; } - args.files[idx].as_os_str() + self.main_bibfiles[idx].as_os_str() }; let filecontent = fs::read_to_string(&filepath).unwrap(); @@ -391,7 +394,7 @@ impl Bibiman { tui.terminal.clear()?; // Update the database and the lists to show changes - Self::update_lists(self, args); + Self::update_lists(self); // Select entry which was selected before entering editor self.select_entry_by_citekey(citekey); @@ -431,7 +434,7 @@ impl Bibiman { .expect("Couldn't parse fetched entry into string"); self.popup_area.popup_sel_item = entry; self.popup_area.popup_kind = Some(PopupKind::AppendToFile); - self.append_to_file(args); + self.append_to_file(); self.former_area = Some(FormerArea::EntryArea); self.current_area = CurrentArea::PopupArea; self.popup_area.popup_state.select(Some(0)) @@ -441,14 +444,21 @@ impl Bibiman { } } - pub fn append_to_file(&mut self, args: &CLIArgs) { + pub fn append_to_file(&mut self) { let mut items = vec!["Create new file".to_owned()]; - if args.files.len() > 1 { - for f in args.files.clone() { + if self.main_bibfiles.len() > 1 { + for f in self.main_bibfiles.clone() { items.push(f.to_str().unwrap().to_owned()); } } else { - items.push(args.files.first().unwrap().to_str().unwrap().to_owned()); + items.push( + self.main_bibfiles + .first() + .unwrap() + .to_str() + .unwrap() + .to_owned(), + ); } self.popup_area.popup_selection(items); } @@ -472,8 +482,8 @@ impl Bibiman { let mut file = if self.popup_area.popup_list[popup_idx].contains("Create new file") { let citekey = PathBuf::from(&citekey); // Get path of current files - let path: PathBuf = if args.files[0].is_file() { - args.files[0].parent().unwrap().to_owned() + let path: PathBuf = if self.main_bibfiles[0].is_file() { + self.main_bibfiles[0].parent().unwrap().to_owned() } else { dirs::home_dir().unwrap() // home dir as fallback }; @@ -482,11 +492,11 @@ impl Bibiman { let newfile = path.join(citekey); - args.files.push(newfile.clone()); + self.main_bibfiles.push(newfile.clone()); File::create_new(newfile).unwrap() } else { - let file_path = &args.files[popup_idx - 1]; + let file_path = &self.main_bibfiles[popup_idx - 1]; // Check if similar citekey already exists let file_string = read_to_string(&file_path).unwrap(); @@ -522,7 +532,7 @@ impl Bibiman { // Write content to file file.write_all(self.popup_area.popup_sel_item.as_bytes())?; // Update the database and the lists to reflect the new content - self.update_lists(args); + self.update_lists(); self.close_popup(); // Select newly created entry diff --git a/src/bibiman/bibisetup.rs b/src/bibiman/bibisetup.rs index 21b3c4b..3f64d9c 100644 --- a/src/bibiman/bibisetup.rs +++ b/src/bibiman/bibisetup.rs @@ -144,7 +144,7 @@ impl BibiSetup { if main_bibfiles.is_empty() { println!( "{}", - "No bibfile passed as argument. Please select a valid file." + "No bibfile passed as argument or through config file. Please select a valid file." .red() .bold() ); diff --git a/src/cliargs.rs b/src/cliargs.rs index ecec93e..50ed6f5 100644 --- a/src/cliargs.rs +++ b/src/cliargs.rs @@ -31,7 +31,7 @@ pub struct CLIArgs { pub helparg: bool, pub versionarg: bool, pub pos_args: Vec<PathBuf>, - pub files: Vec<PathBuf>, + // pub files: Vec<PathBuf>, pub cfg_path: PathBuf, // INFO: AppColors struct later should be moved to config/app struct // when config file is implemented @@ -65,7 +65,7 @@ impl CLIArgs { } } - args.files = parse_files(args.pos_args.clone()); + // args.files = parse_files(args.pos_args.clone()); Ok(args) } @@ -74,7 +74,7 @@ impl CLIArgs { /// This function maps a vector containing paths to another vector containing paths. /// But it will walk all entries of the first vec which are directories /// and put only valid file paths with `.bib` ending to the resulting vec. -fn parse_files(args: Vec<PathBuf>) -> Vec<PathBuf> { +pub fn parse_files(args: Vec<PathBuf>) -> Vec<PathBuf> { let mut files: Vec<PathBuf> = Vec::new(); // If pos arg is file, just push it to path vec for i in args { diff --git a/src/config.rs b/src/config.rs index 2ef296a..a80cc13 100644 --- a/src/config.rs +++ b/src/config.rs @@ -30,16 +30,25 @@ pub struct BibiConfig { #[derive(Debug, Clone, Deserialize)] pub struct General { pub bibfiles: Vec<PathBuf>, - pub editor: String, + pub editor: Option<String>, } impl BibiConfig { - pub fn new(args: &mut CLIArgs) -> Result<Self, ConfigError> { + pub fn default(args: &CLIArgs) -> Self { + Self { + general: General { + bibfiles: args.pos_args.clone(), + editor: None, + }, + } + } + + pub fn new(args: &CLIArgs) -> Result<Self, ConfigError> { let mut cfg = config::Config::builder(); cfg = cfg.add_source( config::File::from(args.cfg_path.clone()) .format(FileFormat::Toml) - .required(true), + .required(false), ); cfg.build()?.try_deserialize() } diff --git a/src/main.rs b/src/main.rs index a0f69d1..94f5042 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,12 +45,16 @@ async fn main() -> Result<()> { std::process::exit(0); } - let cfg = BibiConfig::new(&mut parsed_args)?; + let mut cfg = if parsed_args.cfg_path.is_file() { + BibiConfig::new(&parsed_args)? + } else { + BibiConfig::default(&parsed_args) + }; init_error_hooks()?; // Create an application. - let mut app = App::new(&parsed_args)?; + let mut app = App::new(&mut parsed_args, &mut cfg)?; app.run(&mut parsed_args).await?; Ok(()) diff --git a/src/tui/ui.rs b/src/tui/ui.rs index d85f318..52d2d9a 100644 --- a/src/tui/ui.rs +++ b/src/tui/ui.rs @@ -410,27 +410,21 @@ pub fn render_file_info(app: &mut App, args: &CLIArgs, frame: &mut Frame, rect: .horizontal_margin(1) .areas(rect); - let file_info = if args.pos_args.len() == 1 && args.pos_args.first().unwrap().is_file() { + let file_info = if app.bibiman.main_bibfiles.len() == 1 + && app.bibiman.main_bibfiles.first().unwrap().is_file() + { Line::from(vec![ Span::raw("File: ") .fg(Color::Indexed(args.colors.main_text_color)) .bold(), - Span::raw(args.pos_args[0].file_name().unwrap().to_string_lossy()) - .fg(Color::Indexed(args.colors.main_text_color)) - .bold(), - ]) - .bg(Color::Indexed(args.colors.bar_bg_color)) - } else if args.pos_args.len() == 1 && args.pos_args.first().unwrap().is_dir() { - Line::from(vec![ - Span::raw("Directory: ") - .bold() - .fg(Color::Indexed(args.colors.main_text_color)), - Span::raw(args.pos_args[0].file_name().unwrap().to_string_lossy()) - .fg(Color::Indexed(args.colors.main_text_color)) - .bold(), - Span::raw("/*.bib") - .fg(Color::Indexed(args.colors.main_text_color)) - .bold(), + Span::raw( + app.bibiman.main_bibfiles[0] + .file_name() + .unwrap() + .to_string_lossy(), + ) + .fg(Color::Indexed(args.colors.main_text_color)) + .bold(), ]) .bg(Color::Indexed(args.colors.bar_bg_color)) } else { @@ -438,7 +432,7 @@ pub fn render_file_info(app: &mut App, args: &CLIArgs, frame: &mut Frame, rect: Span::raw("Multiple files (") .fg(Color::Indexed(args.colors.main_text_color)) .bold(), - Span::raw(count_files(&args.files).to_string()) + Span::raw(count_files(&app.bibiman.main_bibfiles).to_string()) .fg(Color::Indexed(args.colors.main_text_color)) .bold(), Span::raw(")") diff --git a/tests/biblatex-test.bib b/tests/biblatex-test.bib index d0fc0a6..0a1202e 100644 --- a/tests/biblatex-test.bib +++ b/tests/biblatex-test.bib @@ -1,378 +1,470 @@ @set{set, - entryset = {herrmann,aksin,yoon}, - annotation = {A \texttt{set} with three members.}, + entryset = {herrmann,aksin,yoon}, + annotation = {A \texttt{set} with three members.}, } @set{stdmodel, - entryset = {glashow,weinberg,salam}, - annotation = {A \texttt{set} with three members discussing the standard model of particle physics.}, + entryset = {glashow,weinberg,salam}, + annotation = {A \texttt{set} with three members discussing the standard + model of particle physics.}, } @collection{matuz:doody, - title = {Contemporary Literary Criticism}, - year = {1990}, - location = {Detroit}, - publisher = {Gale}, - volume = {61}, - pages = {204--208}, - editor = {Matuz, Roger and Miller, Helen}, - keywords = {narration}, - langid = {english}, - langidopts = {variant=american}, - annotation = {A \texttt{collection} entry providing the excerpt information for the \texttt{doody} entry. Note the format of the \texttt{pages} field}, + title = {Contemporary Literary Criticism}, + year = {1990}, + location = {Detroit}, + publisher = {Gale}, + volume = {61}, + pages = {204--208}, + editor = {Matuz, Roger and Miller, Helen}, + keywords = {narration}, + langid = {english}, + langidopts = {variant=american}, + annotation = {A \texttt{collection} entry providing the excerpt information + for the \texttt{doody} entry. Note the format of the \texttt{ + pages} field}, } @article{aksin, - title = {Effect of immobilization on catalytic characteristics of saturated {Pd-N}-heterocyclic carbenes in {Mizoroki-Heck} reactions}, - author = {Aks{\i}n, {\"O}zge and T{\"u}rkmen, Hayati and Artok, Levent and {\c{C}}etinkaya, Bekir and Ni, Chaoying and B{\"u}y{\"u}kg{\"u}ng{\"o}r, Orhan and {\"O}zkal, Erhan}, - volume = {691}, - number = {13}, - pages = {3027--3036}, - journaltitle = jomch, - date = {2006}, - indextitle = {Effect of immobilization on catalytic characteristics}, + title = {Effect of immobilization on catalytic characteristics of saturated + {Pd-N}-heterocyclic carbenes in {Mizoroki-Heck} reactions}, + author = {Aks{\i}n, {\"O}zge and T{\"u}rkmen, Hayati and Artok, Levent and { + \c{C}}etinkaya, Bekir and Ni, Chaoying and B{\"u}y{\"u}kg{\"u}ng{\" + o}r, Orhan and {\"O}zkal, Erhan}, + volume = {691}, + number = {13}, + pages = {3027--3036}, + journaltitle = jomch, + date = {2006}, + indextitle = {Effect of immobilization on catalytic characteristics}, } @article{angenendt, - title = {In Honore Salvatoris~-- Vom Sinn und Unsinn der Patrozinienkunde}, - shorttitle = {In Honore Salvatoris}, - author = {Angenendt, Arnold}, - volume = {97}, - pages = {431--456, 791--823}, - journaltitle = {Revue d'Histoire Eccl{\'e}siastique}, - date = {2002}, - langid = {german}, - indextitle = {In Honore Salvatoris}, - annotation = {A German article in a French journal. Apart from that, a typical \texttt{article} entry. Note the \texttt{indextitle} field}, + title = {In Honore Salvatoris~-- Vom Sinn und Unsinn der Patrozinienkunde}, + shorttitle = {In Honore Salvatoris}, + author = {Angenendt, Arnold}, + volume = {97}, + pages = {431--456, 791--823}, + journaltitle = {Revue d'Histoire Eccl{\'e}siastique}, + date = {2002}, + langid = {german}, + indextitle = {In Honore Salvatoris}, + annotation = {A German article in a French journal. Apart from that, a + typical \texttt{article} entry. Note the \texttt{indextitle} + field}, } @book{aristotle:anima, - title = {De Anima}, - author = {Aristotle}, - location = {Cambridge}, - publisher = cup, - date = {1907}, - editor = {Hicks, Robert Drew}, - keywords = {primary, ancient, philosophy, athens}, - langid = {english}, - langidopts = {variant=british}, - annotation = {A \texttt{book} entry with an \texttt{author} and an \texttt{editor}}, + title = {De Anima}, + author = {Aristotle}, + location = {Cambridge}, + publisher = cup, + date = {1907}, + editor = {Hicks, Robert Drew}, + keywords = {primary, ancient, philosophy, athens}, + langid = {english}, + langidopts = {variant=british}, + annotation = {A \texttt{book} entry with an \texttt{author} and an \texttt{ + editor}}, } @book{aristotle:physics, - title = {Physics}, - shorttitle = {Physics}, - author = {Aristotle}, - location = {New York}, - publisher = {G. P. Putnam}, - url = {https://www.infobooks.org/authors/classic/aristotle-books/#Physic}, - date = {1929}, - translator = {Wicksteed, P. H. and Cornford, F. M.}, - keywords = {primary, ancient, philosophy}, - langid = {english}, - langidopts = {variant=american}, - file = {~/Documents/projects/coding/bibiman/tests/aristotle_physics.pdf}, - annotation = {A \texttt{book} entry with a \texttt{translator} field}, + title = {Physics}, + shorttitle = {Physics}, + author = {Aristotle}, + location = {New York}, + publisher = {G. P. Putnam}, + url = {https://www.infobooks.org/authors/classic/aristotle-books/#Physic}, + date = {1929}, + translator = {Wicksteed, P. H. and Cornford, F. M.}, + keywords = {primary, ancient, philosophy}, + langid = {english}, + langidopts = {variant=american}, + file = {~/Documents/projects/coding/bibiman/tests/aristotle_physics.pdf}, + annotation = {A \texttt{book} entry with a \texttt{translator} field}, } @book{aristotle:poetics, - title = {Poetics}, - shorttitle = {Poetics}, - author = {Aristotle}, - location = {Oxford}, - publisher = {Clarendon Press}, - series = {Clarendon {Aristotle}}, - date = {1968}, - editor = {Lucas, D. W.}, - keywords = {primary}, - langid = {english}, - langidopts = {variant=british}, - annotation = {A \texttt{book} entry with an \texttt{author} and an \texttt{editor} as well as a \texttt{series} field}, + title = {Poetics}, + shorttitle = {Poetics}, + author = {Aristotle}, + location = {Oxford}, + publisher = {Clarendon Press}, + series = {Clarendon {Aristotle}}, + date = {1968}, + editor = {Lucas, D. W.}, + keywords = {primary}, + langid = {english}, + langidopts = {variant=british}, + annotation = {A \texttt{book} entry with an \texttt{author} and an \texttt{ + editor} as well as a \texttt{series} field}, } @mvbook{aristotle:rhetoric, - title = {The Rhetoric of {Aristotle} with a commentary by the late {Edward Meredith Cope}}, - shorttitle = {Rhetoric}, - author = {Aristotle}, - publisher = cup, - date = {1877}, - editor = {Cope, Edward Meredith}, - commentator = {Cope, Edward Meredith}, - volumes = {3}, - keywords = {primary}, - langid = {english}, - langidopts = {variant=british}, - sorttitle = {Rhetoric of Aristotle}, - indextitle = {Rhetoric of {Aristotle}, The}, - annotation = {A commented edition. Note the concatenation of the \texttt{editor} and \texttt{commentator} fields as well as the \texttt{volumes}, \texttt{sorttitle}, and \texttt{indextitle} fields}, + title = {The Rhetoric of {Aristotle} with a commentary by the late {Edward + Meredith Cope}}, + shorttitle = {Rhetoric}, + author = {Aristotle}, + publisher = cup, + date = {1877}, + editor = {Cope, Edward Meredith}, + commentator = {Cope, Edward Meredith}, + volumes = {3}, + keywords = {primary}, + langid = {english}, + langidopts = {variant=british}, + sorttitle = {Rhetoric of Aristotle}, + indextitle = {Rhetoric of {Aristotle}, The}, + annotation = {A commented edition. Note the concatenation of the \texttt{ + editor} and \texttt{commentator} fields as well as the \texttt{ + volumes}, \texttt{sorttitle}, and \texttt{indextitle} fields}, } @book{augustine, - title = {Heterogeneous catalysis for the synthetic chemist}, - shorttitle = {Heterogeneous catalysis}, - author = {Augustine, Robert L.}, - location = {New York}, - publisher = {Marcel Dekker}, - date = {1995}, - langid = {english}, - langidopts = {variant=american}, - annotation = {A plain \texttt{book} entry}, - keywords = {chemistry}, + title = {Heterogeneous catalysis for the synthetic chemist}, + shorttitle = {Heterogeneous catalysis}, + author = {Augustine, Robert L.}, + location = {New York}, + publisher = {Marcel Dekker}, + date = {1995}, + langid = {english}, + langidopts = {variant=american}, + annotation = {A plain \texttt{book} entry}, + keywords = {chemistry}, } @book{averroes/bland, - title = {The Epistle on the Possibility of Conjunction with the Active Intellect by {Ibn Rushd} with the Commentary of {Moses Narboni}}, - shorttitle = {Possibility of Conjunction}, - author = {Averroes}, - location = {New York}, - publisher = {Jewish Theological Seminary of America}, - series = {Moreshet: Studies in {Jewish} History, Literature and Thought}, - number = {7}, - date = {1982}, - editor = {Bland, Kalman P.}, - translator = {Bland, Kalman P.}, - keywords = {primary}, - langid = {english}, - langidopts = {variant=american}, - indextitle = {Epistle on the Possibility of Conjunction, The}, - annotation = {A \texttt{book} entry with a \texttt{series} and a \texttt{number}. Note the concatenation of the \texttt{editor} and \texttt{translator} fields as well as the \texttt{indextitle} field}, + title = {The Epistle on the Possibility of Conjunction with the Active + Intellect by {Ibn Rushd} with the Commentary of {Moses Narboni}}, + shorttitle = {Possibility of Conjunction}, + author = {Averroes}, + location = {New York}, + publisher = {Jewish Theological Seminary of America}, + series = {Moreshet: Studies in {Jewish} History, Literature and Thought}, + number = {7}, + date = {1982}, + editor = {Bland, Kalman P.}, + translator = {Bland, Kalman P.}, + keywords = {primary}, + langid = {english}, + langidopts = {variant=american}, + indextitle = {Epistle on the Possibility of Conjunction, The}, + annotation = {A \texttt{book} entry with a \texttt{series} and a \texttt{ + number}. Note the concatenation of the \texttt{editor} and + \texttt{translator} fields as well as the \texttt{indextitle} + field}, } @article{baez/article, - title = {Higher-Dimensional Algebra {V}: 2-Groups}, - author = {Baez, John C. and Lauda, Aaron D.}, - volume = {12}, - pages = {423--491}, - journaltitle = {Theory and Applications of Categories}, - date = {2004}, - version = {3}, - eprint = {math/0307200v3}, - eprinttype = {arxiv}, - langid = {english}, - keywords = {math}, - langidopts = {variant=american}, - annotation = {An \texttt{article} with \texttt{eprint} and \texttt{eprinttype} fields. Note that the arXiv reference is transformed into a clickable link if \texttt{hyperref} support has been enabled. Compare \texttt{baez\slash online}, which is the same item given as an \texttt{online} entry}, + title = {Higher-Dimensional Algebra {V}: 2-Groups}, + author = {Baez, John C. and Lauda, Aaron D.}, + volume = {12}, + pages = {423--491}, + journaltitle = {Theory and Applications of Categories}, + date = {2004}, + version = {3}, + eprint = {math/0307200v3}, + eprinttype = {arxiv}, + langid = {english}, + keywords = {math}, + langidopts = {variant=american}, + annotation = {An \texttt{article} with \texttt{eprint} and \texttt{ + eprinttype} fields. Note that the arXiv reference is + transformed into a clickable link if \texttt{hyperref} support + has been enabled. Compare \texttt{baez\slash online}, which is + the same item given as an \texttt{online} entry}, } @article{bertram, - title = {Gromov invariants for holomorphic maps on {Riemann} surfaces}, - shorttitle = {Gromov invariants}, - author = {Bertram, Aaron and Wentworth, Richard}, - volume = {9}, - number = {2}, - pages = {529--571}, - journaltitle = jams, - date = {1996}, - langid = {english}, - langidopts = {variant=american}, - annotation = {An \texttt{article} entry with a \texttt{volume} and a \texttt{number} field}, + title = {Gromov invariants for holomorphic maps on {Riemann} surfaces}, + shorttitle = {Gromov invariants}, + author = {Bertram, Aaron and Wentworth, Richard}, + volume = {9}, + number = {2}, + pages = {529--571}, + journaltitle = jams, + date = {1996}, + langid = {english}, + langidopts = {variant=american}, + annotation = {An \texttt{article} entry with a \texttt{volume} and a \texttt + {number} field}, } @article{doody, - title = {Hemingway's Style and {Jake's} Narration}, - author = {Doody, Terrence}, - year = {1974}, - journal = {The Journal of Narrative Technique}, - volume = {4}, - number = {3}, - pages = {212--225}, - langid = {english}, - langidopts = {variant=american}, - related = {matuz:doody}, + title = {Hemingway's Style and {Jake's} Narration}, + author = {Doody, Terrence}, + year = {1974}, + journal = {The Journal of Narrative Technique}, + volume = {4}, + number = {3}, + pages = {212--225}, + langid = {english}, + langidopts = {variant=american}, + related = {matuz:doody}, relatedstring = {\autocap{e}xcerpt in}, - annotation = {An \texttt{article} entry cited as an excerpt from a \texttt{collection} entry. Note the format of the \texttt{related} and \texttt{relatedstring} fields}, + annotation = {An \texttt{article} entry cited as an excerpt from a \texttt{ + collection} entry. Note the format of the \texttt{related} and + \texttt{relatedstring} fields}, } @article{gillies, - title = {Herder and the Preparation of {Goethe's} Idea of World Literature}, - author = {Gillies, Alexander}, - series = {newseries}, - volume = {9}, - pages = {46--67}, - journaltitle = {Publications of the English Goethe Society}, - date = {1933}, - langid = {english}, - langidopts = {variant=british}, - annotation = {An \texttt{article} entry with a \texttt{series} and a \texttt{volume} field. Note that format of the \texttt{series} field in the database file}, + title = {Herder and the Preparation of {Goethe's} Idea of World Literature}, + author = {Gillies, Alexander}, + series = {newseries}, + volume = {9}, + pages = {46--67}, + journaltitle = {Publications of the English Goethe Society}, + date = {1933}, + langid = {english}, + langidopts = {variant=british}, + annotation = {An \texttt{article} entry with a \texttt{series} and a \texttt + {volume} field. Note that format of the \texttt{series} field + in the database file}, } @article{glashow, - title = {Partial Symmetries of Weak Interactions}, - author = {Glashow, Sheldon}, - volume = {22}, - pages = {579--588}, - journaltitle = {Nucl.~Phys.}, - date = {1961}, + title = {Partial Symmetries of Weak Interactions}, + author = {Glashow, Sheldon}, + volume = {22}, + pages = {579--588}, + journaltitle = {Nucl.~Phys.}, + date = {1961}, } @article{herrmann, - title = {A carbocyclic carbene as an efficient catalyst ligand for {C--C} coupling reactions}, - author = {Herrmann, Wolfgang A. and {\"O}fele, Karl and Schneider, Sabine K. and Herdtweck, Eberhardt and Hoffmann, Stephan D.}, - volume = {45}, - number = {23}, - pages = {3859--3862}, - journaltitle = anch-ie, - date = {2006}, - indextitle = {Carbocyclic carbene as an efficient catalyst, A}, + title = {A carbocyclic carbene as an efficient catalyst ligand for {C--C} + coupling reactions}, + author = {Herrmann, Wolfgang A. and {\"O}fele, Karl and Schneider, Sabine K. + and Herdtweck, Eberhardt and Hoffmann, Stephan D.}, + volume = {45}, + number = {23}, + pages = {3859--3862}, + journaltitle = anch-ie, + date = {2006}, + indextitle = {Carbocyclic carbene as an efficient catalyst, A}, } @article{murray, - title = {Alkanethiolate gold cluster molecules with core diameters from 1.5 to 5.2~{nm}}, - shorttitle = {Alkanethiolate gold cluster molecules}, - author = {Hostetler, Michael J. and Wingate, Julia E. and Zhong, Chuan-Jian and Harris, Jay E. and Vachet, Richard W. and Clark, Michael R. and Londono, J. David and Green, Stephen J. and Stokes, Jennifer J. and Wignall, George D. and Glish, Gary L. and Porter, Marc D. and Evans, Neal D. and Murray, Royce W.}, - volume = {14}, - number = {1}, - pages = {17--30}, - journaltitle = {Langmuir}, - date = {1998}, - subtitle = {Core and monolayer properties as a function of core size}, - langid = {english}, - langidopts = {variant=american}, - indextitle = {Alkanethiolate gold cluster molecules}, - annotation = {An \texttt{article} entry with \arabic{author} authors. By default, long author and editor lists are automatically truncated. This is configurable}, + title = {Alkanethiolate gold cluster molecules with core diameters from 1.5 + to 5.2~{nm}}, + shorttitle = {Alkanethiolate gold cluster molecules}, + author = {Hostetler, Michael J. and Wingate, Julia E. and Zhong, Chuan-Jian + and Harris, Jay E. and Vachet, Richard W. and Clark, Michael R. and + Londono, J. David and Green, Stephen J. and Stokes, Jennifer J. and + Wignall, George D. and Glish, Gary L. and Porter, Marc D. and Evans + , Neal D. and Murray, Royce W.}, + volume = {14}, + number = {1}, + pages = {17--30}, + journaltitle = {Langmuir}, + date = {1998}, + subtitle = {Core and monolayer properties as a function of core size}, + langid = {english}, + langidopts = {variant=american}, + indextitle = {Alkanethiolate gold cluster molecules}, + annotation = {An \texttt{article} entry with \arabic{author} authors. By + default, long author and editor lists are automatically + truncated. This is configurable}, } @article{kastenholz, - title = {Computation of methodology\hyphen independent ionic solvation free energies from molecular simulations}, - author = {Kastenholz, M. A. and H{\"u}nenberger, Philippe H.}, - volume = {124}, - doi = {10.1063/1.2172593}, - journaltitle = jchph, - date = {2006}, - subtitle = {{I}. {The} electrostatic potential in molecular liquids}, - eid = {124106}, - langid = {english}, - langidopts = {variant=american}, - indextitle = {Computation of ionic solvation free energies}, - annotation = {An \texttt{article} entry with an \texttt{eid} and a \texttt{doi} field. Note that the \textsc{doi} is transformed into a clickable link if \texttt{hyperref} support has been enabled}, - abstract = {The computation of ionic solvation free energies from atomistic simulations is a surprisingly difficult problem that has found no satisfactory solution for more than 15 years. The reason is that the charging free energies evaluated from such simulations are affected by very large errors. One of these is related to the choice of a specific convention for summing up the contributions of solvent charges to the electrostatic potential in the ionic cavity, namely, on the basis of point charges within entire solvent molecules (M scheme) or on the basis of individual point charges (P scheme). The use of an inappropriate convention may lead to a charge-independent offset in the calculated potential, which depends on the details of the summation scheme, on the quadrupole-moment trace of the solvent molecule, and on the approximate form used to represent electrostatic interactions in the system. However, whether the M or P scheme (if any) represents the appropriate convention is still a matter of on-going debate. The goal of the present article is to settle this long-standing controversy by carefully analyzing (both analytically and numerically) the properties of the electrostatic potential in molecular liquids (and inside cavities within them).}, + title = {Computation of methodology\hyphen independent ionic solvation free + energies from molecular simulations}, + author = {Kastenholz, M. A. and H{\"u}nenberger, Philippe H.}, + volume = {124}, + doi = {10.1063/1.2172593}, + journaltitle = jchph, + date = {2006}, + subtitle = {{I}. {The} electrostatic potential in molecular liquids}, + eid = {124106}, + langid = {english}, + langidopts = {variant=american}, + indextitle = {Computation of ionic solvation free energies}, + annotation = {An \texttt{article} entry with an \texttt{eid} and a \texttt{ + doi} field. Note that the \textsc{doi} is transformed into a + clickable link if \texttt{hyperref} support has been enabled}, + abstract = {The computation of ionic solvation free energies from atomistic + simulations is a surprisingly difficult problem that has found no + satisfactory solution for more than 15 years. The reason is that + the charging free energies evaluated from such simulations are + affected by very large errors. One of these is related to the + choice of a specific convention for summing up the contributions + of solvent charges to the electrostatic potential in the ionic + cavity, namely, on the basis of point charges within entire + solvent molecules (M scheme) or on the basis of individual point + charges (P scheme). The use of an inappropriate convention may + lead to a charge-independent offset in the calculated potential, + which depends on the details of the summation scheme, on the + quadrupole-moment trace of the solvent molecule, and on the + approximate form used to represent electrostatic interactions in + the system. However, whether the M or P scheme (if any) + represents the appropriate convention is still a matter of + on-going debate. The goal of the present article is to settle + this long-standing controversy by carefully analyzing (both + analytically and numerically) the properties of the electrostatic + potential in molecular liquids (and inside cavities within them). + }, } @article{sarfraz, - title = {Technical section: {An} algorithm for automatic capturing of the font outlines}, - author = {M. Sarfraz and M. F. A. Razzak}, - year = {2002}, - journal = {Computers and Graphics}, - volume = {26}, - number = {5}, - pages = {795--804}, - issn = {0097-8493}, - annotation = {An \texttt{article} entry with an \texttt{issn} field}, + title = {Technical section: {An} algorithm for automatic capturing of the + font outlines}, + author = {M. Sarfraz and M. F. A. Razzak}, + year = {2002}, + journal = {Computers and Graphics}, + volume = {26}, + number = {5}, + pages = {795--804}, + issn = {0097-8493}, + annotation = {An \texttt{article} entry with an \texttt{issn} field}, } @article{reese, - title = {Georgia in {Anglo-Spanish} Diplomacy, 1736--1739}, - author = {Reese, Trevor R.}, - series = {3}, - volume = {15}, - pages = {168--190}, - journaltitle = {William and Mary Quarterly}, - date = {1958}, - langid = {english}, - langidopts = {variant=american}, - annotation = {An \texttt{article} entry with a \texttt{series} and a \texttt{volume} field. Note the format of the series. If the value of the \texttt{series} field is an integer, this number is printed as an ordinal and the string \enquote*{series} is appended automatically}, + title = {Georgia in {Anglo-Spanish} Diplomacy, 1736--1739}, + author = {Reese, Trevor R.}, + series = {3}, + volume = {15}, + pages = {168--190}, + journaltitle = {William and Mary Quarterly}, + date = {1958}, + langid = {english}, + langidopts = {variant=american}, + annotation = {An \texttt{article} entry with a \texttt{series} and a \texttt + {volume} field. Note the format of the series. If the value of + the \texttt{series} field is an integer, this number is printed + as an ordinal and the string \enquote*{series} is appended + automatically}, } @article{shore, - title = {Twice-Born, Once Conceived}, - author = {Shore, Bradd}, - series = {newseries}, - volume = {93}, - number = {1}, - pages = {9--27}, - journaltitle = {American Anthropologist}, - date = {1991-03}, - subtitle = {Meaning Construction and Cultural Cognition}, - annotation = {An \texttt{article} entry with \texttt{series}, \texttt{volume}, and \texttt{number} fields. Note the format of the \texttt{series} which is a localization key}, + title = {Twice-Born, Once Conceived}, + author = {Shore, Bradd}, + series = {newseries}, + volume = {93}, + number = {1}, + pages = {9--27}, + journaltitle = {American Anthropologist}, + date = {1991-03}, + subtitle = {Meaning Construction and Cultural Cognition}, + annotation = {An \texttt{article} entry with \texttt{series}, \texttt{volume + }, and \texttt{number} fields. Note the format of the \texttt{ + series} which is a localization key}, } @article{sigfridsson, - title = {Comparison of methods for deriving atomic charges from the electrostatic potential and moments}, - author = {Sigfridsson, Emma and Ryde, Ulf}, - volume = {19}, - number = {4}, - pages = {377--395}, - doi = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P}, - journaltitle = {Journal of Computational Chemistry}, - date = {1998}, - langid = {english}, - langidopts = {variant=american}, - indextitle = {Methods for deriving atomic charges}, - annotation = {An \texttt{article} entry with \texttt{volume}, \texttt{number}, and \texttt{doi} fields. Note that the \textsc{doi} is transformed into a clickable link if \texttt{hyperref} support has been enabled}, - abstract = {Four methods for deriving partial atomic charges from the quantum chemical electrostatic potential (CHELP, CHELPG, Merz-Kollman, and RESP) have been compared and critically evaluated. It is shown that charges strongly depend on how and where the potential points are selected. Two alternative methods are suggested to avoid the arbitrariness in the point-selection schemes and van der Waals exclusion radii: CHELP-BOW, which also estimates the charges from the electrostatic potential, but with potential points that are Boltzmann-weighted after their occurrence in actual simulations using the energy function of the program in which the charges will be used, and CHELMO, which estimates the charges directly from the electrostatic multipole moments. Different criteria for the quality of the charges are discussed.}, + title = {Comparison of methods for deriving atomic charges from the + electrostatic potential and moments}, + author = {Sigfridsson, Emma and Ryde, Ulf}, + volume = {19}, + number = {4}, + pages = {377--395}, + doi = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P}, + journaltitle = {Journal of Computational Chemistry}, + date = {1998}, + langid = {english}, + langidopts = {variant=american}, + indextitle = {Methods for deriving atomic charges}, + annotation = {An \texttt{article} entry with \texttt{volume}, \texttt{number + }, and \texttt{doi} fields. Note that the \textsc{doi} is + transformed into a clickable link if \texttt{hyperref} support + has been enabled}, + abstract = {Four methods for deriving partial atomic charges from the + quantum chemical electrostatic potential (CHELP, CHELPG, + Merz-Kollman, and RESP) have been compared and critically + evaluated. It is shown that charges strongly depend on how and + where the potential points are selected. Two alternative methods + are suggested to avoid the arbitrariness in the point-selection + schemes and van der Waals exclusion radii: CHELP-BOW, which also + estimates the charges from the electrostatic potential, but with + potential points that are Boltzmann-weighted after their + occurrence in actual simulations using the energy function of the + program in which the charges will be used, and CHELMO, which + estimates the charges directly from the electrostatic multipole + moments. Different criteria for the quality of the charges are + discussed.}, } @article{spiegelberg, - title = {\mkbibquote{Intention} und \mkbibquote{Intentionalit{\"a}t} in der Scholastik, bei Brentano und Husserl}, - shorttitle = {Intention und Intentionalit{\"a}t}, - author = {Spiegelberg, Herbert}, - volume = {29}, - pages = {189--216}, - journaltitle = {Studia Philosophica}, - date = {1969}, - langid = {german}, - sorttitle = {Intention und Intentionalitat in der Scholastik, bei Brentano und Husserl}, - indexsorttitle = {Intention und Intentionalitat in der Scholastik, bei Brentano und Husserl}, - annotation = {An \texttt{article} entry. Note the \texttt{sorttitle} and \texttt{indexsorttitle} fields and the markup of the quotes in the database file}, + title = {\mkbibquote{Intention} und \mkbibquote{Intentionalit{\"a}t} in der + Scholastik, bei Brentano und Husserl}, + shorttitle = {Intention und Intentionalit{\"a}t}, + author = {Spiegelberg, Herbert}, + volume = {29}, + pages = {189--216}, + journaltitle = {Studia Philosophica}, + date = {1969}, + langid = {german}, + sorttitle = {Intention und Intentionalitat in der Scholastik, bei Brentano + und Husserl}, + indexsorttitle = {Intention und Intentionalitat in der Scholastik, bei + Brentano und Husserl}, + annotation = {An \texttt{article} entry. Note the \texttt{sorttitle} and + \texttt{indexsorttitle} fields and the markup of the quotes in + the database file}, } @article{springer, - title = {Mediaeval Pilgrim Routes from {Scandinavia} to {Rome}}, - shorttitle = {Mediaeval Pilgrim Routes}, - author = {Springer, Otto}, - volume = {12}, - pages = {92--122}, - journaltitle = {Mediaeval Studies}, - date = {1950}, - langid = {english}, - langidopts = {variant=british}, - annotation = {A plain \texttt{article} entry}, + title = {Mediaeval Pilgrim Routes from {Scandinavia} to {Rome}}, + shorttitle = {Mediaeval Pilgrim Routes}, + author = {Springer, Otto}, + volume = {12}, + pages = {92--122}, + journaltitle = {Mediaeval Studies}, + date = {1950}, + langid = {english}, + langidopts = {variant=british}, + annotation = {A plain \texttt{article} entry}, } @article{weinberg, - title = {A Model of Leptons}, - author = {Weinberg, Steven}, - volume = {19}, - pages = {1264--1266}, - journaltitle = {Phys.~Rev.~Lett.}, - date = {1967}, + title = {A Model of Leptons}, + author = {Weinberg, Steven}, + volume = {19}, + pages = {1264--1266}, + journaltitle = {Phys.~Rev.~Lett.}, + date = {1967}, } @string{anch-ie = {Angew.~Chem. Int.~Ed.}} -@string{cup = {Cambridge University Press}} +@string{cup = {Cambridge University Press}} -@string{dtv = {Deutscher Taschenbuch-Verlag}} +@string{dtv = {Deutscher Taschenbuch-Verlag}} -@string{hup = {Harvard University Press}} +@string{hup = {Harvard University Press}} -@string{jams = {J.~Amer. Math. Soc.}} +@string{jams = {J.~Amer. Math. Soc.}} -@string{jchph = {J.~Chem. Phys.}} +@string{jchph = {J.~Chem. Phys.}} -@string{jomch = {J.~Organomet. Chem.}} +@string{jomch = {J.~Organomet. Chem.}} -@string{pup = {Princeton University Press}} +@string{pup = {Princeton University Press}} @incollection{westfahl:space, - title = {The True Frontier}, - author = {Westfahl, Gary}, - pages = {55--65}, - subtitle = {Confronting and Avoiding the Realities of Space in {American} Science Fiction Films}, - crossref = {westfahl:frontier}, - langid = {english}, - langidopts = {variant=american}, - indextitle = {True Frontier, The}, - annotation = {A cross-referenced article from a \texttt{collection}. This is an \texttt{incollection} entry with a \texttt{crossref} field. Note the \texttt{subtitle} and \texttt{indextitle} fields}, + title = {The True Frontier}, + author = {Westfahl, Gary}, + pages = {55--65}, + subtitle = {Confronting and Avoiding the Realities of Space in {American} + Science Fiction Films}, + crossref = {westfahl:frontier}, + langid = {english}, + langidopts = {variant=american}, + indextitle = {True Frontier, The}, + annotation = {A cross-referenced article from a \texttt{collection}. This is + an \texttt{incollection} entry with a \texttt{crossref} field. + Note the \texttt{subtitle} and \texttt{indextitle} fields}, } @article{yoon, - title = {Palladium pincer complexes with reduced bond angle strain: efficient catalysts for the {Heck} reaction}, - author = {Yoon, Myeong S. and Ryu, Dowook and Kim, Jeongryul and Ahn, Kyo Han}, - volume = {25}, - number = {10}, - pages = {2409--2411}, - journaltitle = {Organometallics}, - date = {2006}, - indextitle = {Palladium pincer complexes}, + title = {Palladium pincer complexes with reduced bond angle strain: + efficient catalysts for the {Heck} reaction}, + author = {Yoon, Myeong S. and Ryu, Dowook and Kim, Jeongryul and Ahn, Kyo + Han}, + volume = {25}, + number = {10}, + pages = {2409--2411}, + journaltitle = {Organometallics}, + date = {2006}, + indextitle = {Palladium pincer complexes}, } |
