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
On Wed, Jan 13, 2010 at 11:51 AM, Hans van der Meer
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
On 13 jan 2010, at 11:55, luigi scarso wrote:
On Wed, Jan 13, 2010 at 11:51 AM, 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
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.
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. :-(
On Wed, Jan 13, 2010 at 12:12 PM, Hans van der Meer
On 13 jan 2010, at 12:16, luigi scarso wrote:
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. :-(
On Wed, Jan 13, 2010 at 12:12 PM, Hans van der Meer
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
On Wed, Jan 13, 2010 at 12:26 PM, Hans van der Meer
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
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
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
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 ___________________________________________________________________________________
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
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
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 -----------------------------------------------------------------
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 -----------------------------------------------------------------
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 ___________________________________________________________________________________
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 -----------------------------------------------------------------
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!
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
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 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 ______________________________________________________________________ _____________
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
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 ___________________________________________________________________________________
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
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 ___________________________________________________________________________________
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
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 -----------------------------------------------------------------
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 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 ___________________________________________________________________________________
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
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 -----------------------------------------------------------------
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
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
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 -----------------------------------------------------------------
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 ___________________________________________________________________________________
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
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 ___________________________________________________________________________________
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
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 -----------------------------------------------------------------
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
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 -----------------------------------------------------------------
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 -----------------------------------------------------------------
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!!
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
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 -----------------------------------------------------------------
participants (11)
-
Aditya Mahajan
-
Hans Hagen
-
Hans van der Meer
-
luigi scarso
-
Matthias Weber
-
Otared Kavian
-
Peter Rolf
-
Thomas A. Schmitz
-
Vladimir Lomov
-
Willi Egger
-
Wolfgang Schuster