ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* two different outputs.
       [not found] <mailman.1.1546254001.21789.ntg-context@ntg.nl>
@ 2019-01-01  0:33 ` Jeong Dal
  2019-01-01 20:13   ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Jeong Dal @ 2019-01-01  0:33 UTC (permalink / raw)
  To: list ntg-context@ntg.nl ntg-context@ntg.nl ntg-context@ntg.nl
	ntg-context@ntg.nl

Dear all,

First, Happy new year!

I tried to make a style of title as following. The first code creates the title as I wanted, but the second which uses “\title” creates the title strange. they are almost same code.
To include it in the list of contents, I use “\title”.
Is there a way to make output as the first one and include it in the list of contents?
Thank you for reading.
Best regards,

Dalyoung


\definefont[BigFontOne][NotoSansCJKkr-Bold sa 4]
\definefont[BigFontTwo][NotoSansCJKkr-Bold sa 3]
\definefont[BigFontThree][NotoSansCJKkr-Bold sa 1.5]%[YoonGothicB sa 1.5]
\definecolor[BigColorOne][r=.86,g=.850,b=.54]
\definecolor[BigColorTwo][r=.43,g=.425,b=.27]

\define[1]\TitlePage
{\begingroup
\defineoverlay[back][{\BigFontOne \blue  \starteffect[outer]#1\stopeffect}]%
\framed[frame=off,background=back,align={hilo}]
	{\kern-3pt{\BigFontOne\BigColorOne  \starteffect[inner]#1\stopeffect}}
\endgroup}

\setuphead[title]
	[textcommand=\TitlePage,
%	 color=BigColorTwo,
%	 style=\BigFontTwo,
%	 after={\blank[2cm]}]
	] %number=yes]

 \starttext
	\defineoverlay[back][{\BigFontOne \blue  \starteffect[outer]Title\stopeffect}]%
\framed[frame=off,background=back,align={hilo}]
	{\kern-3pt{\BigFontOne\BigColorOne  \starteffect[inner]Title\stopeffect}}


	\title{Title}

\defineoverlay[back][{\BigFontOne \blue  \starteffect[outer]타이틀\stopeffect}]%
\framed[frame=off,background=back,align={hilo}]
{\kern-3pt{\BigFontOne\BigColorOne  \starteffect[inner]타이틀\stopeffect}}

\title{타이틀}
\stoptext
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: two different outputs.
  2019-01-01  0:33 ` two different outputs Jeong Dal
@ 2019-01-01 20:13   ` Wolfgang Schuster
  2019-01-01 22:28     ` Jeong Dal
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2019-01-01 20:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Jeong Dal

Jeong Dal schrieb am 01.01.19 um 01:33:
> Dear all,
> 
> First, Happy new year!
> 
> I tried to make a style of title as following. The first code creates the title as I wanted, but the second which uses “\title” creates the title strange. they are almost same code.
> To include it in the list of contents, I use “\title”.

\setuphead [title] [incrementnumber=list]

> Is there a way to make output as the first one and include it in the list of contents?

You have to apply your command to the deeptextcommand key.

%%%% begin example

% \definefontfamily [mainface] [ss] [Noto Sans CJK KR]
%
% \setupbodyfont [mainface]
%
% \definefont [BigFontOne]   [SansBold sa 4]

\definefontfamily [notosanscjkkr] [ss] [Noto Sans CJK KR]

%\definefont [BigFontOne] [file:notosanscjkkrbold*default sa 4]
\definefont [BigFontOne] [\classfont{notosanscjkkr}{Bold} sa 4]

\setupbodyfont [pagella]

\definecolor [BigColorOne] [r=.86,g=.850,b=.54]

\define[1]\TitlePage
   {\rlap{\offset[x=2pt,y=2pt]{\color[blue]{\effect[outer]{#1}}}}%
    \effect[inner]{#1}}

\setuphead
   [title]
   [deeptextcommand=\TitlePage,
    color=BigColorOne,
    style=BigFontOne,
    incrementnumber=list]

\starttext

\title{Contents}

\placelist[chapter,title]

\title{Title}

\title{타이틀}

\stoptext

%%%% end example

Wolfgang

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: two different outputs.
  2019-01-01 20:13   ` Wolfgang Schuster
@ 2019-01-01 22:28     ` Jeong Dal
  2019-01-01 22:47       ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Jeong Dal @ 2019-01-01 22:28 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 4951 bytes --]

Dear Wolfgang,

Thank you for the solution at the new year’s day.

Your sample works very well. It is what I want.

I copied it into my file and run it, then I got a strange output.
Everything is OK except outer effect text is written twice.
I don’t know what makes it write twice.
I have two more questions.
1. I’d like to put a title only in a page using the following. How to put a title as center aligned?
%%%%%%%%%
\page[yes]
\dontleavehmode\blank[5cm]

\title{Why, Math?}
\blank[big]
\midaligned{\fancy Why do we learn mathematics?}
\vfill
\midaligned{\tfb Institution}
\blank[2cm]
\page
%%%%%%%%%%%%

2. Is there a way to remove a pagenumber from the title page?

Thank you again.
Best regards,

Dalyoung


Here is the simplified code:


%\startMPenvironment
%\stopMPenvironment

%\environment defCommon
%\environment defBook
%\usemodule[m-matrix]
%\startluacode
%mtx = moduledata.matrix
%\stopluacode

\setuplanguage[kr][patterns=us]
\mainlanguage[kr]
\setscript[hangul]

%\usetypescriptfile[type-hcrlvt]
%\usetypescript[HcrFont] % As set in your typescript file
%\definefontfamily [Myface] [mm][Neo Euler]

\definefont[fancy][Zapfino at 24pt]
\definefont[GreekA][MinionPro-MediumIt Regular]

\definefontfeature[kr][script=hang,language=kor,mode=node,analyze=yes]
%\setupbodyfont[Myface, rm, 11pt]
\setupbodyfont[pagella]
%\setuppagenumbering[state=stop]
\setupexternalfigures[directory={./figures, ./funmath/WhyMath/whyMathSlide,}]
\setupindenting[medium, yes]

\definefont [BigFontOne] [\classfont{notosanscjkkr}{Bold} sa 4]
\definecolor [BigColorOne] [r=.86,g=.850,b=.54]
\define[1]\TitlePage
 {\rlap{\offset[x=2pt,y=2pt]{\color[blue]{\effect[outer]{#1}}}}%
  \effect[inner]{#1}}
\setuphead
 [title]
 [deeptextcommand=\TitlePage,
  color=BigColorOne,
  style=BigFontOne,
  incrementnumber=list]

\startproduct Danggok

\definestructureconversionset[frontpart:pagenumber][][romannumerals]
\definestructureconversionset[bodypart:pagenumber][][numbers]
\definestructureconversionset[backpart:pagenumber][][numbers]

\startsectionblockenvironment[frontpart]
\setupuserpagenumber[numberconversion=romannumerals]
\setuppagenumber[alternative=singlesided,number=]
\stopsectionblockenvironment

\startsectionblockenvironment[bodypart]
\setuppagenumber[number=2]
\setuppagenumbering[alternative=singlesided]
\stopsectionblockenvironment

%\startsectionblockenvironment[backpart]
%\setupuserpagenumber[numberconversion=romannumerals]
%\setuppagenumbering[alternative=doublesided]
%\setuppagenumber[number=1]
%\stopsectionblockenvironment

\setupcombinedlist[content][list={title,chapter}]%,section,subsection}]
\setuplist[chapter, title][width=5mm, style=,textstyle={\ss\bf }]%,after={\blank[preference]}]
\setuplist[section][width=10mm, style=,textstyle=\ss,after={\blank[preference]}]
\setuplist[subsection][style=,textstyle={\ss}]
%%%%%
\startfrontmatter
	\title{Contents}
	\placelist[chapter,title]
\stopfrontmatter

\startbodymatter
	\title{First}
	\page
	\title{Second}
	\page
%	\component ./funmath/whyMath/whyMathH
%	\component ./Mathematics/TopicsInMath/Crypto/CryptoH
%	\component ./funmath/algorithm/algorithmH
%	\component ./funmath/Problems/squareH
%	\component ./funmath/Tiling/tilingH
\stopbodymatter

%\startbackmatter
%\stopbackmatter

\stopproduct
 

> 2019. 1. 2. 오전 5:13, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> 작성:
> 
> Jeong Dal schrieb am 01.01.19 um 01:33:
>> Dear all,
>> First, Happy new year!
>> I tried to make a style of title as following. The first code creates the title as I wanted, but the second which uses “\title” creates the title strange. they are almost same code.
>> To include it in the list of contents, I use “\title”.
> 
> \setuphead [title] [incrementnumber=list]
> 
>> Is there a way to make output as the first one and include it in the list of contents?
> 
> You have to apply your command to the deeptextcommand key.
> 
> %%%% begin example
> 
> % \definefontfamily [mainface] [ss] [Noto Sans CJK KR]
> %
> % \setupbodyfont [mainface]
> %
> % \definefont [BigFontOne]   [SansBold sa 4]
> 
> \definefontfamily [notosanscjkkr] [ss] [Noto Sans CJK KR]
> 
> %\definefont [BigFontOne] [file:notosanscjkkrbold*default sa 4]
> \definefont [BigFontOne] [\classfont{notosanscjkkr}{Bold} sa 4]
> 
> \setupbodyfont [pagella]
> 
> \definecolor [BigColorOne] [r=.86,g=.850,b=.54]
> 
> \define[1]\TitlePage
>  {\rlap{\offset[x=2pt,y=2pt]{\color[blue]{\effect[outer]{#1}}}}%
>   \effect[inner]{#1}}
> 
> \setuphead
>  [title]
>  [deeptextcommand=\TitlePage,
>   color=BigColorOne,
>   style=BigFontOne,
>   incrementnumber=list]
> 
> \starttext
> 
> \title{Contents}
> 
> \placelist[chapter,title]
> 
> \title{Title}
> 
> \title{타이틀}
> 
> \stoptext
> 
> %%%% end example
> 
> Wolfgang
> 


[-- Attachment #1.2.1: Type: text/html, Size: 9524 bytes --]

[-- Attachment #1.2.2: 스크린샷 2019-01-02 오전 7.26.26.png --]
[-- Type: image/png, Size: 37613 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: two different outputs.
  2019-01-01 22:28     ` Jeong Dal
@ 2019-01-01 22:47       ` Wolfgang Schuster
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2019-01-01 22:47 UTC (permalink / raw)
  To: Jeong Dal; +Cc: mailing list for ConTeXt users

Jeong Dal schrieb am 01.01.19 um 23:28:
> Dear Wolfgang,
> 
> Thank you for the solution at the new year’s day.
> 
> Your sample works very well. It is what I want.
> 
> I copied it into my file and run it, then I got a strange output.
> Everything is OK except outer effect text is written twice.
> I don’t know what makes it write twice.

I can’t reproduce the effect with your included example.

What I guess is that one of your setuos still contain the line

   \setuphead[title][textcommand=\TitlePage]

and you apply the effect twice because when you take a closer look
at the image you can see even the inner effect appears two times.

> I have two more questions.
> 1. I’d like to put a title only in a page using the following. How to 
> put a title as center aligned?

\setuphead[title][align=middle]

> %%%%%%%%%
> \page[yes]
> \dontleavehmode\blank[5cm]
> 
> \title{Why, Math?}
> \blank[big]
> \midaligned{\fancy Why do we learn mathematics?}
> \vfill
> \midaligned{\tfb Institution}
> \blank[2cm]
> \page
> %%%%%%%%%%%%
> 
> 2. Is there a way to remove a pagenumber from the title page?

\startstandardmakeup[align=middle]
\blank[5cm]
\title{Why, Math?}
\blank
{\fancy Why do we learn mathematics?}
\vfill
{\tfb Institution}
\blank[2cm]
\stopstandardmakeup

Wolfgang
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-01 22:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.1.1546254001.21789.ntg-context@ntg.nl>
2019-01-01  0:33 ` two different outputs Jeong Dal
2019-01-01 20:13   ` Wolfgang Schuster
2019-01-01 22:28     ` Jeong Dal
2019-01-01 22:47       ` Wolfgang Schuster

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).