Hi all, this sounds easy, but I can't seem to find a solution. I want my section headers to look like so: 1. April 4 Title of chapter i.e. have the title right aligned. I thought this should be as simple as \section{April 4 \hfill Title of chapter} but alas, no, it's always flush left. Is there an obvious solution I'm overlooking? Thanks Thomas
Thomas A. Schmitz wrote:
Hi all,
this sounds easy, but I can't seem to find a solution. I want my section headers to look like so:
1. April 4 Title of chapter
i.e. have the title right aligned. I thought this should be as simple as
\section{April 4 \hfill Title of chapter}
but alas, no, it's always flush left. Is there an obvious solution I'm overlooking?
The section title does not have more than one line. This looks ok, but is quite ugly input: \section{April 4 \hfill Title of chapter\break} But that could be hidden inside a deeptextcommand, of course Cheers, Taco
Hi gang, Taco's solution to Thomas' section question reminds me: How can I evenly spread the contents of a box or column-row? In PlainTeX there is \hbox{Here\hfill is\hfill an\hfill evenly\hfill spread\hfill line.} but there must be a better (read "ConTeXt-") way. I looked into this years ago and may have found the answer; but I've forgotten it... Best Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523 Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Hmm, no reply yet, maybe the following is more interesting:
On Thu, 01 Mar 2007 12:30:42 -0700, Idris Samawi Hamid
How can I evenly spread the contents of a box or column-row? In PlainTeX there is
\hbox{Here\hfill is\hfill an\hfill evenly\hfill spread\hfill line.}
but there must be a better (read "ConTeXt-") way. I looked into this years ago and may have found the answer; but I've forgotten it...
============================== \starttext \defineparagraphs[TwoColumns][n=2,distance=2cm] \setupparagraphs[TwoColumns][each][width=5cm,tolerance=stretch] \setupframedtexts[frame=off] \startframedtext[middle] \startalignment[middle] \startTwoColumns \hbox spread \textwidth{Here is the first line 1a} \TwoColumns Here \hfill is \hfill the \hfill first \hfill line \hfill 1b \stopTwoColumns \startTwoColumns Here \hfill is \hfill the \hfill second \hfill line \hfill 2a \TwoColumns Here \hfill is \hfill the \hfill second \hfill line \hfill 2b \stopTwoColumns \stopalignment \stopframedtext \stoptext ============================== How can I get the first column right? Note that, according to the manual, \textwidth gives the width of a column but in this case it apparently gives a full \hsize. RELATED QUESTION: How can I control the distance between rows? I do not want any extra whitespace between rows (i.e., except the normal interparagraph space). Please advise! Best Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523 -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
On Mar 1, 2007, at 7:36 PM, Taco Hoekwater wrote:
The section title does not have more than one line. This looks ok, but is quite ugly input:
\section{April 4 \hfill Title of chapter\break}
But that could be hidden inside a deeptextcommand, of course
Cheers, Taco
Taco, thanks! This made me experiment with my file again, and it turned out there is some strange interference because I have defined a command in \setuphead[section]. When I comment it out, I get the output I want. I'll do some more experiments and will report back. Thanks Thomas
On Mar 1, 2007, at 8:54 PM, Thomas A. Schmitz wrote:
Taco,
thanks! This made me experiment with my file again, and it turned out there is some strange interference because I have defined a command in \setuphead[section]. When I comment it out, I get the output I want. I'll do some more experiments and will report back.
Thanks
Thomas
OK, after some more experiments: it looks like I can't have a command= AND a \hfill in my sections. I have something like \setuphead [section] [command=\incrementSlideNumber, page=yes, ] in my definition. If I comment the command= line out or put a \ in front of the comma at the end, the section title looks the way I want, but the command does (of course) not work any longer. If I have the command, the \hfill is not honored. Strange, but I can live with it. All best Thomas
On Thu, 1 Mar 2007, Thomas A. Schmitz wrote:
On Mar 1, 2007, at 8:54 PM, Thomas A. Schmitz wrote:
Taco,
thanks! This made me experiment with my file again, and it turned out there is some strange interference because I have defined a command in \setuphead[section]. When I comment it out, I get the output I want. I'll do some more experiments and will report back.
Thanks
Thomas
OK, after some more experiments: it looks like I can't have a command= AND a \hfill in my sections. I have something like
\setuphead [section] [command=\incrementSlideNumber, page=yes, ]
in my definition. If I comment the command= line out or put a \ in front of the comma at the end, the section title looks the way I want, but the command does (of course) not work any longer. If I have the command, the \hfill is not honored. Strange, but I can live with it.
Can you provide some more details? This works fine here \setuphead[section][command=\mycommand] \def\mycommand#1#2{\framed[width=0.8\textwidth]{#1#2}} \starttext \section{ABC\hfill DEF} \stoptext Aditya
Thomas A. Schmitz wrote:
On Mar 1, 2007, at 8:54 PM, Thomas A. Schmitz wrote:
Taco,
thanks! This made me experiment with my file again, and it turned out there is some strange interference because I have defined a command in \setuphead[section]. When I comment it out, I get the output I want. I'll do some more experiments and will report back.
Thanks
Thomas
OK, after some more experiments: it looks like I can't have a command= AND a \hfill in my sections. I have something like
\setuphead [section] [command=\incrementSlideNumber, page=yes, ]
in my definition. If I comment the command= line out or put a \ in front of the comma at the end, the section title looks the way I want, but the command does (of course) not work any longer. If I have the command, the \hfill is not honored. Strange, but I can live with it.
has to do with being in vertical or horizontal mode; also keep in mind that section heads are to take care of lists, marks, refs as well, so the underlying code is somewhat messy and complex grep for \defineheadplacement in core-sec ... you can implement your own variants Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Dear Friends, For about a year and a half I have been using Taco's macro for theorems. I use it in the following way: \startCasus[casus-166][Title: my title] text text text \stopCasus The result ought to be: Casus 1. Title: my title The macro has been working fine, but recently it does not print the title anymore, leaving only Casus 1. I badly need it working for my courses. Has anyone any suggestions? Kind regards, Robert \unprotect \def\dododefinecomplexenumeration#1#2#3% {\setvalue{\e!start#1#2}% {\@EA\dodoubleempty\csname dostart#1#2\endcsname}% \setvalue{dostart#1#2}[##1][##2]% {\begingroup\setvalue{#2title}{##2}\getvalue{\e!start#1i#2}[##1]}% \setvalue{\e!stop#1#2}{\getvalue{\e!stop#1i#2}\endgroup}} \def\dodefinecomplexenumeration[#1][#2]% {\defineenumeration[i#1] [\c!text=#1,\c!stopper=\getvalue{do#1title},#2]% \setvalue{do#1title}% {\doifnotemptyvalue{#1title}{~(\getvalue{#1title})}}% \dododefinecomplexenumeration{}{#1}{#2}% \dododefinecomplexenumeration{\v!sub}{#1}{#2}% \dododefinecomplexenumeration{\v!sub\v!sub}{#1}{#2}% \dododefinecomplexenumeration{\v!sub\v!sub\v!sub}{#1}{#2}} \def\definecomplexenumeration{\dodoubleempty\dodefinecomplexenumeration} \protect \definecomplexenumeration[Casus]
On Sat, 3 Mar 2007, r.ermers@hccnet.nl wrote:
Dear Friends,
For about a year and a half I have been using Taco's macro for theorems. I use it in the following way:
\startCasus[casus-166][Title: my title] text text text \stopCasus
The result ought to be:
Casus 1. Title: my title
The macro has been working fine, but recently it does not print the title anymore, leaving only Casus 1. I badly need it working for my courses.
Has anyone any suggestions?
Hi Robert, I have not looked into Taco's code carefully. But at first glance I do not see why it should not work. I can not test it right now. However, I am working on enhancing enumerations to have all the features needed for theorems. With what I have right now, you can do \defineenumeration[Casus][title=yes,titledistance=1ex,titleleft={Title: },titleright=] after which you can say, \startCasus[casus-166]{my title} to get the same result. You can also get end-of-proof markers. This is something that I am working on right now, but if you want to test it, I can send you the files. Aditya
Thanks Aditya for your suggestion. The problem is that I already have about 200 separate documents in this format: \startCasus[casus-166][Title: my title] Text \stopcasus Does anyone have an other idea? Regards, Robert Op Za, 3 maart, 2007 7:37 pm schreef Aditya Mahajan:
On Sat, 3 Mar 2007, r.ermers@hccnet.nl wrote:
Dear Friends,
For about a year and a half I have been using Taco's macro for theorems. I use it in the following way:
\startCasus[casus-166][Title: my title] text text text \stopCasus
The result ought to be:
Casus 1. Title: my title
The macro has been working fine, but recently it does not print the title anymore, leaving only Casus 1. I badly need it working for my courses.
Has anyone any suggestions?
Hi Robert,
I have not looked into Taco's code carefully. But at first glance I do not see why it should not work. I can not test it right now.
However, I am working on enhancing enumerations to have all the features needed for theorems. With what I have right now, you can do
\defineenumeration[Casus][title=yes,titledistance=1ex,titleleft={Title: },titleright=] after which you can say,
\startCasus[casus-166]{my title} to get the same result.
You can also get end-of-proof markers. This is something that I am working on right now, but if you want to test it, I can send you the files.
Aditya _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
r.ermers@hccnet.nl wrote:
Thanks Aditya for your suggestion.
The problem is that I already have about 200 separate documents in this format:
\startCasus[casus-166][Title: my title] Text \stopcasus
Does anyone have an other idea?
Hi Robert, I just tried your minimal example and it works here (min. distribution with latest ConTeXt on XP). Peter
Regards,
Robert
Op Za, 3 maart, 2007 7:37 pm schreef Aditya Mahajan:
On Sat, 3 Mar 2007, r.ermers@hccnet.nl wrote:
Dear Friends,
For about a year and a half I have been using Taco's macro for theorems. I use it in the following way:
\startCasus[casus-166][Title: my title] text text text \stopCasus
The result ought to be:
Casus 1. Title: my title
The macro has been working fine, but recently it does not print the title anymore, leaving only Casus 1. I badly need it working for my courses.
Has anyone any suggestions?
Hi Robert,
I have not looked into Taco's code carefully. But at first glance I do not see why it should not work. I can not test it right now.
However, I am working on enhancing enumerations to have all the features needed for theorems. With what I have right now, you can do
\defineenumeration[Casus][title=yes,titledistance=1ex,titleleft={Title: },titleright=] after which you can say,
\startCasus[casus-166]{my title} to get the same result.
You can also get end-of-proof markers. This is something that I am working on right now, but if you want to test it, I can send you the files.
Aditya _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
\unprotect \def\dododefinecomplexenumeration#1#2#3% {\setvalue{\e!start#1#2}% {\@EA\dodoubleempty\csname dostart#1#2\endcsname}% \setvalue{dostart#1#2}[##1][##2]% {\begingroup\setvalue{#2title}{##2}\getvalue{\e!start#1i#2}[##1]}% \setvalue{\e!stop#1#2}{\getvalue{\e!stop#1i#2}\endgroup}} \def\dodefinecomplexenumeration[#1][#2]% {\defineenumeration[i#1] [\c!text=#1,\c!stopper=\getvalue{do#1title},#2]% \setvalue{do#1title}% {\doifnotemptyvalue{#1title}{~(\getvalue{#1title})}}% \dododefinecomplexenumeration{}{#1}{#2}% \dododefinecomplexenumeration{\v!sub}{#1}{#2}% \dododefinecomplexenumeration{\v!sub\v!sub}{#1}{#2}% \dododefinecomplexenumeration{\v!sub\v!sub\v!sub}{#1}{#2}} \def\definecomplexenumeration{\dodoubleempty\dodefinecomplexenumeration} \protect \definecomplexenumeration[Casus] \starttext \startCasus[casus-166][Title: my title] text text text \stopCasus \stoptext
Hi there, Thanks for all suggestions. Based on the message that the file processed normally, I thought I had to update to a the most recent version of Context. This entailed downloading a large set of new lm fonts. Now the files process normally, apart from the \dots command... Regards, Robert
Hi all, While my other files process normally, others don't anymore. Find relevant snippets from the log file below. The problem begins arising here: (D:\tex\texmf\tex\context\base\spec-fdf.tex ! Undefined control sequence. l.3282 \loadmarkfile{spec-fdf} Does anyone have a solution? Kind regards! Robert This is pdfeTeX, Version 3.141592-1.30.6-2.2 (MiKTeX 2.5) (preloaded format=cont-en 2006.11.27) 4 MAR 2007 16:56 entering extended mode **facturen.tex \emergencyend specials : tex,postscript,rokicki loaded system : facturen.top loaded (D:\MO_Perspectief\facturen\facturen.top specials : loading definition file tpd (D:\tex\texmf\tex\context\base\spec-tpd.tex specials : loading definition file fdf (D:\tex\texmf\tex\context\base\spec-fdf.tex ! Undefined control sequence. l.3282 \loadmarkfile {spec-fdf} ? ) specials : fdf loaded ! Undefined control sequence. l.468 \definefilechecker {tpd}{pdf}{\dogetTPDfiguresize} ? ! Undefined control sequence. <argument> \@@DriverImageFile \doifelsenothing #1->\edef \!!stringa {#1 }\ifx \!!stringa \empty \expandafte... \doiffileexistselse #1->\doifelsenothing {#1} {\secondoftwoarguments } {\imm... \doifvalidpdfimagefileelse #1->\doiffileelse {#1} {\edef \filesuffix {#1}\do... \dogetTPDfiguresize ...ileelse \@@DriverImageFile {\ifvoid \foundexternalfig... l.468 ...filechecker{tpd}{pdf}{\dogetTPDfiguresize }
On Sun, 4 Mar 2007, r.ermers@hccnet.nl wrote:
Hi all,
While my other files process normally, others don't anymore. Find relevant snippets from the log file below.
The problem begins arising here:
(D:\tex\texmf\tex\context\base\spec-fdf.tex ! Undefined control sequence. l.3282 \loadmarkfile{spec-fdf}
Does anyone have a solution?
This is strange. For some reason, you did not get all the files. I am assuming that you updated using Miktex's update wizard (guessing from the date of the files). Try the following: ctxtools --updatecontext This will download the latest cont-tmf files from pragma-ade's website and install them on your machine. Then go to Miktex Options and press "Refresh FNDB" and "Update Formats" and hopefully, everything should work. Another option is to download the mswinstandalone files from pragma-ade, and unzip them on your computer. Then you need to run E:\isoimage\usr\local\context\tex\setuptex.bat E:\isoimage\usr\local\context\tex on the command line to set up the path. With this you can be sure of having the most up to date context version. Aditya
On Sun, 4 Mar 2007, Aditya Mahajan wrote:
On Sun, 4 Mar 2007, r.ermers@hccnet.nl wrote:
Hi all,
While my other files process normally, others don't anymore. Find relevant snippets from the log file below.
The problem begins arising here:
(D:\tex\texmf\tex\context\base\spec-fdf.tex ! Undefined control sequence. l.3282 \loadmarkfile{spec-fdf}
Does anyone have a solution?
This is strange. For some reason, you did not get all the files. I am assuming that you updated using Miktex's update wizard (guessing from the date of the files).
Actually, try using Miktex's update wizard once again before you try the manual steps. Right now, with Miktex's update wizard says "There are currently no intact repositories". I guess that is because things are shifting to texlive 2007.
Try the following:
ctxtools --updatecontext
This will download the latest cont-tmf files from pragma-ade's website and install them on your machine. Then go to Miktex Options and press "Refresh FNDB" and "Update Formats" and hopefully, everything should work.
Another option is to download the mswinstandalone files from pragma-ade, and unzip them on your computer. Then you need to run
E:\isoimage\usr\local\context\tex\setuptex.bat E:\isoimage\usr\local\context\tex
on the command line to set up the path. With this you can be sure of having the most up to date context version.
Aditya
-- Aditya Mahajan | EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam | Ph: 734.262.4008
On Sun, 4 Mar 2007, r.ermers@hccnet.nl wrote:
Hi there,
Thanks for all suggestions.
Based on the message that the file processed normally, I thought I had to update to a the most recent version of Context.
This entailed downloading a large set of new lm fonts.
Now the files process normally, apart from the \dots command...
What error do you get? Aditya
participants (7)
-
Aditya Mahajan
-
Hans Hagen
-
Idris Samawi Hamid
-
Peter Rolf
-
r.ermers@hccnet.nl
-
Taco Hoekwater
-
Thomas A. Schmitz