2

目前我使用 Python Report Labs 动态生成此文档……以生成 pdf 文档。

现在,我想尝试用 Tex / Latex / ConTeXt 生成这个文档……</p>

我有一些问题:

  • 我怎样才能使布局?
  • 如何制作标题背景颜色?
  • 如何定义我的自定义标题(带蓝色框)?
  • 我的项目有什么更好的选择:Latex 还是 ConTeXt?

我需要使用什么包?

  • 几何学 ?
  • 花式的?

你有例子吗?一些资源?

昨天,我阅读了很多文档……但我没有找到解决问题的解决方案/示例。

4

3 回答 3

2

With titlesecand colorpackages 在 LaTeX 头中使用这个(之前\begin{document}

\usepackage{titlesec}
\usepackage{color}

% Colors
\definecolor{textcolor}{rgb}{.90,.95,1}
\definecolor{boxcolor}{rgb}{.94,.97,1}

% Header style
\titleformat{\section}
{\color{textcolor}\normalfont\Large\bfseries}
{}{1em}{{\color{boxcolor}\rule{0.35cm}{0.35cm}}\quad}

制作蓝色框并更改标题颜色,字体并删除编号。

于 2010-05-31T17:39:12.660 回答
2

Some useful packages apart from the fancyhdr you already mentioned are:

  1. titlesec for more control over your section titles
  2. booktabs for more control over table layout
  3. PGF/TikZ for the graphics in your document, i.e., the page turn effect in the corner and maybe the blue boxes (although that might be considered a bit overkill :))
  4. memoir for more control over your document layout, but the package is more book-oriented than you need probably
  5. koma-script might be a good alternative for memoir but I'm not familiar with it so I don't know about its weaknesses

This is list is not exhaustive and I am not experienced enough in this kind of typesetting meets lay-out stuff to be of much help, but these are packages that come to my mind given your problem :).

Using inputenc there shouldn't be a problem typesetting Russian text.

Maybe the actual process will be easier in ConTeXt, it is more oriented towards control over your typesetting but I'm not familiar with it.

Good luck!

于 2010-05-27T12:59:20.077 回答
2

我肯定会在 Context 而不是 Latex 中进行这种思考:Context 允许网格布局,并允许您定义用于将文本和其他图形放在背景图形之上的层。但正如 Pieter 所说,您可以尝试使用 TikZ 来使用 Latex 来执行此操作。

Unicode 不是常规 Latex 或 Context 的障碍:使用任何一种,只需指定要使用 utf-8 作为输入编码。

如果您确实使用 Latex,则不要有页眉或页脚,也不要为它们分配垂直空间。

有上下文:

  1. 如何进行布局?— 使用网格布局。
  2. 如何制作标题背景颜色?— 使用 \setupbackground
  3. 如何定义我的自定义标题(带蓝色框)? ——我不明白你想在这里做什么。

执行此操作所需的一切,除了网格模式和如何将图形放在背景中,都记录在Context an excursion中。网格模式在上下文手册中进行了说明。层有点难以掌握,但上下文 wiki 中的是一个很好的起点。

于 2010-05-27T14:09:43.820 回答