更新模版

This commit is contained in:
2023-11-08 10:17:58 +08:00
parent bda298aebc
commit f869a9dda7
37 changed files with 30247 additions and 3 deletions
File diff suppressed because it is too large Load Diff
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+225
View File
@@ -0,0 +1,225 @@
/* cyrillic-ext */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 300;
font-display: swap;
src: url(./googlefonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwmhdu3cOWxy40.woff2)
format("woff2");
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 300;
font-display: swap;
src: url(./googlefonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwkxdu3cOWxy40.woff2)
format("woff2");
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 300;
font-display: swap;
src: url(./googlefonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwmxdu3cOWxy40.woff2)
format("woff2");
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 300;
font-display: swap;
src: url(./googlefonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlBdu3cOWxy40.woff2)
format("woff2");
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 300;
font-display: swap;
src: url(./googlefonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwmBdu3cOWxy40.woff2)
format("woff2");
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 300;
font-display: swap;
src: url(./googlefonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwmRdu3cOWxy40.woff2)
format("woff2");
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 300;
font-display: swap;
src: url(./googlefonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlxdu3cOWxw.woff2)
format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(./googlefonts/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNa7lujVj9_mf.woff2)
format("woff2");
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(./googlefonts/6xK3dSBYKcSV-LCoeQqfX1RYOo3qPK7lujVj9_mf.woff2)
format("woff2");
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(./googlefonts/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNK7lujVj9_mf.woff2)
format("woff2");
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(./googlefonts/6xK3dSBYKcSV-LCoeQqfX1RYOo3qO67lujVj9_mf.woff2)
format("woff2");
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(./googlefonts/6xK3dSBYKcSV-LCoeQqfX1RYOo3qN67lujVj9_mf.woff2)
format("woff2");
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(./googlefonts/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNq7lujVj9_mf.woff2)
format("woff2");
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(./googlefonts/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7lujVj9w.woff2)
format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(./googlefonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmhdu3cOWxy40.woff2)
format("woff2");
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F,
U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(./googlefonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwkxdu3cOWxy40.woff2)
format("woff2");
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(./googlefonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmxdu3cOWxy40.woff2)
format("woff2");
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(./googlefonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlBdu3cOWxy40.woff2)
format("woff2");
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(./googlefonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmBdu3cOWxy40.woff2)
format("woff2");
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(./googlefonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwmRdu3cOWxy40.woff2)
format("woff2");
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: "Source Sans Pro";
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(./googlefonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlxdu3cOWxw.woff2)
format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
U+FEFF, U+FFFD;
}
+8
View File
@@ -0,0 +1,8 @@
title: D2
author: Data Intuitive
version: 1.1.0
quarto-required: ">=1.3"
contributes:
filters:
- d2.lua
+272
View File
@@ -0,0 +1,272 @@
-- Enum for D2Theme
local D2Theme = {
NeutralDefault = 0,
NeutralGrey = 1,
FlagshipTerrastruct = 3,
CoolClassics = 4,
MixedBerryBlue = 5,
GrapeSoda = 6,
Aubergine = 7,
ColorblindClear = 8,
VanillaNitroCola = 100,
OrangeCreamsicle = 101,
ShirelyTemple = 102,
EarthTones = 103,
EvergladeGreen = 104,
ButteredToast = 105,
DarkMauve = 200,
Terminal = 300,
TerminalGrayscale = 301,
Origami = 302
}
-- Enum for D2Layout
local D2Layout = {
dagre = 'dagre',
elk = 'elk'
}
-- Enum for D2Format
local D2Format = {
svg = 'svg',
png = 'png',
pdf = 'pdf'
}
-- Enum for Embed mode
local EmbedMode = {
inline = "inline",
link = "link",
raw = "raw"
}
-- Helper function to copy a table
function copyTable(obj, seen)
-- Handle non-tables and previously-seen tables.
if type(obj) ~= 'table' then return obj end
if seen and seen[obj] then return seen[obj] end
-- New table; mark it as seen and copy recursively.
local s = seen or {}
local res = {}
s[obj] = res
for k, v in pairs(obj) do res[copyTable(k, s)] = copyTable(v, s) end
return setmetatable(res, getmetatable(obj))
end
-- Helper function for debugging
function dump(o)
if type(o) == 'table' then
local s = '{ '
for k,v in pairs(o) do
if type(k) ~= 'number' then k = '"'..k..'"' end
s = s .. '['..k..'] = ' .. dump(v) .. ','
end
return s .. '} '
else
return tostring(o)
end
end
-- Counter for the diagram files
local counter = 0
local function render_graph(globalOptions)
local filter = {
CodeBlock = function(cb)
-- Check if the CodeBlock has the 'd2' class
if not cb.classes:includes('d2') or cb.text == nil then
return nil
end
counter = counter + 1
-- Initialise options table
local options = copyTable(globalOptions)
-- Process codeblock attributes
for k, v in pairs(cb.attributes) do
options[k] = v
end
-- Transform options
if options.theme ~= nil and type(options.theme) == "string" then
assert(D2Theme[options.theme] ~= nil, "Invalid theme: " .. options.theme .. ". Options are: " .. dump(D2Theme))
options.theme = D2Theme[options.theme]
end
if options.layout ~= nil and type(options.layout) == "string" then
assert(D2Layout[options.layout] ~= nil, "Invalid layout: " .. options.layout .. ". Options are: " .. dump(D2Layout))
options.layout = D2Layout[options.layout]
end
if options.format ~= nil and type(options.format) == "string" then
assert(D2Format[options.format] ~= nil, "Invalid format: " .. options.format .. ". Options are: " .. dump(D2Format))
options.format = D2Format[options.format]
end
if options.embed_mode ~= nil and type(options.embed_mode) == "string" then
assert(EmbedMode[options.embed_mode] ~= nil, "Invalid embed_mode: " .. options.embed_mode .. ". Options are: " .. dump(EmbedMode))
options.embed_mode = EmbedMode[options.embed_mode]
end
if options.sketch ~= nil and type(options.sketch) == "string" then
assert(options.sketch == "true" or options.sketch == "false", "Invalid sketch: " .. options.sketch .. ". Options are: true, false")
options.sketch = options.sketch == "true"
end
if options.pad ~= nil and type(options.pad) == "string" then
assert(tonumber(options.pad) ~= nil, "Invalid pad: " .. options.pad .. ". Must be a number")
options.pad = tonumber(options.pad)
end
if options.echo ~= nil and type(options.echo) == "string" then
assert(options.echo == "true" or options.echo == "false", "Invalid echo: " .. options.echo .. ". Options are: true, false")
options.echo = options.echo == "true"
end
-- Set default filename
if options.filename == nil then
options.filename = "diagram-" .. counter
end
-- Set the default format to pdf since svg is not supported in PDF output
if options.format == D2Format.svg and quarto.doc.is_format("latex") then
options.format = D2Format.pdf
end
-- Set the default embed_mode to link if the quarto format is not html or the figure format is pdf
if not quarto.doc.is_format("html") or options.format == D2Format.pdf then
options.embed_mode = EmbedMode.link
end
-- Set the default folder to ./images when embed_mode is link
if options.folder == nil and options.embed_mode == EmbedMode.link then
options.folder = "./images"
end
-- Generate diagram using `d2` CLI utility
local result = pandoc.system.with_temporary_directory('svg-convert', function (tmpdir)
-- determine path name of input file
local inputPath = pandoc.path.join({tmpdir, "temp_" .. counter .. ".txt"})
-- determine path name of output file
local outputPath
if options.folder ~= nil then
os.execute("mkdir -p " .. options.folder)
outputPath = options.folder .. "/" .. options.filename .. "." .. options.format
else
outputPath = pandoc.path.join({tmpdir, options.filename .. "." .. options.format})
end
-- write graph text to file
local tmpFile = io.open(inputPath, "w")
if tmpFile == nil then
print("Error: Could not open file for writing")
return nil
end
tmpFile:write(cb.text)
tmpFile:close()
-- run d2
os.execute(
"d2" ..
" --theme=" .. options.theme ..
" --layout=" .. options.layout ..
" --sketch=" .. tostring(options.sketch) ..
" --pad=" .. options.pad ..
" " .. inputPath ..
" " .. outputPath
)
if options.embed_mode == EmbedMode.link then
return outputPath
else
local file = io.open(outputPath, "rb")
local data
if file then
data = file:read('*all')
file:close()
end
os.remove(outputPath)
if options.embed_mode == EmbedMode.raw then
return data
elseif options.embed_mode == EmbedMode.inline then
dump(options)
if options.format == "svg" then
return "data:image/svg+xml;base64," .. quarto.base64.encode(data)
elseif options.format == "png" then
return "data:image/png;base64," .. quarto.base64.encode(data)
else
print("Error: Unsupported format")
return nil
end
end
end
end)
-- Read the generated output into a Pandoc Image element
local output
if options.embed_mode == EmbedMode.raw then
output = pandoc.Div({pandoc.RawInline("html", result)})
if options.width ~= nil then
output.attributes.style = "width: " .. options.width .. ";"
end
if options.height ~= nil then
output.attributes.style = output.attributes.style .. "height: " .. options.height .. ";"
end
else
local image = pandoc.Image({}, result)
-- Set the width and height attributes, if they exist
if options.width ~= nil then
image.attributes.width = options.width
end
if options.height ~= nil then
image.attributes.height = options.height
end
if options.caption ~= '' then
image.caption = pandoc.Str(options.caption)
end
output = pandoc.Para({image})
end
-- Wrap the Image element in a Para element and return it
if options.echo then
local codeBlock = pandoc.CodeBlock(cb.text, cb.attr)
output = pandoc.Div({codeBlock, output})
end
return output
end
}
return filter
end
function Pandoc(doc)
local options = {
theme = D2Theme.NeutralDefault,
layout = D2Layout.dagre,
format = D2Format.svg,
sketch = false,
pad = 100,
folder = nil,
filename = nil,
caption = '',
width = nil,
height = nil,
echo = false,
embed_mode = "inline"
}
-- Process global attributes
local globalOptions = doc.meta["d2"]
if type(globalOptions) == "table" then
for k, v in pairs(globalOptions) do
options[k] = pandoc.utils.stringify(v)
end
end
return doc:walk(render_graph(options))
end
@@ -0,0 +1,435 @@
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" class="in-text" names-delimiter=". " name-as-sort-order="all" sort-separator=" " demote-non-dropping-particle="never" initialize-with=" " initialize-with-hyphen="false" page-range-format="expanded" default-locale="zh-CN">
<info>
<title>China National Standard GB/T 7714-2015 (numeric, 中文)</title>
<id>http://www.zotero.org/styles/china-national-standard-gb-t-7714-2015-numeric</id>
<link href="http://www.zotero.org/styles/china-national-standard-gb-t-7714-2015-numeric" rel="self"/>
<link href="http://std.samr.gov.cn/gb/search/gbDetailed?id=71F772D8055ED3A7E05397BE0A0AB82A" rel="documentation"/>
<author>
<name>牛耕田</name>
<email>buffalo_d@163.com</email>
</author>
<contributor>
<name>Zeping Lee</name>
<email>zepinglee@gmail.com</email>
</contributor>
<category citation-format="numeric"/>
<category field="generic-base"/>
<summary>The Chinese GB/T 7714-2015 numeric style</summary>
<updated>2022-02-23T10:44:01+00:00</updated>
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info>
<locale xml:lang="zh-CN">
<date form="text">
<date-part name="year" suffix="年" range-delimiter="&#8212;"/>
<date-part name="month" form="numeric" suffix="月" range-delimiter="&#8212;"/>
<date-part name="day" suffix="日" range-delimiter="&#8212;"/>
</date>
<terms>
<term name="edition" form="short">版</term>
<term name="open-quote">“</term>
<term name="close-quote">”</term>
<term name="open-inner-quote"></term>
<term name="close-inner-quote"></term>
</terms>
</locale>
<locale>
<date form="numeric">
<date-part name="year" range-delimiter="/"/>
<date-part name="month" form="numeric-leading-zeros" prefix="-" range-delimiter="/"/>
<date-part name="day" form="numeric-leading-zeros" prefix="-" range-delimiter="/"/>
</date>
<terms>
<term name="page-range-delimiter">-</term>
</terms>
</locale>
<!-- 引用日期 -->
<macro name="accessed-date">
<date variable="accessed" form="numeric" prefix="[" suffix="]"/>
</macro>
<!-- 主要责任者 -->
<macro name="author">
<names variable="author">
<name>
<name-part name="family" text-case="uppercase"/>
<name-part name="given"/>
</name>
<substitute>
<names variable="composer"/>
<names variable="illustrator"/>
<names variable="director"/>
<choose>
<if variable="container-title" match="none">
<names variable="editor"/>
</if>
</choose>
</substitute>
</names>
</macro>
<!-- 书籍的卷号(“第 x 卷”或“第 x 册”) -->
<macro name="book-volume">
<choose>
<if type="article article-journal article-magazine article-newspaper periodical" match="none">
<choose>
<if is-numeric="volume">
<group delimiter=" ">
<label variable="volume" form="short" text-case="capitalize-first"/>
<text variable="volume"/>
</group>
</if>
<else>
<text variable="volume"/>
</else>
</choose>
</if>
</choose>
</macro>
<!-- 专著主要责任者 -->
<macro name="container-author">
<names variable="editor">
<name>
<name-part name="family" text-case="uppercase"/>
<name-part name="given"/>
</name>
<substitute>
<names variable="editorial-director"/>
<names variable="collection-editor"/>
<names variable="container-author"/>
</substitute>
</names>
</macro>
<!-- 专著题名 -->
<macro name="container-title">
<group delimiter=", ">
<group delimiter=": ">
<choose>
<if variable="container-title">
<text variable="container-title"/>
</if>
<else>
<text variable="event"/>
</else>
</choose>
<text macro="book-volume"/>
</group>
<choose>
<if variable="event-date">
<date variable="event-date" form="text"/>
<text variable="event-place"/>
</if>
</choose>
</group>
</macro>
<!-- 版本项 -->
<macro name="edition">
<choose>
<if is-numeric="edition">
<group delimiter=" ">
<number variable="edition" form="ordinal"/>
<text term="edition" form="short"/>
</group>
</if>
<else>
<text variable="edition"/>
</else>
</choose>
</macro>
<!-- 电子资源的更新或修改日期 -->
<macro name="issued-date">
<date variable="issued" form="numeric"/>
</macro>
<!-- 出版年 -->
<macro name="issued-year">
<choose>
<if is-uncertain-date="issued">
<date variable="issued" prefix="[" suffix="]">
<date-part name="year" range-delimiter="-"/>
</date>
</if>
<else>
<date variable="issued">
<date-part name="year" range-delimiter="-"/>
</date>
</else>
</choose>
</macro>
<!-- 专著的出版项 -->
<macro name="publishing">
<group delimiter=": ">
<group delimiter=", ">
<group delimiter=": ">
<text variable="publisher-place"/>
<text variable="publisher"/>
</group>
<!-- 非电子资源显示“出版年” -->
<choose>
<if variable="publisher page" type="book chapter paper-conference thesis" match="any">
<text macro="issued-year"/>
</if>
<else-if variable="URL DOI" match="none">
<text macro="issued-year"/>
</else-if>
</choose>
</group>
<text variable="page"/>
</group>
<choose>
<!-- 纯电子资源显示“更新或修改日期” -->
<if variable="publisher page" type="book chapter paper-conference thesis" match="none">
<choose>
<if variable="URL DOI" match="any">
<text macro="issued-date" prefix="(" suffix=")"/>
</if>
</choose>
</if>
</choose>
<text macro="accessed-date"/>
</macro>
<!-- 其他责任者 -->
<macro name="secondary-contributor">
<names variable="translator">
<name>
<name-part name="family" text-case="uppercase"/>
<name-part name="given"/>
</name>
<label form="short" prefix=", "/>
</names>
</macro>
<!-- 连续出版物中的析出文献的出处项(年、卷、期等信息) -->
<macro name="periodical-publishing">
<group>
<group delimiter=": ">
<group>
<group delimiter=", ">
<text macro="container-title" text-case="title"/>
<choose>
<if type="article-newspaper">
<text macro="issued-date"/>
</if>
<else>
<text macro="issued-year"/>
</else>
</choose>
<text variable="volume"/>
</group>
<text variable="issue" prefix="(" suffix=")"/>
</group>
<text variable="page"/>
</group>
<text macro="accessed-date"/>
</group>
</macro>
<!-- 题名 -->
<macro name="title">
<group delimiter=", ">
<group delimiter=": ">
<text variable="title"/>
<group delimiter="&#8195;">
<choose>
<if variable="container-title" type="paper-conference" match="none">
<text macro="book-volume"/>
</if>
</choose>
<choose>
<if type="bill legal_case legislation patent regulation report standard" match="any">
<text variable="number"/>
</if>
</choose>
</group>
</group>
<choose>
<if variable="container-title" type="paper-conference" match="none">
<choose>
<if variable="event-date">
<text variable="event-place"/>
<date variable="event-date" form="text"/>
</if>
</choose>
</if>
</choose>
</group>
<text macro="type-code" prefix="[" suffix="]"/>
</macro>
<!-- 文献类型标识 -->
<macro name="type-code">
<group delimiter="/">
<choose>
<if type="article">
<choose>
<if variable="archive">
<text value="A"/>
</if>
<else>
<text value="M"/>
</else>
</choose>
</if>
<else-if type="article-journal article-magazine periodical" match="any">
<text value="J"/>
</else-if>
<else-if type="article-newspaper">
<text value="N"/>
</else-if>
<else-if type="bill collection legal_case legislation regulation" match="any">
<text value="A"/>
</else-if>
<else-if type="book chapter" match="any">
<text value="M"/>
</else-if>
<else-if type="dataset">
<text value="DS"/>
</else-if>
<else-if type="map">
<text value="CM"/>
</else-if>
<else-if type="paper-conference">
<text value="C"/>
</else-if>
<else-if type="patent">
<text value="P"/>
</else-if>
<else-if type="post post-weblog webpage" match="any">
<text value="EB"/>
</else-if>
<else-if type="report">
<text value="R"/>
</else-if>
<else-if type="software">
<text value="CP"/>
</else-if>
<else-if type="standard">
<text value="S"/>
</else-if>
<else-if type="thesis">
<text value="D"/>
</else-if>
<else>
<text value="Z"/>
</else>
</choose>
<choose>
<if variable="URL DOI" match="any">
<text value="OL"/>
</if>
</choose>
</group>
</macro>
<!-- 获取和访问路径以及 DOI -->
<macro name="url-doi">
<group delimiter=". ">
<text variable="URL"/>
<text variable="DOI" prefix="DOI:"/>
</group>
</macro>
<!-- 连续出版物的年卷期 -->
<macro name="year-volume-issue">
<group>
<group delimiter=", ">
<text macro="issued-year"/>
<text variable="volume"/>
</group>
<text variable="issue" prefix="(" suffix=")"/>
</group>
</macro>
<!-- 专著和电子资源 -->
<macro name="monograph-layout">
<group delimiter=". " suffix=".">
<text macro="author"/>
<text macro="title"/>
<text macro="secondary-contributor"/>
<text macro="edition"/>
<text macro="publishing"/>
<text macro="url-doi"/>
</group>
</macro>
<!-- 专著中的析出文献 -->
<macro name="chapter-in-book-layout">
<group delimiter=". " suffix=".">
<text macro="author"/>
<group delimiter="//">
<group delimiter=". ">
<text macro="title"/>
<text macro="secondary-contributor"/>
</group>
<group delimiter=". ">
<text macro="container-author"/>
<text macro="container-title"/>
</group>
</group>
<text macro="edition"/>
<text macro="publishing"/>
<text macro="url-doi"/>
</group>
</macro>
<!-- 连续出版物 -->
<macro name="serial-layout">
<group delimiter=". " suffix=".">
<text macro="author"/>
<text macro="title"/>
<text macro="year-volume-issue"/>
<text macro="publishing"/>
<text variable="URL"/>
<text variable="DOI" prefix="DOI:"/>
</group>
</macro>
<!-- 连续出版物中的析出文献 -->
<macro name="article-in-periodical-layout">
<group delimiter=". " suffix=".">
<text macro="author"/>
<text macro="title"/>
<text macro="periodical-publishing"/>
<text macro="url-doi"/>
</group>
</macro>
<!-- 专利文献 -->
<macro name="patent-layout">
<group delimiter=". " suffix=".">
<text macro="author"/>
<text macro="title"/>
<group>
<text macro="issued-date"/>
<text macro="accessed-date"/>
</group>
<text macro="url-doi"/>
</group>
</macro>
<!-- 正文中引用的文献标注格式 -->
<macro name="citation-layout">
<group>
<text variable="citation-number"/>
</group>
</macro>
<!-- 参考文献表格式 -->
<macro name="entry-layout">
<choose>
<if type="article-journal article-magazine article-newspaper" match="any">
<text macro="article-in-periodical-layout"/>
</if>
<else-if type="periodical">
<text macro="serial-layout"/>
</else-if>
<else-if type="patent">
<text macro="patent-layout"/>
</else-if>
<else-if type="paper-conference" variable="container-title" match="any">
<text macro="chapter-in-book-layout"/>
</else-if>
<else>
<text macro="monograph-layout"/>
</else>
</choose>
</macro>
<citation collapse="citation-number" after-collapse-delimiter=",">
<layout vertical-align="sup" delimiter="," prefix="[" suffix="]">
<text macro="citation-layout"/>
</layout>
</citation>
<bibliography entry-spacing="0" et-al-min="4" et-al-use-first="3" second-field-align="flush">
<!-- 取消这部分注释可以使用 CSL-M 的功能支持双语 -->
<!-- <layout locale="en"><text variable="citation-number" prefix="[" suffix="]"/><text macro="entry-layout"/></layout> -->
<layout>
<text variable="citation-number" prefix="[" suffix="]"/>
<text macro="entry-layout"/>
</layout>
</bibliography>
</style>
Binary file not shown.
+59
View File
@@ -0,0 +1,59 @@
.udot {
text-decoration-line: underline;
text-decoration-color: rgb(50, 50, 50);
text-decoration-style: dashed;
text-decoration-thickness: 1px;
}
.good {
background-color: forestgreen;
color: lightyellow;
}
.bad {
background-color: orangered;
color: lightyellow;
}
.del {
text-decoration-line: line-through;
text-decoration-color: rgb(222 13 13);
text-decoration-style: initial;
text-decoration-thickness: 1.5px;
}
.todo {
background-color: darkorange;
color: lightyellow;
}
.com {
background-color: #0025ff;
font-weight: bold;
color: lightyellow;
}
.add {
text-decoration-line: underline;
text-decoration-color: rgb(222 13 13);
background-color: violet;
text-decoration-style: initial;
text-decoration-thickness: 2px;
}
del {
text-decoration-line: line-through;
text-decoration-color: rgb(222 13 13);
text-decoration-style: initial;
text-decoration-thickness: 1.0px;
}
ins {
text-decoration-color: rgb(222 93 93);
background-color: violet;
text-decoration-style: initial;
text-decoration-thickness: 2px;
}