Re: [NTG-context] nested itemize
Hi Mickael, If you put a blank line after \item, or an empty grouping everything works fine. I think the reason for the behavior may be that \item expects something after you invok eit and it doesn’t know what to do with the scond \startitemize. %%% begin example \starttext \startitemize[n] \item {} \startitemize[a] \item Hello \item Good bye \stopitemize \stopitemize \startitemize[n] \item \startitemize[a] \item Hello \item Good bye \stopitemize \stopitemize \stoptext %%% end example Best regards: OK On 28 Nov 2014, at 19:01, Mikael P. Sundqvist mic...@gmail.com wrote: The following code (using latest minimals) \starttext \startitemize[n] \item FOO \startitemize[a] \item Hello \item Good bye \stopitemize \stopitemize \startitemize[n] \item \startitemize[a] \item Hello \item Good bye \stopitemize \stopitemize \stoptext gives the attached pdf file, i.e. the second nested list is cut. Has something changed (I've been able to use nested lists before without having to use FOO or something inbetwen (as in the first example)? I tried to reinstall, but the same problem appeared again. Best regards, Mikael listor.pdflistor.log___ 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 ___
[NTG-context] How does \setupfloat work?
I'm trying to set a default width for figures with \setupfloat. However, the command doesn't seem to be picking up the width specification, even though the manual indicates it accepts a width= argument: \setupfloat[figure][width=2cm] \starttext \placefigure{}{\externalfigure[picture.png]} \stoptext picture.png just gets inserted at its native size, rather than scaled to have the specified width. What am I doing wrong? (setting minwidth and/or maxwidth doesn't seem to work either) Thanks in advance for any assistance. Mark ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] How does \setupfloat work?
On 11/29/2014 10:49 AM, Mark Szepieniec wrote: I'm trying to set a default width for figures with \setupfloat. However, the command doesn't seem to be picking up the width specification, even though the manual indicates it accepts a width= argument: \setupfloat[figure][width=2cm] \starttext \placefigure{}{\externalfigure[picture.png]} \stoptext just \placefigure{}{\externalfigure[picture.png][width=2cm]} picture.png just gets inserted at its native size, rather than scaled to have the specified width. What am I doing wrong? (setting minwidth and/or maxwidth doesn't seem to work either) Thanks in advance for any assistance. Mark ___ 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 ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 ___
Re: [NTG-context] nested itemize
On 11/28/2014 7:01 PM, Mikael P. Sundqvist wrote: The following code (using latest minimals) \starttext \startitemize[n] \item FOO \startitemize[a] \item Hello \item Good bye \stopitemize \stopitemize \startitemize[n] \item \startitemize[a] \item Hello \item Good bye \stopitemize \stopitemize \stoptext gives the attached pdf file, i.e. the second nested list is cut. Has something changed (I've been able to use nested lists before without having to use FOO or something inbetwen (as in the first example)? I tried to reinstall, but the same problem appeared again. a bug indeed ... very nasty code (kind of fight between mechanisms deep down in luatex) ... i'll try to fix it - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 ___
Re: [NTG-context] How does \setupfloat work?
On Sat, Nov 29, 2014 at 11:03 AM, Hans Hagen pra...@wxs.nl wrote: On 11/29/2014 10:49 AM, Mark Szepieniec wrote: I'm trying to set a default width for figures with \setupfloat. However, the command doesn't seem to be picking up the width specification, even though the manual indicates it accepts a width= argument: \setupfloat[figure][width=2cm] \starttext \placefigure{}{\externalfigure[picture.png]} \stoptext just \placefigure{}{\externalfigure[picture.png][width=2cm]} picture.png just gets inserted at its native size, rather than scaled to have the specified width. What am I doing wrong? (setting minwidth and/or maxwidth doesn't seem to work either) Thanks in advance for any assistance. Mark ___ 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 ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 ___ Sorry, I should have mentioned I was able to work around it by doing exactly that, but I'd rather not have to edit all the \placefigure instances if I decide to change the width. Also I'd like to use a different default width for graphics, so \setupexternalfigures[width=XXXcm] wouldn't work well either. I realize I could define my own macros or something to solve this, but I'm just puzzled that setting width in \setupfloat[figure] doesn't work. Am I reading the manual wrong, or is is just not implemented yet or something? (honest question) Thanks for your response, Mark ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] nested itemize
On Sat, Nov 29, 2014 at 11:04 AM, Hans Hagen pra...@wxs.nl wrote: On 11/28/2014 7:01 PM, Mikael P. Sundqvist wrote: The following code (using latest minimals) \starttext \startitemize[n] \item FOO \startitemize[a] \item Hello \item Good bye \stopitemize \stopitemize \startitemize[n] \item \startitemize[a] \item Hello \item Good bye \stopitemize \stopitemize \stoptext gives the attached pdf file, i.e. the second nested list is cut. Has something changed (I've been able to use nested lists before without having to use FOO or something inbetwen (as in the first example)? I tried to reinstall, but the same problem appeared again. a bug indeed ... very nasty code (kind of fight between mechanisms deep down in luatex) ... i'll try to fix it - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 ___ Thank you, I hope it is fixable :) To Otared: Thank you also for replying. Your code indeed compiles, but the nested itemize starts on a new line, i.e. 1 a instead of 1 a as expected. /Mikael ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] nested itemize
On 11/29/2014 11:43 AM, Mikael P. Sundqvist wrote: On Sat, Nov 29, 2014 at 11:04 AM, Hans Hagen pra...@wxs.nl wrote: On 11/28/2014 7:01 PM, Mikael P. Sundqvist wrote: The following code (using latest minimals) \starttext \startitemize[n] \item FOO \startitemize[a] \item Hello \item Good bye \stopitemize \stopitemize \startitemize[n] \item \startitemize[a] \item Hello \item Good bye \stopitemize \stopitemize \stoptext gives the attached pdf file, i.e. the second nested list is cut. Has something changed (I've been able to use nested lists before without having to use FOO or something inbetwen (as in the first example)? I tried to reinstall, but the same problem appeared again. a bug indeed ... very nasty code (kind of fight between mechanisms deep down in luatex) ... i'll try to fix it - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 ___ Thank you, I hope it is fixable :) lots of trial and error .. it should work ok for non standard lineheights too -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 ___
Re: [NTG-context] How does \setupfloat work?
On 29 Nov 2014, at 11:49 , Mark Szepieniec mszep...@gmail.com wrote Sorry, I should have mentioned I was able to work around it by doing exactly that, but I'd rather not have to edit all the \placefigure instances if I decide to change the width. Also I'd like to use a different default width for graphics, so \setupexternalfigures[width=XXXcm] wouldn't work well either. I realize I could define my own macros or something to solve this, but I'm just puzzled that setting width in \setupfloat[figure] doesn't work. Am I reading the manual wrong, or is is just not implemented yet or something? (honest question) Hi Mark, What I would probably do (again) is: 1 leave out the float dimension from the setup and use something like \definefloat[figure][figures] \setupfloat[figure][location=,spacebefore=,spaceafter=,sidespacebefore=,sidespaceafter=] or whatever you want in this respect 2 collect in a separate .tex-file, to be input in your document .tex-file, all figure-data in the form \useexternalfigure[Fig1][YourFigure1.png][width=.x\textwidth]% etc If you want a different uniform figure width you can then easily replace ijn this file all width=.x\textwidth by width=.y\textwidth. 3 In your document .tex-file use \placefigure[here][Fig1]{Title} {\externalfigure[Fig1]} This will probably give you optimal flexibility. I hope it helps. Best regards, Robert Blackstone ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] How does \setupfloat work?
On Sat, Nov 29, 2014 at 11:03 AM, Hans Hagen pra...@wxs.nl wrote: On 11/29/2014 10:49 AM, Mark Szepieniec wrote: I'm trying to set a default width for figures with \setupfloat. However, the command doesn't seem to be picking up the width specification, even though the manual indicates it accepts a width= argument: \setupfloat[figure][width=2cm] \starttext \placefigure{}{\externalfigure[picture.png]} \stoptext just \placefigure{}{\externalfigure[picture.png][width=2cm]} picture.png just gets inserted at its native size, rather than scaled to have the specified width. What am I doing wrong? (setting minwidth and/or maxwidth doesn't seem to work either) Thanks in advance for any assistance. Mark Sorry, I should have mentioned I was able to work around it by doing exactly that, but I'd rather not have to edit all the \placefigure instances if I decide to change the width. Also I'd like to use a different default width for graphics, so \setupexternalfigures[width=XXXcm] wouldn't work well either. I realize I could define my own macros or something to solve this, but I'm just puzzled that setting width in \setupfloat[figure] doesn't work. Am I reading the manual wrong, or is is just not implemented yet or something? (honest question) Thanks for your response, Mark Hi Mark, You can use \defineexternalfigure as in the following example. \defineexternalfigure[whatever][width=2cm] \starttext \placefigure{}{\externalfigure[picture.png][whatever]} \stoptext See also http://wiki.contextgarden.net/Floating_Objects Christoph ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] How does \setupfloat work?
On Sat, Nov 29, 2014 at 8:22 PM, Christoph Reller christoph.rel...@gmail.com wrote: On Sat, Nov 29, 2014 at 11:03 AM, Hans Hagen pra...@wxs.nl wrote: On 11/29/2014 10:49 AM, Mark Szepieniec wrote: I'm trying to set a default width for figures with \setupfloat. However, the command doesn't seem to be picking up the width specification, even though the manual indicates it accepts a width= argument: \setupfloat[figure][width=2cm] \starttext \placefigure{}{\externalfigure[picture.png]} \stoptext just \placefigure{}{\externalfigure[picture.png][width=2cm]} picture.png just gets inserted at its native size, rather than scaled to have the specified width. What am I doing wrong? (setting minwidth and/or maxwidth doesn't seem to work either) Thanks in advance for any assistance. Mark Sorry, I should have mentioned I was able to work around it by doing exactly that, but I'd rather not have to edit all the \placefigure instances if I decide to change the width. Also I'd like to use a different default width for graphics, so \setupexternalfigures[width=XXXcm] wouldn't work well either. I realize I could define my own macros or something to solve this, but I'm just puzzled that setting width in \setupfloat[figure] doesn't work. Am I reading the manual wrong, or is is just not implemented yet or something? (honest question) Thanks for your response, Mark Hi Mark, You can use \defineexternalfigure as in the following example. \defineexternalfigure[whatever][width=2cm] \starttext \placefigure{}{\externalfigure[picture.png][whatever]} \stoptext See also http://wiki.contextgarden.net/Floating_Objects Christoph Thanks all for your responses. \defineexternalfigure looks like it does something very close to what I wanted. Googling it brought me to a mailing list thread where a question similar to mine was asked, so for future reference: http://www.ntg.nl/pipermail/ntg-context/2012/069446.html. So I guess my problem is resolved, but I'd still like to understand better why my earlier solution of doing \setupfloat[figure][width=2cm] didn't set a default for later instances of \placefigure. I feel like I might be missing some aspect of the ConTeXt philosophy, or I'm misreading the manual, or it's just a bug...? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] How does \setupfloat work?
On Sat, 29 Nov 2014, Mark Szepieniec wrote: So I guess my problem is resolved, but I'd still like to understand better why my earlier solution of doing \setupfloat[figure][width=2cm] didn't set a default for later instances of \placefigure. I feel like I might be missing some aspect of the ConTeXt philosophy, or I'm misreading the manual, or it's just a bug...? \setupfloat[figure] sets the values of \startplacefigure (and \placefigure), and not for \externalfigure. The width value for startplacefigure is not used anywhere. The default value of \setupfloats[width=...] is used when the float box is empty. So, the only scenario where the value of \setupfloats[width=...] will matter is the following: \starttext \setupfloats[width=2cm] \placefloat{}{} \setupfloats[width=10cm] \placefloat{}{} \stoptext Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] How does \setupfloat work?
On Sun, Nov 30, 2014 at 12:48 AM, Aditya Mahajan adit...@umich.edu wrote: On Sat, 29 Nov 2014, Mark Szepieniec wrote: So I guess my problem is resolved, but I'd still like to understand better why my earlier solution of doing \setupfloat[figure][width=2cm] didn't set a default for later instances of \placefigure. I feel like I might be missing some aspect of the ConTeXt philosophy, or I'm misreading the manual, or it's just a bug...? \setupfloat[figure] sets the values of \startplacefigure (and \placefigure), and not for \externalfigure. The width value for startplacefigure is not used anywhere. The default value of \setupfloats[width=...] is used when the float box is empty. So, the only scenario where the value of \setupfloats[width=...] will matter is the following: \starttext \setupfloats[width=2cm] \placefloat{}{} \setupfloats[width=10cm] \placefloat{}{} \stoptext Aditya Thanks Aditya, that's very helpful and things make more sense now. Is this stuff documented somewhere or did you consult the source code? ___ 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 ___