[NTG-context] Split \startalign content on more pages
Sorry for having given you a non working example! Here you can find a working one. The comments at the end of each line are in italian. Changing the height of the frame you can move the \startalign content in the page. As you will see, the whole content flows from one page to the following, without splitting at the right line. Thank you very much for your help. %INIZIO PREAMBOLO \setuppapersize[A4, portrait] [A4]% layout di pagina su foglio A4 \setuplayout[width=middle]% disposizione del testo sulla pagina \setuppagenumbering[location={footer, middle}]% numero di pagina in basso al centro \setupbodyfont[11pt]% altezza carattere 11pt \setupcolors[state=start, rgb=yes]% per usare colori \setupcolor[rgb]% carico colori di default \setuptabulate[split=yes]% consente di spezzare le liste di tabualte su più pagine %\setupindenting[medium, yes]% indentazione prima linea di paragrafi \mainlanguage[it]% lingua principale del documento \usemodule[units]% per scrivere le unità di misura in maniera coerente sia in modalità testo che matematico %\usemodule[NTE]% per crare le tabelle complesse multipagina utilizzando l'ambiente TABLE % %--COMANDI DEFINITI DA UTENTE- % comando \sb \def\sb#1{\ctxlua{tex.print(#1)}}% definizione comando di sostituzione dei valori numerici a quelli letterali % comando \sba \def\sba#1{\ctxlua{tex.print(string.format("\%.0f", #1))}}% sostituisce numero a valori letterali scrivendolo senza cifre decimali % comando \sbb \define[1]\sbb{\ctxlua{context("\%.1f", #1)}}% sostituisce numero a valori letterali scrivendolo con 1 cifra decimale % comando \sbc \define[1]\sbc{\ctxlua{context("\%.2f", #1)}}% sostituisce numero a valori letterali scrivendolo con 2 cifre decimali % comando \sbd \define[1]\sbd{\ctxlua{context("\%.3f", #1)}}% sostituisce numero a valori letterali scrivendolo con 3 cifre decimali \definedescription[descr][style=packed,headstyle=bold,style=normal, location=hanging,width=broad,margin=1cm] %FINE PREAMBOLO \starttext Bla bla bla {\framed[height=15cm] Bla Bla} \startluacode e_yfi=5 R_fi=2000 r_fi=300 D_ifi=2500 P_dfi=0.6 f_dfi=200 e_dtryfi=1 -- spessore di tentativo in progetto in mm e_yfi=100 -- inizializzo il valore ey a 100 while math.abs(e_yfi-e_dtryfi)>0.001 do e_dtryfi=e_yfi Y=math.min((e_dtryfi / R_fi), 0.04) Z=math.log10(1/Y) X=r_fi/D_ifi N=1.006-(1 / (6.2+(90*(Y^4 beta006=N*((-0.3635*(Z^3))+(2.2124*(Z^2))-(3.2937*Z)+1.8873) beta01=N*((-0.1833*(Z^3))+(1.0383*(Z^2))-(1.2943*Z)+0.837) beta02=math.max(0.95*(0.56-(1.94*Y)-(83.5*(Y^2))), 0.5) if X==0.06 then beta=beta006 elseif 0.060.06 and X<0.1 then tex.print("\\NC \\NC \\beta_{0.06} \\NC = N \\cdot \\left(-0.3635 \\cdot Z^3 + 2.2124 \\cdot Z^2 - 3.2937 \\cdot Z + 1.8873 \\right) = \\NR") tex.print("\\NC \\NC \\NC = N \\cdot \\left(-0.3635 \\cdot \\sbc{Z}^3 + 2.2124 \\cdot \\sbc{Z}^2 - 3.2937 \\cdot \\sbc{Z} + 1.8873 \\right) = \\sbc {beta006} \\NR") tex.print("\\NC \\NC \\beta_{0.1} \\NC = N \\cdot \\left(-0.1833 \\cdot Z^3 + 1.0383 \\cdot Z^2 - 1.2943 \\cdot Z + 0.837 \\right) = \\NR") tex.print("\\NC \\NC \\NC = N \\cdot \\left(-0.1833 \\cdot \\sbc{Z}^3 + 1.0383 \\cdot \\sbc{Z}^2 - 1.2943 \\cdot \\sbc{Z} + 0.837 \\right) = \\sbc {beta01} \\NR") tex.print("\\NC \\NC \\beta \\NC = 25 \\cdot \\left[ \\left(0.1 - X \\right) \\cdot \\beta_{0.06} + \\left(X - 0.06 \\right) \\cdot \\beta_{0.1} \\right]= \\NR") tex.print("\\NC \\NC\\NC = 25 \\cdot \\left[ \\left(0.1 - \\sbd{X} \\right) \\cdot \\sbc{beta006} + \\left(\\sbd{X} - 0.06 \\right) \\cdot \\sbc {beta01} \\right]=\\sbd{beta} \\NR") elseif X==0.1 then tex.print("\\NC \\NC \\beta_{0.1} \\NC = N \\cdot \\left(-0.1833 \\cdot Z^3 + 1.0383 \\cdot Z^2 - 1.2943 \\cdot Z + 0.837 \\right) = \\NR") tex.print("\\NC \\NC \\NC = N \\cdot \\left(-0.1833 \\cdot \\sbc{Z}^3 + 1.0383 \\cdot \\sbc{Z}^2 - 1.2943 \\cdot \\sbc{Z} + 0.837 \\right) = \\sbc {beta01} \\NR") tex.print("\\NC \\NC \\beta \\NC =\\beta_{0.1}=\\sbc{beta01} \\NR") elseif X>0.1 and X<0.2 then tex.print("\\NC \\NC \\beta_{0.1} \\NC = N \\cdot \\left(-0.1833 \\cdot Z^3 + 1.0383 \\cdot Z^2 - 1.2943 \\cdot Z + 0.837 \\right) = \\NR") tex.print("\\NC \\NC \\NC = N \\cdot \\left(-0.1833 \\cdot \\sbc{Z}^3 + 1.0383 \\cdot \\sbc{Z}^2 - 1.2943 \\cdot \\sbc{Z} + 0.837 \\right) = \\sbc {beta01} \\NR") tex.print("\\NC \\NC \\beta_{0.2} \\NC = max \\left[ 0.95 \\cdot \\left(0.56 - 1.94 \\cdot Y - 82.5 \\cdot Y^2 \\right); 0.5 \\right] \\NR") tex.print("\\NC \\NC \\NC = max \\left[ 0.95 \\cdot \\left(0.56 - 1.94 \\cdot \\sbd{Y} - 82.5 \\cdot \\sbd{Y}^2 \\right); 0.5 \\right] = \\sbd {beta02} \\NR") tex.print("\\NC \\NC \\beta \\NC = 1
Re: [NTG-context] description setup error
Am 13.05.2012 um 22:16 schrieb Meer, H. van der: > Of all the parameter values for \setupdescriptions[][alternative=value] there > is one that fails here, i.e. "right". right is a value mentioned in > http://wiki.contextgarden.net/Command/setupdescriptions. > > Below a minimal example and the error. > > \definedescription[htmldd][before=,after=] > \setupdescriptions[htmldd][alternative=right] > \starttext > Text before.\crlf > \starthtmldd{item-1}description\stophtmldd > \starthtmldd{item-2}description\stophtmldd > Text after. > \stoptext > > ! Undefined control sequence. > > system > tex > error on line 5 in file description.tex: Undefined > control sequence ... > > \12>:153>:right:none ...nstructions_pure_hang_box > \raggedleft \rlap {\hskip ... > \148>construction ...parameter \c!renderingsetup } > \relax \dostoptagged \dost... > \dodogotopar ...andler \v!construction \endcsname > \BeforePar \emptytoks > > d > l.5 \starthtmldd{item-1}d > escription\stophtmldd > > Hans van der Meer The commented line in the setups environment is wrong and the line below is the fix. \unprotect \startsetups[\??constructionrenderings:\v!right:\v!none] \let\\=\crlf \noindent \leftskip\leftconstructionskip \rightskip\dimexpr\rightconstructionskip+\constructionsheadwidth\relax %\strc_constructions_pure_hang_box\raggedleft \strc_constructions_set_pure_box\v!flushright \rlap { \hskip\dimexpr\hsize-\leftskip-\rightskip\relax \copy\constructionheadbox \hskip\rightconstructionskip } \advance\rightskip \constructionsheaddistance \useconstructionstyleandcolor\c!style\c!color \ignorespaces \stopsetups \protect \definedescription[description][alternative=right,headalign=] \starttext BEFORE \startdescription{Knuth} \input knuth \stopdescription AFTER \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 ___
[NTG-context] description setup error
Of all the parameter values for \setupdescriptions[][alternative=value] there is one that fails here, i.e. "right". right is a value mentioned in http://wiki.contextgarden.net/Command/setupdescriptions. Below a minimal example and the error. \definedescription[htmldd][before=,after=] \setupdescriptions[htmldd][alternative=right] \starttext Text before.\crlf \starthtmldd{item-1}description\stophtmldd \starthtmldd{item-2}description\stophtmldd Text after. \stoptext ! Undefined control sequence. system > tex > error on line 5 in file description.tex: Undefined control sequence ... \12>:153>:right:none ...nstructions_pure_hang_box \raggedleft \rlap {\hskip ... \148>construction ...parameter \c!renderingsetup } \relax \dostoptagged \dost... \dodogotopar ...andler \v!construction \endcsname \BeforePar \emptytoks d l.5 \starthtmldd{item-1}d escription\stophtmldd Hans van der Meer ___ 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] Split \startalign content on more pages
On Sun, 13 May 2012, elgo...@libero.it wrote: \sbc{} is a command defined by me. \define[1]\sbc{\ctxlua{context("\%.2f", #1)}}% I'm writing a technical report and I use that command to substitute numbers to letters in formulas. Please create a complete working minimal example. 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 ___
Re: [NTG-context] Split \startalign content on more pages
On Sun, May 13, 2012 at 3:54 PM, elgo...@libero.it wrote: > \sbc{} is a command defined by me. > \define[1]\sbc{\ctxlua{context("\%.2f", #1)}}% > I'm writing a technical report and I use that command to substitute numbers to > letters in formulas. ok, I'm using \def\sbc#1{#1} \let\sbd\sbc \let\sba\sbc but I've an error --- X is undefined . -- luigi ___ 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] Split \startalign content on more pages
\sbc{} is a command defined by me. \define[1]\sbc{\ctxlua{context("\%.2f", #1)}}% I'm writing a technical report and I use that command to substitute numbers to letters in formulas. ___ 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] [mkvi] comment handling bug
Hi all, seems the mkvi-style macros have trouble with groups in comments: % macros=mkvi \def\dosomething#content{%%% <= fine with “#1” % { %%% Open unbalanced brace breaks macros. } \starttext \dosomething {foo} \stoptext Fails here with: c l.2 \def\dosomething#c ontent{%%% <= fine with “#1” Removing the comment, closing the group or reverting to TEX-style argument numbering makes this behavior disappear. Philipp -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments pgpCwiy8mxOvG.pgp Description: PGP signature ___ 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] Align caption text separately from figure label
On 2012-05-11 John Dyreby wrote: > Or if this formatting works... > > How it currently looks: > Figure 1 This is a caption that extends > to multiple lines. > > What I'm trying to get: > Figure 1 This is also a caption that > extends to multiple lines. This is a hack, but seems to work: \setupcaptions [headstyle={\hskip-5em\bold}] \starttext \startplacefigure [title={\input knuth\par}] \externalfigure [dummy] \stopplacefigure \stoptext Marco ___ 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] Align caption text separately from figure label
Hello, I spent a few hours googling and trying random things but am not able to get figure captions looking the way I want them. Basically, I'd like long captions to be left aligned as a framed chunk of text, similar to this post here: http://tex.stackexchange.com/questions/8739/multiline-figure-caption-centering Or if this formatting works... How it currently looks: Figure 1 This is a caption that extends to multiple lines. What I'm trying to get: Figure 1 This is also a caption that extends to multiple lines. I was able to produce what I wanted with an aligned \framed command, but the width of the caption and the width of the framed box had to be set for each figure, which is less than ideal. I'm hoping that there is a way to adjust the amount of indent for the text of the caption so that I can 'push' all the lines after the first one to line up with it? Thanks much, John ___ 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 ___