marquistj13 / TongjiThesis

同济大学硕博士论文LaTeX模板
315 stars 105 forks source link

关于发表论文和研究成果的另一种解决方案 #19

Closed hushidong closed 5 years ago

hushidong commented 5 years ago

从resume.tex文档看,发表论文和研究成果是以enumerate直接写的,但其实因为这些信息也类似于参考文献信息,因此完全可以利用参考文献的解决方案来避免大量的人工书写。

从其内容看,两者与参考文献的差别仅在于文献条目的格式,比如没有文献类型标识符,文献的作者的格式是不同的,条目后面还存在一个注释(说明)信息,而这些差异完全可以利用格式局部化调整的方式来实现。

下面给出一个示例,来展示这样的局部化调整,其中为同时给出作者年制的文献表,使用了gb7714-2015mx样式。后面的第二个示例是精确实现resume.tex样式的。

\documentclass[twoside]{article}
    \usepackage{ctex}
    \usepackage{xcolor}
    \usepackage{toolbox}
    \usepackage{hyperref}
    \usepackage{lipsum}
    \usepackage[paperwidth=21cm,paperheight=29cm,top=10pt,bottom=10pt,left=1cm,right=1cm]{geometry}

\usepackage[backend=biber,style=gb7714-2015mx]{biblatex}

\setaystylesection{1}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
% Encoding: UTF-8
@article{ref-1-1-Yang,
author    = {Yang, Y and Ren, T L and Zhang, L T and others},
title     = {Miniature microphone with silicon-based ferroelectric thin films},
journal   = {Integrated Ferroelectrics},
date      = {2003},
pages      = {229-235},
volume      = {52},
annotation      = {SCI 收录, 检索号:758FZ},
}

@article{ref-2-1-杨轶,
author    = {杨轶 and 张宁欣 and 任天令 and others},
title     = {硅基铁电微声学器件中薄膜残余应力的研究},
journal   = {中国机械工程},
pages= {1289-1291},
date      = {2005},
volume      = {16},
number ={14},
annotation ={EI 收录, 检索号:0534931 2907},
}

@article{ref-3-1-杨轶,
author    = {杨轶 and 张宁欣 and 任天令 and others},
title     = {集成铁电器件中的关键工艺研究},
journal   = {仪器仪表学报},
date      = {2003},
volume      = {24},
pages={192-193},
number      = {S4},
annotation      = {EI 源刊},
}

@article{ref-4-1-Yang,
author    = {Yang, Y and Ren, T L and Zhu, Y P and others},
title     = {PMUTs for handwriting recognition},
pubstate ={In press},
annotation      = {已被 Integrated Ferroelectrics 录用. SCI 源刊.},
}

@article{ref-5-1-Wu,
author    = {Wu, X M and Yang, Y and Cai, J and others},
title     = {Measurements of ferroelectric MEMS microphones},
journal   = {Integrated Ferroelectrics},
date      = {2005},
pages={417-429},
volume      = {69},
annotation      = {SCI 收录, 检索号 :896KM.},
}

@article{ref-6-1-贾泽,
author    = {贾泽 and 杨轶 and 陈兢 and others},
title     = {用于压电和电容微麦克风的体硅腐蚀相关研究},
journal   = {压电与声光},
date      = {2006},
pages      = {117-119},
number={1},
volume      = {28},
annotation      = {EI 收录, 检索号:06129773469.},
}

@article{ref-7-1-伍晓明,
author    = {伍晓明 and 杨轶 and 张宁欣 and others},
title     = {基于MEMS技术的集成铁电硅微麦克风},
journal   = {中国集成电路},
date      = {2003},
volume      = {53},
pages      = {59-61},
}

@patent{ref-8-1-任天令,
author    = {任天令 and 杨轶 and 朱一平 and others},
title     = {硅基铁电微声学传感器畴极化区域控制和电极连接的方法},
number ={中国, CN1602118A},
annotation      = {中国专利公开号.},
}

@patent{ref-9-1-Ren,
author    = {Ren, T L and Yang, Y and Zhu, Y P and others},
title     = {Piezoelectric micro acoustic sensor based on ferroelectric materials},
number ={USA, No.11/215, 102},
annotation      = {美国发明专利申请号.},
}
\end{filecontents}

    \addbibresource{\jobname.bib}
    %

    \begin{document}

    \nocite{*}
    \printbibliography

    \begin{refsection}

    \settoggle{bbx:gbtype}{false}%局部设置不输出文献类型和载体标识符
    \settoggle{bbx:gbannote}{true}%局部设置输出注释信息
    \setcounter{gbnamefmtcase}{1}%局部设置作者的格式为大小写不变的国标格式
    \nocite{ref-1-1-Yang,ref-2-1-杨轶,ref-3-1-杨轶,ref-4-1-Yang,ref-5-1-Wu,ref-6-1-贾泽,ref-7-1-伍晓明}

    \printbibliography[title={论文成果}]

    \end{refsection}

    \begin{refsection}

    \settoggle{bbx:gbtype}{false}%局部设置不输出文献类型和载体标识符
    \settoggle{bbx:gbannote}{true}%局部设置输出注释信息
    \setcounter{gbnamefmtcase}{3}%局部设置作者的格式为familyahead格式
    \nocite{ref-8-1-任天令,ref-9-1-Ren}

    \printbibliography[title={专利成果}]

    \end{refsection}

    \end{document} 

结果为:

图片

hushidong commented 5 years ago

第二个示例:

\documentclass[twoside]{article}
    \usepackage{ctex}
    \usepackage{xcolor}
    \usepackage{toolbox}
    \usepackage{hyperref}
    \usepackage{lipsum}
    \usepackage[paperwidth=21cm,paperheight=29cm,top=10pt,bottom=10pt,left=1cm,right=1cm]{geometry}

\usepackage[backend=biber,style=gb7714-2015]{biblatex}

%\setaystylesection{1}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
% Encoding: UTF-8
@article{ref-1-1-Yang,
author    = {Yang, Y and Ren, T L and Zhang, L T and others},
title     = {Miniature microphone with silicon-based ferroelectric thin films},
journal   = {Integrated Ferroelectrics},
date      = {2003},
pages      = {229-235},
volume      = {52},
annotation      = {SCI 收录, 检索号:758FZ},
}

@article{ref-2-1-杨轶,
author    = {杨轶 and 张宁欣 and 任天令 and others},
title     = {硅基铁电微声学器件中薄膜残余应力的研究},
journal   = {中国机械工程},
pages= {1289-1291},
date      = {2005},
volume      = {16},
number ={14},
annotation ={EI 收录, 检索号:0534931 2907},
}

@article{ref-3-1-杨轶,
author    = {杨轶 and 张宁欣 and 任天令 and others},
title     = {集成铁电器件中的关键工艺研究},
journal   = {仪器仪表学报},
date      = {2003},
volume      = {24},
pages={192-193},
number      = {S4},
annotation      = {EI 源刊},
}

@article{ref-4-1-Yang,
author    = {Yang, Y and Ren, T L and Zhu, Y P and others},
title     = {PMUTs for handwriting recognition},
pubstate ={In press},
annotation      = {已被 Integrated Ferroelectrics 录用. SCI 源刊.},
}

@article{ref-5-1-Wu,
author    = {Wu, X M and Yang, Y and Cai, J and others},
title     = {Measurements of ferroelectric MEMS microphones},
journal   = {Integrated Ferroelectrics},
date      = {2005},
pages={417-429},
volume      = {69},
annotation      = {SCI 收录, 检索号 :896KM.},
}

@article{ref-6-1-贾泽,
author    = {贾泽 and 杨轶 and 陈兢 and others},
title     = {用于压电和电容微麦克风的体硅腐蚀相关研究},
journal   = {压电与声光},
date      = {2006},
pages      = {117-119},
number={1},
volume      = {28},
annotation      = {EI 收录, 检索号:06129773469.},
}

@article{ref-7-1-伍晓明,
author    = {伍晓明 and 杨轶 and 张宁欣 and others},
title     = {基于MEMS技术的集成铁电硅微麦克风},
journal   = {中国集成电路},
date      = {2003},
volume      = {53},
pages      = {59-61},
}

@patent{ref-8-1-任天令,
author    = {任天令 and 杨轶 and 朱一平 and others},
title     = {硅基铁电微声学传感器畴极化区域控制和电极连接的方法},
number ={中国, CN1602118A},
annotation      = {中国专利公开号.},
}

@patent{ref-9-1-Ren,
author    = {Ren, T L and Yang, Y and Zhu, Y P and others},
title     = {Piezoelectric micro acoustic sensor based on ferroelectric materials},
number ={USA, No.11/215, 102},
annotation      = {美国发明专利申请号.},
}
\end{filecontents}

    \addbibresource{\jobname.bib}
    %

    \begin{document}

    \nocite{*}
    \printbibliography

    \begin{refsection}

    \settoggle{bbx:gbtype}{false}%局部设置不输出文献类型和载体标识符
    \settoggle{bbx:gbannote}{true}%局部设置输出注释信息
    \setcounter{gbnamefmtcase}{1}%局部设置作者的格式为大小写不变的国标格式
    \nocite{ref-1-1-Yang,ref-2-1-杨轶,ref-3-1-杨轶,ref-4-1-Yang,ref-5-1-Wu,ref-6-1-贾泽,ref-7-1-伍晓明}

    \printbibliography[title={论文成果}]

    \end{refsection}

    \begin{refsection}

    \settoggle{bbx:gbtype}{false}%局部设置不输出文献类型和载体标识符
    \settoggle{bbx:gbannote}{true}%局部设置输出注释信息
    \setcounter{gbnamefmtcase}{1}%局部设置作者的格式为familyahead格式
    \nocite{ref-8-1-任天令,ref-9-1-Ren}

    \printbibliography[title={专利成果}]

    \end{refsection}

    \end{document} 

结果为:

图片

hushidong commented 5 years ago

这一解决方案,可以将所有的与文献相关的信息,同一放到bib文件中来同一管理,唯一要增加的就是annotation或annote域,用来放,条目后的注释信息。

当然, 因为才看到你们的模板不久,且格式问题,比如注释信息问题,是才产生的。因此相比之前的看到北邮模板需要增加一个annotation或annote域来解决,所以对biblatex-gb7714-2015做了更新。所以要使用这种解决方案,那么需要使用最新的biblatex-gb7714-2015,因为暂时还没有更新到ctan上,所以目前只能从github上下载了。

marquistj13 commented 5 years ago

感谢大神的指导,我先花时间消化一下。

我目前有如下想法:

  1. 鉴于我的bib文件是zotero自动更新的,因此不宜直接操作这个bib文件,可新建一个bib文件填入resume中的“文献”信息。
  2. 两个或多个bib文件可通过多个 \addbibresource 实现。

等有时间了我就搞一下。:blush:

Best,

hushidong commented 5 years ago

好,加bib文件时除了直接用addbibresource外,可以直接在启用refsection环境时加入,比如:

\begin{refsection}[resume.bib]

\nocite{*}

\printbibliography

\end{refsection}
marquistj13 commented 5 years ago

good :thumbsup:

marquistj13 commented 5 years ago

@hushidong 您好,我尝试了您的方案,遇到一点困难。 描述如下:

  1. 对于你给的第二个示例,我将resume中的参考文献存为resume.bib 文件,发现没有问题,和你的输出一样。
  2. 对于我校的模板,也采用新建 resume.bib 文件的方式,发现 论文成果专利成果 部分会分别另起一页。(对应的修改放在了 resume branch

其实对于我校模板的参考文献 部分,它也是自动新起一页,然后作为标题居中的,我一开始用的时候就没搞明白它是什么原理。现在终于到了要解决的地步了。 我猜测 \printbibliography 有对应的选项来控制是否另起一页么?不过我看了你的文档,貌似 \printbibliography 部分没讲这个。

Best regards,

hushidong commented 5 years ago

是这样的,biblatex中,printbibliography命令有一个heading参数用于控制参考文献标题的层级,默认情况下是heading=bibliography,对于book或report类,该选项的意义是标题的层级与chapter相同,因此会自动换页,如果设置其他值,就会有所不同。比如设置heading=subbibliography,表示与当前默认层级的下一级相同,所以在book或report类中会与section层级相同。如果要去除标题那么可以设置为none。当然在article类中heading=bibliography的默认层级是section,因此是不同的,这里不再赘述。因此,如果在book或report类中若不需要换页,则简单的设置heading=subbibliography即可。当然也可以对heading=bibliography的内部代码进行重定义,但那样又会对全文的文献表产生影响。为此,我们只需要在resume中局部的使用heading=subbibliography。

比如:

\documentclass[twoside]{book}
    \usepackage{ctex}
    \usepackage{xcolor}
    \usepackage{toolbox}
    \usepackage{hyperref}
    \usepackage{lipsum}
    \usepackage[paperwidth=21cm,paperheight=29cm,top=10pt,bottom=10pt,left=1cm,right=1cm]{geometry}

\usepackage[backend=biber,style=gb7714-2015]{biblatex}

%\setaystylesection{1}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
% Encoding: UTF-8
@article{ref-1-1-Yang,
author    = {Yang, Y and Ren, T L and Zhang, L T and others},
title     = {Miniature microphone with silicon-based ferroelectric thin films},
journal   = {Integrated Ferroelectrics},
date      = {2003},
pages      = {229-235},
volume      = {52},
annotation      = {SCI 收录, 检索号:758FZ},
}

@article{ref-2-1-杨轶,
author    = {杨轶 and 张宁欣 and 任天令 and others},
title     = {硅基铁电微声学器件中薄膜残余应力的研究},
journal   = {中国机械工程},
pages= {1289-1291},
date      = {2005},
volume      = {16},
number ={14},
annotation ={EI 收录, 检索号:0534931 2907},
}

@article{ref-3-1-杨轶,
author    = {杨轶 and 张宁欣 and 任天令 and others},
title     = {集成铁电器件中的关键工艺研究},
journal   = {仪器仪表学报},
date      = {2003},
volume      = {24},
pages={192-193},
number      = {S4},
annotation      = {EI 源刊},
}

@article{ref-4-1-Yang,
author    = {Yang, Y and Ren, T L and Zhu, Y P and others},
title     = {PMUTs for handwriting recognition},
pubstate ={In press},
annotation      = {已被 Integrated Ferroelectrics 录用. SCI 源刊.},
}

@article{ref-5-1-Wu,
author    = {Wu, X M and Yang, Y and Cai, J and others},
title     = {Measurements of ferroelectric MEMS microphones},
journal   = {Integrated Ferroelectrics},
date      = {2005},
pages={417-429},
volume      = {69},
annotation      = {SCI 收录, 检索号 :896KM.},
}

@article{ref-6-1-贾泽,
author    = {贾泽 and 杨轶 and 陈兢 and others},
title     = {用于压电和电容微麦克风的体硅腐蚀相关研究},
journal   = {压电与声光},
date      = {2006},
pages      = {117-119},
number={1},
volume      = {28},
annotation      = {EI 收录, 检索号:06129773469.},
}

@article{ref-7-1-伍晓明,
author    = {伍晓明 and 杨轶 and 张宁欣 and others},
title     = {基于MEMS技术的集成铁电硅微麦克风},
journal   = {中国集成电路},
date      = {2003},
volume      = {53},
pages      = {59-61},
}

@patent{ref-8-1-任天令,
author    = {任天令 and 杨轶 and 朱一平 and others},
title     = {硅基铁电微声学传感器畴极化区域控制和电极连接的方法},
number ={中国, CN1602118A},
annotation      = {中国专利公开号.},
}

@patent{ref-9-1-Ren,
author    = {Ren, T L and Yang, Y and Zhu, Y P and others},
title     = {Piezoelectric micro acoustic sensor based on ferroelectric materials},
number ={USA, No.11/215, 102},
annotation      = {美国发明专利申请号.},
}
\end{filecontents}

    \addbibresource{\jobname.bib}
    %

    \begin{document}

    \nocite{*}
    \printbibliography

\chapter*{简历}

    \begin{refsection}

    \settoggle{bbx:gbtype}{false}%局部设置不输出文献类型和载体标识符
    \settoggle{bbx:gbannote}{true}%局部设置输出注释信息
    \setcounter{gbnamefmtcase}{1}%局部设置作者的格式为大小写不变的国标格式
    \nocite{ref-1-1-Yang,ref-2-1-杨轶,ref-3-1-杨轶,ref-4-1-Yang,ref-5-1-Wu,ref-6-1-贾泽,ref-7-1-伍晓明}

    \printbibliography[heading=subbibliography,title={论文成果}]

    \end{refsection}

    \begin{refsection}

    \settoggle{bbx:gbtype}{false}%局部设置不输出文献类型和载体标识符
    \settoggle{bbx:gbannote}{true}%局部设置输出注释信息
    \setcounter{gbnamefmtcase}{1}%局部设置作者的格式为familyahead格式
    \nocite{ref-8-1-任天令,ref-9-1-Ren}

    \printbibliography[heading=subbibliography,title={专利成果}]

    \end{refsection}

    \end{document} 

结果为: 图片

hushidong commented 5 years ago

你看一下biblatex中关于 defbibheading的内容就会比较清楚原理了,biblatex实质是调用chapter*这样的命令来生成文献表标题的。

marquistj13 commented 5 years ago

ok, thanks