Re: [NTG-context] Aligning subsection head with following paragraph in tagged pdf output
Hello everyone, Thanks to all who helped me better understand the issues surrounding my question. The document style I am following requires that the first three headings are included in the table of contents. Headings one and two are easy, as they stand on lines by themself. Heading three must be aligned with the left margin in bold and followed by a period. The rest of the paragraph or paragraphs folllow. This style makes sense visually, bold text at the margin represents a change in topic. less so when reading or editing with audio output (My computer does not have a monitor attached.) Using good sectioning allows one to fold the document for navigation and organization. Consider how Org-mode in Emacs works as an analogue. I started thinking that life would be easier if heading level 3 sections could be both structural, for navigation, and visual, inline with their first paragraph. This idea holds true both in source text and in the pdf output. Properly tagged pdf documents allow one to jump by structural elements (heading to heading, paragraph to paragraph. In a perfect world one could have it both ways: a structural element like a section, but placed inline as though it were just another layout token. The audio using tagged structure indicates a topic change, while those using their eyes just see the bold text. Hopefully this short explanation adequately describes my reason for addressing the list. Thank you, Todd ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Greek word sorting
Hans, I have the following source: \mainlanguage[agr] \setupbodyfont[dejavu] \defineregister[indexgr][indexgrs] \setupregister[indexgr][pagenumber=no, balance=yes] \define[1]\grcindx{#1\index{#1}\indexgr{#1}} \setupregisters[n=3, pagenumber=no, method=default] \setupregister[index][language=grc] \setupregister[indexgr][language=gr] \starttext \grcindx{ἀδικία} \grcindx{ῥόδον} \grcindx{ρῶ } \grcindx{Ῥαδίον} \grcindx{αὐτοῦ} \grcindx{αὐτός} \grcindx{αὑτοῦ} \grcindx{αὐτός} \grcindx{Ἀφροδιτή} \grcindx{Ἁμαρτία} \grcindx{Αὐτός} \grcindx{πάντα} \grcindx{δὲ} \grcindx{δέ} \grcindx{δ’} \grcindx{σ} \grcindx{ς} \grcindx{Παυσανίας} \grcindx{Παυσανίας} \section{Improved} \placeindex \section{Default} \placeregister[indexgr] \stoptext Just for the sake of testing, I added the following sorting language to sort-lang.lua: 8<- definitions["grc"] = { replacements = { { "α", "α" }, { "ά", "α" }, { "ὰ", "α" }, { "ὰ", "α" }, { "ᾳ", "α" }, { "ἀ", "α" }, { "ἁ", "α" }, { "ἄ", "α" }, { "ἂ", "α" }, { "ἆ", "α" }, { "ἁ", "α" }, { "ἅ", "α" }, { "ἃ", "α" }, { "ἇ", "α" }, { "ᾁ", "α" }, { "ᾴ", "α" }, { "ᾲ", "α" }, { "ᾷ", "α" }, { "ᾄ", "α" }, { "ὰ", "α" }, { "ᾅ", "α" }, { "ᾃ", "α" }, { "ᾆ", "α" }, { "ᾇ", "α" }, { "ε", "ε" }, { "έ", "ε" }, { "ὲ", "ε" }, { "ἐ", "ε" }, { "ἔ", "ε" }, { "ἒ", "ε" }, { "ἑ", "ε" }, { "ἕ", "ε" }, { "ἓ", "ε" }, { "η", "η" }, { "η", "η" }, { "ή", "η" }, { "ὴ", "η" }, { "ῆ", "η" }, { "ῃ", "η" }, { "ἠ", "η" }, { "ἤ", "η" }, { "ἢ", "η" }, { "ἦ", "η" }, { "ᾐ", "η" }, { "ἡ", "η" }, { "ἥ", "η" }, { "ἣ", "η" }, { "ἧ", "η" }, { "ᾑ", "η" }, { "ῄ", "η" }, { "ῂ", "η" }, { "ῇ", "η" }, { "ᾔ", "η" }, { "ᾒ", "η" }, { "ᾕ", "η" }, { "ᾓ", "η" }, { "ᾖ", "η" }, { "ᾗ", "η" }, { "ι", "ι" }, { "ί", "ι" }, { "ὶ", "ι" }, { "ῖ", "ι" }, { "ἰ", "ι" }, { "ἴ", "ι" }, { "ἲ", "ι" }, { "ἶ", "ι" }, { "ἱ", "ι" }, { "ἵ", "ι" }, { "ἳ", "ι" }, { "ἷ", "ι" }, { "ϊ", "ι" }, { "ΐ", "ι" }, { "ῒ", "ι" }, { "ῗ", "ι" }, { "ο", "ο" }, { "ό", "ο" }, { "ὸ", "ο" }, { "ὀ", "ο" }, { "ὄ", "ο" }, { "ὂ", "ο" }, { "ὁ", "ο" }, { "ὅ", "ο" }, { "ὃ", "ο" }, { "ρ", "ρ" }, { "ῤ", "ρ" }, { "ῥ", "ρ" }, { "υ", "υ" }, { "ύ", "υ" }, { "ὺ", "υ" }, { "ῦ", "υ" }, { "ὐ", "υ" }, { "ὔ", "υ" }, { "ὒ", "υ" }, { "ὖ", "υ" }, { "ὑ", "υ" }, { "ὕ", "υ" }, { "ὓ", "υ" }, { "ὗ", "υ" }, { "ϋ", "υ" }, { "ΰ", "υ" }, { "ῢ", "υ" }, { "ω", "ω" }, { "ώ", "ω" }, { "ὼ", "ω" }, { "ῶ", "ω" }, { "ῳ", "ω" }, { "ὠ", "ω" }, { "ὤ", "ω" }, { "ὢ", "ω" }, { "ὦ", "ω" }, { "ᾠ", "ω" }, { "ὡ", "ω" }, { "ὥ", "ω" }, { "ὣ", "ω" }, { "ὧ", "ω" }, { "ᾡ", "ω" }, { "ῴ", "ω" }, { "ῲ", "ω" }, { "ῷ", "ω" }, { "ᾤ", "ω" }, { "ᾢ", "ω" }, { "ᾥ", "ω" }, { "ᾣ", "ω" }, { "ᾦ", "ω" }, { "ᾧ", "ω" }, { "Α", "α" }, { "Ά", "α" }, { "Ὰ", "α" }, { "Ὰ", "α" }, { "ΑΙ", "α" }, { "Ἀ", "α" }, { "Ἁ", "α" }, { "Ἄ", "α" }, { "Ἂ", "α" }, { "Ἆ", "α" }, { "Ἁ", "α" }, { "Ἅ", "α" }, { "Ἃ", "α" }, { "Ἇ", "α" }, { "ἉΙ", "α" }, { "ΆΙ", "α" }, { "ᾺΙ", "α" }, { "Α͂Ι", "α" }, { "ἌΙ", "α" }, { "Ὰ", "α" }, { "ἍΙ", "α" }, { "ἋΙ", "α" }, { "ἎΙ", "α" }, { "ἏΙ", "α" }, { "Ε", "ε" }, { "Έ", "ε" }, { "Ὲ", "ε" }, { "Ἐ", "ε" }, { "Ἔ", "ε" }, { "Ἒ", "ε" }, { "Ἑ", "ε" }, { "Ἕ", "ε" }, { "Ἓ", "ε" }, { "Η", "η" }, { "Η", "η" }, { "Ή", "η" }, { "Ὴ", "η" }, { "Η͂", "η" }, { "ΗΙ", "η" }, { "Ἠ", "η" }, { "Ἤ", "η" }, { "Ἢ", "η" }, { "Ἦ", "η" }, { "ἨΙ", "η" }, { "Ἡ", "η" }, { "Ἥ", "η" }, { "Ἣ", "η" }, { "Ἧ", "η" }, { "ἩΙ", "η" }, { "ΉΙ", "η" }, { "ῊΙ", "η" }, { "Η͂Ι", "η" }, { "ἬΙ", "η" }, { "ἪΙ", "η" }, { "ἭΙ", "η" }, { "ἫΙ", "η" }, { "ἮΙ", "η" }, { "ἯΙ", "η" }, { "Ι", "ι" }, { "Ί", "ι" }, { "Ὶ", "ι" }, { "Ι͂", "ι" }, { "Ἰ", "ι" }, { "Ἴ", "ι" }, { "Ἲ", "ι" }, { "Ἶ", "ι" }, { "Ἱ", "ι" }, { "Ἵ", "ι" }, { "Ἳ", "ι" }, { "Ἷ", "ι" }, { "Ϊ", "ι" }, { "Ϊ́", "ι" }, { "Ϊ̀", "ι" }, { "Ϊ͂", "ι" }, { "Ο", "ο" }, { "Ό", "ο" }, { "Ὸ", "ο" }, { "Ὀ", "ο" }, { "Ὄ", "ο" }, { "Ὂ", "ο" }, { "Ὁ", "ο" }, { "Ὅ", "ο" }, { "Ὃ", "ο" }, { "Ρ", "ρ" }, { "Ρ̓", "ρ" }, { "Ῥ", "ρ" }, { "Υ", "υ" }, { "Ύ", "υ" }, { "Ὺ", "υ" }, { "Υ͂", "υ" }, { "Υ̓", "υ" }, { "Υ̓́", "υ" }, { "Υ̓̀", "υ" }, { "Υ̓͂", "υ" }, { "Ὑ", "υ" }, { "Ὕ", "υ" }, { "Ὓ", "υ" }, { "Ὗ", "υ" }, { "Ϋ", "υ" }, { "Ϋ́", "υ" }, { "Ϋ̀", "υ" }, { "Ω", "ω" }, { "Ώ", "ω" }, { "Ὼ", "ω" }, { "Ω͂", "ω" }, { "ΩΙ", "ω" }, { "Ὠ", "ω" }, { "Ὤ", "ω" }, { "Ὢ", "ω" }, { "Ὦ", "ω" }, { "ὨΙ", "ω" }, { "Ὡ", "ω" }, { "Ὥ", "ω" }, { "Ὣ", "ω" }, { "Ὧ", "ω" }, { "ὩΙ", "ω" }, { "ΏΙ", "ω" }, { "ῺΙ", "ω" }, { "Ω͂Ι", "ω" }, { "ὬΙ", "ω" }, { "ὪΙ", "ω" }, { "ὭΙ", "ω" }, { "ὫΙ", "ω" }, { "ὮΙ", "ω" }, { "ὯΙ", "ω"
Re: [NTG-context] ConTeXt not finding fonts in OSFONTDIR
On 04/02/2017 12:37 AM, Alan Bowen wrote: > Thanks, Pablo: > > I have revised the line in my bash profile to read > export OSFONTDIR=/Users/bowen1/Library/Fonts/ > and the problem persists—assuming that I have the absolute path correct. Sorry, add another slash to to the final slash and put inside quotes, such as in: export OSFONTDIR="/Users/bowen1/Library/Fonts//" > As for adding the path at the end of tex/setuptex, I do not know how to > do this. I see in setuptex.csh that this is a TODO. Open tex/setuptext, go to the end of the file, hit Enter twice and copy the line above. Now it comes the unorthodox part: remove tex/texmf-cache/luatex-cache/. Run "source tex/setuptex" and "mtxrunjit --generate". After that, compuile the ConTeXt source file you want. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] ConTeXt not finding fonts in OSFONTDIR
Thanks, Pablo: I have revised the line in my bash profile to read export OSFONTDIR=/Users/bowen1/Library/Fonts/ and the problem persists—assuming that I have the absolute path correct. As for adding the path at the end of tex/setuptex, I do not know how to do this. I see in setuptex.csh that this is a TODO. Alan On Sat, Apr 1, 2017 at 5:49 PM, Pablo Rodriguezwrote: > On 04/01/2017 11:17 PM, Alan Bowen wrote: > > ConTeXT does not seem to be finding the fonts that I have in my > > OSFONTDIR, which is set in my .bash_profile by the line > > export OSFONTDIR=./Users/bowen1/Library/Fonts/ > > Alan, > > I see two issues with your font directory. > > 1. The initial point in the path sets a relative path. > >I guess you have to remove it to have an absolute path. > > 2. How about adding the path at the end of tex/setuptex? > > Just in case it helps, > > Pablo > -- > http://www.ousia.tk > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/ > listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] understanding index sorting
On 04/01/2017 10:51 PM, Rik Kabel wrote: > On 2017-04-01 16:07, Pablo Rodriguez wrote: >> [...] >> Sorry, but I don’t see a reason to have this as default. I mean, I have >> never seen any encyclopedia or dictionary that sorts entries according >> to letter case. >> > I believe you want method=default for your \setupregister[index][] > options. The allowable values appear to be default, first, last, before, > and after. With nothing specified you do not get the same as specifying > default. I asked about these a while back but got no answer. Rik, many thanks for your reply. Naming an option default not being the default should have very strong reasons, because I’m afraid that the name is most misleading. Greek word sorting requires extra replacements. Otherwise, sorting is wrong and uppercase and lowecase entries generate two heads. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] ConTeXt not finding fonts in OSFONTDIR
On 04/01/2017 11:17 PM, Alan Bowen wrote: > ConTeXT does not seem to be finding the fonts that I have in my > OSFONTDIR, which is set in my .bash_profile by the line > export OSFONTDIR=./Users/bowen1/Library/Fonts/ Alan, I see two issues with your font directory. 1. The initial point in the path sets a relative path. I guess you have to remove it to have an absolute path. 2. How about adding the path at the end of tex/setuptex? Just in case it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] ConTeXt not finding fonts in OSFONTDIR
ConTeXT does not seem to be finding the fonts that I have in my OSFONTDIR, which is set in my .bash_profile by the line export OSFONTDIR=./Users/bowen1/Library/Fonts/ I have clean-installed the latest beta (ConTeXt ver: 2017.03.26 16:15 MKIV beta) The file processes but substitutes fonts for what I want: mkiv lua stats > loaded fonts: 10 files: latinmodern-math.otf, lmroman10-bold.otf, lmroman10-bolditalic.otf, lmroman10-italic.otf, lmroman10-regular.otf, lmroman12-regular.otf, lmromancaps10-regular.otf, texgyretermes-math.otf, texgyrecursor-regular.otf, texgyrepagella-regular.otf Files worked until yesterday (with the latest beta). But then I began experimenting with a Hieroglyphic font….. I am running MacOS 10.12.4 (if that is relevant). Any suggestions will be most welcome. Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] mathmatrix and grid: followup
I haven’t bumped this in a long time... On 01/24/2017 11:57 PM, Henri Menke wrote: > Bump > > On 01/06/2017 10:33 AM, Henri Menke wrote: >> Bump and (belated) Happy New Year! >> >> On 12/10/2016 10:37 AM, Henri Menke wrote: >>> Bump >>> >>> On 11/27/2016 07:45 PM, Henri Menke wrote: Bump On 11/22/2016 02:18 PM, Henri Menke wrote: > Dear list, > > some time ago I asked about the interplay of mathmatix with grid > typesetting: https://mailman.ntg.nl/pipermail/ntg-context/2016/087018.html > > I noticed that when the grid is enabled, the height of a mathmatrix is > rounded down which leaves less space above than below. In my opinion > either the height should be rounded up or the depth rounded down here. > In the original thread Wolfgang proposed using > \setupformula[grid=tolerant] and adding a blank line before the formula > (otherwise grid=tolerant is applied to the paragraph before). This > workaround leads to the depth being rounded down in the example below > which produces a more balanced output. Could this somehow be made the > default behaviour or something? Currently it requires the user to notice > that vertical spacing is off and correct it manually, including adding a > blank line before the formula to prevent grid=tolerant being applied to > the paragraph. > > Cheers, Henri > > --- > > \setuplayout[grid=yes] > \showgrid > > \starttext > > \input knuth > \startformula > \vrule % make lineheight and depth visible > \startmathmatrix > \NC A \NR > \NC B \NR > \NC C \NR > \stopmathmatrix > \stopformula > \input tufte > > \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] understanding index sorting
On 2017-04-01 16:07, Pablo Rodriguez wrote: Hans, I have just discovered the following: \define[1]\indx{#1\index{#1}} \starttext \indx{an} \indx{american} \indx{Aphrodite} \placeindex \stoptext Lowercase letters are placed after its uppercase counterparts. I don’t have (almost) any experience with indices in ConTeXt, but which is the way to turn this off? Sorry, but I don’t see a reason to have this as default. I mean, I have never seen any encyclopedia or dictionary that sorts entries according to letter case. I believe you want method=default for your \setupregister[index][] options. The allowable values appear to be default, first, last, before, and after. With nothing specified you do not get the same as specifying default. I asked about these a while back but got no answer. There is a cryptic explanation from 2010 at http://www.mail-archive.com/ntg-context%40ntg.nl/msg50454.html. -- Rik ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] understanding index sorting
Hans, I have just discovered the following: \define[1]\indx{#1\index{#1}} \starttext \indx{an} \indx{american} \indx{Aphrodite} \placeindex \stoptext Lowercase letters are placed after its uppercase counterparts. I don’t have (almost) any experience with indices in ConTeXt, but which is the way to turn this off? Sorry, but I don’t see a reason to have this as default. I mean, I have never seen any encyclopedia or dictionary that sorts entries according to letter case. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Aligning subsection head with following paragraph in tagged pdf output
Have you tried: On Sat, 1 Apr 2017 20:20:02 +0200 Pablo Rodriguezwrote: > Tagging PDFs the way you seem to be trying might be impossible. Here > is my sample: > > \setuppapersize[letter] > \setuptagging[state=start] > \starttext > \startsubsection[title=First Subsection] \startparagraph[before=] a\stopparagraph > \startparagraph b\stopparagraph > \startparagraph c\stopparagraph > \stopsubsection > \stoptext (untested) Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Aligning subsection head with following paragraph in tagged pdf output
On 04/01/2017 05:32 PM, Rik Kabel wrote: > On 2017-04-01 00:10, Todd DeVries wrote: >> Thanks for your assistance. Was unaware of using the setupheads >> command incorrectly. Good information to have. I am still not >> able to produce an automatic period (.) at the end of the section >> title using the after keyword. is this correct? > > Seems to be. While before= is honored, after= is not. This looks like an > inconsistency that can be addressed. Hi Todd, this will give the output you like: \setuppapersize[letter] \setuptagging[state=start] \setuphead[subsection][style=\bf, number=no, commandafter={.~}, textdistance=0cm, alternative=text] \starttext \startsubsection[title=First Subsection] \input knuth \stopsubsection \stoptext >>> alternative=text is working, but \startparagraph is starting a >>> new paragraph after the heading. \start\stopparagraph is not >>> happy with the text alternative. >> I am wondering if this is just not going to work with the tagging >> subsystem. The subsection aligns if I remove the start/stop >> paragraph following the heading. But if I add a second paragraph >> in that subsection it breaks again. > > Example, please. I have no problem adding a start/stopparagraph after > your knuth. (Note that the knuth has to be terminated in a \par or a > blank line. That is because of the construction of that input file.) Add a sample, otherwise we might speculate about what you’re aiming at. Tagging PDFs the way you seem to be trying might be impossible. Here is my sample: \setuppapersize[letter] \setuptagging[state=start] \starttext \startsubsection[title=First Subsection] \startparagraph a\stopparagraph \startparagraph b\stopparagraph \startparagraph c\stopparagraph \stopsubsection \stoptext Both paragraphs and headings are block elements (I have just checked it at https://wwwimages2.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf#page=585). Block elements cannot contain other block elements inside. Displaying block elements as inline elements, if not contradictory, might be misleading, at least. >> I use tagged pdfs for output >> because they are more accessible with my screen reader. Without >> tagging, all one gets is long blocks of undifferentiated text. >> With the correct tags, paragraphs, headings, lists, and tables >> get created that make more sense with auditory output. To my >> knowledge, ConTeXt is the only alternative for producing >> accessible pdfs beyond working with Acrobat pro or MS. Word. >> After writing a 70-page academic project in Word, I'm seeking >> alternatives! This is an issue about text structure. We speak of block elements because they have vertical space between them (even if set to none). >> Perhaps one can just use in-paragraph bolding and mark that text >> for the table of contents as an alternative. This is required >> for heading level 3 content in APA style. > > For now that might be best as long as you do not need to reference them > in a table of contents (not required by APA, as I read the standard, > although perhaps an added requirement from your publisher). It seems that H3 should be a block element, not an inline element inside P (according to most XML implementations, I’d say). Why do you need in-line titles? But I may be missing something, correct me if I’m wrong. Sorry for the bad news, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] aligning heads in indices
On 04/01/2017 04:04 PM, Rik Kabel wrote: > On 2017-04-01 08:38, Pablo Rodriguez wrote: >> Dear list, >> >> I have the following sample: >> >> \showframe >> \definefontfeature[smcp][smcp=yes] >> \definefontfamily[mainface][rm][GFS Didot] >> \setupbodyfont[mainface] >> >> \setupregister[index][style=\addfs{smcp}, command={\hfill}] >> [...] >> Is there no way to center the head in indices? >> [...] > > As to the centering, it works fine here with command=\centerline . Index > heads (a, b, ..., β, ἄ, ...) are centered over each of the two columns. I got the same results, but I wonder whether this is the right way of doing it. > But that last bit is a problem. ἄ is indexed separately from α, and it > is placed after β. I don't think you want that. I do not know how you > would support more than one language in a single index sort. It was only a test and the font has some issues with OpenType features. The real problem comes with this source: http://www.ousia.tk/grc-index.tex (output in http://www.ousia.tk/grc-index.pdf). Each word-starting letter with a different diacritical mark is considerer a different letter for the index sorting. It seems to be a problem only related to ancient Greek, since the following works as expected: \mainlanguage[es] \define[1]\indx{#1\index{#1}} \setupregister[index][n=6, balance=no, command={\centerline}] \starttext \indx{a} \indx{á} \indx{ñ} \indx{n} \indx{ü} \indx{u} \indx{A} \indx{Á} \indx{Ñ} \indx{n} \indx{Û} \indx{u} \placeindex \stoptext German is rather tricky (sorting rules in German are tricky, too), but it works as it should (after fine tuning): \mainlanguage[de-at] \define[1]\indx{#1\index{#1}} \setupregister[index][language=de-AT, balance=no] \starttext \indx{üben} \indx{Übung} \indx{U-Bahn} \currentlanguage \placeindex \stoptext I guess having different language names (de-at and de-AT) for \mainlanguage and index sorting is unnecessarily complex. If it were possible, I think it would be extremely helpful to be able to invoke languages by their XML standards (or https://tools.ietf.org/html/bcp47). This would mean grc for agr, de-1901, de-AT and de-CH for deo, de-at and de-CH... and so on. I mean this as full-working alternatives, not as replacements that would break existing compatibility. But even defining a language synonym doesn’t work with index sorting: \installlanguage [de-AT] [de-at] \mainlanguage[de-AT] \define[1]\indx{#1\index{#1}} \setupregister[index][balance=no] \starttext \indx{üben} \indx{Übung} \indx{U-Bahn} \currentlanguage \placeindex \stoptext Hans, how about improving alternate (standard for the rest of markup) language invocation and allowing the main language to specify the sorting order in German indexes too? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Aligning subsection head with following paragraph in tagged pdf output
On 2017-04-01 00:10, Todd DeVries wrote: Thanks for your assistance. Was unaware of using the setupheads command incorrectly. Good information to have. I am still not able to produce an automatic period (.) at the end of the section title using the after keyword. is this correct? Seems to be. While before= is honored, after= is not. This looks like an inconsistency that can be addressed. On Friday, March 31, 2017, 7:01:28 PM, Rik writes: alternative=text is working, but \startparagraph is starting a new paragraph after the heading. \start\stopparagraph is not happy with the text alternative. I am wondering if this is just not going to work with the tagging subsystem. The subsection aligns if I remove the start/stop paragraph following the heading. But if I add a second paragraph in that subsection it breaks again. Example, please. I have no problem adding a start/stopparagraph after your knuth. (Note that the knuth has to be terminated in a \par or a blank line. That is because of the construction of that input file.) I use tagged pdfs for output because they are more accessible with my screen reader. Without tagging, all one gets is long blocks of undifferentiated text. With the correct tags, paragraphs, headings, lists, and tables get created that make more sense with auditory output. To my knowledge, ConTeXt is the only alternative for producing accessible pdfs beyond working with Acrobat pro or MS. Word. After writing a 70-page academic project in Word, I'm seeking alternatives! Perhaps one can just use in-paragraph bolding and mark that text for the table of contents as an alternative. This is required for heading level 3 content in APA style. For now that might be best as long as you do not need to reference them in a table of contents (not required by APA, as I read the standard, although perhaps an added requirement from your publisher). Thanks for your assistance. I'm a newbie and appreciate the help. Todd -- Rik ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] aligning heads in indices
On 2017-04-01 08:38, Pablo Rodriguez wrote: Dear list, I have the following sample: \showframe \definefontfeature[smcp][smcp=yes] \definefontfamily[mainface][rm][GFS Didot] \setupbodyfont[mainface] \setupregister[index][style=\addfs{smcp}, command={\hfill}] \starttext ancient\index{ancient} better\index{better} complexity\index{complexity} daemonic\index{daemonic} energic\index{energic} ἄγαν\index{ἄγαν} βεβαιος\index{βεβαιος} γυναικός\index{γυναικός} δαίμων\index{δαίμων} ἐνέργεια\index{ἐνέργεια} \placeindex \stoptext Is there no way to center the head in indices? I tried the creepy usage of \hfill in command, which I can replace with \centerline from TeX. But I wonder whether none before wanted to do this. The align options centers both head and entries. And there is no headalign option. Many thanks for your help, Pablo As to the centering, it works fine here with command=\centerline . Index heads (a, b, ..., β, ἄ, ...) are centered over each of the two columns. But that last bit is a problem. ἄ is indexed separately from α, and it is placed after β. I don't think you want that. I do not know how you would support more than one language in a single index sort. -- Rik ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] aligning heads in indices
Dear list, I have the following sample: \showframe \definefontfeature[smcp][smcp=yes] \definefontfamily[mainface][rm][GFS Didot] \setupbodyfont[mainface] \setupregister[index][style=\addfs{smcp}, command={\hfill}] \starttext ancient\index{ancient} better\index{better} complexity\index{complexity} daemonic\index{daemonic} energic\index{energic} ἄγαν\index{ἄγαν} βεβαιος\index{βεβαιος} γυναικός\index{γυναικός} δαίμων\index{δαίμων} ἐνέργεια\index{ἐνέργεια} \placeindex \stoptext Is there no way to center the head in indices? I tried the creepy usage of \hfill in command, which I can replace with \centerline from TeX. But I wonder whether none before wanted to do this. The align options centers both head and entries. And there is no headalign option. Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] switchtobodyfont and dejavu
Am 2017-03-31 um 09:00 schrieb Kostirya: > Hello. > I found error at switchtobodyfont with dejavu font. > > In the below example, switchtobodyfont not correctly worked. > > This is only observed when I switch from 16pt to 14pt. > Switching must be across a different font. > > > The result is attached to the letter > > \setupbodyfont[dejavu,16pt] > \starttext > \showbodyfont \blank > > \switchtobodyfont[gentium] > > \switchtobodyfont[dejavu,14pt] > \showbodyfont > \stoptext While this behaviour is confusing, I guess it’s because TeX prefers serif (rm) fonts. At first, there’s none defined. After you load gentium, there is one. You should just specify that you want to get a sans bodyfont: \switchtobodyfont[dejavu,ss,14pt] Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] slanting small cap glpyhs
Dear list, I have the following sample: \definefontfeature[smcp][smcp=yes] \definefontfeature[slsmcp][smcp=yes, slant=0.2] \definefontfamily[yourface][rm][GFS Didot][it={features:slsmcp}] \definefontfamily[mainface][rm][GFS Didot] \setupbodyfontenvironment [default] [em=italic] \setupbodyfont[mainface] \setuphead[chapter][style={\setupbodyfont[yourface]\addfs{smcp}}] \starttext \chapter{Small caps & {\em italics}} \addfs{smcp}Small caps & {\em italics} \stoptext The font has no glyphs for italic small caps. I would like to have the slanted version of the regular small cap glyphs. My previous sample outputs slanted, but not from the small cap glyphs. Which is the right way to get them? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug getting part for \setupheadertexts?
On 04/01/2017 10:33 AM, Pablo Rodriguez wrote: > Dear list, > > as Hraban already reported, there might be a bug in: > > \setupheadertexts[section][chapter][part][section] > > \starttext > \dorecurse{10}{\part{Part} > \chapter{Chapter} > \dorecurse{5}{\section{Section}\page}} > \stoptext Replying to myself (and to Hraban). This solves the issue: \setuphead[part][placehead=yes] \setupheadertexts[section][chapter][part][section] \starttext \dorecurse{10}{\part{Part} \chapter{Chapter} \dorecurse{5}{\section{Section}\page}} \stoptext From https://mailman.ntg.nl/pipermail/ntg-context/2017/088407.html, the following line has a wrong invocation: \setupheadertexts[][\getmarking{chapter}][\getmarking{part}][] It should read (I just discovered it): \setupheadertexts[][{\getmarking[chapter]}][{\getmarking[part]}][] I hope it helps Hraban. And sorry for the noise, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] bug getting part for \setupheadertexts?
Dear list, as Hraban already reported, there might be a bug in: \setupheadertexts[section][chapter][part][section] \starttext \dorecurse{10}{\part{Part} \chapter{Chapter} \dorecurse{5}{\section{Section}\page}} \stoptext Replacing [part] with [\getmarking{part}] gives the following error message: lua error > lua error on line 7 in file /home/ousia/a.tex: ...eta/tex/texmf-context/tex/context/base/mkiv/strc-mar.lua:413: attempt to compare nil with number stack traceback: ...eta/tex/texmf-context/tex/context/base/mkiv/strc-mar.lua:413: in function 'resolve' ...eta/tex/texmf-context/tex/context/base/mkiv/strc-mar.lua:524: in function 'doresolve' ...eta/tex/texmf-context/tex/context/base/mkiv/strc-mar.lua:552: in function <...eta/tex/texmf-context/tex/context/base/mkiv/strc-mar.lua:548> ...eta/tex/texmf-context/tex/context/base/mkiv/strc-mar.lua:619: in function 'fetched' ...eta/tex/texmf-context/tex/context/base/mkiv/strc-mar.lua:657: in function 'fetchonemark' ...eta/tex/texmf-context/tex/context/base/mkiv/strc-mar.lua:680: in function <...eta/tex/texmf-context/tex/context/base/mkiv/strc-mar.lua:675> 1 2 \setupheadertexts[section][chapter][\getmarking{part}][section] 3 4 \starttext 5 \dorecurse{10}{\part{Part} 6 \chapter{Chapter} 7 >> \dorecurse{5}{\section{Section}\page}} 8 \stoptext 9 Could you confirm whether this is a bug? (Hraban has already reported it.) Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___