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

文内引文格式 #162

Closed
yangjichen opened this issue Oct 11, 2020 · 15 comments
Closed

文内引文格式 #162

yangjichen opened this issue Oct 11, 2020 · 15 comments

Comments

@yangjichen
Copy link

请问将文内引文格式设定为bib-style = author-year后,文内引用(\citet{}或者\citep{})的人名和年份之间出现很大的空格,这个问题能够帮忙看下吗

@zepinglee
Copy link

给个截图?

@yangjichen
Copy link
Author

image

分别是\citet{}和\citep{} 这样的空格长度是正常的吗

@zepinglee
Copy link

好像有些问题,看下你的 bbl 文件内容?

@yangjichen
Copy link
Author

yangjichen commented Oct 11, 2020

我直接贴在下面了哈~

\begin{thebibliography}{30}
\providecommand{\natexlab}[1]{#1}
\providecommand{\url}[1]{#1}
\expandafter\ifx\csname urlstyle\endcsname\relax\relax\else
  \urlstyle{same}\fi
\providecommand{\href}[2]{\url{#2}}
\providecommand{\doi}[1]{\href{https://doi.org/#1}{#1}}

\bibitem[Cai et~al.(2010)Cai, Cand{\`e}s, and Shen]{cai2010singular}
CAI~J~F, CAND{\`E}S~E~J, SHEN~Z, 2010.
\newblock A singular value thresholding algorithm for matrix
  completion\allowbreak[J].
\newblock SIAM Journal on Optimization, 20\penalty0 (4):\penalty0 1956-1982.

\bibitem[Cand{\`e}s et~al.(2010)Cand{\`e}s and Plan]{candes2010matrix}
CAND{\`E}S~E~J, PLAN~Y, 2010.
\newblock Matrix completion with noise\allowbreak[J].
\newblock Proceedings of the IEEE, 98\penalty0 (6):\penalty0 925-936.

\bibitem[Cand{\`e}s et~al.(2009)Cand{\`e}s and Recht]{candes2009exact}
CAND{\`E}S~E~J, RECHT~B, 2009.
\newblock Exact matrix completion via convex optimization\allowbreak[J].
\newblock Foundations of Computational Mathematics, 9\penalty0 (6):\penalty0
  717.

\bibitem[Cao et~al.(2015)Cao and Xie]{cao2015poisson}
CAO~Y, XIE~Y, 2015.
\newblock Poisson matrix recovery and completion\allowbreak[J].
\newblock IEEE Transactions on Signal Processing, 64\penalty0 (6):\penalty0
  1609-1620.

\bibitem[Chi et~al.(2012)Chi and Kolda]{chi2012tensors}
CHI~E~C, KOLDA~T~G, 2012.
\newblock On tensors, sparsity, and nonnegative factorizations\allowbreak[J].
\newblock SIAM Journal on Matrix Analysis and Applications, 33\penalty0
  (4):\penalty0 1272-1299.

\bibitem[Cokus et~al.(2008)Cokus, Feng, Zhang, Chen, Merriman, Haudenschild,
  Pradhan, Nelson, Pellegrini, and Jacobsen]{cokus2008shotgun}
COKUS~S~J, FENG~S, ZHANG~X, et~al., 2008.
\newblock Shotgun bisulphite sequencing of the arabidopsis genome reveals {DNA}
  methylation patterning\allowbreak[J].
\newblock Nature, 452\penalty0 (7184):\penalty0 215.

\bibitem[Davenport et~al.(2014)Davenport, Plan, Van Den~Berg, and
  Wootters]{davenport20141}
DAVENPORT~M~A, PLAN~Y, VAN DEN~BERG~E, et~al., 2014.
\newblock 1-bit matrix completion\allowbreak[J].
\newblock Information and Inference, 3\penalty0 (3):\penalty0 189-223.

\bibitem[Gandy et~al.(2011)Gandy, Recht, and Yamada]{gandy2011tensor}
GANDY~S, RECHT~B, YAMADA~I, 2011.
\newblock Tensor completion and low-n-rank tensor recovery via convex
  optimization\allowbreak[J].
\newblock Inverse Problems, 27\penalty0 (2):\penalty0 025010.

\bibitem[Ge et~al.(2016{\natexlab{a}})Ge, Caverlee, and Lu]{Ge2016TAPER}
GE~H, CAVERLEE~J, LU~H, 2016{\natexlab{a}}.
\newblock Taper: A contextual tensor-based approach for personalized expert
  recommendation\allowbreak[C]//\allowbreak
Proceedings of the 10th ACM Conference on Recommender Systems.
\newblock [S.l.]: ACM: 261-268.

\bibitem[Ge et~al.(2016{\natexlab{b}})Ge, Caverlee, Zhang, and
  Squicciarini]{ge2016uncovering}
GE~H, CAVERLEE~J, ZHANG~N, et~al., 2016{\natexlab{b}}.
\newblock Uncovering the spatio-temporal dynamics of memes in the presence of
  incomplete information\allowbreak[C]//\allowbreak
Proceedings of the 25th ACM International on Conference on Information and
  Knowledge Management.
\newblock [S.l.]: ACM: 1493-1502.

\bibitem[Gunasekar et~al.(2014)Gunasekar, Ravikumar, and
  Ghosh]{gunasekar2014exponential}
GUNASEKAR~S, RAVIKUMAR~P, GHOSH~J, 2014.
\newblock Exponential family matrix completion under structural
  constraints\allowbreak[C]//\allowbreak
International Conference on Machine Learning.
\newblock [S.l.: s.n.]: 1917-1925.

\bibitem[Hayashi et~al.(2012)Hayashi, Takenouchi, Shibata, Kamiya, Kato,
  Kunieda, Yamada, and Ikeda]{hayashi2012exponential}
HAYASHI~K, TAKENOUCHI~T, SHIBATA~T, et~al., 2012.
\newblock Exponential family tensor factorization: an online extension and
  applications\allowbreak[J].
\newblock Knowledge and Information Systems, 33\penalty0 (1):\penalty0 57-88.

\bibitem[Hong et~al.(2020)Hong, Kolda, and Duersch]{hong2020generalized}
HONG~D, KOLDA~T~G, DUERSCH~J~A, 2020.
\newblock Generalized canonical polyadic tensor decomposition\allowbreak[J].
\newblock SIAM Review, 62\penalty0 (1):\penalty0 133-163.

\bibitem[Kolda et~al.(2009)Kolda and Bader]{kolda2009tensor}
KOLDA~T~G, BADER~B~W, 2009.
\newblock Tensor decompositions and applications\allowbreak[J].
\newblock SIAM review, 51\penalty0 (3):\penalty0 455-500.

\bibitem[Lee et~al.(2014)Lee, Choi, Kim, and Kim]{lee2014social}
LEE~J~K, CHOI~J, KIM~C, et~al., 2014.
\newblock Social media, network heterogeneity, and opinion
  polarization\allowbreak[J].
\newblock Journal of Communication, 64\penalty0 (4):\penalty0 702-722.

\bibitem[Liu et~al.(2014)Liu, Shang, Jiao, Cheng, and Cheng]{liu2014trace}
LIU~Y, SHANG~F, JIAO~L, et~al., 2014.
\newblock Trace norm regularized candecomp/parafac decomposition with missing
  data\allowbreak[J].
\newblock IEEE Transactions on Cybernetics, 45\penalty0 (11):\penalty0
  2437-2448.

\bibitem[Mu et~al.(2014)Mu, Huang, Wright, and Goldfarb]{mu2014square}
MU~C, HUANG~B, WRIGHT~J, et~al., 2014.
\newblock Square deal: Lower bounds and improved relaxations for tensor
  recovery\allowbreak[C]//\allowbreak
International Conference on Machine Learning.
\newblock [S.l.: s.n.]: 73-81.

\bibitem[Murphy et~al.(2014)Murphy, Link, Childs, Tesfaye, Dean, Stern, Pasek,
  Cohen, Callegaro, and Harwood]{murphy2014social}
MURPHY~J, LINK~M~W, CHILDS~J~H, et~al., 2014.
\newblock Social media in public opinion research: Executive summary of the
  aapor task force on emerging technologies in public opinion
  research\allowbreak[J].
\newblock Public Opinion Quarterly, 78\penalty0 (4):\penalty0 788-794.

\bibitem[Nagalakshmi et~al.(2008)Nagalakshmi, Wang, Waern, Shou, Raha,
  Gerstein, and Snyder]{nagalakshmi:08}
NAGALAKSHMI~U, WANG~Z, WAERN~K, et~al., 2008.
\newblock The transcriptional landscape of the yeast genome defined by rna
  sequencing\allowbreak[J].
\newblock Science, 320\penalty0 (5881):\penalty0 1344-1349.

\bibitem[Negahban et~al.(2012)Negahban and Wainwright]{negahban2012restricted}
NEGAHBAN~S, WAINWRIGHT~M~J, 2012.
\newblock Restricted strong convexity and weighted matrix completion: Optimal
  bounds with noise\allowbreak[J].
\newblock Journal of Machine Learning Research, 13\penalty0 (May):\penalty0
  1665-1697.

\bibitem[Rai et~al.(2015)Rai, Hu, Harding, and Carin]{rai2015scalable}
RAI~P, HU~C, HARDING~M, et~al., 2015.
\newblock Scalable probabilistic tensor factorization for binary and count
  data\allowbreak[C]//\allowbreak
Twenty-Fourth International Joint Conference on Artificial Intelligence.
\newblock [S.l.: s.n.]: 3770-3776.

\bibitem[Ran et~al.(2016)Ran, Tan, Wu, and Jin]{ran2016tensor}
RAN~B, TAN~H, WU~Y, et~al., 2016.
\newblock Tensor based missing traffic data completion with spatial--temporal
  correlation\allowbreak[J].
\newblock Physica A: Statistical Mechanics and its Applications, 446:\penalty0
  54-63.

\bibitem[Sauve et~al.(1999)Sauve, Hero, Rogers, Wilderman, and
  Clinthorne]{sauve19993d}
SAUVE~A~C, HERO~A~O, ROGERS~W~L, et~al., 1999.
\newblock 3d image reconstruction for a compton spect camera
  model\allowbreak[J].
\newblock IEEE Transactions on Nuclear Science, 46\penalty0 (6):\penalty0
  2075-2084.

\bibitem[Sidiropoulos et~al.(2016)Sidiropoulos, Lathauwer, Fu, Huang, and
  Faloutsos]{Sidiropoulos2016Tensor}
SIDIROPOULOS~N~D, LATHAUWER~L~D, FU~X, et~al., 2016.
\newblock Tensor decomposition for signal processing and machine
  learning\allowbreak[J].
\newblock IEEE Transactions on Signal Processing\penalty0 (99):\penalty0
  3551-3582.

\bibitem[Sobkowicz et~al.(2012)Sobkowicz, Kaschesky, and
  Bouchard]{sobkowicz2012opinion}
SOBKOWICZ~P, KASCHESKY~M, BOUCHARD~G, 2012.
\newblock Opinion mining in social media: Modeling, simulating, and forecasting
  political opinions in the web\allowbreak[J].
\newblock Government Information Quarterly, 29\penalty0 (4):\penalty0 470-479.

\bibitem[Symeonidis(2016)]{symeonidis2016matrix}
SYMEONIDIS~P, 2016.
\newblock Matrix and tensor decomposition in recommender
  systems\allowbreak[C]//\allowbreak
Proceedings of the 10th ACM Conference on Recommender Systems.
\newblock [S.l.]: ACM: 429-430.

\bibitem[Wang et~al.(2012)Wang, Can, Kazemzadeh, Bar, and
  Narayanan]{wang2012system}
WANG~H, CAN~D, KAZEMZADEH~A, et~al., 2012.
\newblock A system for real-time twitter sentiment analysis of 2012 {US}
  presidential election cycle\allowbreak[C]//\allowbreak
Proceedings of the ACL 2012 System Demonstrations.
\newblock [S.l.]: Association for Computational Linguistics: 115-120.

\bibitem[Wood(2017)]{wood2017generalized}
WOOD~S~N, 2017.
\newblock Generalized additive models: an introduction with r\allowbreak[M].
\newblock [S.l.]: Chapman and Hall/CRC.

\bibitem[Zhang(2019)]{zhang2019cross}
ZHANG~A, 2019.
\newblock Cross: Efficient low-rank tensor completion\allowbreak[J].
\newblock The Annals of Statistics, 47\penalty0 (2):\penalty0 936-964.

\bibitem[Zhang et~al.(2016)Zhang and Aeron]{zhang2016exact}
ZHANG~Z, AERON~S, 2016.
\newblock Exact tensor completion using t-{SVD}\allowbreak[J].
\newblock IEEE Transactions on Signal Processing, 65\penalty0 (6):\penalty0
  1511-1526.

\end{thebibliography}

@zepinglee
Copy link

看起来没啥问题。

用模板默认的示例文档生成的是这样的,其中逗号、括号的字体跟你的不一样。你需要给出复现问题的代码。
Screen Shot 2020-10-11 at 20 18 36

@yangjichen
Copy link
Author

我在overleaf提供的模板中测试了下,和您结果还是不同,可能是overleaf版本的问题?

@zepinglee
Copy link

我在overleaf提供的模板中测试了下,和您结果还是不同,可能是overleaf版本的问题?

Overleaf 上使用默认示例的配置也无法复现你的问题。
Screen Shot 2020-10-11 at 20 35 42

需要给出 MWE

@yangjichen
Copy link
Author

不知道怎么上传…已下载并打包发送至您的gmail邮箱

@zepinglee
Copy link

噢,我见你的内容是英文,所以用了英文版的 fduthesis-en,因此编译的结果不一样。

你用的是中文模板,其中把标点符号换成了全宽的:

fduthesis/source/fduthesis.dtx

Lines 5671 to 5681 in 6c32f74

\cs_new:Npn \@@_set_cite_style_author_year:
{
\NAT@numbersfalse
%<*class>
\cs_set_eq:NN \NAT@open \c_@@_fwid_left_paren_tl
\cs_set_eq:NN \NAT@close \c_@@_fwid_right_paren_tl
\cs_set_eq:NN \NAT@sep \c_@@_fwid_semicolon_tl
\cs_set_eq:NN \NAT@aysep \c_@@_fwid_comma_tl
\cs_set_eq:NN \NAT@yrsep \c_@@_ideo_comma_tl
%</class>
}

但是 natbib 内部的处理使得逗号和分号都多了一个空格。

@yangjichen
Copy link
Author

请问该如何来解决这个问题呢,不太看得懂 .dtx的源码,如果使用overleaf的话有办法解决吗

@zepinglee
Copy link

zepinglee commented Oct 11, 2020

请问该如何来解决这个问题呢,不太看得懂 .dtx的源码,如果使用overleaf的话有办法解决吗

你的英文内容应该用英文模板吧?

要解决这个问题等 @stone-zeng 发布新版把。

@yangjichen
Copy link
Author

毕业论文要求用中文写,我是使用前先拿了个以前写过的论文做了下测试,那就等等新的版本~
多谢帮助!

@stone-zeng
Copy link
Owner

这个主要是为了引用中文文献时看起来比较一致,需要修改的话,在导言区加上

\expandafter\def\csname __fdu_set_cite_style_author_year:\endcsname{}

@yangjichen
Copy link
Author

这个主要是为了引用中文文献时看起来比较一致,需要修改的话,在导言区加上

\expandafter\def\csname __fdu_set_cite_style_author_year:\endcsname{}

多谢!搞定了!

@zepinglee
Copy link

我觉得如果要用中文标点符号最好 patch 一下 natbib 吧。

stone-zeng added a commit that referenced this issue Sep 20, 2021
- Direct load `gbt7714` package
- Allow using `style/cite-style` for BibTeX
- Add `\parencite`
- Do not change citation symbols to CJK punctuations
- Close #127, #162, #163
@stone-zeng stone-zeng added this to the v0.8 milestone Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants