Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在学位论文上 url=false 命令失效 #178

Open
YanMing-lxb opened this issue Nov 26, 2023 · 4 comments
Open

在学位论文上 url=false 命令失效 #178

YanMing-lxb opened this issue Nov 26, 2023 · 4 comments

Comments

@YanMing-lxb
Copy link

相关设置:

\RequirePackage[
                backend=biber,                        % 设置后端程序为biber
                style=gb7714-2015,                    % 引用和参考文献样式
                gbpub=true,                           % 显示出版信息
                gbnamefmt=lowercase,                  % 姓名小写
                doi=false,                            % 不显示doi
                url=false,                            % 不显示url
                gbmedium=false,                       % 载体标识符不显示OL
                gbpunctin=false,                      % 关闭inbook,incollection,inproceedings中析出来源文献前//符号
                gbalign=left,                         % 标签左对齐
                defernumbers=true,                    % 解决refsection环境中 \printbibliography 筛选和 notice* 一起使用导致的编号错乱
                ]{biblatex}

latexmk xelatex 编译

文献信息:

@thesis{LuSiHong_2021,
  type = {硕士},
  title = {均温散热微小通道的结构研究},
  author = {{吕嗣鸿}},
  editora = {{王皓}},
  editoratype = {collaborator},
  date = {2021},
  institution = {{电子科技大学}},
  url = {https://kns.cnki.net/KCMS/detail/detail.aspx?dbcode=CMFD&dbname=CMFD202201&filename=1021747500.nh&v=},
  language = {zh-CN}
}

编译结果:

image

@YanMing-lxb
Copy link
Author

目前测试过,如果style不设置成gb7714-2015的话,url-false 是有效的,所以很大概率是biblatex-gb7714-2015的问题

@YanMing-lxb
Copy link
Author

如果删掉url = {https://kns.cnki.net/KCMS/detail/detail.aspx?dbcode=CMFD&dbname=CMFD202201&filename=1021747500.nh&v=}, 则编译后会显示 In collab. with
image

版本号:
MiKTeX 23.10.12
Biblatex 3.19
biblatex-gb7714-2015 1.1o

@hushidong
Copy link
Owner

hushidong commented Nov 27, 2023

  1. thesis 没有地址又有url会识别为online,所以false会失效,所以补上就好了。
  2. patent 通常不用给出地址和类型,所以去掉就行。
% !Mode:: "TeX:UTF-8"
% 用于测试gb7714-2015样式,对于作者姓名格式的控制和选项
% 测试gbnamefmt选项
% 测试bib文件中的nameformat域
\documentclass[twoside]{article}
\usepackage{ctex}
\usepackage{xcolor}
\usepackage[colorlinks]{hyperref}
\usepackage{lipsum}
\usepackage{geometry}

\usepackage[backend=biber,style=gb7714-2015,gbstrict=true,url=false,doi=false]{biblatex}

\DeclareStyleSourcemap{
    \maps[datatype=bibtex]{%
        \map[overwrite]{%
            \pertype{thesis}
            \step[fieldset=editora,null]%
            \step[fieldset=editoratype,null]%
        }
        \map[overwrite]{%
            \pertype{patent}
            \step[fieldset=holder,null]%
            \step[fieldset=type,null]%
            \step[fieldset=institution,null]%
            \step[fieldset=location, fieldvalue={}]%null有问题
        }
    }
}

\begin{filecontents}[force]{\jobname.bib}

@thesis{LuSiHong_2021,
  type = {硕士},
  title = {均温散热微小通道的结构研究},
  author = {{吕嗣鸿}},
  editora = {{王皓}},
  editoratype = {collaborator},
  date = {2021},
  location={成都},
  institution = {{电子科技大学}},
  url = {https://kns.cnki.net/KCMS/detail/detail.aspx?dbcode=CMFD&dbname=CMFD202201&filename=1021747500.nh&v=},
  language = {zh-CN}
}

@patent{LiChunQuan.ZhengYuanHao.ea_2023,
  type = {patent},
  title = {一种的微通道散热装置},
  author = {李XX and 黄XX},
  holder = {{Guilin University of Electronic Technology}},
  date = {2023-05-09},
  number = {CN143A},
  location = {{CN}},
  urldate = {2023-08-07},
  language = {zh},
}


@article{wu2018da,
  title = {Assessing River Water Quality Using Water Quality Index in {{Lake Taihu Basin}}, {{China}}},
  author = {Wu, Zhaoshi and Wang, Xiaolong and Chen, Yuwei and Cai, Yongjiu and Deng, Jiancai},
  date = {2018-01},
  journaltitle = {Science of The Total Environment},
  shortjournal = {Science of The Total Environment},
  volume = {612},
  pages = {914--922},
  issn = {00489697},
  doi = {10.1016/j.scitotenv.2017.08.293},
  urldate = {2023-07-19},
  url={10.1016/j.scitotenv.2017.08.29310.1016/j.scitotenv.2017.08.29310.1016/j.scitotenv.
  2017.08.29310.1016/j.scitotenv.2017.08.29310.1016/j.scitotenv.2017.08.293},
  langid = {english},
  extradate={1}
}

@article{wu2018d,
  title = {Assessing River Water Quality Using Water Quality Index in {{Lake Taihu Basin}}, {{China}}},
  author = {Wu, Zhaoshi and Wang, Xiaolong and Chen, Yuwei and Cai, Yongjiu and Deng, Jiancai},
  date = {2018-01},
  journaltitle = {Science of The Total Environment},
  shortjournal = {Science of The Total Environment},
  volume = {612},
  pages = {914--922},
  issn = {00489697},
  doi = {10.1016/j.scitotenv.2017.08.293},
  url={10.1016/j.scitotenv.2017.08.293},
  urldate = {2023-07-19},
  langid = {english},
  extradate={1}
}

\end{filecontents}
\addbibresource{\jobname.bib}


\begin{document}


\nocite{*}

\printbibliography




 \end{document} 

图片

@YanMing-lxb
Copy link
Author

万分感谢胡老师这么细致的回复🫡,助我完美解决问题,开心!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants