I’d like a book with chapters to have sections/parts, e.g. something that groups a few \chapter elements together. Is there support for this in LMTX? I.e. in such a way that it also shows up in the table of contents?
Thanks,
Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
R&A Enterprise Architecture <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>
On 10/23/21 6:09 PM, Gerben Wierda wrote:
> [...]
Replying a private to the list, since it could be useful for (future?)
reference.
> This works, except:
> - Parts are not mentioned in the table of contents. If I use
> \completecontent, I do not get the abstracts
Well, don’t use \completecontent and replace
\placelist[chapter,chaptertext]
with something similar to
\placelist[part, chapter,chaptertext]
> - In the backmatter, the chapters should be numbered with letters
> (appendix A, B, etc.) and chapters start again from 1 (A)
Add to the numbering command
\definestructureconversionset[sectionnumbers][R,n][n]
the following definition
\definestructureconversionset[appendix:sectionnumbers][R,Character][n]
> I haven’t looked at getting the part title somewhere at 1/3 of the page
> and horizontally centered yet. And the part title page should have no
> page number.
align is a fairly common option and you can add a \vskip with the
.3\textheight (or even \paperheight)
\setuphead[part]
[placehead=yes, align=center, before={\null\vskip.3\textheight}]
\blank would be another option, but I cannot make it work here with
\textheight.
No page number is done by surpressing headers with:
\setuphead[part][placehead=yes, header=empty]% or none
I hope it helps,
Pablo
--
http://www.ousia.tk
Hi,
I cleaned up some more backend code. There were some mails about dates
and such and although the date field in setupinteraction works ok a more
drastic overload is doen with directives. The reason is that the fact
that we can set the date (and traler) is only because it permits
generating pdf files that can be compared. No date as a bad idea anyway.
\setupinteraction[title=My Title]
% \enabledirectives[backend.date=2034-06-07]
\enabledirectives[backend.date=no]
\enabledirectives[backend.trailerid=no]
\starttext
\startTEXpage
\blackrule[height=1cm,depth=0cm,width=4cm,color=darkred]
\stopTEXpage
(there always were command line options for it)
More interesting is asome new experimental code:
\starttext
\dostepwiserecurse{40}{110}{2}{
\startTEXpage[offset=4mm,width=#1mm,align={stretch,normal,tolerant}]
\showmakeup[penalty]%
\orphanpenalties 4 4000 3000 2000 1000\relax
\updateparagraphpenalties
\samplefile{tufte}
\par
\stopTEXpage
}
\stoptext
it's an addendum to the widowpenalties and clubpenalties introduced by
etex but this time it's horizontal; the orphan penalties will be
inserted before spaces (aka spaceskip, xspaceskip and zerospaceskip
glue) so in this case 4000 between the last two 'words' and this
trickery can be used to make sure that the last line is not too short
\orphanpenalties 4 4000 3000 -12000 1000\relax
is also intereting
it's work in progress (i need to play more with it and figure out nice
values for context) .. there might be more such 'simple' useful tricks
Mikael: you can test the math cheat (doesn't make the font nicer).
Pablo : transparencies should work again (wrong alias fixed).
Michal: you can check the dates (as for sure i messed up something).
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
Dear list,
I have the following sample:
\starttext
\setupexternalfigure[location=default]
\startcombination[nx=3, ny=2, location={middle}]
{\externalfigure[mill.png][width=.25\textwidth]}
{\externalfigure[cow.pdf][width=.25\textwidth]}
{\externalfigure[cow.pdf][width=.25\textwidth]}
{\externalfigure[spider.eps][width=.25\textwidth]}
{\externalfigure[hacker.png][width=.25\textwidth]}
{\externalfigure[mill.png][width=.25\textwidth]}
\stopcombination
\stoptext
The first line has the images vertically centered, but the second line
has them aligned to the top. Using "align=middle" made no difference.
How could I get all lines with images vertically centered?
Many thanks for your help,
Pablo
--
http://www.ousia.tk
Dear list,
I have the following imposition sample:
\startbuffer[newbuff]
\showframe\showgrid
\setuppapersize[A3, landscape]
\setuplayout[width=middle]
\starttext
\dorecurse{4}{\null\page}
\stoptext
\stopbuffer
\startmode[*first]
\savebuffer[newbuff][A3page.tex, prefix=no]
\executesystemcommand{context --purgeall A3page.tex}
\stopmode
\showframe
\setuplayout[page]
\setuppapersize[A5][A4, landscape]
\setuparranging [2UP]
\setupinteractionscreen[option={landscape, paper}]
\starttext
\doiffile{A3page.pdf}
{\def\Doc{A3page.pdf}
\getfiguredimensions[\Doc]
\dorecurse{\noffigurepages}
{\ifodd\recurselevel
\rotate[rotation=90]
{\externalfigure[\Doc][page=\recurselevel, width=\textheight]}
\else\rotate[rotation=270]
{\externalfigure[\Doc][page=\recurselevel, width=\textheight]}
\fi}}
\stoptext
I’m afraid that if rotation values are 270 or 180, the imposed page has
an extra vertical space before.
I think this might be a bug. Or I don’t know what I might be missing.
Many thanks for your help,
Pablo
--
http://www.ousia.tk
Hello ConTeXters,
I’d like to use the mp-geo Metapost package with ConTeXt to draw simple globes viewed from various directions. The package is here:
https://melusine.eu.org/syracuse/poulecl/mp-geo/
It looks like the last update was 2008 and I don’t read French, so I though my chances of getting anything to work were pretty small. However, I was pleasantly surprised that this MWE found the mp-geo package, the necessary Metapost files in the ConTeXt installation, and the data files.
\starttext
\startMPcode
input mp-geo;
figure(-10u,-10u,10u,10u);
Mercator(3,48,30);
fin;
end
\stopMPcode
\stoptext
While all of the files were found, it did not produce a globe. Instead I got an error complaining about an invalid character in the data files. This error is repeated for about 20 files (a small fraction of the total). I put the first error and its data file below. All the others are identical with different .dat files.
Maybe it’s just an encoding mismatch or a hidden character I can easily delete or replace. On the other hand, maybe I shouldn't even be attempting this? 2008 is a long time ago in ConTeXt time. Feel free to tell me this project is crazy, but if you have an idea how I can make this work, I’d really appreciate it! It looks like a fun package.
Thanks!
Gavin
Error Log: (This error log below is actually from running Metapost directly on just the .mp file with the metapost code above. This error log is slightly more clear in its formatting than the ConTeXt log, but contains the same information.)
! Text line contains an invalid character.
<scantokens> ^^@
<to be read again>
;
Lecture->...nblec:=scantokens.readfrom.NomFichier;
for.w=1upto.nblec:if.proje...
Mercator->...((EXPR4));Lecture("Cameriquesud.dat")
;Lecture("Ccaraibes.dat");...
l.3 Mercator(3,48,30)
;
?
! An expression can't begin with `;'.
<inserted text>
0
<to be read again>
;
Lecture->...nblec:=scantokens.readfrom.NomFichier;
for.w=1upto.nblec:if.proje...
Mercator->...((EXPR4));Lecture("Cameriquesud.dat")
;Lecture("Ccaraibes.dat");...
l.3 Mercator(3,48,30)
;
Data file Cameriquesud.dat is pretty short:
16
arborescence&"bresil.dat",vert
arborescence&"uruguay.dat",jaune
arborescence&"paraguay.dat",jaune
arborescence&"bolivie1.dat",bleu
arborescence&"bolivie2.dat",bleu
arborescence&"argentine1.dat",rouge
arborescence&"argentine2.dat",rouge
arborescence&"chili1.dat",violet
arborescence&"chili2.dat",violet
arborescence&"guineef.dat",jaune
arborescence&"surinam.dat",rouge
arborescence&"guyane.dat",orange
arborescence&"venezuela.dat",bleu
arborescence&"colombie.dat",rouge
arborescence&"perou.dat",rose
arborescence&"equateur.dat",jaune
Hi all,
in a minimal example
\starttext
\externalfigure[test.svg][conversion=mp]
\stoptext
renders fine.
I my real world project white background is rendered black.
Any hints where I can start to debug?
juh
--
Autoren-Homepage: ......... http://literatur.hasecke.com
Satiren & Essays: ......... http://www.sudelbuch.de
Privater Blog: ............ http://www.hasecke.eu
Netzliteratur-Projekt: .... http://www.generationenprojekt.de