ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Ask advices for underlines in coverage design.
@ 2009-04-09 10:04 Wei-Wei Guo
  0 siblings, 0 replies; only message in thread
From: Wei-Wei Guo @ 2009-04-09 10:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 3023 bytes --]

Dear all,

I'm trying to make a dissertation template for our university. The cover of the
template has many underlines. It's so hard to do with those underlines with
ConTeXt. I attached two files. One is "cover.tex" which designing coverage. The
other is "main.pdf" which is the output file that is the most closing one to my
expectation.

I make underlines with following codes:

   \startuseMPgraphic{mpos:par:columnset:underlinec}
     \iftracepositions show_multi_pars \else draw_multi_pars \fi ;
     path p ; p := boundingbox currentpicture ;
     currentpicture := currentpicture shifted (0,-0.0*StrutDepth) ;
     setbounds currentpicture to p ;
   \stopuseMPgraphic

   \startuseMPgraphic{mpos:par:columnset:underlinee}
     \iftracepositions show_multi_pars \else draw_multi_pars \fi ;
     path p ; p := boundingbox currentpicture ;
     currentpicture := currentpicture shifted (0,-0.7*StrutDepth) ;
     setbounds currentpicture to p ;
   \stopuseMPgraphic

   \startuseMPgraphic{mpos:par:columnset:underlinet}
     path p ; p := boundingbox currentpicture ;
     currentpicture := currentpicture shifted (0,-0.7*StrutDepth) ;
     setbounds currentpicture to p ;
   \stopuseMPgraphic

   \definetextbackground
     [underlinec]
     [location=paragraph,
      alternative=1,
      mp=mpos:par:columnset:underlinec,
      background=,
      frame=off]

   \definetextbackground
     [underlinee]
     [location=paragraph,
      alternative=1,
      mp=mpos:par:columnset:underlinee,
      background=,
      frame=off]

   \definetextbackground
     [underlinet]
     [location=text,
      alternative=1,
      mp=mpos:par:columnset:underlinet,
      background=,
      frame=off]

   \definetextbackground
     [underline]
     [location=text,
      alternative=1,
      background=,
      frame=off]

I defined four kinds of underlines, to fit the different distance requirements between
underlines and text lines. Three of them, underlinec, underlinee, and underlinet, are
defined with MPgraphic; the other one, underline, is defined only by textbeckground.
I can only use the \underline command without MPgraphic, but it will draw lines too
close to the text lines.

The most wried thing is that if I use all the three MPgraphic defined underline, the
vertical positions of underlines will be wrong and some underlines will not be drawn.

The other problems are:

- The English title is longer than the underline. I tried to figure out the reason,
   but in some other tex files, the problem is gone. I cannot reproduce it.
- I don't know how to make the last two parts at the bottom of the coverage centered.
   I tried the following way but nothing happened.

     \definefloat[centered][table]
     \setupfloat[centered][default={none}]
     \placecentered{here,always,none}{}


How can I make those underline acting as predicted? Is it related with the bug I
mailed to the list before? Is there any alternative way to implement it?

Any advice is appreciated. Thanks in advance!

Best wishes,
Wei-Wei

[-- Attachment #2: cover.tex --]
[-- Type: text/plain, Size: 1528 bytes --]

%%% 封面

\useexternalfigure[zjulabel][images/zjdx.pdf][width=52mm]
\useexternalfigure[zjulogo][images/standxb.pdf][width=21mm]

{\it 分类号:}\underline{\cbox{\hsize 4cm \zjuclass}} \hfill {\it 单位代码:}\underline{\cbox{\hsize 3cm 10335}}

{\it 密~~~级:}\underline{\cbox{\hsize 4cm \zjusecurity}} \hfill {\it 学~~~~~号:}\underline{\cbox{\hsize 3cm \zjuauthorid}}

\godown[15mm]

\placefigure[force]{none}{\externalfigure[zjulabel]}

\midaligned{\tfd\it 博士学位论文}

\placefigure[force]{none}{\externalfigure[zjulogo]}

\startproperty[both]
\starttabulate[|l|p|]
\NC \tfb\it 中文论文题目: \NC \underlinec{\tfb \zjutitlec} \NC\NR
\TB[2mm] 
\NC \tfb\it 英文论文题目: \NC \underlinee{\tfb \zjutitlee} \NC\NR
\stoptabulate 
\stopproperty

\placecentered{here,always,none}{
\starttabulate[|r|p|]
\NC \tfa\it 申请人姓名: \NC \underline{\tfa\cbox{\hsize 6cm \zjuauthor}} \NC \NR
\NC \tfa\it 指导教师:  \NC \underline{\tfa\cbox{\hsize 6cm \zjumentor}} \NC \NR
\NC \tfa\it 合作导师:  \NC \underline{\tfa\cbox{\hsize 6cm \zjumentorco}} \NC \NR
\NC \tfa\it 专业名称:  \NC \underline{\tfa\cbox{\hsize 6cm \zjumajor}} \NC \NR
\NC \tfa\it 研究方向:  \NC \underline{\tfa\cbox{\hsize 6cm \zjusubject}} \NC \NR
\NC \tfa\it 所在学院:  \NC \underline{\tfa\cbox{\hsize 6cm \zjuschool}} \NC \NR
\stoptabulate
}

\startproperty[both]
{\tfa\it 论文提交日期:\underline{\cbox{\hsize 51mm \zjuapprovaldate}}}
\stopproperty


[-- Attachment #3: main.pdf --]
[-- Type: application/pdf, Size: 102690 bytes --]

[-- Attachment #4: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-09 10:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-09 10:04 Ask advices for underlines in coverage design Wei-Wei Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).