This commit is contained in:
2025-06-08 16:32:42 +08:00
parent 6c36df26ce
commit 5429ecc231
98 changed files with 224 additions and 28993 deletions
@@ -1 +0,0 @@
$if(it.department)$$it.department$,$endif$ $if(it.name)$$it.name$,$endif$ $if(it.city)$$it.city$,$endif$ $if(it.country)$$it.country$$endif$
@@ -1,30 +0,0 @@
title: ACS Journal Format
author: Charles Teague
version: 0.9.2
contributes:
formats:
common:
csl: american-chemical-society.csl
shortcodes:
- fancy-text
filters:
- latex-environment
environments:
- scheme
- chart
- graph
- tocentry
- acknowledgement
- suppinfo
commands:
- ce
html: default
pdf:
cite-method: natbib
biblio-config: false
format-resources:
- achemso.bst
template-partials:
- "doc-class.tex"
- "title.tex"
- "_affiliation.tex"
@@ -1,7 +0,0 @@
title: Fancy Text
author: Posit Software, PBC
version: 1.1.1
quarto-required: ">=1.2.198"
contributes:
shortcodes:
- fancy-text.lua
@@ -1,78 +0,0 @@
-- shortcode that provides a nicely formatted 'LaTeX' string
function latex()
if quarto.doc.is_format("pdf") then
return pandoc.RawBlock('tex', '{\\LaTeX}')
elseif quarto.doc.is_format("html") then
return pandoc.Math('InlineMath', "\\LaTeX")
else
return pandoc.Span('LaTeX')
end
end
function tex()
if quarto.doc.is_format("pdf") then
return pandoc.RawBlock('tex', '{\\TeX}')
elseif quarto.doc.is_format("html") then
return pandoc.Math('InlineMath', "\\TeX")
else
return pandoc.Span('TeX')
end
end
-- shortcode that provides a nicely formatted 'bibtex' string
function bibtex()
if quarto.doc.is_format("pdf") then
return pandoc.RawBlock('tex', '\\textsc{Bib}{\\TeX}')
elseif quarto.doc.is_format("html") then
return pandoc.RawBlock('html', '<span style="font-variant: small-caps;">Bib</span><span style="letter-spacing:-2px;">T</span><sub style="font-size: inherit; letter-spacing:-1px;">E</sub>X')
else
return pandoc.Span('BibTeX')
end
end
function ldots()
if quarto.doc.is_format("pdf") then
return pandoc.RawBlock('tex', '\\ldots')
elseif quarto.doc.is_format("html") then
return pandoc.RawBlock('html', '&#8230;')
else
return "..."
end
end
function vdots()
if quarto.doc.is_format("pdf") then
return pandoc.Math('InlineMath', "\\vdots")
elseif quarto.doc.is_format("html") then
return pandoc.RawBlock('html', '&#8942;')
else
return "..."
end
end
function ddots()
if quarto.doc.is_format("pdf") then
return pandoc.Math('InlineMath', "\\ddots")
elseif quarto.doc.is_format("html") then
return pandoc.RawBlock('html', '&#8945;')
else
return "..."
end
end
function pct()
local pct
if quarto.doc.is_format("pdf") then
return pandoc.Math('InlineMath', '\\%')
else
return pandoc.Str("%")
end
end
function R2()
if quarto.doc.is_format("pdf") then
return pandoc.Math('InlineMath', "R^2")
else
return {pandoc.Str("R"), pandoc.Superscript("2")}
end
end
@@ -1,9 +0,0 @@
title: LaTeX Environment
author: Posit Software, PBC
version: 1.2.1
quarto-required: ">=1.3"
contributes:
filters:
- latex-environment.lua
format:
pdf: default
@@ -1,150 +0,0 @@
-- environment.lua
-- Copyright (C) 2020 by RStudio, PBC
local classEnvironments = pandoc.MetaMap({})
local classCommands = pandoc.MetaMap({})
-- helper that identifies arrays
local function tisarray(t)
local i = 0
for _ in pairs(t) do
i = i + 1
if t[i] == nil then return false end
end
return true
end
-- reads the environments
local function readEnvironments(meta)
local env = meta['environments']
if env ~= nil then
if tisarray(env) then
-- read an array of strings
for i, v in ipairs(env) do
local value = pandoc.utils.stringify(v)
classEnvironments[value] = value
end
else
-- read key value pairs
for k, v in pairs(env) do
local key = pandoc.utils.stringify(k)
local value = pandoc.utils.stringify(v)
classEnvironments[key] = value
end
end
end
end
local function readCommands(meta)
local env = meta['commands']
if env ~= nil then
if tisarray(env) then
-- read an array of strings
for i, v in ipairs(env) do
local value = pandoc.utils.stringify(v)
classCommands[value] = value
end
else
-- read key value pairs
for k, v in pairs(env) do
local key = pandoc.utils.stringify(k)
local value = pandoc.utils.stringify(v)
classCommands[key] = value
end
end
end
end
local function readEnvsAndCommands(meta)
readEnvironments(meta)
readCommands(meta)
end
-- use the environments from metadata to
-- emit a custom environment for latex
local function writeEnvironments(divEl)
if quarto.doc.is_format("latex") then
for k, v in pairs(classEnvironments) do
if divEl.attr.classes:includes(k) then
-- process this into a latex environment
local beginEnv = '\\begin' .. '{' .. v .. '}'
local endEnv = '\n\\end{' .. v .. '}'
-- check if custom options or arguments are present
-- and add them to the environment accordingly
local opts = divEl.attr.attributes['options']
if opts then
beginEnv = beginEnv .. '[' .. opts .. ']'
end
local args = divEl.attr.attributes['arguments']
if args then
beginEnv = beginEnv .. '{' .. args .. '}'
end
-- if the first and last div blocks are paragraphs then we can
-- bring the environment begin/end closer to the content
if #divEl.content > 0 and divEl.content[1].t == "Para" and divEl.content[#divEl.content].t == "Para" then
table.insert(divEl.content[1].content, 1, pandoc.RawInline('tex', beginEnv .. "\n"))
table.insert(divEl.content[#divEl.content].content, pandoc.RawInline('tex', "\n" .. endEnv))
else
table.insert(divEl.content, 1, pandoc.RawBlock('tex', beginEnv))
table.insert(divEl.content, pandoc.RawBlock('tex', endEnv))
end
return divEl
end
end
end
end
local function buildCommandArgs(opts, format)
local function wrap(o)
return string.format(format, o)
end
local t = pandoc.List()
for str in string.gmatch(opts, "([^"..",".."]+)") do
t:insert(str)
end
return table.concat(t:map(wrap), "")
end
-- use the environments from metadata to
-- emit a custom environment for latex
local function writeCommands(spanEl)
if quarto.doc.is_format("latex") then
for k, v in pairs(classCommands) do
if spanEl.attr.classes:includes(k) then
-- resolve the begin command
local beginCommand = '\\' .. pandoc.utils.stringify(v)
local opts = spanEl.attr.attributes['options']
local args = spanEl.attr.attributes['arguments']
if opts then
beginCommand = beginCommand .. buildCommandArgs(opts, "[%s]")
end
if args then
beginCommand = beginCommand .. buildCommandArgs(args, "{%s}")
end
local beginCommandRaw = pandoc.RawInline('latex', beginCommand .. '{')
-- the end command
local endCommandRaw = pandoc.RawInline('latex', '}')
-- attach the raw inlines to the span contents
local result = spanEl.content
table.insert(result, 1, beginCommandRaw)
table.insert(result, endCommandRaw)
return result
end
end
end
end
-- Run in two passes so we process metadata
-- and then process the divs
return {
{ Meta = readEnvsAndCommands },
{ Div = writeEnvironments, Span = writeCommands }
}
File diff suppressed because it is too large Load Diff
@@ -1,252 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" page-range-format="expanded" default-locale="en-US">
<info>
<title>American Chemical Society</title>
<title-short>ACS</title-short>
<id>http://www.zotero.org/styles/american-chemical-society</id>
<link href="http://www.zotero.org/styles/american-chemical-society" rel="self"/>
<link href="http://pubs.acs.org/doi/pdf/10.1021/bk-2006-STYG.ch014" rel="documentation"/>
<author>
<name>Julian Onions</name>
<email>julian.onions@gmail.com</email>
</author>
<contributor>
<name>Ivan Bushmarinov</name>
<email>ib@ineos.ac.ru</email>
</contributor>
<category citation-format="numeric"/>
<category field="chemistry"/>
<summary>The American Chemical Society style.</summary>
<updated>2015-09-18T15:13:17+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="en">
<terms>
<term name="editortranslator" form="short">
<single>ed. and translator</single>
<multiple>eds. and translators</multiple>
</term>
<term name="translator" form="short">
<single>translator</single>
<multiple>translators</multiple>
</term>
<term name="collection-editor" form="short">
<single>series ed.</single>
<multiple>series eds.</multiple>
</term>
</terms>
</locale>
<macro name="editor">
<group delimiter="; ">
<names variable="editor translator" delimiter="; ">
<name sort-separator=", " initialize-with=". " name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
<label form="short" prefix=", " text-case="title"/>
</names>
<names variable="collection-editor">
<name sort-separator=", " initialize-with=". " name-as-sort-order="all" delimiter=", " delimiter-precedes-last="always"/>
<label form="short" prefix=", " text-case="title"/>
</names>
</group>
</macro>
<macro name="author">
<names variable="author" suffix=".">
<name sort-separator=", " initialize-with=". " name-as-sort-order="all" delimiter="; " delimiter-precedes-last="always"/>
<label form="short" prefix=", " text-case="capitalize-first"/>
</names>
</macro>
<macro name="publisher">
<group delimiter=": ">
<text variable="publisher"/>
<text variable="publisher-place"/>
</group>
</macro>
<macro name="volume">
<group delimiter=" ">
<text term="volume" form="short" text-case="capitalize-first"/>
<text variable="volume"/>
</group>
</macro>
<macro name="series">
<text variable="collection-title"/>
</macro>
<macro name="pages">
<label variable="page" form="short" suffix=" " strip-periods="true"/>
<text variable="page"/>
</macro>
<macro name="book-container">
<group delimiter=" ">
<choose>
<if type="entry-dictionary entry-encyclopedia" match="none">
<group delimiter=" ">
<text term="in" text-case="capitalize-first"/>
<text variable="container-title" font-style="italic"/>
</group>
</if>
<else>
<text variable="container-title" font-style="italic"/>
</else>
</choose>
</group>
</macro>
<macro name="issued">
<date variable="issued" delimiter=" ">
<date-part name="year"/>
</date>
</macro>
<macro name="full-issued">
<date variable="issued" delimiter=" ">
<date-part name="month" form="long" suffix=" "/>
<date-part name="day" suffix=", "/>
<date-part name="year"/>
</date>
</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" suffix="."/>
</else>
</choose>
</macro>
<citation collapse="citation-number">
<sort>
<key variable="citation-number"/>
</sort>
<layout delimiter="," vertical-align="sup">
<text variable="citation-number"/>
</layout>
</citation>
<bibliography second-field-align="flush" entry-spacing="0">
<layout suffix=".">
<text variable="citation-number" prefix="(" suffix=") "/>
<text macro="author" suffix=" "/>
<choose>
<if type="article-journal review" match="any">
<group delimiter=" ">
<text variable="container-title" font-style="italic" form="short"/>
<group delimiter=", ">
<text macro="issued" font-weight="bold"/>
<choose>
<if variable="volume">
<group delimiter=" ">
<text variable="volume" font-style="italic"/>
<text variable="issue" prefix="(" suffix=")"/>
</group>
</if>
<else-if variable="issue">
<group delimiter=" ">
<text term="issue" form="short" text-case="capitalize-first"/>
<text variable="issue"/>
</group>
</else-if>
</choose>
<text variable="page"/>
</group>
</group>
</if>
<else-if type="article-magazine article-newspaper article" match="any">
<group delimiter=" ">
<text variable="container-title" font-style="italic" suffix="."/>
<text macro="edition"/>
<text macro="publisher"/>
<group delimiter=", ">
<text macro="full-issued"/>
<text macro="pages"/>
</group>
</group>
</else-if>
<else-if type="thesis">
<group delimiter=", ">
<group delimiter=". ">
<text variable="title"/>
<text variable="genre"/>
</group>
<text macro="publisher"/>
<text macro="issued"/>
<text macro="volume"/>
<text macro="pages"/>
</group>
</else-if>
<else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
<group delimiter="; ">
<group delimiter=", ">
<text variable="title" font-style="italic"/>
<text macro="edition"/>
</group>
<text macro="editor" prefix=" "/>
<text macro="series"/>
<choose>
<if type="report">
<group delimiter=" ">
<text variable="genre"/>
<text variable="number"/>
</group>
</if>
</choose>
<group delimiter=", ">
<text macro="publisher"/>
<text macro="issued"/>
</group>
<group delimiter=", ">
<text macro="volume"/>
<text macro="pages"/>
</group>
</group>
</else-if>
<else-if type="patent">
<group delimiter=", ">
<group delimiter=". ">
<text variable="title"/>
<text variable="number"/>
</group>
<date variable="issued" form="text"/>
</group>
</else-if>
<else-if type="chapter paper-conference entry-dictionary entry-encyclopedia" match="any">
<group delimiter="; ">
<text macro="book-container"/>
<text macro="editor"/>
<text macro="series"/>
<group delimiter=", ">
<text macro="publisher"/>
<text macro="issued"/>
</group>
<group delimiter=", ">
<text macro="volume"/>
<text macro="pages"/>
</group>
</group>
</else-if>
<else-if type="webpage">
<group delimiter=" ">
<text variable="title"/>
<text variable="URL"/>
<date variable="accessed" prefix="(accessed " suffix=")" delimiter=" ">
<date-part name="month" form="short" strip-periods="true"/>
<date-part name="day" suffix=", "/>
<date-part name="year"/>
</date>
</group>
</else-if>
<else>
<group delimiter=", ">
<group delimiter=". ">
<text variable="title"/>
<text variable="container-title" font-style="italic"/>
</group>
<group delimiter=", ">
<text macro="issued"/>
<text variable="volume" font-style="italic"/>
<text variable="page"/>
</group>
</group>
</else>
</choose>
</layout>
</bibliography>
</style>
File diff suppressed because it is too large Load Diff
@@ -1,5 +0,0 @@
\documentclass[journal=$journal.id$,manuscript=$journal.type$$if(journal.layout)$,layout=$journal.layout$$endif$$if(journal.hide-email)$,email=false$endif$]{achemso}
\usepackage[version=3]{mhchem}
\newcommand*\mycommand[1]{\texttt{\emph{#1}}}
-40
View File
@@ -1,40 +0,0 @@
$for(by-author)$
\author{$by-author.name.literal$}
$if(by-author.affiliations)$
$if(by-author.affiliations/first)$
$for(by-author.affiliations/first)$
\affiliation{$_affiliation.tex()$}
$endfor$
$if(by-author.affiliations/rest/first)$
$for(by-author.affiliations/rest/first)$
\affiliation{$_affiliation.tex()$}
$endfor$
$endif$
$endif$
$endif$
$if(by-author.note.text)$
\altaffiliation{$by-author.note.text$}
$endif$
$if(by-author.email)$
\email{$by-author.email$}
$endif$
$if(by-author.phone)$
\phone{$by-author.phone$}
$endif$
$if(by-author.fax)$
\fax{$by-author.fax$}
$endif$
$endfor$
$if(abbr)$
\abbreviations{$journal.abbreviations$}
$endif$
$if(keywords)$
\keywords{$keywords$}
$endif$
\title[$title-short$]{$title$}
\makeatletter