Re: [NTG-context] New header
Hi, I lacked precision in my post, I forgot to say that the header is an idea of Hans with Metapost. I would like to have: p: = textext (\footnotesize \itshape \quad # where \space \endash \space \ time [# d = day, m = month #, # y = year] \quad and \ framed [ width = \hsize, height = 5em, foregroundstyle = \Large \scshape \bf, background = whatever, frame = off, ] Thank you. 2014/1/22 Aditya Mahajan adit...@umich.edu On Wed, 22 Jan 2014, Fabrice Couvreur wrote: Thank you Wolfgang. With LuaLaTeX, for my header, I use the commands \footnotesize\itshape and \Large\scshape. Is there an equivalent with ConTeXt ? \setupheader[style={\switchtobodyfont[small]\italic}] \setupfooter[style={\switchtobodyfont[big]\smallcaps}] You can also try style=\itx\setupinterlinespace (or \itxx) or style=\scb\setupinterlinespace (or \sca \scc etc.) See: http://wiki.contextgarden.net/Font_Switching http://wiki.contextgarden.net/Style_Alternatives Aditya ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ attachment.tex Description: TeX document ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] New header
Hi Joshua, To the right and left but not up and down. I would like margin to 1.5cm on the right, left, up and down. Thank you. 2014/1/21 Joshua Krämer joshua.krae...@gmail.com Am Tue, 21 Jan 2014 20:02:19 +0100 schrieb Fabrice Couvreur fabrice1.couvr...@gmail.com: I would also fit the dimensions of my papers as I used to do (\usepackage [ a4paper, hmargin = 1.5cm, vmargin =1.5cm] {geometry}) Thank you. There is a wiki page about setting up the page layout: http://wiki.contextgarden.net/Layout The following sets the space around the type area to 1.5cm: \setuplayout [ backspace=1.5cm, width=middle, topspace=1.5cm, height=middle, ] \showframe % very useful when setting up the layout \starttext \input{knuth} \stoptext Kind regards, Joshua Krämer ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] New header
You have to disable the header and footer by setting the values to 0pt. \setuplayout [backspace=15mm, width=middle, topspace=15mm, height=middle, header=0pt, footer=0pt] \showframe \starttext \input knuth \stoptext You can also use the fullpage module when you equal margins for your document. \usemodule[fullpage][style={margin,empty},margin=15mm] \showframe \starttext \input knuth \stoptext 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] New header
Thank you Wolfgang. With LuaLaTeX, for my header, I use the commands \footnotesize\itshape and \Large\scshape. Is there an equivalent with ConTeXt ? 2014/1/22 Wolfgang Schuster schuster.wolfg...@gmail.com You have to disable the header and footer by setting the values to 0pt. \setuplayout [backspace=15mm, width=middle, topspace=15mm, height=middle, header=0pt, footer=0pt] \showframe \starttext \input knuth \stoptext You can also use the fullpage module when you equal margins for your document. \usemodule[fullpage][style={margin,empty},margin=15mm] \showframe \starttext \input knuth \stoptext 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] New header
On Wed, 22 Jan 2014, Fabrice Couvreur wrote: Thank you Wolfgang. With LuaLaTeX, for my header, I use the commands \footnotesize\itshape and \Large\scshape. Is there an equivalent with ConTeXt ? \setupheader[style={\switchtobodyfont[small]\italic}] \setupfooter[style={\switchtobodyfont[big]\smallcaps}] You can also try style=\itx\setupinterlinespace (or \itxx) or style=\scb\setupinterlinespace (or \sca \scc etc.) See: http://wiki.contextgarden.net/Font_Switching http://wiki.contextgarden.net/Style_Alternatives Aditya ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] New header
Hello, Thank you for your reply. I do not understand all of the code, even if I use MetaPost but with Asymptote. I would also fit the dimensions of my papers as I used to do (\usepackage [ a4paper, hmargin = 1.5cm, vmargin =1.5cm] {geometry}) Thank you. attachment.tex Description: TeX document ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] New header
Am Tue, 21 Jan 2014 20:02:19 +0100 schrieb Fabrice Couvreur fabrice1.couvr...@gmail.com: I would also fit the dimensions of my papers as I used to do (\usepackage [ a4paper, hmargin = 1.5cm, vmargin =1.5cm] {geometry}) Thank you. There is a wiki page about setting up the page layout: http://wiki.contextgarden.net/Layout The following sets the space around the type area to 1.5cm: \setuplayout [ backspace=1.5cm, width=middle, topspace=1.5cm, height=middle, ] \showframe % very useful when setting up the layout \starttext \input{knuth} \stoptext Kind regards, Joshua Krämer ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] New header
On 1/20/2014 10:34 AM, Fabrice Couvreur wrote: Hi, Here is the resulting file with LuaLaTeX. Thank you. 2014/1/18 Fabrice Couvreur fabrice1.couvr...@gmail.com mailto:fabrice1.couvr...@gmail.com Hi, I use the following header to my statements made with tittlesec package. \makeatletter \newcommand{\@classe}[1]{} \newcommand{\classe}[1]{\gdef\@classe{#1}} \newcommand{\@typedevoir}[1]{} \newcommand{\typedevoir}[1]{\gdef\@typedevoir{#1}} \newcommand{\@numerodevoir}[1]{} \newcommand{\numerodevoir}[1]{\gdef\@numerodevoir{#1}} \AtBeginDocument{\section{\@typedevoir\space\no\@numerodevoir}} \titleformat{\section}[frame] {\normalfont} {\footnotesize\enspace\itshape\@classe\enspace--\enspace Le \@date\enspace} {10pt} {\Large\scshape\bfseries\filcenter} \makeatother I want to gradually move to ConTeXt and I tried to create the same header. But I do not yet know all the commands to do with ConTeXt. \setuptextrules [style=\it,location=top] \define[6]\MyHeader{% \textrule[top]{#1\space--\space\date[d=#2,m=#3,y=#4]}{\startlinealignment[middle]{\cap \bf #5 \space n\high{{o}}\space {#6}}\stoplinealignment\blank\textrule}} \starttext \MyHeader{Seconde GTA}{11}{1}{2014}{Devoir de Mathématiques}{7} \stoptext Thank you. an exercise in - mkvi - metapost - framed - definitions don't forget to start your tex file with this line: % macros=mkvi \starttext \starttexdefinition MyOtherHeader #where #day #month #year #title #number \defineoverlay[whatever][\useMPgraphic{whatever}] \startuseMPgraphic{whatever} draw OverlayBox withpen pencircle scaled .5pt dashed evenly ; picture p ; p := textext(\it\quad#where\space\endash\space\date[d=#day,m=#month,y=#year]\quad) shifted .5[ulcorner OverlayBox,urcorner OverlayBox]; fill boundingbox p withcolor white ; draw p ; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \framed [ width=\hsize, height=5em, foregroundstyle=\cap\bf, background=whatever, frame=off, ] { #title \space n\high{o} \space #number } \stoptexdefinition \MyOtherHeader{Seconde GTA}{11}{1}{2014}{Devoir de Mathématiques}{7} \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - % macros=mkvi \starttext \starttexdefinition MyOtherHeader #where #day #month #year #title #number \defineoverlay[whatever][\useMPgraphic{whatever}] \startuseMPgraphic{whatever} draw OverlayBox withpen pencircle scaled .5pt dashed evenly ; picture p ; p := textext(\it\quad#where\space\endash\space\date[d=#day,m=#month,y=#year]\quad) shifted .5[ulcorner OverlayBox,urcorner OverlayBox]; fill boundingbox p withcolor white ; draw p ; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \framed [ width=\hsize, height=5em, foregroundstyle=\cap\bf, background=whatever, frame=off, ] { #title \space n\high{o} \space #number } \stoptexdefinition \MyOtherHeader{Seconde GTA}{11}{1}{2014}{Devoir de Mathématiques}{7} \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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] New header
Hi, I use the following header to my statements made with tittlesec package. \makeatletter \newcommand{\@classe}[1]{} \newcommand{\classe}[1]{\gdef\@classe{#1}} \newcommand{\@typedevoir}[1]{} \newcommand{\typedevoir}[1]{\gdef\@typedevoir{#1}} \newcommand{\@numerodevoir}[1]{} \newcommand{\numerodevoir}[1]{\gdef\@numerodevoir{#1}} \AtBeginDocument{\section{\@typedevoir\space\no\@numerodevoir}} \titleformat{\section}[frame] {\normalfont} {\footnotesize\enspace\itshape\@classe\enspace--\enspace Le \@date\enspace} {10pt} {\Large\scshape\bfseries\filcenter} \makeatother I want to gradually move to ConTeXt and I tried to create the same header. But I do not yet know all the commands to do with ConTeXt. \setuptextrules [style=\it,location=top] \define[6]\MyHeader{% \textrule[top]{#1\space--\space\date[d=#2,m=#3,y=#4]}{\startlinealignment[middle]{\cap \bf #5 \space n\high{{o}}\space {#6}}\stoplinealignment\blank\textrule}} \starttext \MyHeader{Seconde GTA}{11}{1}{2014}{Devoir de Mathématiques}{7} \stoptext Thank you. ___ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] New header
Am 18.01.2014 um 11:52 schrieb Fabrice Couvreur fabrice1.couvr...@gmail.com: Hi, I use the following header to my statements made with tittlesec package. \makeatletter \newcommand{\@classe}[1]{} \newcommand{\classe}[1]{\gdef\@classe{#1}} \newcommand{\@typedevoir}[1]{} \newcommand{\typedevoir}[1]{\gdef\@typedevoir{#1}} \newcommand{\@numerodevoir}[1]{} \newcommand{\numerodevoir}[1]{\gdef\@numerodevoir{#1}} \AtBeginDocument{\section{\@typedevoir\space\no\@numerodevoir}} \titleformat{\section}[frame] {\normalfont} {\footnotesize\enspace\itshape\@classe\enspace--\enspace Le \@date\enspace} {10pt} {\Large\scshape\bfseries\filcenter} \makeatother I want to gradually move to ConTeXt and I tried to create the same header. But I do not yet know all the commands to do with ConTeXt. Can you show the output from LaTeX which is more use than some piece of code. 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___