Coder Social home page Coder Social logo

course-report's People

Contributors

eliaul avatar xkwxdyy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

course-report's Issues

优化封面个人信息中的自动换行效果

问题描述

example/cover-example3.tex 中使用了 {{}, 赵六}, 来排版出换行的效果:

addinfo = {
{学院, 测绘学院},
{专业, 导航工程},
{班级, 2020 级 x 班},
{组员, 张三、李四、王五},
{{}, 赵六},
{学号, 202020212022}
}

但作为模版来说,我并不建议这样处理。

模版具有传播性,可能这里传来传去,模版的手册可能会丢失,即使有模版手册,不能保证每个用户都能完整地看一遍手册(这是 LaTeX 模版的普遍现状),所以这个换行方法不能确保每个用户都知道。

还有一点,其实这个从某种角度也违背了”内容和样式分离”的**,因为作为一个好的模版来讲,用户要做的是输入内容,仅此而已。

优化想法

第一个想法是用 \parbox ,但是这个就需要固定宽度,可能不太好。

可以尝试用 varwidth 环境来获得“弹性最大宽度“

\documentclass{ctexart}
\usepackage{varwidth}
\usepackage{xeCJKfntef}

\begin{document}

组员:
\begin{varwidth}[t]{0.5\textwidth}
  \CJKunderline*{张三、李四、王五、赵六}
\end{varwidth}

组员:
\begin{varwidth}[t]{0.5\textwidth}
  \centering
  \CJKunderline*{张三、李四、王五 \\ 赵六}
\end{varwidth}

\end{document}

image

如果换行后还要是整行的下划线,可以参考我的那个 CCNUthesis

https://github.com/xkwxdyy/CCNUthesis/blob/f296da08073b2c4dd1a68da3fe34c64b21fa05e8/CCNUthesis.cls#L2431-L2544

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.