ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* question regarding \placefloats
@ 2018-08-08 12:33 Susanne G. Loeber
  2018-08-08 15:54 ` Alan Braslau
  0 siblings, 1 reply; 2+ messages in thread
From: Susanne G. Loeber @ 2018-08-08 12:33 UTC (permalink / raw)
  To: ntg-context


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

Dear Reader,

I have a document with figures and tables. I have tried to use the command
  \placefloats to create a list of all my floats as recommended on the page
Floating Objects, section Flushing floats. There it states: The command
\placefloats outputs all pending floats. I hoped to get a list with all
tables, all figures and all other possible floats.That list would either be
sorted per chapter or sorted per float. However, I was not able to make it
work at all.

In the appendix, you can find my struggles.
First:
\placefloats does not work.

\placelistoffloats does not exist as a command

My solution is two seperate commands, one for the tables \placelistoftables
and one for the figures \completelistoffigures.

Question: how to use \placefloats correctly to get a list of all floats?


Second:

\startcombination[1*2] looks nice, but does not add information to the
\placelistoffigures .

My solution is to place the \startcombination inside a \placefigure.

Question: Is there a better way?


Kind regards, thanks,

Susanne

[-- Attachment #1.2: Type: text/html, Size: 1591 bytes --]

[-- Attachment #2: placefloat.tex --]
[-- Type: application/octet-stream, Size: 2602 bytes --]

\usemodule[tikz]  
\starttext
	
\completecontent % with title

\par \startTEX \placefloats does not work \stopTEX
\placefloats

\par \startTEX \placelistoffloats is not a known ConTeXt command \stopTEX

\par \startTEX \placelistoftables \stopTEX
\placelistoftables

\par \startTEX \completelistoffigures starts on a new page with header\stopTEX
\setupheadtext[figures=Afbeeldingen en Tikz]
\completelistoffigures[alternative=c]



\startchapter
	[title={Hoofdstuk 1}]

\par \input knuth

\placefigure[here][fig:vierkant]{Vierkant}{\hbox{\starttikzpicture \draw[green] (0,0) rectangle (2,2); \stoptikzpicture}}	

\placefigure[here][fig:rechthoek]{Rechthoek}{\hbox{\starttikzpicture \draw[blue] (0,0) rectangle (4,2); \stoptikzpicture}}

\startsection
	[title={Sectie A}]
	
\par \input knuth	

\placetable[here][tab:12]{Een rij met twee kolommen}{\startxtable \startxrow \startxcell 1 \stopxcell \startxcell 2 \stopxcell \stopxrow \stopxtable}	

\stopsection

\stopchapter

\startchapter
	[title={Hoofdstuk 2}]

\par \input knuth

\placetable[here][tab:AB]{Een kolom met twee rijen}{\startxtable \startxrow \startxcell A \stopxcell \stopxrow \startxrow \startxcell B \stopxcell \stopxrow \stopxtable}	

\placefigure[here][fig:cows]{Koeien}{\externalfigure[cows.pdf]}

\stopchapter

\startchapter
	[title={Hoofdstuk 3}]

\par \input knuth

\stopchapter

\startchapter
	[title={Hoofdstuk 4}]

\par \input knuth

\par \startTEX \startxombiation[3*2] doesn't place info inside \completelistoffigures \stopTEX

\startcombination[3*2]
{\hbox{\starttikzpicture \draw[red] (0,0) circle (1cm); \stoptikzpicture}}{text 1}  {\hbox{\starttikzpicture \draw[red] (0,0) circle (1cm); \stoptikzpicture}}{text 2} 
{\hbox{\starttikzpicture \draw[red] (0,0) circle (1cm); \stoptikzpicture}}{text 3} {\hbox{\starttikzpicture \draw[red] (0,0) circle (1cm); \stoptikzpicture}}{text 4}
{\hbox{\starttikzpicture \draw[red] (0,0) circle (1cm); \stoptikzpicture}}{text 5} {\hbox{\starttikzpicture \draw[red] (0,0) circle (1cm); \stoptikzpicture}}{text 6}  
\stopcombination

\par \startTEX A solution is to use \startcombination inside \placefigure \stopTEX

\placefigure[here][fig:c12]{Combi cirkels}{
\startcombination[1*2]
{\hbox{\starttikzpicture \draw[green] (0,0) circle (0.5); \stoptikzpicture}}{c1}
{\hbox{\starttikzpicture \draw[green] (0,0) circle (0.5); \stoptikzpicture}}{c2}
\stopcombination}

\placefigure[top][fig:cirkel]{Cirkel x}{\hbox{\starttikzpicture \draw[cyan] (0,0) circle (1cm); \stoptikzpicture}}


\stopchapter

\stoptext

[-- Attachment #3: 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] 2+ messages in thread

* Re: question regarding \placefloats
  2018-08-08 12:33 question regarding \placefloats Susanne G. Loeber
@ 2018-08-08 15:54 ` Alan Braslau
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Braslau @ 2018-08-08 15:54 UTC (permalink / raw)
  To: Susanne G. Loeber; +Cc: mailing list for ConTeXt users

On Wed, 8 Aug 2018 14:33:21 +0200
"Susanne G. Loeber" <dekleurenfamilie@gmail.com> wrote:

> \placelistoffloats does not exist as a command
> 
> My solution is two seperate commands, one for the tables \placelistoftables
> and one for the figures \completelistoffigures.
> 
> Question: how to use \placefloats correctly to get a list of all floats?

Floating objects or floats exist in many instances. One predefined instance is figure and a second is table. So \placelistofINSTANCEs will give you the list. You can define more floating objects, for example a sidebox, etc.

The figure and table lists can be combined:

\definecombinedlist [figuresandtables] [figure,table]

\placelistoffiguresandtables

or something like that.


> Second:
> 
> \startcombination[1*2] looks nice, but does not add information to the
> \placelistoffigures .
> 
> My solution is to place the \startcombination inside a \placefigure.

\startcombination [nx=1,ny=2] % my preferred syntax

\stopcombination

allows you to create a combined (matrix) of graphics. It is indeed generally used inside a float construct such as \startplacefigure ... \stopplacefigure.


By the way, "alternative=label" is a favorite of mine, making it unnecessary to explicitly include labels, as in:

\startcombination [nx=1,ny=2,alternative=label]
  {My top graphic}
  {My bottom graphic}
\stopcombination

rather than

\startcombination [nx=1,ny=2]
  {My top graphic}    {a}
  {My bottom graphic} {b}
\stopcombination


Alan
___________________________________________________________________________________
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] 2+ messages in thread

end of thread, other threads:[~2018-08-08 15:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 12:33 question regarding \placefloats Susanne G. Loeber
2018-08-08 15:54 ` Alan Braslau

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