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

英文封面Institute如何换行? #77

Open
Jambalaya11 opened this issue Mar 1, 2021 · 10 comments
Open

英文封面Institute如何换行? #77

Jambalaya11 opened this issue Mar 1, 2021 · 10 comments

Comments

@Jambalaya11
Copy link

如题所示,如果学院名字很长,封面无法显示完整名称,请问该如何换行?
eg:
学院名称为 school of xxx( xxxx school)
但是只显示school of xxx(xx
后面就没了,想达到的效果是
school of xxx
(xxxx school)

@Jambalaya11
Copy link
Author

已尝试\mbox, \titlebreak, \quad均无效

@loganwhite
Copy link

loganwhite commented Mar 23, 2021

他那个列表是tabular实现的,需要去buptgraduatethesis.cls文件,找到相应的行,相当于在tabular环境中新添加一行。比如我这么改的

\begin{minipage}[t]{\textwidth}%学号姓名等
      \centering
      \sihao[1.24]
      \setlength{\extrarowheight}{0pt}
      \setlength{\arrayrulewidth}{0.5bp}
      \begin{tabular}{rc}
        \bupt@label@estudentid\bupt@title@esep & {\hfill\bupt@hide{\bupt@meta@studentid}\hfill} \\
        [-3pt] \cline{2-2} \\
        \bupt@label@eauthor\bupt@title@esep & {\hfill\bupt@hide{\bupt@meta@eauthor}\hfill} \\
        [-3pt] \cline{2-2} \\
        \bupt@label@emajor\bupt@title@esep & {\hfill\bupt@meta@emajor\hfill} \\
        [-3pt] \cline{2-2} \\
        \bupt@label@esupervisor\bupt@title@esep & {\hfill\bupt@hide{\bupt@meta@esupervisor}\hfill} \\
        [-3pt] \cline{2-2} \\
        \bupt@label@edepartment\bupt@title@esep & {\hfill\bupt@meta@edepartment\hfill} \\
        [-3pt] \cline{2-2} \\
        & {\hfill\bupt@meta@edepartmentext\hfill}\\
        [-3pt] \cline{2-2} \\
      \end{tabular}
    \end{minipage}

其中添加了

...
 & {\hfill\bupt@meta@edepartmentext\hfill}\\
        [-3pt] \cline{2-2} \\
...

@metheway
Copy link

哥们你这改的内容不动呀,不智能化

@loganwhite
Copy link

哥们你这改的内容不动呀,不智能化

I’d be glad if you could provide a neat solution.

@metheway
Copy link

难解决,我能够智能化调整行,将{rc}改为{cp{0.6\columnwidth},然后加上\hfill保证居中。但是横线没法解决,手动加的横线只能有一条

@metheway
Copy link

\begin{minipage}[t]{\textwidth}%学号姓名等
\centering
\sihao[1.24]
\setlength{\extrarowheight}{0pt}
\setlength{\arrayrulewidth}{0.5bp}
%rc

  %| m{0.8\columnwidth}
  \begin{tabular}{cp{0.6\columnwidth}}
    \bupt@label@estudentid\bupt@title@esep & {\hfill\bupt@hide{\bupt@meta@studentid}\hfill} \\
    [-3pt] \cline{2-2} \\
    \bupt@label@eauthor\bupt@title@esep & {\hfill\bupt@hide{\bupt@meta@eauthor}\hfill} \\
    [-3pt] \cline{2-2} \\
    \bupt@label@emajor\bupt@title@esep & {\hfill\bupt@meta@emajor\hfill\hfill} \\
    [-3pt] \cline{2-2} \\
    \bupt@label@esupervisor\bupt@title@esep & {\hfill\bupt@hide{\bupt@meta@esupervisor}\hfill} \\
    [-3pt] \cline{2-2} \\
    % \multirow{4}{1in}{Common g text} & Column g2a\\ 
     %          & Column g2b \\ 
       %        & Column g2c \\ 
         %      & Column g2d \\
    \bupt@label@edepartment\bupt@title@esep &  {\hfill\bupt@meta@edepartment\hfill} \\
    [0pt] \cline{2-2} \\
    % -18pt重合了,所以
            [-35pt] \cline{2-2} \\

    %& {\hfill\bupt@meta@edepartment\hfill}\\
    %& {\hfill\bupt@meta@edepartment\hfill} \\

  \end{tabular}

解决了横线问题,但是还是不太智能,强行加了线,要是根据行数调整线就好了。

@metheway
Copy link

炸裂,产生了新的问题,行间距太窄,得加个\specialrule才行,因为是一行自动换行的,所以需要设置内部行间距比较困难

@loganwhite
Copy link

炸裂,产生了新的问题,行间距太窄,得加个\specialrule才行,因为是一行自动换行的,所以需要设置内部行间距比较困难

Nice try though.

@yuliu
Copy link

yuliu commented Jun 4, 2021

他那个列表是tabular实现的,需要去buptgraduatethesis.cls文件,找到相应的行,相当于在tabular环境中新添加一行。比如我这么改的

\begin{minipage}[t]{\textwidth}%学号姓名等
      \centering
      \sihao[1.24]
      \setlength{\extrarowheight}{0pt}
      \setlength{\arrayrulewidth}{0.5bp}
      \begin{tabular}{rc}
        \bupt@label@estudentid\bupt@title@esep & {\hfill\bupt@hide{\bupt@meta@studentid}\hfill} \\
        [-3pt] \cline{2-2} \\
        \bupt@label@eauthor\bupt@title@esep & {\hfill\bupt@hide{\bupt@meta@eauthor}\hfill} \\
        [-3pt] \cline{2-2} \\
        \bupt@label@emajor\bupt@title@esep & {\hfill\bupt@meta@emajor\hfill} \\
        [-3pt] \cline{2-2} \\
        \bupt@label@esupervisor\bupt@title@esep & {\hfill\bupt@hide{\bupt@meta@esupervisor}\hfill} \\
        [-3pt] \cline{2-2} \\
        \bupt@label@edepartment\bupt@title@esep & {\hfill\bupt@meta@edepartment\hfill} \\
        [-3pt] \cline{2-2} \\
        & {\hfill\bupt@meta@edepartmentext\hfill}\\
        [-3pt] \cline{2-2} \\
      \end{tabular}
    \end{minipage}

其中添加了

...
 & {\hfill\bupt@meta@edepartmentext\hfill}\\
        [-3pt] \cline{2-2} \\
...

既然下线是手动加的,那这种方法应该是最好的吧。不知道能不能这么做,加个判断,如果edepartmentext不空就输出且加线?

@dafengzai
Copy link

他那个列表是tabular实现的,需要去buptgraduatethesis.cls文件,找到相应的行,相当于在tabular环境中新添加一行。比如我这么改的

\begin{minipage}[t]{\textwidth}%学号姓名等
      \centering
      \sihao[1.24]
      \setlength{\extrarowheight}{0pt}
      \setlength{\arrayrulewidth}{0.5bp}
      \begin{tabular}{rc}
        \bupt@label@estudentid\bupt@title@esep & {\hfill\bupt@hide{\bupt@meta@studentid}\hfill} \\
        [-3pt] \cline{2-2} \\
        \bupt@label@eauthor\bupt@title@esep & {\hfill\bupt@hide{\bupt@meta@eauthor}\hfill} \\
        [-3pt] \cline{2-2} \\
        \bupt@label@emajor\bupt@title@esep & {\hfill\bupt@meta@emajor\hfill} \\
        [-3pt] \cline{2-2} \\
        \bupt@label@esupervisor\bupt@title@esep & {\hfill\bupt@hide{\bupt@meta@esupervisor}\hfill} \\
        [-3pt] \cline{2-2} \\
        \bupt@label@edepartment\bupt@title@esep & {\hfill\bupt@meta@edepartment\hfill} \\
        [-3pt] \cline{2-2} \\
        & {\hfill\bupt@meta@edepartmentext\hfill}\\
        [-3pt] \cline{2-2} \\
      \end{tabular}
    \end{minipage}

其中添加了

...
 & {\hfill\bupt@meta@edepartmentext\hfill}\\
        [-3pt] \cline{2-2} \\
...

这个靠谱。
另外各位在用这招的时候记得在buptgraduatethesis.cls内绑定文本\bupt@def@metadata{cdepartmentext}并在metadata内将院名称拆开。

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

6 participants