我正在尝试设计一个采访的标题页。我想在页面上显示标题、受访者、介绍文字……所有这些都在基于列的布局中。
我尝试了几种方法:columnsetareas
、伪列等。目前,最好的选择似乎是使用层和框架。以下是我目前的情况:
\setuplayout[grid=yes] \showgrid
\setuplayout
[columndistance=12pt,
columns=3]
\starttext
\definelayer [text] \setupbackgrounds [text] [background=text]
\setlayerframed[text]
[column=3,line=3]
[align=normal,frame=off,strut=no, width=\layoutcolumnwidth]
{\startlines[before=\vss,after=\vss]
Here comes some text.
\stoplines}
\stoptext
除此以外,我无法将框架与页面底部对齐(它会从底部向顶部扩展)。此外,我的框架在文本周围有轻微的填充(即使有frame=off
)。
这是我想要实现的 Scribus 模型:
有什么提示吗?
多谢。
答案1
我不明白这里的网格部分。我只是把文本放在我认为看起来不错的地方。毕竟,这只是标题页,对吧?
在下面的例子中,你可以得到一些可以玩的东西。注意
- 我们对字体大小 10pt(设置为 15pt)使用支柱,但不对更大的尺寸使用支柱(测试一下!)。
- 我们设置的字体大小的行间距是 15pt 的整数倍。
- 我们已经使用了
location=low
。这似乎是“锚定在底部”的正确方法。
这对微小的扰动非常敏感,所以......
\setuppapersize[A4,landscape]
\definebodyfontenvironment
[10pt]
[interlinespace=15pt]
\setupbodyfont[10pt]
\definefont
[myfontone]
[Serif*default at 20pt]
[line=30pt]
\definefont
[myfonttwo]
[Serif*default at 25pt]
[line=30pt]
\definefont
[myfontthree]
[SerifBold*default at 90pt]
[line=120pt]
% To use the page area in the example
\setuplayout[tight]
\setuplayout
[grid=yes,
columns=4,
columndistance=10pt]
\showgrid
\showstruts
\definelayer
[text]
\setupbackgrounds
[text]
[background=text]
% To use to step down a certain
% number of lines.
\starttexdefinition LayoutLineOffset #1
\the\dimexpr\topskip-\strutht+#1\lineheight-\lineheight\relax
\stoptexdefinition
\startbuffer[zero]
Typesetting on the grid involves arranging text and images in a structured layout using a grid system. This approach helps to create a consistent and balanced design, and can also aid in the responsive design of a website or publication. It is commonly used in print design and digital design, such as web design and user interface design. However, it also has its drawbacks. One of the main limitations is that it can restrict the flexibility in the design, as elements must conform to the grid structure.
\stopbuffer
\startbuffer[one]
This can make it difficult to create asymmetrical or diagonal compositions and may result in a lack of visual interest or creativity in the design. When not used effectively, the grid can also make the design look rigid or unbalanced.
\stopbuffer
\startbuffer[two]
Finally, if the grid is overused, it can become too formulaic or predictable in the layout, leading to a lack of creativity and uniqueness in the design.
\stopbuffer
\startbuffer[three]
No grid!
\stopbuffer
\starttext
\setlayerframed
[text]
[y=\LayoutLineOffset{1},
x=\layoutcolumnoffset{4}]
[align=verytolerant,
offset=overlay,
location=top,
width=\layoutcolumnwidth]
{\begstrut \getbuffer[zero] \endstrut}
{\myfontone\setupinterlinespace
\setlayerframed
[text]
[y=\LayoutLineOffset{12},
x=\layoutcolumnoffset{2}]
[align=verytolerant,
offset=overlay,
width=\dimexpr2\layoutcolumnwidth+\layoutcolumndistance\relax,
location=low]
{\getbuffer[one]}%\begstrut \getbuffer[one] \endstrut}
}
{\myfonttwo\setupinterlinespace
\setlayerframed
[text]
[y=\LayoutLineOffset{19},
x=\layoutcolumnoffset{1}]
[align=verytolerant,
offset=overlay,
width=\dimexpr2\layoutcolumnwidth+\layoutcolumndistance,
location=low]
{\getbuffer[two]}%\begstrut \getbuffer[two] \endstrut}
}
{\myfontthree\setupinterlinespace
\setlayerframed
[text]
[y=\LayoutLineOffset{1},
x=\layoutcolumnoffset{1}]
[align=verytolerant,
offset=overlay,
width=\dimexpr3\layoutcolumnwidth+2\layoutcolumndistance,
location=low]
{\getbuffer[three]}%\begstrut \getbuffer[three] \endstrut}
}
\null% Since other stuff is put in layers...
\stoptext