* spaces in file names @ 2010-01-13 10:51 Hans van der Meer 2010-01-13 10:55 ` luigi scarso 2010-01-13 15:35 ` Otared Kavian 0 siblings, 2 replies; 42+ messages in thread From: Hans van der Meer @ 2010-01-13 10:51 UTC (permalink / raw) To: NTG ConTeXt I would like to include a file with spaces in its name. Clearly it does not work using: \input /Users/me/dir with spaces/file I can use something like: \def\DataDirectory#1{\def\DATADIRECTORY{#1/}} % in reality coping with empty #1 \DataDirectory{/Users/me/dir with spaces} \def\Input#1{\input "\DATADIRECTORY#1"} and then that file is read. When however I want to set this directory with \setupexternalfigures[directory=\DATADIRECTORY] it does not find the picture file there. How can I accomplish the setup? Do I miss something? Using contextbeta, if that makes a difference. 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 10:51 spaces in file names Hans van der Meer @ 2010-01-13 10:55 ` luigi scarso 2010-01-13 11:12 ` Hans van der Meer 2010-01-13 15:35 ` Otared Kavian 1 sibling, 1 reply; 42+ messages in thread From: luigi scarso @ 2010-01-13 10:55 UTC (permalink / raw) To: mailing list for ConTeXt users On Wed, Jan 13, 2010 at 11:51 AM, Hans van der Meer <H.vanderMeer@uva.nl> wrote: > I would like to include a file with spaces in its name. > Clearly it does not work using: \input /Users/me/dir with spaces/file > I can use something like: > \def\DataDirectory#1{\def\DATADIRECTORY{#1/}} % in reality coping with > empty #1 > \DataDirectory{/Users/me/dir with spaces} > \def\Input#1{\input "\DATADIRECTORY#1"} > and then that file is read. > When however I want to set this directory with > \setupexternalfigures[directory=\DATADIRECTORY] > it does not find the picture file there. > > How can I accomplish the setup? Do I miss something? Using contextbeta, if > that makes a difference. > > Hans van der Meer > > what about \setupexternalfigures[directory={\DATADIRECTORY}] ? -- 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 10:55 ` luigi scarso @ 2010-01-13 11:12 ` Hans van der Meer 2010-01-13 11:16 ` luigi scarso 0 siblings, 1 reply; 42+ messages in thread From: Hans van der Meer @ 2010-01-13 11:12 UTC (permalink / raw) To: mailing list for ConTeXt users On 13 jan 2010, at 11:55, luigi scarso wrote: > On Wed, Jan 13, 2010 at 11:51 AM, Hans van der Meer <H.vanderMeer@uva.nl > > wrote: >> I would like to include a file with spaces in its name. >> Clearly it does not work using: \input /Users/me/dir with spaces/file >> I can use something like: >> \def\DataDirectory#1{\def\DATADIRECTORY{#1/}} % in reality coping >> with >> empty #1 >> \DataDirectory{/Users/me/dir with spaces} >> \def\Input#1{\input "\DATADIRECTORY#1"} >> and then that file is read. >> When however I want to set this directory with >> \setupexternalfigures[directory=\DATADIRECTORY] >> it does not find the picture file there. >> >> How can I accomplish the setup? Do I miss something? Using >> contextbeta, if >> that makes a difference. >> >> Hans van der Meer >> >> > what about > \setupexternalfigures[directory={\DATADIRECTORY}] > ? Tried it but NO. That didn't work. Without a space in the directory name I can find the picture. But as soon as a space gets in the directory name then the picture file is not found. 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 11:12 ` Hans van der Meer @ 2010-01-13 11:16 ` luigi scarso 2010-01-13 11:26 ` Hans van der Meer 0 siblings, 1 reply; 42+ messages in thread From: luigi scarso @ 2010-01-13 11:16 UTC (permalink / raw) To: mailing list for ConTeXt users On Wed, Jan 13, 2010 at 12:12 PM, Hans van der Meer <H.vanderMeer@uva.nl> wrote: >> what about >> \setupexternalfigures[directory={\DATADIRECTORY}] >> ? > > Tried it but NO. That didn't work. Without a space in the directory name I > can find the picture. But as soon as a space gets in the directory name then > the picture file is not found. :-( the last one... \setupexternalfigures[directory={"\DATADIRECTORY"}] -- 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 11:16 ` luigi scarso @ 2010-01-13 11:26 ` Hans van der Meer 2010-01-13 11:30 ` luigi scarso 2010-01-13 11:32 ` Wolfgang Schuster 0 siblings, 2 replies; 42+ messages in thread From: Hans van der Meer @ 2010-01-13 11:26 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 867 bytes --] On 13 jan 2010, at 12:16, luigi scarso wrote: > On Wed, Jan 13, 2010 at 12:12 PM, Hans van der Meer <H.vanderMeer@uva.nl > > wrote: >>> what about >>> \setupexternalfigures[directory={\DATADIRECTORY}] >>> ? >> >> Tried it but NO. That didn't work. Without a space in the directory >> name I >> can find the picture. But as soon as a space gets in the directory >> name then >> the picture file is not found. > :-( > the last one... > \setupexternalfigures[directory={"\DATADIRECTORY"}] > > NO again. Doing: \DataDirectory{/Users/hans/Movies/Inlays/Muziek/MadisonSquare Garden} % defs \DATADIRECTORY \setupexternalfigures[directory={"\DATADIRECTORY"}] gives an error: ! LuaTeX error <main ctx instance>:1: ')' expected near 'Garden'. \setfigurepathlist ...cation ","\@@exdirectory ")} Putting the "s around the name triggers the error. Hans van der Meer [-- Attachment #1.2: Type: text/html, Size: 2619 bytes --] [-- Attachment #2: Type: text/plain, Size: 486 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 11:26 ` Hans van der Meer @ 2010-01-13 11:30 ` luigi scarso 2010-01-13 11:32 ` Wolfgang Schuster 1 sibling, 0 replies; 42+ messages in thread From: luigi scarso @ 2010-01-13 11:30 UTC (permalink / raw) To: mailing list for ConTeXt users On Wed, Jan 13, 2010 at 12:26 PM, Hans van der Meer <H.vanderMeer@uva.nl> wrote: > NO again. Doing: > \DataDirectory{/Users/hans/Movies/Inlays/Muziek/MadisonSquare Garden} % > defs \DATADIRECTORY > \setupexternalfigures[directory={"\DATADIRECTORY"}] > > gives an error: > ! LuaTeX error <main ctx instance>:1: ')' expected near 'Garden'. > \setfigurepathlist ...cation ","\@@exdirectory ")} > Putting the "s around the name triggers the error. > Hans van der Meer :-( :-( :-( That's why I don't use spaces.. -- 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 11:26 ` Hans van der Meer 2010-01-13 11:30 ` luigi scarso @ 2010-01-13 11:32 ` Wolfgang Schuster 2010-01-13 11:38 ` Hans van der Meer 2010-01-13 13:23 ` Peter Rolf 1 sibling, 2 replies; 42+ messages in thread From: Wolfgang Schuster @ 2010-01-13 11:32 UTC (permalink / raw) To: mailing list for ConTeXt users Am 13.01.2010 um 12:26 schrieb Hans van der Meer: > \DataDirectory{/Users/hans/Movies/Inlays/Muziek/MadisonSquare Garden} % defs \DATADIRECTORY > \setupexternalfigures[directory={"\DATADIRECTORY"}] Why don't you save the pictures in a subdirectory of your document. 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 11:32 ` Wolfgang Schuster @ 2010-01-13 11:38 ` Hans van der Meer 2010-01-13 11:42 ` Wolfgang Schuster 2010-01-13 13:23 ` Peter Rolf 1 sibling, 1 reply; 42+ messages in thread From: Hans van der Meer @ 2010-01-13 11:38 UTC (permalink / raw) To: mailing list for ConTeXt users On 13 jan 2010, at 12:32, Wolfgang Schuster wrote: > > Am 13.01.2010 um 12:26 schrieb Hans van der Meer: > >> \DataDirectory{/Users/hans/Movies/Inlays/Muziek/MadisonSquare >> Garden} % defs \DATADIRECTORY >> \setupexternalfigures[directory={"\DATADIRECTORY"}] > > Why don't you save the pictures in a subdirectory of your document. > Because I want to keep all files (aif, description, notes, cd-cover, pictures) pertaining to a certain piece together in one directory. I did grep for the definition of \setupexternalfigures but could not find it in the sources. Where is it? Perhaps I can spot the difficulty there. Or, it might be in the use that /externalfigure makes of it. Please point to the definitions of both, that I can have a look. 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 11:38 ` Hans van der Meer @ 2010-01-13 11:42 ` Wolfgang Schuster 0 siblings, 0 replies; 42+ messages in thread From: Wolfgang Schuster @ 2010-01-13 11:42 UTC (permalink / raw) To: mailing list for ConTeXt users Am 13.01.2010 um 12:38 schrieb Hans van der Meer: > I did grep for the definition of \setupexternalfigures but could not find it in the sources. Where is it? Perhaps I can spot the difficulty there. Or, it might be in the use that /externalfigure makes of it. > Please point to the definitions of both, that I can have a look. grph-fig.mkiv -> \setupexternalfigures grph-inc.mkiv -> \setfigurepathlist grph-inc.lua -> figures.setpaths 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 11:32 ` Wolfgang Schuster 2010-01-13 11:38 ` Hans van der Meer @ 2010-01-13 13:23 ` Peter Rolf 1 sibling, 0 replies; 42+ messages in thread From: Peter Rolf @ 2010-01-13 13:23 UTC (permalink / raw) To: mailing list for ConTeXt users Am 13.01.2010 12:32, schrieb Wolfgang Schuster: > > Am 13.01.2010 um 12:26 schrieb Hans van der Meer: > >> \DataDirectory{/Users/hans/Movies/Inlays/Muziek/MadisonSquare Garden} % defs \DATADIRECTORY >> \setupexternalfigures[directory={"\DATADIRECTORY"}] > > Why don't you save the pictures in a subdirectory of your document. > .. or try to use a link (without spaces) to the source directory. e.g. a link named 'MadisonSquareGarden', which points to the original directory. Untested... Best wishes, Peter > 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 10:51 spaces in file names Hans van der Meer 2010-01-13 10:55 ` luigi scarso @ 2010-01-13 15:35 ` Otared Kavian 2010-01-13 16:30 ` Hans van der Meer 1 sibling, 1 reply; 42+ messages in thread From: Otared Kavian @ 2010-01-13 15:35 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1417 bytes --] Hi Hans, The following works for me both with mkii and mkiv (running Mac OS X 10.6.2). %%%%%%%%% \starttext \input "exercise english.tex" \page \externalfigure[pictures folder/old friend.jpg][maxwidth=3cm,maxheight=4cm,frame=on] \stoptext %%%%%%%%%% My images are in the « folder » or directory « pictures folder » and my file is called « old friend.jpg », so the command \externalfigure is clever enough (not surprising from an old ConTeXt command…) and doesn't need any double quotes. However for an \input file I have to say « \input "exercise english.tex" ». Actually in general I avoid to have spaces in my file names, but I just tried the above in order to understand your question. On 13 janv. 2010, at 11:51, Hans van der Meer wrote: > I would like to include a file with spaces in its name. > Clearly it does not work using: \input /Users/me/dir with spaces/file > I can use something like: > \def\DataDirectory#1{\def\DATADIRECTORY{#1/}} % in reality coping with empty #1 > \DataDirectory{/Users/me/dir with spaces} > \def\Input#1{\input "\DATADIRECTORY#1"} > and then that file is read. > When however I want to set this directory with > \setupexternalfigures[directory=\DATADIRECTORY] > it does not find the picture file there. > > How can I accomplish the setup? Do I miss something? Using contextbeta, if that makes a difference. > > Hans van der Meer [-- Attachment #1.2: Type: text/html, Size: 2017 bytes --] [-- Attachment #2: Type: text/plain, Size: 486 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 15:35 ` Otared Kavian @ 2010-01-13 16:30 ` Hans van der Meer 2010-01-13 17:59 ` Hans Hagen 0 siblings, 1 reply; 42+ messages in thread From: Hans van der Meer @ 2010-01-13 16:30 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 2053 bytes --] On 13 jan 2010, at 16:35, Otared Kavian wrote: > Hi Hans, > > The following works for me both with mkii and mkiv (running Mac OS X > 10.6.2). Yes, I knew that. Adding the full path inside the \externalfigure works. But I would like to access picture files by separately adressing directory and filename, not combining them explicitely. \setupexternalfigures[directory=..] was made for this. The annoying thing is that \setupexternalfigures and \externalfigure apparently do not work seamlessly together. > > %%%%%%%%% > \starttext > \input "exercise english.tex" > \page > \externalfigure[pictures folder/old friend.jpg] > [maxwidth=3cm,maxheight=4cm,frame=on] > > \stoptext > %%%%%%%%%% > > My images are in the « folder » or directory « pictures folder » and > my file is called « old friend.jpg », so the command \externalfigure > is clever enough (not surprising from an old ConTeXt command…) and > doesn't need any double quotes. > However for an \input file I have to say « \input "exercise > english.tex" ». > > Actually in general I avoid to have spaces in my file names, but I > just tried the above in order to understand your question. > > > > On 13 janv. 2010, at 11:51, Hans van der Meer wrote: > >> I would like to include a file with spaces in its name. >> Clearly it does not work using: \input /Users/me/dir with spaces/file >> I can use something like: >> \def\DataDirectory#1{\def\DATADIRECTORY{#1/}} % in reality coping >> with empty #1 >> \DataDirectory{/Users/me/dir with spaces} >> \def\Input#1{\input "\DATADIRECTORY#1"} >> and then that file is read. >> When however I want to set this directory with >> \setupexternalfigures[directory=\DATADIRECTORY] >> it does not find the picture file there. >> >> How can I accomplish the setup? Do I miss something? Using >> contextbeta, if that makes a difference. >> >> Hans van der Meer > ___________________________________________________________________________________ Hans van der Meer [-- Attachment #1.2: Type: text/html, Size: 3664 bytes --] [-- Attachment #2: Type: text/plain, Size: 486 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 16:30 ` Hans van der Meer @ 2010-01-13 17:59 ` Hans Hagen 2010-01-13 19:34 ` Hans van der Meer 0 siblings, 1 reply; 42+ messages in thread From: Hans Hagen @ 2010-01-13 17:59 UTC (permalink / raw) To: mailing list for ConTeXt users On 13-1-2010 17:30, Hans van der Meer wrote: > On 13 jan 2010, at 16:35, Otared Kavian wrote: > >> Hi Hans, >> >> The following works for me both with mkii and mkiv (running Mac OS X >> 10.6.2). > > Yes, I knew that. Adding the full path inside the \externalfigure works. > But I would like to access picture files by separately adressing > directory and filename, not combining them explicitely. > \setupexternalfigures[directory=..] was made for this. The annoying > thing is that \setupexternalfigures and \externalfigure apparently do > not work seamlessly together. well, it's not deliberately .. just that i never use paths with spaces in tex workflows so it never got tested in grph-inc.lua patch the gmatch pattern: if h[iv["global"]] then for s in gmatch(pathlist,",* *([^,]+)") do if not table.contains(t,s) then t[#t+1] = s end end end ----------------------------------------------------------------- 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 17:59 ` Hans Hagen @ 2010-01-13 19:34 ` Hans van der Meer 2010-01-13 19:46 ` Hans van der Meer 2010-01-13 19:59 ` Thomas A. Schmitz 0 siblings, 2 replies; 42+ messages in thread From: Hans van der Meer @ 2010-01-13 19:34 UTC (permalink / raw) To: Hans Hagen, NTG ConTeXt Thanks Hans. That does the trick. Odd by the way, that so many people apparently refrain from using spaces in directory and file names, because this did not surface earlier. It can make things a lot more readable. The habit of avoiding spaces is probably a holdover from old times where OS's were much more restrictive in filenaming. I reckon the next beta will contain this patch, so that I don't have to go through patching hassles when installing a new version. Hans van der Meer On 13 jan 2010, at 18:59, Hans Hagen wrote: > On 13-1-2010 17:30, Hans van der Meer wrote: >> On 13 jan 2010, at 16:35, Otared Kavian wrote: >> >>> Hi Hans, >>> >>> The following works for me both with mkii and mkiv (running Mac OS X >>> 10.6.2). >> >> Yes, I knew that. Adding the full path inside the \externalfigure >> works. >> But I would like to access picture files by separately adressing >> directory and filename, not combining them explicitely. >> \setupexternalfigures[directory=..] was made for this. The annoying >> thing is that \setupexternalfigures and \externalfigure apparently do >> not work seamlessly together. > > well, it's not deliberately .. just that i never use paths with > spaces in tex workflows so it never got tested > > in grph-inc.lua patch the gmatch pattern: > > if h[iv["global"]] then > for s in gmatch(pathlist,",* *([^,]+)") do > if not table.contains(t,s) then > t[#t+1] = s > end > end > end > > > > ----------------------------------------------------------------- > 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 > ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 19:34 ` Hans van der Meer @ 2010-01-13 19:46 ` Hans van der Meer 2010-01-13 20:39 ` Hans Hagen 2010-01-14 2:00 ` spaces in file names Vladimir Lomov 2010-01-13 19:59 ` Thomas A. Schmitz 1 sibling, 2 replies; 42+ messages in thread From: Hans van der Meer @ 2010-01-13 19:46 UTC (permalink / raw) To: mailing list for ConTeXt users I just became aware of the fact that a comma in a directory name like "dir, so-and-so" is failing too. No doubt there will be others that are allowed in those names but resist \setupexternalfigures. I guess I will have to live with that. Though Hans might feel tempted to sort it out once and for all..... Hans van der Meer On 13 jan 2010, at 20:34, Hans van der Meer wrote: > Thanks Hans. That does the trick. > > Odd by the way, that so many people apparently refrain from using > spaces in directory and file names, because this did not surface > earlier. It can make things a lot more readable. The habit of > avoiding spaces is probably a holdover from old times where OS's > were much more restrictive in filenaming. I reckon the next beta > will contain this patch, so that I don't have to go through patching > hassles when installing a new version. > > > > > On 13 jan 2010, at 18:59, Hans Hagen wrote: > >> On 13-1-2010 17:30, Hans van der Meer wrote: >>> On 13 jan 2010, at 16:35, Otared Kavian wrote: >>> >>>> Hi Hans, >>>> >>>> The following works for me both with mkii and mkiv (running Mac >>>> OS X >>>> 10.6.2). >>> >>> Yes, I knew that. Adding the full path inside the \externalfigure >>> works. >>> But I would like to access picture files by separately adressing >>> directory and filename, not combining them explicitely. >>> \setupexternalfigures[directory=..] was made for this. The annoying >>> thing is that \setupexternalfigures and \externalfigure apparently >>> do >>> not work seamlessly together. >> >> well, it's not deliberately .. just that i never use paths with >> spaces in tex workflows so it never got tested >> >> in grph-inc.lua patch the gmatch pattern: >> >> if h[iv["global"]] then >> for s in gmatch(pathlist,",* *([^,]+)") do >> if not table.contains(t,s) then >> t[#t+1] = s >> end >> end >> end >> >> >> >> ----------------------------------------------------------------- >> 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 >> ----------------------------------------------------------------- > > ___________________________________________________________________________________ > 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 19:46 ` Hans van der Meer @ 2010-01-13 20:39 ` Hans Hagen 2010-01-14 20:16 ` Text backgrounds once again Matthias Weber 2010-01-14 2:00 ` spaces in file names Vladimir Lomov 1 sibling, 1 reply; 42+ messages in thread From: Hans Hagen @ 2010-01-13 20:39 UTC (permalink / raw) To: mailing list for ConTeXt users On 13-1-2010 20:46, Hans van der Meer wrote: > I just became aware of the fact that a comma in a directory name like > "dir, so-and-so" is failing too. No doubt there will be others that are > allowed in those names but resist \setupexternalfigures. I guess I will > have to live with that. Though Hans might feel tempted to sort it out > once and for all..... well, directory=a, b, c should be directory={a, b, c} or when b, c is a path directory={a, {b, c}} you can try if h[iv["global"]] then for _, s in ipairs(aux.settings_to_array(pathlist)) do if not table.contains(t,s) then t[#t+1] = s end end end (untested) ----------------------------------------------------------------- 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Text backgrounds once again 2010-01-13 20:39 ` Hans Hagen @ 2010-01-14 20:16 ` Matthias Weber 2010-01-14 20:55 ` Text backgrounds once again (follow-up) Matthias Weber 0 siblings, 1 reply; 42+ messages in thread From: Matthias Weber @ 2010-01-14 20:16 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 805 bytes --] Dear all, after a long break I am returning to two larger projects of mine, and to celebrate, I upgraded to ConTeXt from the current TeXLive. To my surprise, mostly everything looks as before (which is good), but all my text backgrounds are gone. A little search brought up Wolf-gang's example (from 1-20 2009) \setupcolors[state=start] \definetextbackground [example] [location=paragraph, background=color, backgroundcolor=middlegray, frame=off] \starttext \input knuth \startexample \dorecurse{4}{\input knuth\par} \stopexample \input knuth \stoptext which doesn't produce any backgrounds - neither on my installation, nor at ConTeXt live. What is the current way to produce backgrounds around text snippets? I'll need/want it framed with rounded corners eventually, too. Thanks! [-- Attachment #1.2: Type: text/html, Size: 1369 bytes --] [-- Attachment #2: Type: text/plain, Size: 486 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: Text backgrounds once again (follow-up) 2010-01-14 20:16 ` Text backgrounds once again Matthias Weber @ 2010-01-14 20:55 ` Matthias Weber 2010-01-14 21:39 ` Willi Egger 2010-01-14 21:48 ` NOT reusing figures Matthias Weber 0 siblings, 2 replies; 42+ messages in thread From: Matthias Weber @ 2010-01-14 20:55 UTC (permalink / raw) To: mailing list for ConTeXt users More precisely, what formerly worked (with my 2008 installation, and it still works when I switch back) is the following minimized setup. The frame and the background are gone :(, the red text is there. Matthias \setupcolors[state=start] \definecolor[defc][r=.9,g=.9,b=.94] \definetextbackground [defbackground] [background=color, backgroundcolor=defc, align=right, frame=on, corner=round, before=\blank, after=\blank, leftoffset=5pt, rightoffset=5pt, topoffset=5pt, bottomoffset=5pt, framecolor=darkred, location=paragraph, color=darkred] \defineenumeration [definition] [before={\starttextbackground[defbackground]}, after={\stoptextbackground}, text=Definition, way=bysection, location=hanging, letter=rm] \starttext \startdefinition \input knuth \stopdefinition \input knuth \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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: Text backgrounds once again (follow-up) 2010-01-14 20:55 ` Text backgrounds once again (follow-up) Matthias Weber @ 2010-01-14 21:39 ` Willi Egger 2010-01-14 21:45 ` Matthias Weber 2010-01-14 21:48 ` NOT reusing figures Matthias Weber 1 sibling, 1 reply; 42+ messages in thread From: Willi Egger @ 2010-01-14 21:39 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1: Type: text/plain, Size: 257 bytes --] Hi Mathias, I tested your sample-code with the minimals This is LuaTeX, Version beta-0.50.0-2009122422 ConTeXt ver: 2010.01.11 14:57 MKIV fmt: 2010.1.11 int: english/ english The outcome is to my knowledge correct See attachment. Kind regards Willi [-- Attachment #2: backgrounds.pdf --] [-- Type: application/pdf, Size: 18906 bytes --] [-- Attachment #3: Type: text/plain, Size: 1458 bytes --] On Jan 14, 2010, at 9:55 PM, Matthias Weber wrote: > More precisely, what formerly worked (with my 2008 installation, > and it still works when I switch back) > is the following minimized setup. The frame and the background are > gone :(, the red text is there. > > Matthias > > \setupcolors[state=start] > > \definecolor[defc][r=.9,g=.9,b=.94] > > \definetextbackground > [defbackground] > [background=color, > backgroundcolor=defc, > align=right, > frame=on, > corner=round, > before=\blank, > after=\blank, > leftoffset=5pt, > rightoffset=5pt, > topoffset=5pt, > bottomoffset=5pt, > framecolor=darkred, > location=paragraph, > color=darkred] > > \defineenumeration > [definition] > [before={\starttextbackground[defbackground]}, > after={\stoptextbackground}, > text=Definition, > way=bysection, > location=hanging, > letter=rm] > > > \starttext > > \startdefinition > \input knuth > \stopdefinition > > > \input knuth > > \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 > ______________________________________________________________________ > _____________ [-- Attachment #4: Type: text/plain, Size: 486 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: Text backgrounds once again (follow-up) 2010-01-14 21:39 ` Willi Egger @ 2010-01-14 21:45 ` Matthias Weber 2010-01-14 22:15 ` Aditya Mahajan 0 siblings, 1 reply; 42+ messages in thread From: Matthias Weber @ 2010-01-14 21:45 UTC (permalink / raw) To: mailing list for ConTeXt users Thanks, that is what I want to see. So ConTeXt live is broken as well as TeXlive 2009? Matthias On Jan 14, 2010, at 4:39 PM, Willi Egger wrote: > Hi Mathias, > > I tested your sample-code with the minimals > > This is LuaTeX, Version beta-0.50.0-2009122422 > ConTeXt ver: 2010.01.11 14:57 MKIV fmt: 2010.1.11 int: english/ > english > > The outcome is to my knowledge correct See attachment. > > Kind regards > Willi > <backgrounds.pdf> > > On Jan 14, 2010, at 9:55 PM, Matthias Weber wrote: > >> More precisely, what formerly worked (with my 2008 installation, >> and it still works when I switch back) >> is the following minimized setup. The frame and the background are >> gone :(, the red text is there. >> >> Matthias >> >> \setupcolors[state=start] >> >> \definecolor[defc][r=.9,g=.9,b=.94] >> >> \definetextbackground >> [defbackground] >> [background=color, >> backgroundcolor=defc, >> align=right, >> frame=on, >> corner=round, >> before=\blank, >> after=\blank, >> leftoffset=5pt, >> rightoffset=5pt, >> topoffset=5pt, >> bottomoffset=5pt, >> framecolor=darkred, >> location=paragraph, >> color=darkred] >> >> \defineenumeration >> [definition] >> [before={\starttextbackground[defbackground]}, >> after={\stoptextbackground}, >> text=Definition, >> way=bysection, >> location=hanging, >> letter=rm] >> >> >> \starttext >> >> \startdefinition >> \input knuth >> \stopdefinition >> >> >> \input knuth >> >> \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 >> ___________________________________________________________________________________ > > ___________________________________________________________________________________ > 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: Text backgrounds once again (follow-up) 2010-01-14 21:45 ` Matthias Weber @ 2010-01-14 22:15 ` Aditya Mahajan 2010-01-15 12:58 ` Matthias Weber 0 siblings, 1 reply; 42+ messages in thread From: Aditya Mahajan @ 2010-01-14 22:15 UTC (permalink / raw) To: mailing list for ConTeXt users On Thu, 14 Jan 2010, Matthias Weber wrote: > Thanks, that is what I want to see. > So ConTeXt live is broken as well as TeXlive 2009? No. Both are (understandably) slightly paranoid, and disable \write18 by default. Either enable write18 in Texlive (http://wiki.contextgarden.net/write18) or add \runMPgraphicsfalse on top of your file. 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: Text backgrounds once again (follow-up) 2010-01-14 22:15 ` Aditya Mahajan @ 2010-01-15 12:58 ` Matthias Weber 0 siblings, 0 replies; 42+ messages in thread From: Matthias Weber @ 2010-01-15 12:58 UTC (permalink / raw) To: mailing list for ConTeXt users Thanks, that solves it! Matthias On Jan 14, 2010, at 5:15 PM, Aditya Mahajan wrote: > On Thu, 14 Jan 2010, Matthias Weber wrote: > >> Thanks, that is what I want to see. >> So ConTeXt live is broken as well as TeXlive 2009? > > No. Both are (understandably) slightly paranoid, and disable > \write18 by default. Either enable write18 in Texlive (http://wiki.contextgarden.net/write18 > ) or add \runMPgraphicsfalse on top of your file. > > 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 > ___________________________________________________________________________________ ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* NOT reusing figures 2010-01-14 20:55 ` Text backgrounds once again (follow-up) Matthias Weber 2010-01-14 21:39 ` Willi Egger @ 2010-01-14 21:48 ` Matthias Weber 2010-01-14 22:36 ` Hans Hagen 1 sibling, 1 reply; 42+ messages in thread From: Matthias Weber @ 2010-01-14 21:48 UTC (permalink / raw) To: mailing list for ConTeXt users Dear All, I just notice another discrepancy between 2009 and earlier ConTeXt: I organize my project in folders/subfolders according to chapters/ sections, and each section folder contains the files needed for that section: the ConTeXt source, images, and helper files etc. Now it happens so that some images in different directories have the same name. In my ConTeXt (2009), only the first image is loaded and used instead of the local one (which is explicitly referenced with the correct path). I can clearly rename all file names to become unique, but it strikes me as a little odd. Matthias ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: NOT reusing figures 2010-01-14 21:48 ` NOT reusing figures Matthias Weber @ 2010-01-14 22:36 ` Hans Hagen 2010-01-15 0:58 ` Matthias Weber 0 siblings, 1 reply; 42+ messages in thread From: Hans Hagen @ 2010-01-14 22:36 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Matthias Weber On 14-1-2010 22:48, Matthias Weber wrote: > Dear All, > > I just notice another discrepancy between 2009 and earlier ConTeXt: > > I organize my project in folders/subfolders according to > chapters/sections, and > each section folder contains the files needed for that section: the > ConTeXt source, > images, and helper files etc. > > Now it happens so that some images in different directories have the > same name. > In my ConTeXt (2009), only the first image is loaded and used instead of > the local one (which is explicitly referenced > with the correct path). I can clearly rename all file names to become > unique, but it strikes me as a little odd. what do you mean with 2009? a recent beta? ----------------------------------------------------------------- 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: NOT reusing figures 2010-01-14 22:36 ` Hans Hagen @ 2010-01-15 0:58 ` Matthias Weber 2010-01-15 15:26 ` reusing figures ok - problem with hiding blocks in MKIV Matthias Weber 0 siblings, 1 reply; 42+ messages in thread From: Matthias Weber @ 2010-01-15 0:58 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1: Type: text/plain, Size: 771 bytes --] Dear all, I made a minimal sample project illustrating the issue. Note that the figures in the two folders are different, and individually referenced by the two TeX files in the folders, but come out as the same image. In older versions of ConTeX (before 2007) the different figures were used. So far I have been using the TeXlive distributions (on a Mac) and shied away from the minimals. I am not a terminal person, and while I can use it, I do it rarely and forget instantly what I did. I am just trying to update to something more recent than the last 2008 TeXlive distribution and get my old projects to look similar to what they looked a few years back. If you tell me I have to use the minimals for that, well, I'll give it a shot. Matthias [-- Attachment #2: test.zip --] [-- Type: application/zip, Size: 24887 bytes --] [-- Attachment #3: Type: text/plain, Size: 1691 bytes --] On Jan 14, 2010, at 5:36 PM, Hans Hagen wrote: > On 14-1-2010 22:48, Matthias Weber wrote: >> Dear All, >> >> I just notice another discrepancy between 2009 and earlier ConTeXt: >> >> I organize my project in folders/subfolders according to >> chapters/sections, and >> each section folder contains the files needed for that section: the >> ConTeXt source, >> images, and helper files etc. >> >> Now it happens so that some images in different directories have the >> same name. >> In my ConTeXt (2009), only the first image is loaded and used >> instead of >> the local one (which is explicitly referenced >> with the correct path). I can clearly rename all file names to become >> unique, but it strikes me as a little odd. > > what do you mean with 2009? a recent beta? > > ----------------------------------------------------------------- > 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 > ----------------------------------------------------------------- > ___________________________________________________________________________________ > 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 #4: Type: text/plain, Size: 486 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* reusing figures ok - problem with hiding blocks in MKIV 2010-01-15 0:58 ` Matthias Weber @ 2010-01-15 15:26 ` Matthias Weber 2010-01-18 9:00 ` Hans Hagen 0 siblings, 1 reply; 42+ messages in thread From: Matthias Weber @ 2010-01-15 15:26 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1: Type: text/plain, Size: 381 bytes --] Dear all, after (finally) installing the minimals, the zip with the figures TeXs as expected with MKII and MKIV. Now, in MKIV I notice another issue. I use the \hideblocks mechanism to hide and reuse answers and get an error message (Undefined control sequence) in MKIV while everything is fine in MKII. I am attaching a sample file. Thanks for all the help! Matthias [-- Attachment #2: test.tex --] [-- Type: application/octet-stream, Size: 780 bytes --] \setupbodyfont[12pt] \setuppagenumbering[location={footer,middle},way=bytext] \setuppapersize[letter][letter] \setuphead [section] [numberstyle=bold, page=yes, continue=no ] \defineenumeration [exercise] [way=bysection, text=Exercise, start=1, location=hanging, letter=rm] \defineenumeration [solution] [text=Solution, way=bysection, location=hanging, letter=rm] \defineblock[exercise,solution] \hideblocks[solution] \setupinteraction [state=start] \starttext \section{Problems} \startexercise Addition\index{addition} problem: $1+1=?$. \stopexercise \beginsolution \solution incorrect\index{incorrect} answer: 3. \endsolution \section{Answers to the Problems} \reset[solution] \useblocks[solution] \section{Index} \completeindex \stoptext [-- Attachment #3: Type: text/plain, Size: 1 bytes --] [-- Attachment #4: Type: text/plain, Size: 486 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: reusing figures ok - problem with hiding blocks in MKIV 2010-01-15 15:26 ` reusing figures ok - problem with hiding blocks in MKIV Matthias Weber @ 2010-01-18 9:00 ` Hans Hagen 2010-01-22 15:19 ` More questions about hiding/reusing blocks Matthias Weber 0 siblings, 1 reply; 42+ messages in thread From: Hans Hagen @ 2010-01-18 9:00 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Matthias Weber On 15-1-2010 16:26, Matthias Weber wrote: > Dear all, > > after (finally) installing the minimals, > the zip with the figures TeXs as expected with MKII and MKIV. > > Now, in MKIV I notice another issue. I use the \hideblocks mechanism to > hide and reuse answers and get an error message (Undefined control > sequence) in MKIV while everything is fine > in MKII. I am attaching a sample file. there are two issues: \defineblock[exercise,solution] i want to get away from the multiple definitions (for the moment i enabled it again in the upcoming beta) but the following should work in your case \defineblock[solution] \defineblock[exercise] next, delete the tuc file and use the start/stop commands \beginsolution \startsolution Solution one. \stopsolution \endsolution \solution is ok but looks for a \par as delimiter so using the \start... \stop... variant is better 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* More questions about hiding/reusing blocks 2010-01-18 9:00 ` Hans Hagen @ 2010-01-22 15:19 ` Matthias Weber 2010-01-22 15:55 ` Calligraphic letters in Mark IV Matthias Weber 2010-01-24 16:57 ` More questions about hiding/reusing blocks Hans Hagen 0 siblings, 2 replies; 42+ messages in thread From: Matthias Weber @ 2010-01-22 15:19 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1: Type: text/plain, Size: 1012 bytes --] Dear all, I have two more questions about reusing blocks and interreferencing them. First of all, I have set up problems within different chapters, and would like to have a separate chapter at the end that gathers the solutions chapter by chapter like \chapter{Solutions} \section{Solutions from chapter 1} get these here \section{Solutions from chapter 2} get those here A sample file is attached below that has the layout, but all I know is how to retrieve all blocks at once. Would I need to create another block at the end of each chapter, and retrieve these at the end? If so, how? Then, I'd like to have little inconspicuous hyperlinks from the exercise to its solution and back. So far, I can only do this manually, as indicated. I would prefer to have the text Exercise in the enumeration to become a hyperlink to the corresponding solution, and vice versa for the text Solution. Is there a way of doing this (or something similar)? Thanks a lot for all the help! Matthias [-- Attachment #2: test.tex --] [-- Type: application/octet-stream, Size: 1196 bytes --] \setupbodyfont[12pt] \setuppagenumbering[location={footer,middle},way=bytext] \setuppapersize[letter][letter] \setuphead [section] [numberstyle=bold, page=yes, continue=no ] \defineenumeration [exercise] [way=bysection, text=Exercise, start=1, location=hanging, letter=rm] \defineenumeration [solution] [text=Solution, way=bysection, location=hanging, letter=rm] \defineblock[exercise] \defineblock[solution] \hideblocks[solution] \setupinteraction [state=start] \starttext \section{Main Text} \subsection[subsec:1]{problem section 1} \startexercise[ex:1] Addition\index{addition} problem: $1+1=?$ (\in{solution}[sol:1]) \stopexercise \beginsolution \startsolution[sol:1] Answer: 2. (\in{problem}[ex:1]) \stopsolution \endsolution \subsection[subsec:2]{problem section 2} \startexercise[ex:2] Multiplication problem: $1\times1=?$ (\in{solution}[sol:2]) \stopexercise \beginsolution \startsolution[sol:2] Answer: 1. (\in{problem}[ex:2]) \stopsolution \endsolution \section{Answers to the Problems} \subsection{Answers to \in{section}[subsec:1]} \reset[solution] \useblocks[solution] \subsection{Answers to \in{section}[subsec:2]} How to place? \stoptext [-- Attachment #3: Type: text/plain, Size: 1 bytes --] [-- Attachment #4: Type: text/plain, Size: 486 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Calligraphic letters in Mark IV 2010-01-22 15:19 ` More questions about hiding/reusing blocks Matthias Weber @ 2010-01-22 15:55 ` Matthias Weber 2010-01-22 17:29 ` Hans Hagen 2010-01-24 16:57 ` More questions about hiding/reusing blocks Hans Hagen 1 sibling, 1 reply; 42+ messages in thread From: Matthias Weber @ 2010-01-22 15:55 UTC (permalink / raw) To: mailing list for ConTeXt users Dear all, what's the best way to use calligraphic letters in LuaTeX? I am used to \starttext \calligraphic{H} \stoptext which doesn't work in Mark IV (undefined control sequence). Thanks, Matthias ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: Calligraphic letters in Mark IV 2010-01-22 15:55 ` Calligraphic letters in Mark IV Matthias Weber @ 2010-01-22 17:29 ` Hans Hagen 2010-01-22 17:49 ` Matthias Weber 2010-01-22 18:20 ` Wolfgang Schuster 0 siblings, 2 replies; 42+ messages in thread From: Hans Hagen @ 2010-01-22 17:29 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Matthias Weber On 22-1-2010 16:55, Matthias Weber wrote: > > Dear all, > > what's the best way to use calligraphic letters in LuaTeX? > > I am used to > > \starttext > \calligraphic{H} > \stoptext > > which doesn't work in Mark IV (undefined control sequence). that was actually something math in mkiv you have to define a caligraphic font ----------------------------------------------------------------- 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: Calligraphic letters in Mark IV 2010-01-22 17:29 ` Hans Hagen @ 2010-01-22 17:49 ` Matthias Weber 2010-01-22 17:53 ` Wolfgang Schuster 2010-01-22 18:20 ` Wolfgang Schuster 1 sibling, 1 reply; 42+ messages in thread From: Matthias Weber @ 2010-01-22 17:49 UTC (permalink / raw) To: mailing list for ConTeXt users Yes indeed, I need this just for math. So do I really need to grab some font that has calligraphic , write/ use a typescript, and then write $text{\calligraphic H}$ or is there a simpler way that works out of the box? Sorry for asking these simple questions, I just haven't started looking into fonts yet... Matthias Weber On Jan 22, 2010, at 12:29 PM, Hans Hagen wrote: > On 22-1-2010 16:55, Matthias Weber wrote: >> >> Dear all, >> >> what's the best way to use calligraphic letters in LuaTeX? >> >> I am used to >> >> \starttext >> \calligraphic{H} >> \stoptext >> >> which doesn't work in Mark IV (undefined control sequence). > > that was actually something math > > in mkiv you have to define a caligraphic font > > > ----------------------------------------------------------------- > 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 > ----------------------------------------------------------------- > ___________________________________________________________________________________ > 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: Calligraphic letters in Mark IV 2010-01-22 17:49 ` Matthias Weber @ 2010-01-22 17:53 ` Wolfgang Schuster 2010-01-22 18:14 ` Matthias Weber 0 siblings, 1 reply; 42+ messages in thread From: Wolfgang Schuster @ 2010-01-22 17:53 UTC (permalink / raw) To: mailing list for ConTeXt users Am 22.01.10 18:49, schrieb Matthias Weber: > > > Yes indeed, I need this just for math. > So do I really need to grab some font that has calligraphic , write/use > a typescript, and then write > $text{\calligraphic H}$ > or is there a simpler way that works out of the box? $H{\cal H}$ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: Calligraphic letters in Mark IV 2010-01-22 17:53 ` Wolfgang Schuster @ 2010-01-22 18:14 ` Matthias Weber 0 siblings, 0 replies; 42+ messages in thread From: Matthias Weber @ 2010-01-22 18:14 UTC (permalink / raw) To: mailing list for ConTeXt users Thanks! Matthias On Jan 22, 2010, at 12:53 PM, Wolfgang Schuster wrote: > Am 22.01.10 18:49, schrieb Matthias Weber: >> >> >> Yes indeed, I need this just for math. >> So do I really need to grab some font that has calligraphic , write/ >> use >> a typescript, and then write >> $text{\calligraphic H}$ >> or is there a simpler way that works out of the box? > > $H{\cal H}$ > > 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: Calligraphic letters in Mark IV 2010-01-22 17:29 ` Hans Hagen 2010-01-22 17:49 ` Matthias Weber @ 2010-01-22 18:20 ` Wolfgang Schuster 2010-01-24 13:34 ` Hans Hagen 1 sibling, 1 reply; 42+ messages in thread From: Wolfgang Schuster @ 2010-01-22 18:20 UTC (permalink / raw) To: mailing list for ConTeXt users Am 22.01.10 18:29, schrieb Hans Hagen: > On 22-1-2010 16:55, Matthias Weber wrote: >> >> Dear all, >> >> what's the best way to use calligraphic letters in LuaTeX? >> >> I am used to >> >> \starttext >> \calligraphic{H} >> \stoptext >> >> which doesn't work in Mark IV (undefined control sequence). > > that was actually something math > > in mkiv you have to define a caligraphic font but \calligraphic is no longer available in mkiv, can you add \unexpanded\def\calligraphic{\ifmmode\expandafter\mathscript \fi} to math-ini.mkiv? 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: Calligraphic letters in Mark IV 2010-01-22 18:20 ` Wolfgang Schuster @ 2010-01-24 13:34 ` Hans Hagen 2010-01-24 21:17 ` Aditya Mahajan 0 siblings, 1 reply; 42+ messages in thread From: Hans Hagen @ 2010-01-24 13:34 UTC (permalink / raw) To: mailing list for ConTeXt users On 22-1-2010 19:20, Wolfgang Schuster wrote: > \unexpanded\def\calligraphic{\ifmmode\expandafter\mathscript \fi} > > to math-ini.mkiv? probably something \unexpanded\def\calligraphic{\groupedcommand{... then but lets see what aditya thinks of it ... 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: Calligraphic letters in Mark IV 2010-01-24 13:34 ` Hans Hagen @ 2010-01-24 21:17 ` Aditya Mahajan 2010-01-24 22:45 ` Hans Hagen 0 siblings, 1 reply; 42+ messages in thread From: Aditya Mahajan @ 2010-01-24 21:17 UTC (permalink / raw) To: mailing list for ConTeXt users On Sun, 24 Jan 2010, Hans Hagen wrote: > On 22-1-2010 19:20, Wolfgang Schuster wrote: > >> \unexpanded\def\calligraphic{\ifmmode\expandafter\mathscript \fi} >> >> to math-ini.mkiv? > > probably something > > \unexpanded\def\calligraphic{\groupedcommand{... > > then but lets see what aditya thinks of it ... I think that we should have \calligraphic for text calligraphic fonts only. For math, plain tex had \cal as a font switch, MkIV has \mathscript and \mathcal. I am not sure that we need another font switch in math. I know, that in mkii \calligraphic is available in math mode, but I did not like that either. Since you are asking for my opinion, I think that it should go :-). For backward compatibility, we can add appropriate definition of \calligraphic to m-mkii module. While we are at this topic, I think that we should change the definitions of \mathbf, \mathtf, etc from being a font switch to being a grouped command (to be more in tune with ams convetions). So, in math-ini.mkiv we can have diff --git a/math-ini.mkiv b/math-ini.mkiv index 17b0205..65bd43c 100644 --- a/math-ini.mkiv +++ b/math-ini.mkiv @@ -72,23 +72,27 @@ \unexpanded\def\mathfraktur {\setmathalphabet{fraktur}} \unexpanded\def\mathblackboard{\setmathalphabet{blackboard}} -\unexpanded\def\mathrm{\setmathattribute{rm}{tf}} -\unexpanded\def\mathss{\setmathattribute{ss}{tf}} -\unexpanded\def\mathtt{\setmathattribute{tt}{tf}} - -\unexpanded\def\mathtf{\setmathstyle{tf}} -\unexpanded\def\mathbf{\setmathstyle{bf}} -\unexpanded\def\mathsl{\setmathstyle{sl}} -\unexpanded\def\mathit{\setmathstyle{it}} -\unexpanded\def\mathbs{\setmathstyle{bs}} -\unexpanded\def\mathbi{\setmathstyle{bi}} - -\let\tfmath\mathtf % maybe a grouped command -\let\bfmath\mathbf -\let\slmath\mathsl -\let\itmath\mathit -\let\bsmath\mathbs -\let\bimath\mathbi +\unexpanded\def\rmmath{\setmathattribute{rm}{tf}} +\unexpanded\def\ssmath{\setmathattribute{ss}{tf}} +\unexpanded\def\ttmath{\setmathattribute{tt}{tf}} + +\unexpanded\def\tfmath{\setmathstyle{tf}} +\unexpanded\def\bfmath{\setmathstyle{bf}} +\unexpanded\def\slmath{\setmathstyle{sl}} +\unexpanded\def\itmath{\setmathstyle{it}} +\unexpanded\def\bsmath{\setmathstyle{bs}} +\unexpanded\def\bimath{\setmathstyle{bi}} + +\unexpanded\def\mathrm{\groupedcommand{\rmmath}{}} +\unexpanded\def\mathss{\groupedcommand{\ssmath}{}} +\unexpanded\def\mathtt{\groupedcommand{\ttmath}{}} + +\unexpanded\def\mathtf{\groupedcommand{\tfmath}{}} +\unexpanded\def\mathbf{\groupedcommand{\bfmath}{}} +\unexpanded\def\mathsl{\groupedcommand{\slmath}{}} +\unexpanded\def\mathit{\groupedcommand{\itmath}{}} +\unexpanded\def\mathbs{\groupedcommand{\bsmath}{}} +\unexpanded\def\mathbi{\groupedcommand{\bimath}{}} \let\Bbb\mathblackboard What do you think? 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: Calligraphic letters in Mark IV 2010-01-24 21:17 ` Aditya Mahajan @ 2010-01-24 22:45 ` Hans Hagen 0 siblings, 0 replies; 42+ messages in thread From: Hans Hagen @ 2010-01-24 22:45 UTC (permalink / raw) To: mailing list for ConTeXt users On 24-1-2010 22:17, Aditya Mahajan wrote: > I think that we should have \calligraphic for text calligraphic fonts > only. For math, plain tex had \cal as a font switch, MkIV has > \mathscript and \mathcal. I am not sure that we need another font switch > in math. > > I know, that in mkii \calligraphic is available in math mode, but I did > not like that either. Since you are asking for my opinion, I think that > it should go :-). For backward compatibility, we can add appropriate > definition of \calligraphic to m-mkii module. ok, just send me a patch then > While we are at this topic, I think that we should change the > definitions of \mathbf, \mathtf, etc from being a font switch to being a > grouped command (to be more in tune with ams convetions). So, in > math-ini.mkiv we can have > > diff --git a/math-ini.mkiv b/math-ini.mkiv > index 17b0205..65bd43c 100644 > --- a/math-ini.mkiv > +++ b/math-ini.mkiv > @@ -72,23 +72,27 @@ > > ... > > What do you think? i have no problem with that ... so if no one comes up with good arguments against it we can do that 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: More questions about hiding/reusing blocks 2010-01-22 15:19 ` More questions about hiding/reusing blocks Matthias Weber 2010-01-22 15:55 ` Calligraphic letters in Mark IV Matthias Weber @ 2010-01-24 16:57 ` Hans Hagen [not found] ` <A4C3BD19-AAE4-4033-AA0E-A2C2DB586BFB@indiana.edu> 1 sibling, 1 reply; 42+ messages in thread From: Hans Hagen @ 2010-01-24 16:57 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Matthias Weber On 22-1-2010 16:19, Matthias Weber wrote: > Dear all, > > I have two more questions about reusing blocks and interreferencing them. > > First of all, I have set up problems within different chapters, and > would like to have a separate chapter at the end that gathers > the solutions chapter by chapter like > > \chapter{Solutions} > \section{Solutions from chapter 1} > > get these here > > \section{Solutions from chapter 2} > > get those here you can group your solutions in categories: \beginsolution[one] .... and then use \useblocks[solution][one] > A sample file is attached below that has the layout, but all I know is > how to retrieve all blocks at once. Would I need to create another block > at the end of each chapter, and > retrieve these at the end? If so, how? > > Then, I'd like to have little inconspicuous hyperlinks from the exercise > to its solution and back. So far, I can only do this manually, as > indicated. I would prefer to have the text Exercise in the enumeration > to become a hyperlink to the corresponding solution, and vice versa for > the text Solution. > > Is there a way of doing this (or something similar)? actually in mkii there is (using symbols pointing to the companion that can be clicked) but in mkiv i didn't yet add the code for that but i will do that (we used that long ago in interactive educational documents) 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
[parent not found: <A4C3BD19-AAE4-4033-AA0E-A2C2DB586BFB@indiana.edu>]
* Re: More questions about hiding/reusing blocks [not found] ` <A4C3BD19-AAE4-4033-AA0E-A2C2DB586BFB@indiana.edu> @ 2010-01-25 0:15 ` Hans Hagen 0 siblings, 0 replies; 42+ messages in thread From: Hans Hagen @ 2010-01-25 0:15 UTC (permalink / raw) To: Matthias Weber, mailing list for ConTeXt users On 24-1-2010 18:15, Matthias Weber wrote: > On Jan 24, 2010, at 11:57 AM, Hans Hagen wrote: > > actually in mkii there is (using symbols pointing to the companion that > can be clicked) but in mkiv i didn't yet add the code for that but i > will do that (we used that long ago in interactive educational documents) > > That would be extremely cool - I am working on two long textbooks for my > students right now, and when working with them in class, > navigating through something with more than 200 pages can be painful. > > Is there any source/documentation I can look at? in mkii it's provided by the coupling directive but as we only used it ourselves for some projects it was never document (i think) in mkiv it will be named couplings: \defineenumeration [exercise] [way=bysection, text=Exercise, coupling=solution, location=hanging] \defineenumeration [solution] [text=Solution, way=bysection, coupling=exercise, location=hanging] \defineblock[exercise] \defineblock[solution] \hideblocks[solution] \setupinteraction [state=start] \starttext \section{Main Text} \subsection[subsec:1]{problem section 1} \startexercise[ex:1] Addition\index{addition} problem: $1+1=?$ (\in{solution}[sol:1]) \stopexercise \beginsolution[one] \startsolution[sol:1] Answer: 2. (\in{problem}[ex:1]) \stopsolution \endsolution \subsection[subsec:2]{problem section 2} \startexercise[ex:2] Multiplication problem: $1\times1=?$ (\in{solution}[sol:2]) \stopexercise \beginsolution[two] \startsolution[sol:2] Answer: 1. (\in{problem}[ex:2]) \stopsolution \endsolution \page \reset[solution] \section{Answers to the Problems} \subsection{Answers to \in{section}[subsec:1]} \useblocks[solution][one] \subsection{Answers to \in{section}[subsec:2]} \useblocks[solution][two] \stoptext keep in mind that this only works well (at least currently) for synchronized enumerations; also, the rendering uses symbols; more variants can be provided later (no time for that now) and the mechanism has to be more pluggable i will update a beta that provides this 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 19:46 ` Hans van der Meer 2010-01-13 20:39 ` Hans Hagen @ 2010-01-14 2:00 ` Vladimir Lomov 1 sibling, 0 replies; 42+ messages in thread From: Vladimir Lomov @ 2010-01-14 2:00 UTC (permalink / raw) To: mailing list for ConTeXt users On Wed, Jan 13, 2010 at 20:46:53 +0100, Hans van der Meer wrote: > I just became aware of the fact that a comma in a directory name like > "dir, so-and-so" is failing too. No doubt there will be others that > are allowed in those names but resist \setupexternalfigures. I guess I > will have to live with that. Though Hans might feel tempted to sort it > out once and for all..... Just small note: in POSIX (e.g. Linux) you could use any char in file or directory name expect '/' and '\0'. Windows is more restricted (why nowadays?) on char in file and directory names (not ':' for example). Now imagine what should developers do in order to maintain software for these different (in sense of names) systems? (My guess: use only plain names: only latin letters and underscope is sufficient). -- Boys, you have ALL been selected to LEAVE th' PLANET in 15 minutes!! ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 19:34 ` Hans van der Meer 2010-01-13 19:46 ` Hans van der Meer @ 2010-01-13 19:59 ` Thomas A. Schmitz 2010-01-13 20:32 ` Hans Hagen 1 sibling, 1 reply; 42+ messages in thread From: Thomas A. Schmitz @ 2010-01-13 19:59 UTC (permalink / raw) To: mailing list for ConTeXt users On Jan 13, 2010, at 8:34 PM, Hans van der Meer wrote: > Odd by the way, that so many people apparently refrain from using spaces in directory and file names, because this did not surface earlier. It can make things a lot more readable. The habit of avoiding spaces is probably a holdover from old times where OS's were much more restrictive in filenaming. I prefer to work with my computer, not against it. Whenever you want to script something or do something remotely, spaces in file names give you nothing but grief. And I don't think "My Stuff" is so much more readable than "My-Stuff" or "My_Stuff" or ... But to each their own, I guess, if you think that spaces in filenames are so 2010 and avoiding them old hat. Thomas ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: spaces in file names 2010-01-13 19:59 ` Thomas A. Schmitz @ 2010-01-13 20:32 ` Hans Hagen 0 siblings, 0 replies; 42+ messages in thread From: Hans Hagen @ 2010-01-13 20:32 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Thomas A. Schmitz On 13-1-2010 20:59, Thomas A. Schmitz wrote: > > On Jan 13, 2010, at 8:34 PM, Hans van der Meer wrote: > >> Odd by the way, that so many people apparently refrain from using spaces in directory and file names, because this did not surface earlier. It can make things a lot more readable. The habit of avoiding spaces is probably a holdover from old times where OS's were much more restrictive in filenaming. > > I prefer to work with my computer, not against it. Whenever you want to script something or do something remotely, spaces in file names give you nothing but grief. And I don't think "My Stuff" is so much more readable than "My-Stuff" or "My_Stuff" or ... But to each their own, I guess, if you think that spaces in filenames are so 2010 and avoiding them old hat. also, as nowadays guis can use proportional fonts, it's easy to oversee two spaces in a row which makes debugging a pain esp when we get graphics from third parties we need to be pretty aware of inconsistency in - upper/lowercase (and mixed) - suffixes - multiple spaces - underscores vs hyphens the problem being that in gui apps one just clicks on a (potentially messy) name but in automated flows one needs to be exact. 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 42+ messages in thread
end of thread, other threads:[~2010-01-25 0:15 UTC | newest] Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-01-13 10:51 spaces in file names Hans van der Meer 2010-01-13 10:55 ` luigi scarso 2010-01-13 11:12 ` Hans van der Meer 2010-01-13 11:16 ` luigi scarso 2010-01-13 11:26 ` Hans van der Meer 2010-01-13 11:30 ` luigi scarso 2010-01-13 11:32 ` Wolfgang Schuster 2010-01-13 11:38 ` Hans van der Meer 2010-01-13 11:42 ` Wolfgang Schuster 2010-01-13 13:23 ` Peter Rolf 2010-01-13 15:35 ` Otared Kavian 2010-01-13 16:30 ` Hans van der Meer 2010-01-13 17:59 ` Hans Hagen 2010-01-13 19:34 ` Hans van der Meer 2010-01-13 19:46 ` Hans van der Meer 2010-01-13 20:39 ` Hans Hagen 2010-01-14 20:16 ` Text backgrounds once again Matthias Weber 2010-01-14 20:55 ` Text backgrounds once again (follow-up) Matthias Weber 2010-01-14 21:39 ` Willi Egger 2010-01-14 21:45 ` Matthias Weber 2010-01-14 22:15 ` Aditya Mahajan 2010-01-15 12:58 ` Matthias Weber 2010-01-14 21:48 ` NOT reusing figures Matthias Weber 2010-01-14 22:36 ` Hans Hagen 2010-01-15 0:58 ` Matthias Weber 2010-01-15 15:26 ` reusing figures ok - problem with hiding blocks in MKIV Matthias Weber 2010-01-18 9:00 ` Hans Hagen 2010-01-22 15:19 ` More questions about hiding/reusing blocks Matthias Weber 2010-01-22 15:55 ` Calligraphic letters in Mark IV Matthias Weber 2010-01-22 17:29 ` Hans Hagen 2010-01-22 17:49 ` Matthias Weber 2010-01-22 17:53 ` Wolfgang Schuster 2010-01-22 18:14 ` Matthias Weber 2010-01-22 18:20 ` Wolfgang Schuster 2010-01-24 13:34 ` Hans Hagen 2010-01-24 21:17 ` Aditya Mahajan 2010-01-24 22:45 ` Hans Hagen 2010-01-24 16:57 ` More questions about hiding/reusing blocks Hans Hagen [not found] ` <A4C3BD19-AAE4-4033-AA0E-A2C2DB586BFB@indiana.edu> 2010-01-25 0:15 ` Hans Hagen 2010-01-14 2:00 ` spaces in file names Vladimir Lomov 2010-01-13 19:59 ` Thomas A. Schmitz 2010-01-13 20:32 ` Hans Hagen
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).