diff --git a/backendtest-lanparal/egdoublelan-nm.pdf b/backendtest-lanparal/egdoublelan-nm.pdf index 3c64199..9e24f73 100644 Binary files a/backendtest-lanparal/egdoublelan-nm.pdf and b/backendtest-lanparal/egdoublelan-nm.pdf differ diff --git a/backendtest-lanparal/egdoublelan.pdf b/backendtest-lanparal/egdoublelan.pdf index 953d43e..44356e3 100644 Binary files a/backendtest-lanparal/egdoublelan.pdf and b/backendtest-lanparal/egdoublelan.pdf differ diff --git a/backendtest-lanparal/makeclearall.bat b/backendtest-lanparal/makeclearall.bat new file mode 100644 index 0000000..cede60f --- /dev/null +++ b/backendtest-lanparal/makeclearall.bat @@ -0,0 +1,11 @@ +@echo off +del /q *.aux *.bbl *.blg *.log *.out *.toc *.bcf *.xml *.synctex *.nlo *.nls *.bak *.ind *.idx *.ilg *.lof *.lot *.ent-x *.tmp *.ltx *.los *.lol *.loc *.listing *.gz *.userbak *.nav *.snm *.vrb + + +del /q *.nav *.snm *.vrb *.fls *.xdv *.fdb_latexmk new*.* + +del /q new*.bib new*.json new*.md eg*.bib *.py *.sty + +del /q eg*.bib eg*.json eg*.html eg*.txt + +RD /S /Q __pycache__ \ No newline at end of file diff --git a/backendtest-lanparal/readme.md b/backendtest-lanparal/readme.md new file mode 100644 index 0000000..50d1a98 --- /dev/null +++ b/backendtest-lanparal/readme.md @@ -0,0 +1,6 @@ + +本文件夹用于测试bibmap作为后端程序,来配合bibmap.sty宏包来生成双语对照参考文献。 + +测试方式: + +直接运行 maketest.bat diff --git a/backendtest-tabbib/makeclearall.bat b/backendtest-tabbib/makeclearall.bat new file mode 100644 index 0000000..cede60f --- /dev/null +++ b/backendtest-tabbib/makeclearall.bat @@ -0,0 +1,11 @@ +@echo off +del /q *.aux *.bbl *.blg *.log *.out *.toc *.bcf *.xml *.synctex *.nlo *.nls *.bak *.ind *.idx *.ilg *.lof *.lot *.ent-x *.tmp *.ltx *.los *.lol *.loc *.listing *.gz *.userbak *.nav *.snm *.vrb + + +del /q *.nav *.snm *.vrb *.fls *.xdv *.fdb_latexmk new*.* + +del /q new*.bib new*.json new*.md eg*.bib *.py *.sty + +del /q eg*.bib eg*.json eg*.html eg*.txt + +RD /S /Q __pycache__ \ No newline at end of file diff --git a/backendtest-tabbib/readme.md b/backendtest-tabbib/readme.md new file mode 100644 index 0000000..4927081 --- /dev/null +++ b/backendtest-tabbib/readme.md @@ -0,0 +1,6 @@ + +本文件夹用于测试bibmap作为后端程序,来配合bibmap.sty宏包来生成表格式的参考文献。 + +测试方式: + +直接运行 maketest.bat diff --git a/backendtest/egchapterbib.pdf b/backendtest/egchapterbib.pdf index 427f2f0..161ac23 100644 Binary files a/backendtest/egchapterbib.pdf and b/backendtest/egchapterbib.pdf differ diff --git a/backendtest/egcitations.pdf b/backendtest/egcitations.pdf index 021d85b..aa6504a 100644 Binary files a/backendtest/egcitations.pdf and b/backendtest/egcitations.pdf differ diff --git a/backendtest/egmulticitesty.pdf b/backendtest/egmulticitesty.pdf index 633214f..1f96aac 100644 Binary files a/backendtest/egmulticitesty.pdf and b/backendtest/egmulticitesty.pdf differ diff --git a/backendtest/egmwe.pdf b/backendtest/egmwe.pdf index c6fa945..4a99ab3 100644 Binary files a/backendtest/egmwe.pdf and b/backendtest/egmwe.pdf differ diff --git a/backendtest/egnameformat.pdf b/backendtest/egnameformat.pdf index c238602..ea4214d 100644 Binary files a/backendtest/egnameformat.pdf and b/backendtest/egnameformat.pdf differ diff --git a/backendtest/egtest.pdf b/backendtest/egtest.pdf index 3c7ef9c..528612f 100644 Binary files a/backendtest/egtest.pdf and b/backendtest/egtest.pdf differ diff --git a/backendtest/makeclearall.bat b/backendtest/makeclearall.bat new file mode 100644 index 0000000..cede60f --- /dev/null +++ b/backendtest/makeclearall.bat @@ -0,0 +1,11 @@ +@echo off +del /q *.aux *.bbl *.blg *.log *.out *.toc *.bcf *.xml *.synctex *.nlo *.nls *.bak *.ind *.idx *.ilg *.lof *.lot *.ent-x *.tmp *.ltx *.los *.lol *.loc *.listing *.gz *.userbak *.nav *.snm *.vrb + + +del /q *.nav *.snm *.vrb *.fls *.xdv *.fdb_latexmk new*.* + +del /q new*.bib new*.json new*.md eg*.bib *.py *.sty + +del /q eg*.bib eg*.json eg*.html eg*.txt + +RD /S /Q __pycache__ \ No newline at end of file diff --git a/backendtest/maketest.bat b/backendtest/maketest.bat index 8bea799..a6bf594 100644 --- a/backendtest/maketest.bat +++ b/backendtest/maketest.bat @@ -1,7 +1,7 @@ @echo off -call makeclear +call makecleareg start cmd /c "call d:\Anaconda3\Scripts\activate.bat && call activate base && call makecompile.bat" diff --git a/backendtest/readme.MD b/backendtest/readme.MD new file mode 100644 index 0000000..1c1cbce --- /dev/null +++ b/backendtest/readme.MD @@ -0,0 +1,6 @@ + +本文件夹用于测试bibmap作为后端程序,来配合bibmap.sty宏包生成参考文献。 + +测试方式: + +直接运行 maketest.bat diff --git a/bibfiles/readme.md b/bibfiles/readme.md new file mode 100644 index 0000000..e0b3969 --- /dev/null +++ b/bibfiles/readme.md @@ -0,0 +1,3 @@ + + +本文件夹包含一些用于测试的bib文件 diff --git a/bibmap.py b/bibmap.py index c13975a..9513181 100644 --- a/bibmap.py +++ b/bibmap.py @@ -133,6 +133,7 @@ bibliotableflag='false' #输出表格形式的参考文献表的内容的标识 + # # #打印格式化后的全部文献条目文本 @@ -522,7 +523,11 @@ def formatallbibliography(): elif 'title' in bibentry:#若不存在则首先title域做判断 language=languagejudgement(bibentry,'title') bibentry['language']=language - print('language of bibentry: ',bibentry['entrykey'],' is: ',bibentry['language']) + if 'language' in bibentry: + print('language of bibentry: ',bibentry['entrykey'],' is: ',bibentry['language']) + else: + print('language of bibentry: ',bibentry['entrykey'],' is: none') + # #2.1 姓名列表的歧义的处理,先于排序 @@ -1080,6 +1085,7 @@ def dealambiguity(newbibentries): #1.1 根据基本选项判断原始状态下是否需要存在有歧义的文献 labelnamerawstrs={} for bibentry in newbibentries: + #print(f'{bibentry=}') #1. 计算姓名原始总数和截断后的总数 rawlabelnames=bibentry['labelnameraw'] @@ -1376,7 +1382,7 @@ def labelnamelistparser(bibentry,fieldsource): #首先姓名列表进行分解,包括用' and '和' AND '做分解 #利用safetysplit函数实现安全的分解 - seps=[' and ',' AND '] + seps=[' and ',' AND ', "; "]#增加一个对;的解析 fieldcontents=fieldcontents.strip() fieldauthors=safetysplit(fieldcontents,seps) @@ -1989,7 +1995,7 @@ def citenamelistparser(bibentry,fieldsource,options): #首先姓名列表进行分解,包括用' and '和' AND '做分解 #利用safetysplit函数实现安全的分解 - seps=[' and ',' AND '] + seps=[' and ',' AND ', "; "]#增加一个对;的解析 fieldcontents=fieldcontents.strip() fieldauthors=safetysplit(fieldcontents,seps) @@ -2135,7 +2141,7 @@ def namelistparser(bibentry,fieldsource,options): #首先姓名列表进行分解,包括用' and '和' AND '做分解 #利用safetysplit函数实现安全的分解 - seps=[' and ',' AND '] + seps=[' and ',' AND ', "; "]#增加一个对;的解析 fieldcontents=fieldcontents.strip() fieldauthors=safetysplit(fieldcontents,seps) @@ -2813,10 +2819,33 @@ def mkstrsetencecase(fieldstring): strtoreturn=a return strtoreturn +#首字母大写其它不变的函数 +def capitalize_first_letter(s): + if len(s)>1: + return s[0].upper() + s[1:] + elif len(s)==1: + return s[0].upper() + else: + return s + +#判断单词中是否包含数字 +def contains_digit(s): + return any(char.isdigit() for char in s) + + +#增加titlecase处理函数用于保证'后的字符不会被大写 +def titlecaseudf(s): + #return re.sub("[A-Za-z]+((\-|\')[A-Za-z]+)?",lambda mo: mo.group(0).capitalize(),s) + return re.sub("[A-Za-z]+(\'[A-Za-z]+)?",lambda mo: mo.group(0).capitalize(),s) + # #增加对介词等进行保护 def mkstrtitlecasestd(fieldstring): + + if fieldlanguage(fieldstring) in ['chinese','japanese','korean']: + return fieldstring #当英文字符串是在中文中间时不变化其大小写 + #查找命令和{}保护的所有字符串 #思路是存储信息并利用替换进行保护 @@ -2828,7 +2857,7 @@ def mkstrtitlecasestd(fieldstring): strsn=0 for stra1 in s0: strsn=strsn+1 - a=a.replace(stra1,'$'+str(strsn)+'$') + a=a.replace(stra1,'@'+str(strsn)+'@') #@符号不常用,所以用来做标记字符而$是数学公式符号,有些字符串中是存在的 #保护:{}内容 s1=re.findall('\{.*?\}',a) @@ -2838,40 +2867,55 @@ def mkstrtitlecasestd(fieldstring): strsn=len(s0) for stra1 in s1: strsn=strsn+1 - a=a.replace(stra1,'$'+str(strsn)+'$') + a=a.replace(stra1,'@'+str(strsn)+'@') #需要保护的字符串,如介词、连词等 #主要是:不在句首的冠词、介词、连词和作为不定式的to - protectstr=['a','an','the', 'for', 'and', 'nor', 'but', 'or', 'yet', 'so', 'on','in','of','and','to', 'at','around','by','after','along','for','from','with','without']+caseprotectstrs - ndtransstr=['A','An','The', 'For', 'And', 'Nor', 'But', 'Or', 'Yet', 'So', 'On','In','Of','And','To', 'At','Around','By','After','Along','For','From','With','Without'] + protectstr=['a','an','the', 'for', 'and', 'with','nor', 'but', 'or', 'via','yet', 'so', 'on','in','of','and','to', 'at','around','by','after','along','for','from','with','without']+caseprotectstrs + ndtransstr=['A','An','The', 'For', 'And', 'With','Nor', 'But', 'Or', 'Via','Yet', 'So', 'On','In','Of','And','To', 'At','Around','By','After','Along','For','From','With','Without'] + #将字符串中的xa0字符切换成空格即x20 + a=a.replace("\xa0"," ") #对字符串做大小写变换: - b=a.split(" ") - c=[] - for s2 in b: - if s2 in protectstr: - c.append(s2) - elif s2 in ndtransstr: - c.append(s2.lower()) - else: - c.append(s2.title()) - c[0]=c[0].title() - a=" ".join(c) - #a=a.title() + #首先根据冒号将句子分为两个部分 + twoparts=a.split(":") + twopartsnew=[] + for a1 in twoparts: + #然后对每个部分做处理 + b=re.split('(\x20|\/|\-|\(|\))',a1.strip()) #保留间隔符 而不像a.split(" ")那样去掉间隔符 + c=[] + for s2 in b: + if s2 in protectstr: + c.append(s2) + elif s2 in ndtransstr: + c.append(s2.lower()) + elif contains_digit(s2): + c.append(s2) + else: + c.append(titlecaseudf(s2)) + #print(f'{s2=}',c[-1]) + + #句首大写 + c[0]=capitalize_first_letter(c[0]) #capitalize() 函数会让首字母外的字符变小写 + a="".join(c) + twopartsnew.append(a) + #a=a.title() + a=': '.join(twopartsnew) + #对字符串做还原 if s1: strsn=len(s0) for stra1 in s1: strsn=strsn+1 - a=a.replace('$'+str(strsn)+'$',stra1) + a=a.replace('@'+str(strsn)+'@',stra1) if s0: strsn=0 for stra1 in s0: strsn=strsn+1 - a=a.replace('$'+str(strsn)+'$',stra1) + a=a.replace('@'+str(strsn)+'@',stra1) strtoreturn=a return strtoreturn @@ -2923,13 +2967,14 @@ def mkstrtitlecase(fieldstring): elif s2 in ndtransstr: c.append(s2.lower()) else: - print('s2=',s2,s2[0] == s2[0].upper(),flg_alluppercase) - if s2[0] == s2[0].upper() and (not flg_alluppercase): - print('not change') - c.append(s2) - else: - print('change') - c.append(s2.title()) + if s2: + print('s2=',s2,s2[0] == s2[0].upper(),flg_alluppercase) + if s2[0] == s2[0].upper() and (not flg_alluppercase): + print('not change') + c.append(s2) + else: + print('change') + c.append(s2.title()) if (c[0] not in protectstr) and (c[0][0] != c[0][0].upper() and (not flg_alluppercase) ): c[0]=c[0].title() a=" ".join(c) @@ -3428,18 +3473,34 @@ def bibentryparsing(): for line in bibfilecontents:#遍历所有行 #print(line) - line=line.lstrip() - if line.startswith("@") and not "@comment" in line.lower() and not "@string" in line.lower():#判断条目开始行 + if line.lstrip().startswith("@") and not "@comment" in line.lower() and not "@string" in line.lower():#判断条目开始行 + + if entrystated:#前一个条目尚未结束,可能是没有检测到} + #但已经到新的条目了,所以要先把的条目结束 + print('entry:',bibentry) + bibentries.append(bibentry) + bibentry={} + + #新条目开始 entrysn=entrysn+1 - entrystated=True #新条目开始 - #print('entry No.=',entrysn) entrynow=line.lstrip('@').split(sep='{', maxsplit=1) - #print(entrynow) entrytype=entrynow[0] - bibentry['entrytype']=entrytype.lower()#条目类型小写,方便比较 entrykey=entrynow[1].split(sep=',', maxsplit=1)[0] + + entrystated=True #新条目开始 + bibentry['entrytype']=entrytype.lower()#条目类型小写,方便比较 bibentry['entrykey']=entrykey bibentry['entrysn']=entrysn + + ''' + print(f'{entrystated=}') + print('entry No.=',entrysn) + print(entrynow) + print(f'{entrykey=}') + print(f'{entrysn=}') + print('print anykey to continue') + anykey=input() + ''' elif entrystated: #只有新条目开始了才有意义 if fieldvalended: #当前行不是前面的未结束域的值 @@ -3519,7 +3580,7 @@ def bibentryparsing(): else: #当前行是前面的未结束域的值,因此直接往前面的域值添加即可 fieldvalcontinued=True - + entryfieldline=line if enclosenone:#当域没有包围符号时,接续的行可能是用逗号结束的域,也可能没有逗号,而用}直接结束条目信息 @@ -3550,10 +3611,20 @@ def bibentryparsing(): #接续的行可能存在大量的空格,所以先进行处理使得多个空格或tab转换成一个空格 #只要做strip后不存在在字符,那么该字符必然是空格 #2019.04.09,hzz - if not entryfieldline[0].strip(): - entryfieldline=' '+entryfieldline.strip() + entryfieldlineaddspace='' + if not entryfieldline[0].strip(): #存在空格 + #print('space exist') + entryfieldlineaddspace=' '+entryfieldline.strip() + else: + #print('space not exist') + if entryfield in ['author','editor','translator','bookauthor']: + entryfieldlineaddspace=' '+entryfieldline.strip() + else:# 默认还是加一个空格的好 + entryfieldlineaddspace=' '+entryfieldline.strip() + + #print(f'{entryfieldlineaddspace=}') - for chari in entryfieldline:#这里strip可能会把接续行前面的空格去掉,所以考虑不做strip .strip() + for chari in entryfieldlineaddspace:#这里strip可能会把接续行前面的空格去掉,所以考虑不做strip .strip() fieldvalue=fieldvalue+chari #print('chari=',chari) if chari =='{': @@ -3572,7 +3643,7 @@ def bibentryparsing(): elif chari =='"': counterquotes=counterquotes+1 if not enclosebracket: - if mod(counterquotes,2)==0: + if counterquotes%2==0: bibentry[entryfield]=fieldvalue[1:-1] fieldvalue="" counterbracket=0 @@ -3611,6 +3682,7 @@ def bibentryparsing(): bibcommentcounter=len(bibcomments) bibstringcounter=len(bibstrings) + if not bibentrycounter==entrysn or not bibcommentcounter==commentsn or not bibstringcounter==stringsn: try: print('entrysn=',entrysn,' commentsn=',commentsn,' stringsn=',stringsn) @@ -3618,6 +3690,7 @@ def bibentryparsing(): raise BibParsingError('bib file parsing went wrong!') except BibParsingError as e: raise BibParsingError(e.message) + print('total entries=',bibentrycounter) #输出解析后的bib文件信息 diff --git a/bibmap.sty b/bibmap.sty index b16be6d..1eec50c 100644 --- a/bibmap.sty +++ b/bibmap.sty @@ -87,7 +87,7 @@ % % 宏包选项初始化处理,process package options: % -\ProcessKeysOptions {bibmap} +\ProcessKeyOptions [ bibmap ] % % diff --git a/bibmaptitlecase.py b/bibmaptitlecase.py index 276dc18..c94b7e7 100644 --- a/bibmaptitlecase.py +++ b/bibmaptitlecase.py @@ -3,24 +3,34 @@ #数据修改的设置 # #注意:域如果不存在且需要终止,应加上"final":True + +# 大小写字母保护的字符串 +CaseProtect=['AIAA','IEEE','AAAI',"GECCO\'18","ACML","SAR",'BVR','UAV','UCAV','UAVs','PSO','AI','IJCAI','WIC','ACM', + 'CICAI','CDC','CoRR','IT','CAA','PSO','CAC','ICLR','II','III','IV','NIPS','arXiv','VI','VII', + 'VIII','IJCNN','AAMAS','ICGNC','CIG','ICUS','ACC','ICMA','MATEC','ACTA'] +#其他情况请在bib文件中修改做保护,比如用{}包起来,NIPS-12这种用带数字的单词会自动保护 +#平时积累的时候就要做保护 + sourcemaps=[ [#map1:将设置title为sentencecase {"fieldsource":"title","final":True},# - {"fieldset":"title","origfieldval":True,"fieldfunction":'settitlecase',"overwrite":True}#step1 + {"fieldset":"title","origfieldval":True,"fieldfunction":'settitlecasestd',"overwrite":True}#step1 ], - [#map2:将设置booktitle为titlecase +] +''' + [#map2:将设置booktitle为titlecase {"fieldsource":"booktitle","final":True},# - {"fieldset":"booktitle","origfieldval":True,"fieldfunction":'settitlecase',"overwrite":True}#step1 + {"fieldset":"booktitle","origfieldval":True,"fieldfunction":'settitlecasestd',"overwrite":True}#step1 ], [#map3:将设置journal为titlecase {"fieldsource":"journal","final":True},# - {"fieldset":"journal","origfieldval":True,"fieldfunction":'settitlecase',"overwrite":True}#step1 + {"fieldset":"journal","origfieldval":True,"fieldfunction":'settitlecasestd',"overwrite":True}#step1 ], [#map3:将设置journaltitle为titlecase {"fieldsource":"journaltitle","final":True},# - {"fieldset":"journaltitle","origfieldval":True,"fieldfunction":'settitlecase',"overwrite":True}#step1 + {"fieldset":"journaltitle","origfieldval":True,"fieldfunction":'settitlecasestd',"overwrite":True}#step1 ] -] +''' #默认不做修改 #sourcemaps=[] \ No newline at end of file diff --git a/bibmaptobibtex.py b/bibmaptobibtex.py index c483106..829b573 100644 --- a/bibmaptobibtex.py +++ b/bibmaptobibtex.py @@ -5,7 +5,11 @@ #注意:域如果不存在且需要终止,应加上"final":True # 大小写字母保护的字符串 -CaseProtect=['IEEE','AAAI',"GECCO\'18","ACML"] +CaseProtect=['AIAA','IEEE','AAAI',"GECCO\'18","ACML","SAR",'BVR','UAV','UCAV','UAVs','PSO','AI','IJCAI','WIC','ACM', + 'CICAI','CDC','CoRR','IT','CAA','PSO','CAC','ICLR','II','III','IV','NIPS','arXiv','VI','VII', + 'VIII','IJCNN','AAMAS','ICGNC','CIG','ICUS','ACC','ICMA','MATEC','ACTA'] +#其他情况请在bib文件中修改做保护,比如用{}包起来,NIPS-12这种用带数字的单词会自动保护 +#平时积累的时候就要做保护 sourcemaps=[ [#map1:将设置title为sentencecase diff --git a/binary/bibmap.exe b/binary/bibmap.exe index 72dfecb..8647880 100644 Binary files a/binary/bibmap.exe and b/binary/bibmap.exe differ diff --git a/binary/bibmap.py b/binary/bibmap.py index c13975a..9513181 100644 --- a/binary/bibmap.py +++ b/binary/bibmap.py @@ -133,6 +133,7 @@ bibliotableflag='false' #输出表格形式的参考文献表的内容的标识 + # # #打印格式化后的全部文献条目文本 @@ -522,7 +523,11 @@ def formatallbibliography(): elif 'title' in bibentry:#若不存在则首先title域做判断 language=languagejudgement(bibentry,'title') bibentry['language']=language - print('language of bibentry: ',bibentry['entrykey'],' is: ',bibentry['language']) + if 'language' in bibentry: + print('language of bibentry: ',bibentry['entrykey'],' is: ',bibentry['language']) + else: + print('language of bibentry: ',bibentry['entrykey'],' is: none') + # #2.1 姓名列表的歧义的处理,先于排序 @@ -1080,6 +1085,7 @@ def dealambiguity(newbibentries): #1.1 根据基本选项判断原始状态下是否需要存在有歧义的文献 labelnamerawstrs={} for bibentry in newbibentries: + #print(f'{bibentry=}') #1. 计算姓名原始总数和截断后的总数 rawlabelnames=bibentry['labelnameraw'] @@ -1376,7 +1382,7 @@ def labelnamelistparser(bibentry,fieldsource): #首先姓名列表进行分解,包括用' and '和' AND '做分解 #利用safetysplit函数实现安全的分解 - seps=[' and ',' AND '] + seps=[' and ',' AND ', "; "]#增加一个对;的解析 fieldcontents=fieldcontents.strip() fieldauthors=safetysplit(fieldcontents,seps) @@ -1989,7 +1995,7 @@ def citenamelistparser(bibentry,fieldsource,options): #首先姓名列表进行分解,包括用' and '和' AND '做分解 #利用safetysplit函数实现安全的分解 - seps=[' and ',' AND '] + seps=[' and ',' AND ', "; "]#增加一个对;的解析 fieldcontents=fieldcontents.strip() fieldauthors=safetysplit(fieldcontents,seps) @@ -2135,7 +2141,7 @@ def namelistparser(bibentry,fieldsource,options): #首先姓名列表进行分解,包括用' and '和' AND '做分解 #利用safetysplit函数实现安全的分解 - seps=[' and ',' AND '] + seps=[' and ',' AND ', "; "]#增加一个对;的解析 fieldcontents=fieldcontents.strip() fieldauthors=safetysplit(fieldcontents,seps) @@ -2813,10 +2819,33 @@ def mkstrsetencecase(fieldstring): strtoreturn=a return strtoreturn +#首字母大写其它不变的函数 +def capitalize_first_letter(s): + if len(s)>1: + return s[0].upper() + s[1:] + elif len(s)==1: + return s[0].upper() + else: + return s + +#判断单词中是否包含数字 +def contains_digit(s): + return any(char.isdigit() for char in s) + + +#增加titlecase处理函数用于保证'后的字符不会被大写 +def titlecaseudf(s): + #return re.sub("[A-Za-z]+((\-|\')[A-Za-z]+)?",lambda mo: mo.group(0).capitalize(),s) + return re.sub("[A-Za-z]+(\'[A-Za-z]+)?",lambda mo: mo.group(0).capitalize(),s) + # #增加对介词等进行保护 def mkstrtitlecasestd(fieldstring): + + if fieldlanguage(fieldstring) in ['chinese','japanese','korean']: + return fieldstring #当英文字符串是在中文中间时不变化其大小写 + #查找命令和{}保护的所有字符串 #思路是存储信息并利用替换进行保护 @@ -2828,7 +2857,7 @@ def mkstrtitlecasestd(fieldstring): strsn=0 for stra1 in s0: strsn=strsn+1 - a=a.replace(stra1,'$'+str(strsn)+'$') + a=a.replace(stra1,'@'+str(strsn)+'@') #@符号不常用,所以用来做标记字符而$是数学公式符号,有些字符串中是存在的 #保护:{}内容 s1=re.findall('\{.*?\}',a) @@ -2838,40 +2867,55 @@ def mkstrtitlecasestd(fieldstring): strsn=len(s0) for stra1 in s1: strsn=strsn+1 - a=a.replace(stra1,'$'+str(strsn)+'$') + a=a.replace(stra1,'@'+str(strsn)+'@') #需要保护的字符串,如介词、连词等 #主要是:不在句首的冠词、介词、连词和作为不定式的to - protectstr=['a','an','the', 'for', 'and', 'nor', 'but', 'or', 'yet', 'so', 'on','in','of','and','to', 'at','around','by','after','along','for','from','with','without']+caseprotectstrs - ndtransstr=['A','An','The', 'For', 'And', 'Nor', 'But', 'Or', 'Yet', 'So', 'On','In','Of','And','To', 'At','Around','By','After','Along','For','From','With','Without'] + protectstr=['a','an','the', 'for', 'and', 'with','nor', 'but', 'or', 'via','yet', 'so', 'on','in','of','and','to', 'at','around','by','after','along','for','from','with','without']+caseprotectstrs + ndtransstr=['A','An','The', 'For', 'And', 'With','Nor', 'But', 'Or', 'Via','Yet', 'So', 'On','In','Of','And','To', 'At','Around','By','After','Along','For','From','With','Without'] + #将字符串中的xa0字符切换成空格即x20 + a=a.replace("\xa0"," ") #对字符串做大小写变换: - b=a.split(" ") - c=[] - for s2 in b: - if s2 in protectstr: - c.append(s2) - elif s2 in ndtransstr: - c.append(s2.lower()) - else: - c.append(s2.title()) - c[0]=c[0].title() - a=" ".join(c) - #a=a.title() + #首先根据冒号将句子分为两个部分 + twoparts=a.split(":") + twopartsnew=[] + for a1 in twoparts: + #然后对每个部分做处理 + b=re.split('(\x20|\/|\-|\(|\))',a1.strip()) #保留间隔符 而不像a.split(" ")那样去掉间隔符 + c=[] + for s2 in b: + if s2 in protectstr: + c.append(s2) + elif s2 in ndtransstr: + c.append(s2.lower()) + elif contains_digit(s2): + c.append(s2) + else: + c.append(titlecaseudf(s2)) + #print(f'{s2=}',c[-1]) + + #句首大写 + c[0]=capitalize_first_letter(c[0]) #capitalize() 函数会让首字母外的字符变小写 + a="".join(c) + twopartsnew.append(a) + #a=a.title() + a=': '.join(twopartsnew) + #对字符串做还原 if s1: strsn=len(s0) for stra1 in s1: strsn=strsn+1 - a=a.replace('$'+str(strsn)+'$',stra1) + a=a.replace('@'+str(strsn)+'@',stra1) if s0: strsn=0 for stra1 in s0: strsn=strsn+1 - a=a.replace('$'+str(strsn)+'$',stra1) + a=a.replace('@'+str(strsn)+'@',stra1) strtoreturn=a return strtoreturn @@ -2923,13 +2967,14 @@ def mkstrtitlecase(fieldstring): elif s2 in ndtransstr: c.append(s2.lower()) else: - print('s2=',s2,s2[0] == s2[0].upper(),flg_alluppercase) - if s2[0] == s2[0].upper() and (not flg_alluppercase): - print('not change') - c.append(s2) - else: - print('change') - c.append(s2.title()) + if s2: + print('s2=',s2,s2[0] == s2[0].upper(),flg_alluppercase) + if s2[0] == s2[0].upper() and (not flg_alluppercase): + print('not change') + c.append(s2) + else: + print('change') + c.append(s2.title()) if (c[0] not in protectstr) and (c[0][0] != c[0][0].upper() and (not flg_alluppercase) ): c[0]=c[0].title() a=" ".join(c) @@ -3428,18 +3473,34 @@ def bibentryparsing(): for line in bibfilecontents:#遍历所有行 #print(line) - line=line.lstrip() - if line.startswith("@") and not "@comment" in line.lower() and not "@string" in line.lower():#判断条目开始行 + if line.lstrip().startswith("@") and not "@comment" in line.lower() and not "@string" in line.lower():#判断条目开始行 + + if entrystated:#前一个条目尚未结束,可能是没有检测到} + #但已经到新的条目了,所以要先把的条目结束 + print('entry:',bibentry) + bibentries.append(bibentry) + bibentry={} + + #新条目开始 entrysn=entrysn+1 - entrystated=True #新条目开始 - #print('entry No.=',entrysn) entrynow=line.lstrip('@').split(sep='{', maxsplit=1) - #print(entrynow) entrytype=entrynow[0] - bibentry['entrytype']=entrytype.lower()#条目类型小写,方便比较 entrykey=entrynow[1].split(sep=',', maxsplit=1)[0] + + entrystated=True #新条目开始 + bibentry['entrytype']=entrytype.lower()#条目类型小写,方便比较 bibentry['entrykey']=entrykey bibentry['entrysn']=entrysn + + ''' + print(f'{entrystated=}') + print('entry No.=',entrysn) + print(entrynow) + print(f'{entrykey=}') + print(f'{entrysn=}') + print('print anykey to continue') + anykey=input() + ''' elif entrystated: #只有新条目开始了才有意义 if fieldvalended: #当前行不是前面的未结束域的值 @@ -3519,7 +3580,7 @@ def bibentryparsing(): else: #当前行是前面的未结束域的值,因此直接往前面的域值添加即可 fieldvalcontinued=True - + entryfieldline=line if enclosenone:#当域没有包围符号时,接续的行可能是用逗号结束的域,也可能没有逗号,而用}直接结束条目信息 @@ -3550,10 +3611,20 @@ def bibentryparsing(): #接续的行可能存在大量的空格,所以先进行处理使得多个空格或tab转换成一个空格 #只要做strip后不存在在字符,那么该字符必然是空格 #2019.04.09,hzz - if not entryfieldline[0].strip(): - entryfieldline=' '+entryfieldline.strip() + entryfieldlineaddspace='' + if not entryfieldline[0].strip(): #存在空格 + #print('space exist') + entryfieldlineaddspace=' '+entryfieldline.strip() + else: + #print('space not exist') + if entryfield in ['author','editor','translator','bookauthor']: + entryfieldlineaddspace=' '+entryfieldline.strip() + else:# 默认还是加一个空格的好 + entryfieldlineaddspace=' '+entryfieldline.strip() + + #print(f'{entryfieldlineaddspace=}') - for chari in entryfieldline:#这里strip可能会把接续行前面的空格去掉,所以考虑不做strip .strip() + for chari in entryfieldlineaddspace:#这里strip可能会把接续行前面的空格去掉,所以考虑不做strip .strip() fieldvalue=fieldvalue+chari #print('chari=',chari) if chari =='{': @@ -3572,7 +3643,7 @@ def bibentryparsing(): elif chari =='"': counterquotes=counterquotes+1 if not enclosebracket: - if mod(counterquotes,2)==0: + if counterquotes%2==0: bibentry[entryfield]=fieldvalue[1:-1] fieldvalue="" counterbracket=0 @@ -3611,6 +3682,7 @@ def bibentryparsing(): bibcommentcounter=len(bibcomments) bibstringcounter=len(bibstrings) + if not bibentrycounter==entrysn or not bibcommentcounter==commentsn or not bibstringcounter==stringsn: try: print('entrysn=',entrysn,' commentsn=',commentsn,' stringsn=',stringsn) @@ -3618,6 +3690,7 @@ def bibentryparsing(): raise BibParsingError('bib file parsing went wrong!') except BibParsingError as e: raise BibParsingError(e.message) + print('total entries=',bibentrycounter) #输出解析后的bib文件信息 diff --git a/binary/bibmap.sty b/binary/bibmap.sty index b16be6d..1eec50c 100644 --- a/binary/bibmap.sty +++ b/binary/bibmap.sty @@ -87,7 +87,7 @@ % % 宏包选项初始化处理,process package options: % -\ProcessKeysOptions {bibmap} +\ProcessKeyOptions [ bibmap ] % % diff --git a/binary/bibmapaddpinyinkey.py b/binary/bibmapaddpinyinkey.py index 6e6db49..0dd3cca 100644 --- a/binary/bibmapaddpinyinkey.py +++ b/binary/bibmapaddpinyinkey.py @@ -8,17 +8,91 @@ multiplepinyin={ '曾':'zeng1', '沈':'shen3', -'翟':'zhai2' +'汤':'tang1', #姓不读shāng +'仇':'qiu2', #不读chóu。如明代著名画家仇英。4EC7 +'朴':'piao2', #不读pǔ。此姓朝鲜族多见,如韩国前总统朴槿惠。6734 +'单':'shan4', #不读dān。如《说唐》中的单雄信。5355 +'解':'xie4', #不读jiě。如明代才子解缙。89E3 +'区':'ou1', #不读qū。如柳宗元《童区寄传》中的区寄。533A +'查':'zha1',#不读chá。如作家金庸原名查良镛。67E5 +'繁':'po2', #不读fán。如写《定情诗》的汉末诗人繁钦。7E41 +'瞿':'qu2', #不读jù。如革命家瞿秋白。77BF +'员':'yun4',#员,读【yùn】,不读yuán。如唐代诗人员半千。5458 +'能':'nai4',#能读【nài】,不读néng。如宋代名医能自宣。80FD +'阚':'kan4',#阚,读【kàn】,不读hǎn。如三国时吴国学者阚泽。961A +'都':'du1',#都,读【dū】,不读dōu。如明代进士都穆。90FD +'乜':'nie4',#乜,读【niè】,不读miē。如民国时国军少将乜子彬。4E5C +'缪':'miao4',#缪,读【miào】,不读móu。7F2A +'句':'gou1',#句,读【gōu】,不读jù。如宋代进士句克俭。复姓句龙,也读gōu。53E5 +'阿':'e1', #阿,读【ē】,不读ā。963F +'谌':'chen2',#谌,读【chén】,不读shèn。如羽毛球运动员谌龙。8C0C +'尉':'yu4',#尉迟,读【yù chí】,不读wèi chí。如唐初大将尉迟恭;5C09 尉单独作姓时读wèi,如战国时著名军事理论家尉缭。 +'澹':'tan2'#澹台,读【tán tái】,不读dàn tái。如孔子弟子澹台灭明。6FB9 +#'翟':'zhai2',7FDF +# 折,一读【shé】,一读【zhé】。 +# 盖,一读【gě】,一读【gài】。一般念【gě】,如现代京剧表演艺术家盖叫天。 +# 隗,一读【kuí】,一读【wěi】。 +# 种,一读【chóng】,一读【zhǒng】。一般念【chóng】,如北宋末年名将种师道。 +# 覃,一读【tán】,一读【qín】;一般读【qín】。 +# 召,一读【shào】,得姓始祖为周武王之弟召公姬奭(shì)。一读【zhào】,为傣族姓。 +# 相,一读【xiāng】,一读【xiàng】。 +# 曲,读【qū】,不读qǔ。如唐代司空曲环。 +# 訾,读【zī】,不读zǐ。如元代有名孝子訾汝道。 +# 哈,读【hǎ】,不读hā。如央视春晚总导演哈文。 +# 钻,读【zuān】,不读zuàn。 +# 任,读【rén】,不读rèn。如《笑傲江湖》女主角任盈盈。 +# 要,读【yāo】,不读yào。如春秋时著名刺客要离。 +# 华,读【huà】,不读huá。如数学家华罗庚。 +# 过,读【guō】,不读guò。 +# 皇甫,读【huáng fǔ】,不读huáng pǔ。如晚唐诗人皇甫松。 +# 长孙,读【zhǎng sūn】,不读cháng sūn。如唐初名臣长孙无忌。 +# 宰父,读【zǎi fǔ】,不读zǎi fù。如孔子弟子宰父黑。 +# 亓官,读【qí guān】。如孔子的妻子亓官氏。 +# 毌丘,读【guàn qiū】,不要读作 wú qiū 或 mǔqiū,也不要写作“毋丘”或“母丘”。 +# 逄,读【páng】。 +# 桓,读【huán】。如东晋大将桓温。 +# 蒯,读【kuǎi】。如汉初谋士蒯通。 +# 殳,读【shū】。 +# 厍,读【shè】。如北周大臣厍狄峙。 +# 靳,读【jìn】。如演员“老干部”靳东。 +# 郄,读【qiè】。 +# 昝,读【zǎn】。如清代书画家昝茹颖。 +# 逯,读【lù】。如汉代大臣逯普。 +# 郦,读【lì】。如汉初名臣郦食其(lì yì jī)。 +# 麹,读【qū】。如隋代高昌国国王麴伯稚。 +# 璩,读【qú】。 +# 郗,读【xī】。但古籍中也有读chī的。 +# 妫,读【guī】,不读wěi。 +# 郏,读【jiá】。如清代著名画家郏伦逵。 +# 郜,读【gào】。如国足运动员郜林。 } #重设新的任务处理 sourcemaps=[ + [#map3:author中中文作者的逗号去掉 + {"fieldsource":"author","match":r'[\u2FF0-\u9FA5]',"final":True},#step1 + {"fieldsource":"author","match":r'\,\s',"replace":'',"overwrite":True}#step1 + ], + [#map3:author中中文作者的逗号去掉 + {"fieldsource":"author","match":r'[\u2FF0-\u9FA5]',"final":True},#step1 + {"fieldsource":"author","match":r'\{',"replace":'',"overwrite":True}#step1 + ], + [#map3:author中中文作者的逗号去掉 + {"fieldsource":"author","match":r'[\u2FF0-\u9FA5]',"final":True},#step1 + {"fieldsource":"author","match":r'\}',"replace":'',"overwrite":True}#step1 + ], + [#map3:author中中文作者的逗号去掉 + {"fieldsource":"editor","match":r'[\u2FF0-\u9FA5]',"final":True},#step1 + {"fieldsource":"editor","match":r'\,\s',"replace":'',"overwrite":True}#step1 + ], [#map1:设置author域的字符串的拼音字符串设置给域key - {"fieldsource":"author"},#step1 + {"fieldsource":"author","match":r'[\u2FF0-\u9FA5]',"final":True},#step1 + {"fieldsource":"author"},#step1 {"fieldset":"key","origfieldval":True,"fieldfunction":'sethzpinyin'}#step2 ], [#map1:设置editor域的字符串的拼音字符串设置给域key - {"fieldsource":"editor"},#step1 + {"fieldsource":"editor","match":r'[\u2FF0-\u9FA5]',"final":True},#step1 + {"fieldsource":"author"},#step1 {"fieldset":"key","origfieldval":True,"fieldfunction":'sethzpinyin'}#step2 ], ] diff --git a/binary/bibmaptitlecase.py b/binary/bibmaptitlecase.py index 276dc18..c94b7e7 100644 --- a/binary/bibmaptitlecase.py +++ b/binary/bibmaptitlecase.py @@ -3,24 +3,34 @@ #数据修改的设置 # #注意:域如果不存在且需要终止,应加上"final":True + +# 大小写字母保护的字符串 +CaseProtect=['AIAA','IEEE','AAAI',"GECCO\'18","ACML","SAR",'BVR','UAV','UCAV','UAVs','PSO','AI','IJCAI','WIC','ACM', + 'CICAI','CDC','CoRR','IT','CAA','PSO','CAC','ICLR','II','III','IV','NIPS','arXiv','VI','VII', + 'VIII','IJCNN','AAMAS','ICGNC','CIG','ICUS','ACC','ICMA','MATEC','ACTA'] +#其他情况请在bib文件中修改做保护,比如用{}包起来,NIPS-12这种用带数字的单词会自动保护 +#平时积累的时候就要做保护 + sourcemaps=[ [#map1:将设置title为sentencecase {"fieldsource":"title","final":True},# - {"fieldset":"title","origfieldval":True,"fieldfunction":'settitlecase',"overwrite":True}#step1 + {"fieldset":"title","origfieldval":True,"fieldfunction":'settitlecasestd',"overwrite":True}#step1 ], - [#map2:将设置booktitle为titlecase +] +''' + [#map2:将设置booktitle为titlecase {"fieldsource":"booktitle","final":True},# - {"fieldset":"booktitle","origfieldval":True,"fieldfunction":'settitlecase',"overwrite":True}#step1 + {"fieldset":"booktitle","origfieldval":True,"fieldfunction":'settitlecasestd',"overwrite":True}#step1 ], [#map3:将设置journal为titlecase {"fieldsource":"journal","final":True},# - {"fieldset":"journal","origfieldval":True,"fieldfunction":'settitlecase',"overwrite":True}#step1 + {"fieldset":"journal","origfieldval":True,"fieldfunction":'settitlecasestd',"overwrite":True}#step1 ], [#map3:将设置journaltitle为titlecase {"fieldsource":"journaltitle","final":True},# - {"fieldset":"journaltitle","origfieldval":True,"fieldfunction":'settitlecase',"overwrite":True}#step1 + {"fieldset":"journaltitle","origfieldval":True,"fieldfunction":'settitlecasestd',"overwrite":True}#step1 ] -] +''' #默认不做修改 #sourcemaps=[] \ No newline at end of file diff --git a/binary/bibmaptobibtex.py b/binary/bibmaptobibtex.py index c483106..829b573 100644 --- a/binary/bibmaptobibtex.py +++ b/binary/bibmaptobibtex.py @@ -5,7 +5,11 @@ #注意:域如果不存在且需要终止,应加上"final":True # 大小写字母保护的字符串 -CaseProtect=['IEEE','AAAI',"GECCO\'18","ACML"] +CaseProtect=['AIAA','IEEE','AAAI',"GECCO\'18","ACML","SAR",'BVR','UAV','UCAV','UAVs','PSO','AI','IJCAI','WIC','ACM', + 'CICAI','CDC','CoRR','IT','CAA','PSO','CAC','ICLR','II','III','IV','NIPS','arXiv','VI','VII', + 'VIII','IJCNN','AAMAS','ICGNC','CIG','ICUS','ACC','ICMA','MATEC','ACTA'] +#其他情况请在bib文件中修改做保护,比如用{}包起来,NIPS-12这种用带数字的单词会自动保护 +#平时积累的时候就要做保护 sourcemaps=[ [#map1:将设置title为sentencecase diff --git a/binary/readme-pack.md b/binary/readme-pack.md new file mode 100644 index 0000000..6208824 --- /dev/null +++ b/binary/readme-pack.md @@ -0,0 +1,7 @@ + +1. 打包工具是pyinstaller + + +2. pathlib has been part of python stdlib since python 3.4, so there is no reason for Anaconda Navigator to depend on external (obsolete and unmaintained) pathlib package. Open a bug with them. + +The presence of the obsolete pathlib package may cause errors during PyInstaller analysis (#7406), and since the package is unnecessary, we black list it (along with some other now-obsolete backports of stdlib packages) here: \ No newline at end of file diff --git a/binary/readme.md b/binary/readme.md index 4f666a2..e71d3ed 100644 --- a/binary/readme.md +++ b/binary/readme.md @@ -1,4 +1,4 @@ -Date of last change: 2023-03-31 to version v1.0f +Date of last change: 2024-04-29 to version v1.0g ## Introduction @@ -454,6 +454,7 @@ if want to set a bibstyle file , you can run: * v1.0c 2021/05/24 * v1.0d 2021/10/23 * v1.0e 2022/02/07 -* v1.0f 2022/03/31 +* v1.0f 2023/03/31 +* v1.0g 2024/04/29 diff --git a/history.md b/history.md index df4d502..f7cdbf9 100644 --- a/history.md +++ b/history.md @@ -14,6 +14,32 @@ entrynocite=true, false default: false entrynull=true, false default: false match 大小写区分的matchi + + +#### 20240429 + +1. 修正了bib文件中条件结束的右花括号不再单独一行的问题。 + +2. 修正了多行的域值中非首行内容的行首空格全被去除的问题。 + +3. 增加了对于作者列表中以;加空格作为间隔符的处理。 + +4. 修正bibmap.sty中弃用ProcessKeysOptions到新的ProcessKeyOptions命令 + +5. 修正了mktitlecasestd函数中对于xa0字符的处理,对于中文字符串内的英文的保护,增加了一些保护词。注意:默认情况下字符串中以空格分割出来的词才会被保护词保护。 + +6. 增加了一个保护'后面的字符避免其被大写的函数titlecaseudf + +7. 每个文件夹增加了readme说明 + +8. 增加了Pinyin-modified-di.pm,Pinyin-modified-zhai.pm,Pinyin-origin.pm三个文件用于修改biber的排序,放这里便于下载。 + +9. 将mod函数改为%,似乎mod函数用不了,应该是python版本问题 + + + + + #### 20230331 diff --git a/mapbibtest-addpinyinkey/readme.md b/mapbibtest-addpinyinkey/readme.md new file mode 100644 index 0000000..dcc27f9 --- /dev/null +++ b/mapbibtest-addpinyinkey/readme.md @@ -0,0 +1,2 @@ + +本文件夹用于测试给bib文件添加key域,包括两种不同的key:拼音和笔画 \ No newline at end of file diff --git a/mapbibtest-authoran/readme.md b/mapbibtest-authoran/readme.md new file mode 100644 index 0000000..f908cf8 --- /dev/null +++ b/mapbibtest-authoran/readme.md @@ -0,0 +1,2 @@ + +本文件夹用于测试给bib文件添加作者注解信息,根据某个作者,将其各个文献中的对应作者标记为特定的类型,便于后续处理。 \ No newline at end of file diff --git a/mapbibtest-authoran/testannew.bib b/mapbibtest-authoran/testannew.bib new file mode 100644 index 0000000..cc376c0 --- /dev/null +++ b/mapbibtest-authoran/testannew.bib @@ -0,0 +1,41 @@ +%% +%% bib file modified by bibmap.py +%% 2024-04-29T18:56:40 +%% + + +@inproceedings{Nemec1997-209-214, + title = {Force control of redundant robots}, + author = {B Nemec and Zhao, Mou Mou}, + booktitle = {Processings of Symposium on Robot Control}, + shortbooktitle = {(PSRC)}, + pages = {209-214}, + country = {Nantes France}, + year = {1997}, + author+an = {2=thesisauthor}, +} + +@article{Chiani1998-2998-3008, + title = {Error probability for block codes over channels with block interference}, + author = {Zhao, Mou Mou and Chiani, M.}, + journal = {IEEE Trans. Inf. Theory}, + shortbooktitle = {(ITIT)}, + number = {7}, + pages = {2998-3008}, + volume = {44}, + year = {1998}, + author+an = {1=thesisauthor;2=corresponding}, +} + +@article{Chiani1998a, + title = {Error probability for block codes over channels with block interference}, + author = {Zhang, Mou Mou and Chiani, M.}, + journal = {IEEE Trans. Inf. Theory}, + shortbooktitle = {(ITIT)}, + number = {7}, + pages = {2998-3008}, + volume = {44}, + year = {1998}, + author+an = {2=corresponding}, +} + diff --git a/mapbibtest-tobibtex/readme.md b/mapbibtest-tobibtex/readme.md new file mode 100644 index 0000000..b841094 --- /dev/null +++ b/mapbibtest-tobibtex/readme.md @@ -0,0 +1,9 @@ + +本文件夹用于测试将bib文件从biblatex的格式转换为标准的bibtex格式用于后续的参考文献生成任务。 + + +1. maketest.bat 用于自动测试 + +2. testNow.bat 用于直接测试,需要修改里面的命令信息。 + +3. testerror.bib 是一些特殊bib情况用于测试bibmap是否能正确处理的。 \ No newline at end of file diff --git a/mapbibtest-tobibtex/testNow.bat b/mapbibtest-tobibtex/testNow.bat new file mode 100644 index 0000000..454ab6f --- /dev/null +++ b/mapbibtest-tobibtex/testNow.bat @@ -0,0 +1,16 @@ +@echo off + + +call makeclear + +copy ..\*.py . /y + +start cmd /c "call d:\Anaconda3\Scripts\activate.bat && call activate base && python bibmap.py EOM.bib -m bibmaptobibtex.py" + +pause + + + + + + diff --git a/mapbibtest-tobibtex/testerror.bib b/mapbibtest-tobibtex/testerror.bib new file mode 100644 index 0000000..a72032d --- /dev/null +++ b/mapbibtest-tobibtex/testerror.bib @@ -0,0 +1,111 @@ + + +@INPROCEEDINGS{chen2021visual, + author={Chen, Boyuan and Hu, Yuhang and Kwiatkowski, Robert and Song, Shuran and Lipson, Hod}, + booktitle={2021 IEEE International Conference on Robotics and Automation (ICRA)}, + title={Visual perspective taking for opponent behavior modeling}, + year={2021}, + pages={13678-13685}, + keywords={Training;Visualization;Automation;Conferences;Games;Predictive models;Robots}, + doi={10.1109/ICRA48506.2021.9562028}} + + + +@Inproceedings{Alford2015, +title={Active Behavior Recognition in Beyond Visual Range Air Combat}, +author={Ron Alford and Hayley Borck and Justin Karneeb}, +booktitle={The Third Annual Conference on Advances in Cognitive Systems 2015}, +address={Atlanta, Georgia}, +date={2015-05}, +pages={1-14} +} + + + + +@inproceedings{ganzfried2018bayesian, + title="Bayesian opponent exploitation in Imperfect-Information Games", + author="Sam Ganzfried and Qingyun Sun", + booktitle="2018 IEEE Conference on Computational Intelligence and Games (CIG)", + pages="1--8", + year={2018} +} + + +@article{MikolovSCCD13, + author = {Tomas Mikolov and + Ilya Sutskever and + Kai Chen and + Greg Corrado and + Jeffrey Dean}, + title = {Distributed Representations of Words and Phrases and their Compositionality}, + journal = {CoRR}, + volume = {abs/1310.4546}, + year = {2013}, + url = {http://arxiv.org/abs/1310.4546}, + eprinttype = {arXiv}, + eprint = {1310.4546}, +} + + +@article{张强2018, +Title = {基于Q-network强化学习的超视距空战机动决策}, +Author = {张强 and 杨任农 and 俞利新 and 张涛 and 左家亮}, +Journal = {空军工程大学学报}, +Volume = {19}, +Number = {6}, +Pages = {8 - 14}, +Year = {2018}, +} + + +@Article{罗广成2015--, + Title = {对星载SAR压制式干扰掩护区仿真建模研究}, + Author = {罗广成 and 李修和 and 金家才 and 沈阳}, + Date = {2014}, + Journaltitle= {系统仿真学报}, + volume = {26}, + Number = {4}, + Pages = {769-773} +} + + +@Thesis{杨薇2014--, + Title = {机载 SAR 回波仿真与图像模拟}, + Address = {成都}, + Author = {杨薇}, + Date = {2014-06}, + Institution = {电子科技大学}, + Type = {master} +} + + +@InProceedings{huzhenzhen2021, + author="Hu, ZhenZhen and Chen, Jing and Zhang, Wanpeng and Chen, Shaofei and Yuan, Weilin and Luo, Junren and Xu, Jiahui and Ji, Xiang", + title="Odds Estimating with Opponent Hand Belief for Texas Hold'em Poker Agents", + booktitle="Artificial Intelligence. CICAI 2021. Lecture Notes in Computer Science, vol 13069", + year="2021", + publisher="Springer International Publishing", + address="Cham", + pages="51--64", + annotation={EI index}, + AUTHOR+an={1=thesisauthor}, +} + +@book{安波2022, +title={分布式人工智能 人工智能探索与实践}, +author={安波 and 高阳 and 俞扬 and others}, +address={北京}, +publisher={电子工业出版社}, +date={2022-11}, +pages={1-383} +} + +@article{Prezenski2017, +author = {Sabine Prezenski; André Brechmann; Susann Wolff}, +title = {A cognitive modeling approach to strategy formation in dynamic decision making}, +journal = {Frontiers in Psychology}, +year = {2017}, +volume = {8}, +month = {8} +} \ No newline at end of file diff --git a/mapbibtest/readme.md b/mapbibtest/readme.md new file mode 100644 index 0000000..a23e1a2 --- /dev/null +++ b/mapbibtest/readme.md @@ -0,0 +1,2 @@ + +本文件夹用于测试给bib文件添加key域,用于在使用biblatex等生成参考文献时排序 \ No newline at end of file diff --git a/mapbibtest/test-sort.tex b/mapbibtest/test-sort.tex index 19a7c1c..5ae5a9e 100644 --- a/mapbibtest/test-sort.tex +++ b/mapbibtest/test-sort.tex @@ -6,7 +6,7 @@ \usepackage{ctex} \usepackage[backend=biber,style=gb7714-2015,sorting=gb7714-2015]{biblatex} \usepackage{geometry} -\addbibresource{newtestc.bib} +\addbibresource{testcnew.bib} \begin{document} diff --git a/readme.md b/readme.md index 4f666a2..e71d3ed 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -Date of last change: 2023-03-31 to version v1.0f +Date of last change: 2024-04-29 to version v1.0g ## Introduction @@ -454,6 +454,7 @@ if want to set a bibstyle file , you can run: * v1.0c 2021/05/24 * v1.0d 2021/10/23 * v1.0e 2022/02/07 -* v1.0f 2022/03/31 +* v1.0f 2023/03/31 +* v1.0g 2024/04/29