1

By author-year format, sometimes author's name is too long at the end of the line, the name will extend to the right blank of the page. So, how to break it for all the cases in the paper and how to break it just for one case?

\documentclass{article}
\usepackage[backend=biber,style=gb7714-2015ay,gblabelref=true]{biblatex}
\usepackage{ctex,lipsum}
\begin{filecontents}[force]{test.bib}
@article{kleebayoon2023chatgpt,
  title={ChatGPT and oncological applications: comment},
  author={Kleebayoon, Amnuay and Wiwanitkit, Viroj},
  journal={Journal of Cancer Research and Clinical Oncology},
  pages={1--1},
  year={2023},
  publisher={Springer}
}
\end{filecontents}
\addbibresource{test.bib}
\begin{document}
你好你好你好你好你好你好你好你好你好你好你好你好你好 \citep{kleebayoon2023chatgpt}\par
\lipsum[2]
\end{document}

enter image description here

5
  • Use \- to add discretionary hyphens to the name in the bib file (e.g., Klee\-bay\-o\-on). Better to put the citation on its own line, rather than break it across lines in a heading-style line. And maybe a \noindent par (for alignment)? Or \hfill cite, to right align?
    – Cicada
    Oct 11, 2023 at 9:48
  • @Cicada Okay, but the Kleeebaycon et al is produced by biber, so I can't do as the first way you said. How to align with \hfill which I can't imagine. May you say it more clearly.
    – Y. zeng
    Oct 11, 2023 at 10:18
  • 1
    @Cicada Sorry. I checked that and comfired that I can insert \- in the author name in the .bib file. Thanks. This way is a little complicated.
    – Y. zeng
    Oct 11, 2023 at 10:32
  • What do you want to do with the left side of the paragraph? If the cite is like a heading or quotation (and not inline text), you can use epigraph package.
    – Cicada
    Oct 13, 2023 at 5:32
  • @Cicada I don't want to do anything to deal with the left side of the paragraph. I don't know what you said. May you say it more clearly?
    – Y. zeng
    Oct 13, 2023 at 7:44

1 Answer 1

0

An illustration may help.

Typesetting a page can include the action of composing the material ("compose" = "harmonious arrangement"). Reading a well-composed page is an enjoyable experience for the reader. Conversely, being distracted by the layout or other things takes the reader's attention away from the meaning that is being communicated.

There are various techniques.

Discretionary hyphenation pattern for the name:

  author={Kleebay\-o\-on, Amnuay and Wiwanitkit, Viroj},

hyphen

Here,a handful of characters have strayed onto their own line, drawing attention to themselves.

Keeping the citation together as a unit as much as possible is one possible remedy or design choice.

No paragraph indentation (\noindent):

\noindent 你好你好你好你好你好你好你好你好你好你好你好你好你好你好 \citep{kleebayoon2023chatgpt}\par

h2

Slightly better.

Two-line paragraph, with manual line-break (\\):

\noindent 你好你好你好你好你好你好你好你好你好你好你好你好你好你好 \\\citep{kleebayoon2023chatgpt}\par

h3

Right-aligned text (using \hfill):

\hfill 你好你好你好你好你好你好你好你好你好你好你好你好你好你好\par
\hfill\citep{kleebayoon2023chatgpt}\par

h4

Quotation environment:

\begin{quotation}
\hfill 你好你好你好你好你好你好你好你好你好你好你好你好你好你好\par
\hfill\citep{kleebayoon2023chatgpt}\par
\end{quotation}

h5

epigraph package, \epigraph{}{} command:

\epigraph{你好你好你好你好\-你\-好\-你\-好\-你\-好\-你\-好\-你\-好\-你\-好\-你\-好\-你\-好\-你\-好\-你\-好}{\citep{kleebayoon2023chatgpt}}

h6

I don't have your fonts and setup, so that is why - has appeared in the line-break in the epigraph.

Polyglossia and Babel packages can typeset Chinese. There are also many packages dedicated for Chinese. The luatexja bundle of classes and packages are also useful here and, for example, can handle line-breaking

7

and font micro-adjustments

7a

and so on.

MWE

\documentclass{article}
\usepackage{epigraph}
\usepackage[backend=biber,style=gb7714-2015ay,gblabelref=true]{biblatex}
\usepackage{lipsum}
\usepackage{fontspec}
\usepackage{luatexja}

\setmainfont{FandolSong}
\begin{filecontents}[overwrite]{\jobname.bib}
@article{kleebayoon2023chatgpt,
  title={ChatGPT and oncological applications: comment},
  author={Kleebay\-o\-on, Amnuay and Wiwanitkit, Viroj},
  journal={Journal of Cancer Research and Clinical Oncology},
  pages={1--1},
  year={2023},
  publisher={Springer}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}

\noindent\textbf{Hyphenation}

你好你好你好你好你好你好你好你好你好你好你好你好你好你好 \citep{kleebayoon2023chatgpt}\par
\lipsum[2]    

\bigskip
\noindent\textbf{noindent paragraph}

\noindent 你好你好你好你好你好你好你好你好你好你好你好你好你好你好 \citep{kleebayoon2023chatgpt}\par
\lipsum[2]    

\bigskip
\noindent\textbf{two-line paragraph}

\noindent 你好你好你好你好你好你好你好你好你好你好你好你好你好你好 \\\citep{kleebayoon2023chatgpt}\par
\lipsum[2]    

\bigskip
\noindent\textbf{right-aligned quote and cite}

\hfill 你好你好你好你好你好你好你好你好你好你好你好你好你好你好\par
\hfill\citep{kleebayoon2023chatgpt}\par
\lipsum[2]    

\newpage
\bigskip
\noindent\textbf{quotation environment}
\begin{quotation}
\hfill 你好你好你好你好你好你好你好你好你好你好你好你好你好你好\par
\hfill\citep{kleebayoon2023chatgpt}\par
\end{quotation}
\lipsum[2]    


\bigskip
\noindent\textbf{epigraph package} (no language or hyphenation pattern loaded)

    
\epigraph{你好你好你好你好\-你\-好\-你\-好\-你\-好\-你\-好\-你\-好\-你\-好\-你\-好\-你\-好\-你\-好\-你\-好}{\citep{kleebayoon2023chatgpt}}
\lipsum[2]    



    
\marginpar{你好你好你好你好士你. 好你好你好你好你好\footnote{kleebayoon2023chatgpt}}
\lipsum[2]    



\end{document}

\marginpar:

h8

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .