mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
[cm6] Include affiliation in document preamble (#14824)
* [cm6] Include affiliation in document preamble * add affil command * Add mapping to attributeValue --------- Co-authored-by: Alf Eaton <alf.eaton@overleaf.com> GitOrigin-RevId: 6034e07bc5fec23ea704d820acbbe4e77caba651
This commit is contained in:
committed by
Copybot
parent
20f49ae325
commit
f7cf7b9028
@@ -217,6 +217,14 @@ export const atomicDecorations = (options: Options) => {
|
||||
preamble.authors.push({ node, content })
|
||||
preamble.to = nodeRef.node.to
|
||||
}
|
||||
} else if (
|
||||
nodeRef.node.type.is('Affil') ||
|
||||
nodeRef.node.type.is('Affiliation')
|
||||
) {
|
||||
const node = nodeRef.node.getChild('TextArgument')
|
||||
if (node) {
|
||||
preamble.to = nodeRef.node.to
|
||||
}
|
||||
}
|
||||
|
||||
if (nodeRef.type.is('$Environment')) {
|
||||
|
||||
@@ -178,6 +178,9 @@ export const LaTeXLanguage = LRLanguage.define({
|
||||
Comment: t.comment,
|
||||
'UsePackage/OptionalArgument/ShortOptionalArg/Normal': t.attributeValue,
|
||||
'UsePackage/ShortTextArgument/ShortArg/Normal': t.tagName,
|
||||
'Affiliation/OptionalArgument/ShortOptionalArg/Normal':
|
||||
t.attributeValue,
|
||||
'Affil/OptionalArgument/ShortOptionalArg/Normal': t.attributeValue,
|
||||
'LiteralArgContent VerbContent VerbatimContent LstInlineContent':
|
||||
t.string,
|
||||
'NewCommand/LiteralArgContent': t.typeName,
|
||||
|
||||
@@ -88,6 +88,8 @@
|
||||
BibliographyCtrlSeq,
|
||||
BibliographyStyleCtrlSeq,
|
||||
AuthorCtrlSeq,
|
||||
AffilCtrlSeq,
|
||||
AffiliationCtrlSeq,
|
||||
MaketitleCtrlSeq,
|
||||
TextColorCtrlSeq,
|
||||
ColorBoxCtrlSeq,
|
||||
@@ -241,6 +243,12 @@ KnownCommand {
|
||||
Author {
|
||||
AuthorCtrlSeq optionalWhitespace? OptionalArgument? optionalWhitespace? TextArgument
|
||||
} |
|
||||
Affil {
|
||||
AffilCtrlSeq optionalWhitespace? OptionalArgument? optionalWhitespace? TextArgument
|
||||
} |
|
||||
Affiliation {
|
||||
AffiliationCtrlSeq optionalWhitespace? OptionalArgument? optionalWhitespace? TextArgument
|
||||
} |
|
||||
DocumentClass {
|
||||
DocumentClassCtrlSeq optionalWhitespace? OptionalArgument?
|
||||
DocumentClassArgument { ShortTextArgument }
|
||||
|
||||
@@ -24,6 +24,8 @@ import {
|
||||
HboxCtrlSeq,
|
||||
TitleCtrlSeq,
|
||||
AuthorCtrlSeq,
|
||||
AffilCtrlSeq,
|
||||
AffiliationCtrlSeq,
|
||||
DocumentClassCtrlSeq,
|
||||
UsePackageCtrlSeq,
|
||||
HrefCtrlSeq,
|
||||
@@ -589,6 +591,8 @@ const otherKnowncommands = {
|
||||
'\\hbox': HboxCtrlSeq,
|
||||
'\\title': TitleCtrlSeq,
|
||||
'\\author': AuthorCtrlSeq,
|
||||
'\\affil': AffilCtrlSeq,
|
||||
'\\affiliation': AffiliationCtrlSeq,
|
||||
'\\documentclass': DocumentClassCtrlSeq,
|
||||
'\\usepackage': UsePackageCtrlSeq,
|
||||
'\\href': HrefCtrlSeq,
|
||||
|
||||
Reference in New Issue
Block a user