Re: [NTG-context] Margin definition trouble.
On 5/20/06, Johannes Graumann wrote: Mojca Miklavec wrote: Margin as the dimension parameter in \setuplayout is not the distance between text and the border, but the width of an auxiliary field on the left and right (chech the command above to see those fields). Thanks for pointing out my folly. I did some more digging in the ConTeXtgarden and came up with the following: \setuplayout[ topspace=1in, % the space at the very top of the page backspace=1.5in, % the space in the left hand side of the page cutspace=1in, % the space on the right hand side of the page bottomspace=1in, footer=0in ] This gets me significantly closer to where I need to be, but the right edge is more at 15/16 than at 1 in and the bottom one more at 17/16. How do you measure it? If I turn on the grid in Adobe Acrobat and use 6400% zoom, the lines are just there where they are supposed to be. (Unless maybe the bottom line since you have to consider the depth of that line as well.) Any hints on how to get it even closer? Did you use width=fit and height=fit? They are not automatically applied. Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] figure directory is sort of searched
The figure searching code gets confused if a file of the same basename (but in a different directory) has already been loaded. Here is a minimal min.tex to show what I mean: \starttext \setupexternalfigures[directory={1}] \placefigure[here][ch1fig]{should be 1/fig-1.pdf}{\externalfigure[fig-1.pdf]} \setupexternalfigures[directory={2}] \placefigure[here][ch2fig1]{should be 2/fig-1.pdf}{\externalfigure[fig-1.pdf]} \placefigure[here][ch2fig2]{should be 2/fig-2.pdf}{\externalfigure[fig-2.pdf]} \stoptext Probably it's a silly idea to use \setupexternalfigures within the body, but the same problem happens when using components (where each component's preamble has a similar line), where it makes more sense. Here is the directory structure (all the files are attached as a .tgz): min.tex 1/fig-1.pdf 2/fig-1.pdf 2/fig-2.pdf The final (third) figure is correctly found as 2/fig-2.pdf. But the second figure is reused from 1/fig-1.pdf because another fig-1.pdf has already been found: as 1/fig-1.pdf. Here is the relevant bit from the texexec output: ./1/fig-1.pdf figures : dimensions of 1/fig-1.pdf loaded from figurefile itself (./min.tuo) (/home/sanjoy/texmf/tex/context/base/pdfr-ec.tex) floatblocks : 1 placed figures : figureobject fig-1.pdf is reused = The problem?? floatblocks : 2 placed ./2/fig-2.pdf figures : dimensions of 2/fig-2.pdf loaded from figurefile itself floatblocks : 3 placed One part of ConTeXt does know the right figure path. A \getfiguredimensions[fig-1.pdf] after the second \placefigure will trigger a kpathsea search for 2/fig-1.pdf, which it finds. But it still loads 1/fig-1.pdf, which is why I've said 'sort of searched' in the subject line. -Sanjoy searching.tgz Description: test files ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Text style in bookmarks
Hello, Is there a trick so that I can put styles like {\bf ...} or {\tt ...} in the headings without having any weird text in the bookmarks? Adding \bf or \tt as empty macros to the simplifiedcommands doesn't avoid the curly braces to appear (which is normal). Do I need to use something like \def\textbf#1{\def\textbf#1{\bgroup\bf #1\egroup} to have this working? Thanks for any hint. Regards, BG ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Text style in bookmarks
Hi Nico, Provided I understnad you correctly, then you could play with code as: \setuphead [chapter] [style=\sca, after={\blank[3*big]}, number=no, alternative=middle, textstyle=\sca] \setuplist [contents] [sectionnumber=no, style=normal, textstyle=normal, pagestyle=normal, numberstyle=bold] kind regards Willi nico wrote: Hello, Is there a trick so that I can put styles like {\bf ...} or {\tt ...} in the headings without having any weird text in the bookmarks? Adding \bf or \tt as empty macros to the simplifiedcommands doesn't avoid the curly braces to appear (which is normal). Do I need to use something like \def\textbf#1{\def\textbf#1{\bgroup\bf #1\egroup} to have this working? Thanks for any hint. Regards, BG ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Text style in bookmarks
Hi Willi, On Sat, 20 May 2006 20:14:30 +0200, Willi Egger [EMAIL PROTECTED] wrote: Provided I understnad you correctly, then you could play with code as: \setuphead Thanks, but it is not a global heading style I look for, but the ability to do things like this: \section{This {\tt file} {\em is} {\bf quite important}} So that it appears This file is quite important in the bookmark, instead of This {file} {is} {quite important}. Regards, BG ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Margin definition trouble.
Mojca Miklavec wrote: Did you use width=fit and height=fit? They are not automatically applied. Thanks, Fixed now. Joh ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Text style in bookmarks
nico wrote: Hi Willi, On Sat, 20 May 2006 20:14:30 +0200, Willi Egger [EMAIL PROTECTED] wrote: Provided I understnad you correctly, then you could play with code as: \setuphead Thanks, but it is not a global heading style I look for, but the ability to do things like this: \section{This {\tt file} {\em is} {\bf quite important}} So that it appears This file is quite important in the bookmark, instead of This {file} {is} {quite important}. Hehe - may be first time I can help ;0) Recently I asked for something similar: how to get a short version of a figure caption into the List of Figures while maintaining the long version in the actual caption. As a solution Hans came up with the 'selector' feature below (not sure wheather the last release has it yet). Look in the archive ... If I understand you correctly this may be applicable to your problem. Joh % % Float definitions % % % Define selectors for short caption versions (Hans Hagen) %% \unprotect % let's reuse this one in selectors (from syst-ext) \def\dofilterfromstr#1#2% max n {\ifcase#1\or \ifcase#2\or \strippedcsname\firstofoneargument \else \strippedcsname\gobbleoneargument \fi \or \ifcase#2\or \strippedcsname\firstoftwoarguments \or \strippedcsname\secondoftwoarguments \else \strippedcsname\gobbletwoarguments \fi \or \ifcase#2\or \strippedcsname\firstofthreearguments \or \strippedcsname\secondofthreearguments \or \strippedcsname\thirdofthreearguments \else \strippedcsname\gobblethreearguments \fi \or \ifcase#2\or \strippedcsname\firstoffourarguments \or \strippedcsname\secondoffourarguments \or \strippedcsname\thirdoffourarguments \or \strippedcsname\fourthoffourarguments \else \strippedcsname\gobblefourarguments \fi \or \ifcase#2\or \strippedcsname\firstoffivearguments \or \strippedcsname\secondoffivearguments \or \strippedcsname\thirdoffivearguments \or \strippedcsname\fourthoffivearguments \or \strippedcsname\fifthoffivearguments \else \strippedcsname\gobblefivearguments \fi \fi} \def\filterfromvalue#1#2#3% value max n [EMAIL PROTECTED]@EAEAEA\csname % we use the fact that an [EMAIL PROTECTED] % undefined cs has become \relax \strippedcsname\gobbleoneargument % which we then gobble here \else \dofilterfromstr{#2}{#3}% \fi \endcsname\csname#1\endcsname} \def\filterfromnext#1#2% max n {..}{..}{..}{..} {\csname\dofilterfromstr{#1}{#2}\endcsname} % new, selectors \definesystemvariable{sx} \def\defineselector{\dodoubleargument\dodefineselector} \def\setupselector {\dodoubleargument\dosetupselector} \def\dodefineselector[#1][#2]{\getparameters[\??sx#1][\c!max=2,\c!n=1,#2]} \def\dosetupselector [#1][#2]{\getparameters[\??sx#1][#2]} \unexpanded\def\select#1% {\filterfromnext {\executeifdefined{\??sx#1\c!max}1} {\executeifdefined{\??sx#1\c!n }1}} \protect % Define the caption selector \defineselector[caption][max=2,n=2] % Format captions % \setupcaptions[style={\switchtobodyfont[small]\setupinterlinespace[line=2.8ex]},width=\textwidth] \setupcaption[table][location=top] % Setup List Of Figures %%% \defineXMLargument [listoffigures] { \start \setupselector[caption][n=1] \completelistoffigures[criterium=text] %\writetolist[chapter]{Figures}{} \stop } % in the text: \placefigure {\select{caption}{shortcaption}{Longcaption}} ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Math encoding in XeTeX
Hi, With ConTeXt and pdfTeX you can use \enableregime[utf] (utf8 encoding) with normal mode and math mode (no need to write \pm, \alpha or \times). But with ConTeXt and XeTeX you don't have to specify utf8 regime, because XeTeX can read utf8 directly. However, math mode in XeTeX is a different story ( 256 character tfm's are needed and so, and the encoding has to be ascii, so you have to write \pm, and ± doesn't work). It would be nice if utf8 regime (using uni-xxx files) could be enabled only for math mode when using XeTeX, and so you would be able to input unicode characters in all modes (normal and math). Thanks in advance, Ricard Roca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Math encoding in XeTeX
On 5/21/06, Mojca Miklavec wrote: According to one of the recent threads you can most probably do I'm sorry for not being precise enough, the thread was on the XeTeX mailing list, not here. (How to use EC font encoding in XeTeX?) Mojca PS: I would vote for better support of encodings (Type1 fonts) in XeTeX, but I doubt that doing things without active characters can be as good as it is now in ConTeXt+pdfTeX. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Math encoding in XeTeX
On 5/21/06, Ricard Roca wrote: Hi, With ConTeXt and pdfTeX you can use \enableregime[utf] (utf8 encoding) with normal mode and math mode (no need to write \pm, \alpha or \times). But with ConTeXt and XeTeX you don't have to specify utf8 regime, because XeTeX can read utf8 directly. However, math mode in XeTeX is a different story ( 256 character tfm's are needed and so, and the encoding has to be ascii, so you have to write \pm, and ± doesn't work). It would be nice if utf8 regime (using uni-xxx files) could be enabled only for math mode when using XeTeX, and so you would be able to input unicode characters in all modes (normal and math). According to one of the recent threads you can most probably do something like this (I have to reboot first to try it out): \catcode±=\active \def±{\pm} There are actually two possibilities: 1. define a whole lot of active characters in the spirit of the above definition, then ConTeXt will render them OK (a matter of a slight redefinition of \enableregime macro or perhaps an additional macro to switch this option on or off) 2. better support for non-OpenType fonts in XeTeX. XeTeX currently does a very good job with OpenType. I guess that it would be doable that someone would tell to XeTeX which glyphs are present in a certain font/encoding (partially it could guess that alone) and then things could happen automatically even without defining active characters. (or a mixture of both) Also, ConTeXt can fake many characters if they are not present in the font. Without defining active characters this isn't possible since ConTeXt never sees them. Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context