This commit is contained in:
Shan Carter committed 2017-01-25 16:37:32 -08:00
commit e95a67b236
3 files changed
+47 -13

No files matched your search

+23 -6
View File
@@ -171,7 +171,18 @@ export default function(dom, data) {
function bibliography_cite(ent, fancy){
if (ent){
var cite = author_string(ent, "${L}, ${I}", ", ", " and ");
var cite = "<b>" + ent.title + "</b> "
cite += link_string(ent) + "<br>";
cite += author_string(ent, "${L}, ${I}", ", ", " and ");
if (ent.year || ent.date){
cite += ", " + (ent.year || ent.date) + ". "
} else {
cite += ". "
}
cite += venue_string(ent);
cite += doi_string(ent);
return cite
/*var cite = author_string(ent, "${L}, ${I}", ", ", " and ");
if (ent.year || ent.date){
cite += ", " + (ent.year || ent.date) + ". "
} else {
@@ -181,7 +192,7 @@ export default function(dom, data) {
cite += venue_string(ent);
cite += doi_string(ent);
cite += link_string(ent);
return cite
return cite*/
} else {
return "?";
}
@@ -193,10 +204,16 @@ export default function(dom, data) {
cite += "<b>" + ent.title + "</b>";
cite += link_string(ent);
cite += "<br>"
cite += author_string(ent, "${I} ${L}", ", ") + ".<br>";
cite += venue_string(ent).trim() + " " + ent.year + ". "
cite += doi_string(ent, true);
return cite
var a_str = author_string(ent, "${I} ${L}", ", ") + ".";
var v_str = venue_string(ent).trim() + " " + ent.year + ". " + doi_string(ent, true);
if ((a_str+v_str).length < Math.min(40, ent.title.length)) {
cite += a_str + " " + v_str;
} else {
cite += a_str + "<br>" + v_str;
}
return cite;
} else {
return "?";
}
+23 -6
View File
@@ -6078,17 +6078,28 @@ var citation = function(dom, data) {
function bibliography_cite(ent, fancy){
if (ent){
var cite = author_string(ent, "${L}, ${I}", ", ", " and ");
var cite = "<b>" + ent.title + "</b> ";
cite += link_string(ent) + "<br>";
cite += author_string(ent, "${L}, ${I}", ", ", " and ");
if (ent.year || ent.date){
cite += ", " + (ent.year || ent.date) + ". ";
} else {
cite += ". ";
}
cite += venue_string(ent);
cite += doi_string(ent);
return cite
/*var cite = author_string(ent, "${L}, ${I}", ", ", " and ");
if (ent.year || ent.date){
cite += ", " + (ent.year || ent.date) + ". "
} else {
cite += ". "
}
cite += "<b>" + ent.title + "</b>. ";
cite += venue_string(ent);
cite += doi_string(ent);
cite += link_string(ent);
return cite
return cite*/
} else {
return "?";
}
@@ -6100,10 +6111,16 @@ var citation = function(dom, data) {
cite += "<b>" + ent.title + "</b>";
cite += link_string(ent);
cite += "<br>";
cite += author_string(ent, "${I} ${L}", ", ") + ".<br>";
cite += venue_string(ent).trim() + " " + ent.year + ". ";
cite += doi_string(ent, true);
return cite
var a_str = author_string(ent, "${I} ${L}", ", ") + ".";
var v_str = venue_string(ent).trim() + " " + ent.year + ". " + doi_string(ent, true);
if ((a_str+v_str).length < Math.min(40, ent.title.length)) {
cite += a_str + " " + v_str;
} else {
cite += a_str + "<br>" + v_str;
}
return cite;
} else {
return "?";
}
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":null,"sources":["../components/html.js","../components/styles.js","../node_modules/js-yaml/lib/js-yaml/common.js","../node_modules/js-yaml/lib/js-yaml/exception.js","../node_modules/js-yaml/lib/js-yaml/mark.js","../node_modules/js-yaml/lib/js-yaml/type.js","../node_modules/js-yaml/lib/js-yaml/schema.js","../node_modules/js-yaml/lib/js-yaml/type/str.js","../node_modules/js-yaml/lib/js-yaml/type/seq.js","../node_modules/js-yaml/lib/js-yaml/type/map.js","../node_modules/js-yaml/lib/js-yaml/schema/failsafe.js","../node_modules/js-yaml/lib/js-yaml/type/null.js","../node_modules/js-yaml/lib/js-yaml/type/bool.js","../node_modules/js-yaml/lib/js-yaml/type/int.js","../node_modules/js-yaml/lib/js-yaml/type/float.js","../node_modules/js-yaml/lib/js-yaml/schema/json.js","../node_modules/js-yaml/lib/js-yaml/schema/core.js","../node_modules/js-yaml/lib/js-yaml/type/timestamp.js","../node_modules/js-yaml/lib/js-yaml/type/merge.js","../node_modules/js-yaml/lib/js-yaml/type/binary.js","../node_modules/js-yaml/lib/js-yaml/type/omap.js","../node_modules/js-yaml/lib/js-yaml/type/pairs.js","../node_modules/js-yaml/lib/js-yaml/type/set.js","../node_modules/js-yaml/lib/js-yaml/schema/default_safe.js","../node_modules/js-yaml/lib/js-yaml/type/js/undefined.js","../node_modules/js-yaml/lib/js-yaml/type/js/regexp.js","../node_modules/js-yaml/lib/js-yaml/type/js/function.js","../node_modules/js-yaml/lib/js-yaml/schema/default_full.js","../node_modules/js-yaml/lib/js-yaml/loader.js","../node_modules/js-yaml/lib/js-yaml/dumper.js","../node_modules/js-yaml/lib/js-yaml.js","../node_modules/js-yaml/index.js","../components/front-matter.js","../node_modules/bibtex-parse-js/bibtexParse.js","../components/bibliography.js","../node_modules/d3-time/src/interval.js","../node_modules/d3-time/src/millisecond.js","../node_modules/d3-time/src/duration.js","../node_modules/d3-time/src/second.js","../node_modules/d3-time/src/minute.js","../node_modules/d3-time/src/hour.js","../node_modules/d3-time/src/day.js","../node_modules/d3-time/src/week.js","../node_modules/d3-time/src/month.js","../node_modules/d3-time/src/year.js","../node_modules/d3-time/src/utcMinute.js","../node_modules/d3-time/src/utcHour.js","../node_modules/d3-time/src/utcDay.js","../node_modules/d3-time/src/utcWeek.js","../node_modules/d3-time/src/utcMonth.js","../node_modules/d3-time/src/utcYear.js","../node_modules/d3-time-format/src/locale.js","../node_modules/d3-time-format/src/defaultLocale.js","../node_modules/d3-time-format/src/isoFormat.js","../node_modules/d3-time-format/src/isoParse.js","../components/expand-data.js","../components/meta.js","../components/header.js","../node_modules/mustache/mustache.js","../components/byline.js","../components/appendix.js","../components/footer.js","../components/citation.js","../components/footnote.js","../node_modules/marked/lib/marked.js","../components/markdown.js","../node_modules/prismjs/prism.js","../components/code.js","../components/hover-box-include.js","../components/generate-crossref.js","../index.js"],"sourcesContent":["export default function(dom) {\n if (!dom.querySelector(\"html\").getAttribute(\"lang\")) {\n dom.querySelector(\"html\").setAttribute(\"lang\", \"en\")\n }\n\n let head = dom.querySelector(\"head\");\n\n if (!dom.querySelector(\"meta[charset]\")) {\n let meta = dom.createElement(\"meta\");\n meta.setAttribute(\"charset\", \"utf-8\");\n head.appendChild(meta);\n }\n if (!dom.querySelector(\"meta[name=viewport]\")) {\n let meta = dom.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1\");\n head.appendChild(meta);\n }\n}\n","import base from './styles-base.css';\nimport layout from './styles-layout.css';\nimport article from './styles-article.css';\nimport code from './styles-code.css';\n\nexport default function(dom) {\n let s = dom.createElement(\"style\");\n s.textContent = base + layout + article + code;\n dom.querySelector(\"head\").appendChild(s);\n}\n","'use strict';\n\n\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (NumbeLine truncated
{"version":3,"file":null,"sources":["../components/html.js","../components/styles.js","../node_modules/js-yaml/lib/js-yaml/common.js","../node_modules/js-yaml/lib/js-yaml/exception.js","../node_modules/js-yaml/lib/js-yaml/mark.js","../node_modules/js-yaml/lib/js-yaml/type.js","../node_modules/js-yaml/lib/js-yaml/schema.js","../node_modules/js-yaml/lib/js-yaml/type/str.js","../node_modules/js-yaml/lib/js-yaml/type/seq.js","../node_modules/js-yaml/lib/js-yaml/type/map.js","../node_modules/js-yaml/lib/js-yaml/schema/failsafe.js","../node_modules/js-yaml/lib/js-yaml/type/null.js","../node_modules/js-yaml/lib/js-yaml/type/bool.js","../node_modules/js-yaml/lib/js-yaml/type/int.js","../node_modules/js-yaml/lib/js-yaml/type/float.js","../node_modules/js-yaml/lib/js-yaml/schema/json.js","../node_modules/js-yaml/lib/js-yaml/schema/core.js","../node_modules/js-yaml/lib/js-yaml/type/timestamp.js","../node_modules/js-yaml/lib/js-yaml/type/merge.js","../node_modules/js-yaml/lib/js-yaml/type/binary.js","../node_modules/js-yaml/lib/js-yaml/type/omap.js","../node_modules/js-yaml/lib/js-yaml/type/pairs.js","../node_modules/js-yaml/lib/js-yaml/type/set.js","../node_modules/js-yaml/lib/js-yaml/schema/default_safe.js","../node_modules/js-yaml/lib/js-yaml/type/js/undefined.js","../node_modules/js-yaml/lib/js-yaml/type/js/regexp.js","../node_modules/js-yaml/lib/js-yaml/type/js/function.js","../node_modules/js-yaml/lib/js-yaml/schema/default_full.js","../node_modules/js-yaml/lib/js-yaml/loader.js","../node_modules/js-yaml/lib/js-yaml/dumper.js","../node_modules/js-yaml/lib/js-yaml.js","../node_modules/js-yaml/index.js","../components/front-matter.js","../node_modules/bibtex-parse-js/bibtexParse.js","../components/bibliography.js","../node_modules/d3-time/src/interval.js","../node_modules/d3-time/src/millisecond.js","../node_modules/d3-time/src/duration.js","../node_modules/d3-time/src/second.js","../node_modules/d3-time/src/minute.js","../node_modules/d3-time/src/hour.js","../node_modules/d3-time/src/day.js","../node_modules/d3-time/src/week.js","../node_modules/d3-time/src/month.js","../node_modules/d3-time/src/year.js","../node_modules/d3-time/src/utcMinute.js","../node_modules/d3-time/src/utcHour.js","../node_modules/d3-time/src/utcDay.js","../node_modules/d3-time/src/utcWeek.js","../node_modules/d3-time/src/utcMonth.js","../node_modules/d3-time/src/utcYear.js","../node_modules/d3-time-format/src/locale.js","../node_modules/d3-time-format/src/defaultLocale.js","../node_modules/d3-time-format/src/isoFormat.js","../node_modules/d3-time-format/src/isoParse.js","../components/expand-data.js","../components/meta.js","../components/header.js","../node_modules/mustache/mustache.js","../components/byline.js","../components/appendix.js","../components/footer.js","../components/citation.js","../components/footnote.js","../node_modules/marked/lib/marked.js","../components/markdown.js","../node_modules/prismjs/prism.js","../components/code.js","../components/hover-box-include.js","../components/generate-crossref.js","../index.js"],"sourcesContent":["export default function(dom) {\n if (!dom.querySelector(\"html\").getAttribute(\"lang\")) {\n dom.querySelector(\"html\").setAttribute(\"lang\", \"en\")\n }\n\n let head = dom.querySelector(\"head\");\n\n if (!dom.querySelector(\"meta[charset]\")) {\n let meta = dom.createElement(\"meta\");\n meta.setAttribute(\"charset\", \"utf-8\");\n head.appendChild(meta);\n }\n if (!dom.querySelector(\"meta[name=viewport]\")) {\n let meta = dom.createElement(\"meta\");\n meta.setAttribute(\"name\", \"viewport\");\n meta.setAttribute(\"content\", \"width=device-width, initial-scale=1\");\n head.appendChild(meta);\n }\n}\n","import base from './styles-base.css';\nimport layout from './styles-layout.css';\nimport article from './styles-article.css';\nimport code from './styles-code.css';\n\nexport default function(dom) {\n let s = dom.createElement(\"style\");\n s.textContent = base + layout + article + code;\n dom.querySelector(\"head\").appendChild(s);\n}\n","'use strict';\n\n\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (NumbeLine truncated