Coder Social home page Coder Social logo

Comments (6)

hushidong avatar hushidong commented on May 20, 2024

我理解一下你的问题,文献表要顺序编码,但文献又有分文种排序的需要。

要实现顺序编码,那么需要使用顺序编码制。又要实现排序,那么可以通过排序选项来实现。之前由于没有需求,所以一些排序选项没有在顺序编码制中定义,但作者年制中都是有的,但由于时间有限,我下面给出一个简单的实现,先解决问题。下一步再增加这些选项,那样就不用在导言定义了。尽管这种需求比较少见。

比如:

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

\usepackage[backend=biber,style=gb7714-2015,sorting=gb7714-2015,gblanorder=chineseahead,sortlocale=zh__pinyin]{biblatex}


\makeatletter
    \DeclareSortingTemplate{gb7714-2015}{
      \sort{
        \field{presort}
      }
      \sort[final]{
        \field{sortkey}
      }
      \sort{
    	\field{language}%language
    	}
      \sort{%[direction=descending]
        \field{sortname}
        \field{author}
        \field{editor}
        \field{translator}
      }
      \sort{
        \field{sortyear}
        \field{year}
      }
      \sort{
        \field{sorttitle}
        \field{title}
      }
      \sort{
        \field{volume}
        \literal{0}
      }
    }
    
\makeatother

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}

@patent{IEEEexample:jppat,
  author        = "U. Hideki",
  title         = "Quadrature Modulation Circuit",
  type          = "patentjp",
  number        = "152932/92",
  year          = "1992-05-20"
}

@patent{IEEEexample:frenchpatreq,
  author        = "F. Kowalik and M. Isard",
  title         = "Estimateur d'un D{\'e}faut de Fonctionnement
                   d'un Modulateur en Quadrature et {\'E}tage de Modulation
                   l'Utilisant",
  language      = "french",
  type          = "French Patent Request",
  number        = "9500261",
  year          = "1995-01-11"
}

@patent{IEEEexample:uspat,
  author        = "Ronald E. Sorace and Victor S. Reinhardt and
                   Steven A. Vaughn",
  holder        = "Hughes Aircraft Company",
  location      = "Los Angeles, CA",
  title         = "High-Speed Digital-to-{RF} Converter",
  type          = "patentus",
  number        = "5668842",
  yearfiled     = "1995-02-28",
  year          = "1997-09-16",
}


@inbook{IEEEexample:repeatedauthorone,
  author    = "W. Dai and H. V. Pham and O. Milenkovic",
  title     = "Distortion-rate functions for quantized compressive sensing",
  booktitle =
    "IEEE Information Theory Workshop on Networking and Information Theory",
  year      = "2009"
}

@inbook{IEEEexample:repeatedauthortwo,
  author    = "W. Dai and H. V. Pham and O. Milenkovic",
  title     = "comparative study of quantized compressive sensing schemes",
  booktitle =
    "IEEE Information Theory Workshop on Networking and Information Theory",
  year      = "2009"
}


@thesis{IEEEexample:masterstype,
  author        = "A. Karnik",
  title         = "Performance of {TCP} Congestion Control with Rate
                   Feedback: {TCP/ABR} and Rate Adaptive {TCP/IP}",
  institution   = "Indian Institute of Science",
  type          = "M. Eng. thesis",
  location      = "Bangalore, India",
  year          = "1999-01"
}





@ARTICLE{方军雄2007,
  AUTHOR = {方军雄},
  DATE = {2007},
  JOURNALTITLE = {经济研究},
  PAGES = {82--92},
  TITLE = {所有制, 制度环境与信贷资金配置},
  VOLUME = {12},
}

@ARTICLE{李晓西1994,
  AUTHOR = {李晓西},
  DATE = {1994},
  JOURNALTITLE = {经济研究},
  KEYWORDS = {李晓西1994转轨过程中的结构性通货膨胀},
  NUMBER = {10},
  PAGES = {28--32},
  TITLE = {转轨过程中的结构性通货膨胀},
}


@ARTICLE{刘凤良2017,
  AUTHOR = {刘凤良 and 章潇萌 and 于泽},
  DATE = {2017},
  JOURNALTITLE = {金融研究},
  KEYWORDS = {刘凤良2017},
  NUMBER = {2},
  PAGES = {54--69},
  TITLE = {高投资、结构失衡与价格指数二元分化},
}

@ARTICLE{楼继伟2016,
  AUTHOR = {楼继伟},
  DATE = {2016},
  JOURNALTITLE = {求是},
  KEYWORDS = {楼继伟2016改革},
  NUMBER = {1},
  PAGES = {24--26},
  TITLE = {**经济最大潜力在于改革},
}

@ARTICLE{吕捷2015cpi,
  AUTHOR = {吕捷 and 王高望},
  DATE = {2015},
  JOURNALTITLE = {经济研究},
  KEYWORDS = {吕捷2015cpi},
  PAGES = {011},
  TITLE = {CPI 与 PPI “背离” 的结构性解释},
  VOLUME = {4},
}
\end{filecontents}
    \addbibresource{\jobname.bib}
    %

    \begin{document}
    \section{顺序编码加分文中排序}

   %\csuse{mkdaterangegb7714-2015}{abc}

    created with biblatex v\versionofbiblatex, last revised at \today;\\ \hspace*{1.5em} Style Files (gb7714-2015*.*) have version number: \versionofgbtstyle.

    
    文献\cite{楼继伟2016,吕捷2015cpi}

文献\cite{IEEEexample:jppat,IEEEexample:frenchpatreq}

    文献\cite{IEEEexample:uspat,
IEEEexample:repeatedauthorone}

    文献\cite{IEEEexample:repeatedauthortwo,
IEEEexample:masterstype}

    文献\cite{方军雄2007,李晓西1994}


    \printbibliography

    \end{document} 

结果为:

图片

from biblatex-gb7714-2015.

hushidong avatar hushidong commented on May 20, 2024

如果文献表中不加入,编码,那么更简单:

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

\usepackage[backend=biber,bibstyle=gb7714-2015ay,citestyle=gb7714-2015]{biblatex}


\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}

@patent{IEEEexample:jppat,
  author        = "U. Hideki",
  title         = "Quadrature Modulation Circuit",
  type          = "patentjp",
  number        = "152932/92",
  year          = "1992-05-20"
}

@patent{IEEEexample:frenchpatreq,
  author        = "F. Kowalik and M. Isard",
  title         = "Estimateur d'un D{\'e}faut de Fonctionnement
                   d'un Modulateur en Quadrature et {\'E}tage de Modulation
                   l'Utilisant",
  language      = "french",
  type          = "French Patent Request",
  number        = "9500261",
  year          = "1995-01-11"
}

@patent{IEEEexample:uspat,
  author        = "Ronald E. Sorace and Victor S. Reinhardt and
                   Steven A. Vaughn",
  holder        = "Hughes Aircraft Company",
  location      = "Los Angeles, CA",
  title         = "High-Speed Digital-to-{RF} Converter",
  type          = "patentus",
  number        = "5668842",
  yearfiled     = "1995-02-28",
  year          = "1997-09-16",
}


@inbook{IEEEexample:repeatedauthorone,
  author    = "W. Dai and H. V. Pham and O. Milenkovic",
  title     = "Distortion-rate functions for quantized compressive sensing",
  booktitle =
    "IEEE Information Theory Workshop on Networking and Information Theory",
  year      = "2009"
}

@inbook{IEEEexample:repeatedauthortwo,
  author    = "W. Dai and H. V. Pham and O. Milenkovic",
  title     = "comparative study of quantized compressive sensing schemes",
  booktitle =
    "IEEE Information Theory Workshop on Networking and Information Theory",
  year      = "2009"
}


@thesis{IEEEexample:masterstype,
  author        = "A. Karnik",
  title         = "Performance of {TCP} Congestion Control with Rate
                   Feedback: {TCP/ABR} and Rate Adaptive {TCP/IP}",
  institution   = "Indian Institute of Science",
  type          = "M. Eng. thesis",
  location      = "Bangalore, India",
  year          = "1999-01"
}





@ARTICLE{方军雄2007,
  AUTHOR = {方军雄},
  DATE = {2007},
  JOURNALTITLE = {经济研究},
  PAGES = {82--92},
  TITLE = {所有制, 制度环境与信贷资金配置},
  VOLUME = {12},
}

@ARTICLE{李晓西1994,
  AUTHOR = {李晓西},
  DATE = {1994},
  JOURNALTITLE = {经济研究},
  KEYWORDS = {李晓西1994转轨过程中的结构性通货膨胀},
  NUMBER = {10},
  PAGES = {28--32},
  TITLE = {转轨过程中的结构性通货膨胀},
}


@ARTICLE{刘凤良2017,
  AUTHOR = {刘凤良 and 章潇萌 and 于泽},
  DATE = {2017},
  JOURNALTITLE = {金融研究},
  KEYWORDS = {刘凤良2017},
  NUMBER = {2},
  PAGES = {54--69},
  TITLE = {高投资、结构失衡与价格指数二元分化},
}

@ARTICLE{楼继伟2016,
  AUTHOR = {楼继伟},
  DATE = {2016},
  JOURNALTITLE = {求是},
  KEYWORDS = {楼继伟2016改革},
  NUMBER = {1},
  PAGES = {24--26},
  TITLE = {**经济最大潜力在于改革},
}

@ARTICLE{吕捷2015cpi,
  AUTHOR = {吕捷 and 王高望},
  DATE = {2015},
  JOURNALTITLE = {经济研究},
  KEYWORDS = {吕捷2015cpi},
  PAGES = {011},
  TITLE = {CPI 与 PPI “背离” 的结构性解释},
  VOLUME = {4},
}
\end{filecontents}
    \addbibresource{\jobname.bib}
    %

    \begin{document}
    \section{顺序编码加分文中排序}

   %\csuse{mkdaterangegb7714-2015}{abc}

    created with biblatex v\versionofbiblatex, last revised at \today;\\ \hspace*{1.5em} Style Files (gb7714-2015*.*) have version number: \versionofgbtstyle.


    文献\cite{楼继伟2016,吕捷2015cpi}

文献\cite{IEEEexample:jppat,IEEEexample:frenchpatreq}

    文献\cite{IEEEexample:uspat,
IEEEexample:repeatedauthorone}

    文献\cite{IEEEexample:repeatedauthortwo,
IEEEexample:masterstype}

    文献\cite{方军雄2007,李晓西1994}


    \printbibliography

    \end{document} 

结果为:

图片

from biblatex-gb7714-2015.

hushidong avatar hushidong commented on May 20, 2024

两种选择你自己选

from biblatex-gb7714-2015.

hushidong avatar hushidong commented on May 20, 2024

注意文献表最后一条问文献为法语文献,所以排在后面。

from biblatex-gb7714-2015.

KentUna avatar KentUna commented on May 20, 2024

很高兴能够怎么看收到您的回复,已按照您的方法实现想要的效果,非常感谢各位大佬在这项工作上的付出,祝好

from biblatex-gb7714-2015.

hushidong avatar hushidong commented on May 20, 2024

1.0t 版本以后,顺序编码制,也可直接使用sorting选项即:
sorting=gb7714-2015
来实现需要的按文种和拼音排序

from biblatex-gb7714-2015.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.