Re: [NTG-context] context -> docx ??
On Wed, 14 Jan 2015 14:59:01 -0700, Pablo Rodriguez wrote: Context produces three relevant files: darwin-xml-div.xhtml darwin-xml-tag.xhtml darwin-xml-raw.xml 1. Which one of these three files is the one we want to convert to docx? Only *-div.xhtml are (X)HTML files. That was my guess, thanks. 2. I modified Alan's test file [same preamble]: \starttext \startquotation \input darwin \bf \input darwin \stopquotation \stoptext darwin-xml-div.xhtml and darwin-xml-tag.xhtml show up in the browser, but the bold does not. Well, I cannot see any bold in "". It seems to be how ConTeXt handles the blank line and the \bf command. BTW, the quotation environment is not translated as blockquote and paragraphs lack their tags. Hmm, perhaps a showstopper... In Opera 12.17, darwin-xml-raw.xml gives a syntax error XML parsing failed: syntax error (Line: 17, Character: 0) It seems weird to me (that should be the error in Opera), that a element is placed outside the element. But the "Reparse document as HTML" does work. I guess this format won’t be understood by pandoc (unless you write an specific reader for it). Ouch, another showstopper... -raw.xml is not what you need. In each of the three cases, there is no bold effect at all. What is needed to get the typography info transmitted? I have no experience with xhtml export in ConTeXt. This is beyond my knowledge. Sorry. Aditya gave some of the answer. But his answer implies that I will have to define a whole bunch of \definehighlight[typography][style=mystyle] commands and change my entire style of writing... Yet another showstopper 3. My assumption is this: If I can get the xml/xhtml file looking right in the browser, I should be able to build a working docx file via pandoc. If it doesn’t look good in the browser, you won’t get it in pandoc. But it might be that you get it right in the browser and not in pandoc. It depends how ConTeXt outputs the XHTML. But I may be able to save the browser output in an html format that pandoc could read, right? = So the conclusion would appear to be: There is as yet no easy solution to convert context to docx. Given the bibliographical needs of this article: It may be that I'll do it in ConTeXt and then ask the editors to let the publisher -- it's a major publisher -- foot the bill for the conversion to docx. The ironic thing is that this publisher may very well have the final book done in TeX -- many of their books are typeset in TeX --, so we'll see what happens. Thanks to all of you for your help! Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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] context -> docx ??
Hi Aditya, On Wed, 14 Jan 2015 14:38:25 -0700, Aditya Mahajan wrote: Structural elements are exported; raw typographical commands are not. So, you would need: \definehighlight[important][style=bold] \starttext \important{This is important} \stoptext Ok, thanks for this info! Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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] context -> docx ??
On 01/14/2015 09:29 PM, Idris Samawi Hamid ادريس سماوي حامد wrote: > [...] > I was just about to ask about how pandoc handles xhtml. Some questions for > you: Hi Idris, > Context produces three relevant files: > > darwin-xml-div.xhtml > darwin-xml-tag.xhtml > darwin-xml-raw.xml > > 1. Which one of these three files is the one we want to convert to docx? Only *-div.xhtml are (X)HTML files. > 2. I modified Alan's test file [same preamble]: > > > \starttext > > \startquotation > \input darwin > > \bf \input darwin > \stopquotation > > \stoptext > > > darwin-xml-div.xhtml and darwin-xml-tag.xhtml show up in the browser, but > the bold does not. Well, I cannot see any bold in "". It seems to be how ConTeXt handles the blank line and the \bf command. BTW, the quotation environment is not translated as blockquote and paragraphs lack their tags. > In Opera 12.17, darwin-xml-raw.xml gives a syntax error > > > XML parsing failed: syntax error (Line: 17, Character: 0) > It seems weird to me (that should be the error in Opera), that a element is placed outside the element. > But the "Reparse document as HTML" does work. I guess this format won’t be understood by pandoc (unless you write an specific reader for it). -raw.xml is not what you need. > In each of the three cases, there is no bold effect at all. > > What is needed to get the typography info transmitted? I have no experience with xhtml export in ConTeXt. This is beyond my knowledge. Sorry. > 3. My assumption is this: If I can get the xml/xhtml file looking right in > the browser, I should be able to build a working docx file via pandoc. If it doesn’t look good in the browser, you won’t get it in pandoc. But it might be that you get it right in the browser and not in pandoc. It depends how ConTeXt outputs the XHTML. I hope 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] context -> docx ??
On Wed, 14 Jan 2015, Idris Samawi Hamid ادريس سماوي حامد wrote: \starttext \startquotation \input darwin \bf \input darwin \stopquotation \stoptext darwin-xml-div.xhtml and darwin-xml-tag.xhtml show up in the browser, but the bold does not. What is needed to get the typography info transmitted? Structural elements are exported; raw typographical commands are not. So, you would need: \definehighlight[important][style=bold] \starttext \important{This is important} \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] context -> docx ??
On Wed, Jan 14 2015, Idris Samawi Hamid ادريس سماوي حامد wrote: > 3. My assumption is this: If I can get the xml/xhtml file looking right in the > browser, I should be able to build a working docx file via pandoc. Can't Office-Word load html and save it as docx? -- Peter ___ 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] adapt fontsize to given width
On 1/14/2015 7:05 PM, Alan BRASLAU wrote: On Wed, 14 Jan 2015 17:50:12 +0100 Pablo Rodriguez wrote: Dear list, I have the following sample: \showframe \starttext {\setupbodyfont[120pt]My Title} \stoptext Is there a way to make ConTeXt automatically calculate the size of the \setupbodyfont, so that the passage fits exactly to text width? Many thanks for your help, Pablo There is a MP solution: \starttext \startMPcode draw textext("My Title") xsized TextWidth ; \stopMPcode \stoptext \scale[width=\textwidth]{My Title} - 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] context -> docx ??
On 2015-01-14, at 18:55, Alan BRASLAU wrote: > On Tue, 13 Jan 2015 22:34:21 +0100 > Marcin Borkowski wrote: > >> While I /do/ understand you (it's the same with me, only that I'm more >> comfortable with LaTeX), have you considered Org-mode? It's >> similar to markdown (though better IMHO), but it comes with great >> support in Emacs. And you get export to odt "for free". (Also to >> LaTeX, though unfortunately not to ConTeXt; OTOH, writing a ConTeXt >> exporter should be fairly easy, and a simple exporter could be done in >> a few days - the framework for writing exporters to different formats >> is very well done. Incidentally, there's also a Markdown exporter, >> so you could probably get to ConTeXt via markdown). > > Org-mode does not simply come with great support in Emacs, it is > essentially an emacs module I believe. Yes. But Org is _also_ a file format, very similar to markdown (only better). You might write Org files in Vim and fire Emacs from the command line to export them to HTML, for instance. (Not that it would be a particularly great idea, but definitely possible.) So Org (the format) has great support in Emacs Org-mode (an Emacs major mode). Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University ___ 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] context -> docx ??
Hi Pablo, On Wed, 14 Jan 2015 13:15:38 -0700, Pablo Rodriguez wrote: There must be some way to get this into Word... pandoc may be the way. I say “may be” instead of “is” because pandoc ignores some attributes when converting from XHTML (http://pandoc.org/try/?text=%3Cp%3EThis+is+sample+with+a+foreign+word%3A+%3Cem+lang%3D%22de%22%3EFremdsprache%3C%2Fem%3E.%3C%2Fp%3E&from=html&to=markdown). I was just about to ask about how pandoc handles xhtml. Some questions for you: Context produces three relevant files: darwin-xml-div.xhtml darwin-xml-tag.xhtml darwin-xml-raw.xml 1. Which one of these three files is the one we want to convert to docx? 2. I modified Alan's test file [same preamble]: \starttext \startquotation \input darwin \bf \input darwin \stopquotation \stoptext darwin-xml-div.xhtml and darwin-xml-tag.xhtml show up in the browser, but the bold does not. In Opera 12.17, darwin-xml-raw.xml gives a syntax error XML parsing failed: syntax error (Line: 17, Character: 0) But the "Reparse document as HTML" does work. In each of the three cases, there is no bold effect at all. What is needed to get the typography info transmitted? 3. My assumption is this: If I can get the xml/xhtml file looking right in the browser, I should be able to build a working docx file via pandoc. Thanks for any and all advice! and Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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] context -> docx ??
On 01/14/2015 06:55 PM, Alan BRASLAU wrote: > Using ConTeXt (not emacs, markdown, or other such things...) you can > indeed export to xml, xhtml, and create epub files. > [...] > The xhtml file can be read in a browser. > (some tools seem to have problem with the hyphen=yes option) I don’t know whether it makes sense to add discretionary hyphens to texts, ewhen a browser can hyphenate it (http://css-tricks.com/almanac/properties/h/hyphenate/). This would make also searching harder. And my experience with ePub readers (Adobe Reader Mobile 9) is that they are interpreted as zero-width spaces (http://www.mobileread.com/forums/showthread.php?t=28139). BTW, ARM 9 doesn’t handle zero-width spaces right either. It interprets them as standard spaces. > There must be some way to get this into Word... pandoc may be the way. I say “may be” instead of “is” because pandoc ignores some attributes when converting from XHTML (http://pandoc.org/try/?text=%3Cp%3EThis+is+sample+with+a+foreign+word%3A+%3Cem+lang%3D%22de%22%3EFremdsprache%3C%2Fem%3E.%3C%2Fp%3E&from=html&to=markdown). 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] context -> docx ??
On Wed, 14 Jan 2015 12:58:35 -0700, Idris Samawi Hamid ادريس سماوي حامد wrote: It's one of those weird things: Alan sent me the same file as a text attachment and it ran just fine. But the text I copied from his first email did not. Doing a quick compare of the two files in Notepad++ indicated that the two files are identical, but there must be some unseen spurious character caused by the email that context doesn't like.. No, this is totally off-track. The problem was that silly me named the test file darwin.tex, while there was an "\input darwin" in the test file. My apologies for the noise. Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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] context -> docx ??
On 01/13/2015 08:59 PM, Idris Samawi Hamid ادريس سماوي حامد wrote: > Dear gang, > > I'm currently writing a paper with very basic typographical needs: > blockquotes, emphasis, bibliography, perhaps a graphic or two. The > publisher wants the thing in Word, naturally. The last time I did > something like this I set up a markdown document and just exported it to > both docx and to context. For simple documents this is at least workable, > but I'd prefer to write in context, not markdown. Hi Idris, I think it is better to use a markdown source with pandoc. It is the closest model to its native format. I have written a small book from a markdown source. The PDF document was generated by ConTeXt, previously converted with pandoc. I think this is the wrong way to go. Mainly because conversion to ConTeXt doesn’t rettain language information and special attributes. I had to edit the ConTeXt source to add the missing features. [pandoc’s internal document format only allows attributes for certain elements, not for all of them. A workaround is to wrap then in divs an spans.] In my opinion, the right way to go is to convert the markdown source to HTML and to parse it with an environment. Otherwise, updating the source is not straightforward (either you have two sources: markdown and ConTeXt). Why do you prefer to avoid markdown as a source document format? > Now it's been a while since I've experimented with ConTeXt and epub. From > lightly perusing the list it seems that there has been considerable > movement on this front. So my question: Has anyone here succeeded in the > following workflow: > > context -> xml -> docx > > [perhaps via pandoc]? I don’t have any samples of this workflow, since I never worked this way. pandoc doesn’t even have a ConTeXt reader (https://github.com/jgm/pandoc/issues/1423). You will need a way to generate a document in an XML format that pandoc understands. XHTML is an option. And I guess that would be easy to generate with ConTeXt (I have never done it). 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] context -> docx ??
On Wed, 14 Jan 2015 11:58:15 -0700, Idris Samawi Hamid ادريس سماوي حامد wrote: Your example doesn't work here. After 800 lines of overfull hboxes I get tex error > error on line 19 in file darwin.tex: ! TeX capacity exceeded, sorry [text input levels=127] l.19 \input darwin 9 10 \setupexport 11 [hyphen=yes, 12width=60em] 13 14 \stopmode 15 16 \starttext 17 18 \startquotation 19 >> \input darwin 20 \stopquotation 21 22 \stoptext Please advise. Best wishes Idris It's one of those weird things: Alan sent me the same file as a text attachment and it ran just fine. But the text I copied from his first email did not. Doing a quick compare of the two files in Notepad++ indicated that the two files are identical, but there must be some unseen spurious character caused by the email that context doesn't like.. This sort of thing happens once in a while: Have any of you researched this phenomenon at all? Luigi? Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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] adapt fontsize to given width
> Am 14.01.2015 um 20:36 schrieb Pablo Rodriguez : > > On 01/14/2015 06:58 PM, Wolfgang Schuster wrote: >>> [...] >>> Is there a way to make ConTeXt automatically calculate the size of the >>> \setupbodyfont, so that the passage fits exactly to text width? >> >> \starttext >> \WidthSpanningText{My Title}{\textwidth}{Serif} >> \WidthSpanningText{My Title}{12cm}{MonoBold} >> \WidthSpanningText{My Title}{14cm}{SansItalic} >> \stoptext > > Many thanks for your reply, Wolfgang. > > That was what I was looking for. > > There is a minor issue with alignment: > >\starttext > >\startalign[center] >\widthspanningtext{text}{.5\textwidth}{Serif} >\stopalign > >\hfill\widthspanningtext{text}{.5\textwidth}{Serif} > >\stoptext > > Am I missing something or is \hfill the only way to align the contents > from \widthspanningtext? Use \midaligned{\WidthSpanningText{…}{…}{…}} or \startlinealignment[middle] \WidthSpanningText{…}{…}{…} \stoplinealignment 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 ___
Re: [NTG-context] adapt fontsize to given width
On 01/14/2015 07:05 PM, Alan BRASLAU wrote: > [...] > There is a MP solution: > > \starttext > \startMPcode >draw textext("My Title") xsized TextWidth ; > \stopMPcode > \stoptext Many thanks for your reply, Alan. It’s good to know that MP fits perfectly here. 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] adapt fontsize to given width
On 01/14/2015 07:59 PM, Wolfgang Schuster wrote: > [...] > Another solution is to use the \scale command: > > \starttext > \scale[width=\textwidth]{My Title} > \stoptext Many thanks for the new rely, Wolfgang. I think this is easier to remember. And replying to my previous question \dontleavehmode allows right (I mean correct ;-)) alignment. 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] adapt fontsize to given width
On 01/14/2015 06:58 PM, Wolfgang Schuster wrote: >> [...] >> Is there a way to make ConTeXt automatically calculate the size of the >> \setupbodyfont, so that the passage fits exactly to text width? > > \starttext > \WidthSpanningText{My Title}{\textwidth}{Serif} > \WidthSpanningText{My Title}{12cm}{MonoBold} > \WidthSpanningText{My Title}{14cm}{SansItalic} > \stoptext Many thanks for your reply, Wolfgang. That was what I was looking for. There is a minor issue with alignment: \starttext \startalign[center] \widthspanningtext{text}{.5\textwidth}{Serif} \stopalign \hfill\widthspanningtext{text}{.5\textwidth}{Serif} \stoptext Am I missing something or is \hfill the only way to align the contents from \widthspanningtext? 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Center two frames
On 01/14/2015 06:50 PM, Fabrice wrote: > Dear Pablo, > Following a post to which you had already answered, I have been able to > do using a XTABLE. > But I wanted to know if it was possible to do otherwise. But apparently > not, so I'll hold your solution. Hi Fabrice, I guess that placing an invisible object besides the second frame would do the same. This looks like a more complex workaround to me. I must confess that I don’t know whether there are another approaches to the issue you are facing. Pablo > Dear Wolfgang, > Why is it better to use a framed text environment? > ___ > 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 > ___ > -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Catalan especial character (l·l) in ConTeXt
> Am 14.01.2015 um 19:28 schrieb 19cat : > > Hello, again. > > I have another issue. > > When I put \definefontfeature command into environment file, doesn't work. I > must put in product file, before \startproduct command. > > You know why? Load the environment before \startproduct or \startcomponent, e.g. %% begin example \environment env_productname \startproduct prd_productname … \stopproduct %% end example 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 ___
Re: [NTG-context] adapt fontsize to given width
> Am 14.01.2015 um 18:58 schrieb Wolfgang Schuster > : > > >> Am 14.01.2015 um 17:50 schrieb Pablo Rodriguez : >> >> Dear list, >> >> I have the following sample: >> >> \showframe >> \starttext >> {\setupbodyfont[120pt]My Title} >> \stoptext >> >> Is there a way to make ConTeXt automatically calculate the size of the >> \setupbodyfont, so that the passage fits exactly to text width? > > \starttext > > \WidthSpanningText{My Title}{\textwidth}{Serif} > > \WidthSpanningText{My Title}{12cm}{MonoBold} > > \WidthSpanningText{My Title}{14cm}{SansItalic} > > \stoptext Another solution is to use the \scale command: \starttext \scale[width=\textwidth]{My Title} \stoptext 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 ___
Re: [NTG-context] context -> docx ??
Hi Alan, On Wed, 14 Jan 2015 10:55:50 -0700, Alan BRASLAU wrote: \enablemode[export] \startmode[export] \setupbackend [export=yes, xhtml=yes, css=export-example.css] \setupexport [hyphen=yes, width=60em] \stopmode \starttext \startquotation \input darwin \stopquotation \stoptext LuaTeX, Version beta-0.79.2 ConTeXt ver: 2014.12.30 09:48 MKIV beta fmt: 2014.12.30 Your example doesn't work here. After 800 lines of overfull hboxes I get tex error > error on line 19 in file darwin.tex: ! TeX capacity exceeded, sorry [text input levels=127] l.19 \input darwin 9 10 \setupexport 11 [hyphen=yes, 12width=60em] 13 14 \stopmode 15 16 \starttext 17 18 \startquotation 19 >> \input darwin 20 \stopquotation 21 22 \stoptext Please advise. Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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] context -> docx ??
Hi Marcin, On Tue, 13 Jan 2015 14:34:21 -0700, Marcin Borkowski wrote: On 2015-01-13, at 20:59, Idris Samawi Hamid ادريس سماوي حامد wrote: Dear gang, I'm currently writing a paper with very basic typographical needs: blockquotes, emphasis, bibliography, perhaps a graphic or two. The publisher wants the thing in Word, naturally. The last time I did something like this I set up a markdown document and just exported it to both docx and to context. For simple documents this is at least workable, but I'd prefer to write in context, not markdown. While I /do/ understand you (it's the same with me, only that I'm more comfortable with LaTeX), have you considered Org-mode? It's similar to markdown (though better IMHO), but it comes with great support in Emacs. And you get export to odt "for free". (Also to LaTeX, though unfortunately not to ConTeXt; OTOH, writing a ConTeXt exporter should be fairly easy, and a simple exporter could be done in a few days - the framework for writing exporters to different formats is very well done. Incidentally, there's also a Markdown exporter, so you could probably get to ConTeXt via markdown). Thank you, Marcin, for introducing me to Org-mode. OTOH, I decided some years ago that the Emacs lifestyle is a bit too much for me :-) Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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] Catalan especial character (l·l) in ConTeXt
Hello, again. I have another issue. When I put \definefontfeature command into environment file, doesn't work. I must put in product file, before \startproduct command. You know why? This is my tree structure: prd_productname env_productname c_title c_chapter1 c_chapter2 Thanks, 19cat > El 14/01/2015, a les 5:50 p.m., 19cat va escriure: > > Thanks to All, > > But your solutions do not like me. And I keep trying the option of > Fontfeaturefile page in wiki and Adobe feature topic. > - http://wiki.contextgarden.net/fontfeaturefiles > - http://wiki.contextgarden.net/TrueType_fonts_in_luaTeX > - http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html > > With this I had found 4 good solutions. > I think that for Catalans, the best is gemkerndot.fea > I attached files for test. > > > > This is a short sample context file with diferent feature files options > # == geminated.tex = > % Check each feature > \definefontfeature[default][default][featurefile=gemligature.fea] > %\definefontfeature[default][default][featurefile=gemkerndot.fea] > %\definefontfeature[default][default][featurefile=gemkernpair.fea] > %\definefontfeature[default][default][featurefile=gemkerntrio.fea] > > > \starttext > > \section{Geminated l·l} > COL·LEGI > Col·legi > Col·Legi > CoL·legi > > \stoptext > # > > > > > 1.- Create a ligature from L· and l· to special characters > This option substitute my SED command for replace L· and l· to respective > special characters. > # == gemligature.fea = > # Script and language coverage > languagesystem DFLT dflt; > languagesystem latn dflt; > > > # Ligature > feature liga { > # Create a ligature > substitute l \u00b7 by \u0140; > substitute L \u00b7 by \u013F; > } liga; > # > > > 2.- Change kerning of middle dot. > This option change middle dot kerning in all cases > # == gemkerndot.fea = > # Script and language coverage > languagesystem DFLT dflt; > languagesystem latn dflt; > > > # Kerning > feature kern { > # All middle dots > position \u00b7 <-330 0 -660 0>; > } kern; > # > > > 3.- Change kerning of pair middle dot and L characters (suffix and prefix) > This option only change middle dot and L kerning in pair cases > # == gemkernpair.fea = > # Script and language coverage > languagesystem DFLT dflt; > languagesystem latn dflt; > > > # Kerning > feature kern { > # Middle dot pair arround 'L' > position l \u00b7 -330; > position \u00b7 l -330; > position L \u00b7 -330; > position \u00b7 L -330; > } kern; > # > > > 4.- Change kerning only with trio of L·L and l·l > This option only change middle dot kerning with trio L·L. Have a problem with > different L uppercases L·l and l·L > # == gemkerntrio = > # Script and language coverage > languagesystem DFLT dflt; > languagesystem latn dflt; > > > # Kerning > feature kern { > # Middle dot arround L·L and l·l > position l \u00b7' <-330 0 -660 0> l; > position L \u00b7' <-330 0 -660 0> L; > } kern; > # > > > > 19cat > > > > > ___ > 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 ___
Re: [NTG-context] adapt fontsize to given width
On Wed, 14 Jan 2015 17:50:12 +0100 Pablo Rodriguez wrote: > Dear list, > > I have the following sample: > > \showframe > \starttext > {\setupbodyfont[120pt]My Title} > \stoptext > > Is there a way to make ConTeXt automatically calculate the size of the > \setupbodyfont, so that the passage fits exactly to text width? > > Many thanks for your help, > > > Pablo There is a MP solution: \starttext \startMPcode draw textext("My Title") xsized TextWidth ; \stopMPcode \stoptext 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Center two frames
> Am 14.01.2015 um 18:50 schrieb Fabrice : > > Dear Pablo, > Following a post to which you had already answered, I have been able to do > using a XTABLE. > But I wanted to know if it was possible to do otherwise. But apparently not, > so I'll hold your solution. > > Dear Wolfgang, > Why is it better to use a framed text environment? With framedtext you need only one environment to put a frame around your text and center it (you can also set the distance before and after the environment) while the \framed command requires you to center the content with additional commands, you have to add also a manual blank command to set a distance before/after the text. 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 ___
Re: [NTG-context] adapt fontsize to given width
> Am 14.01.2015 um 17:50 schrieb Pablo Rodriguez : > > Dear list, > > I have the following sample: > >\showframe >\starttext >{\setupbodyfont[120pt]My Title} >\stoptext > > Is there a way to make ConTeXt automatically calculate the size of the > \setupbodyfont, so that the passage fits exactly to text width? \starttext \WidthSpanningText{My Title}{\textwidth}{Serif} \WidthSpanningText{My Title}{12cm}{MonoBold} \WidthSpanningText{My Title}{14cm}{SansItalic} \stoptext 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 ___
Re: [NTG-context] context -> docx ??
On Tue, 13 Jan 2015 22:34:21 +0100 Marcin Borkowski wrote: > > On 2015-01-13, at 20:59, Idris Samawi Hamid ادريس سماوي حامد > wrote: > > > Dear gang, > > > > I'm currently writing a paper with very basic typographical needs: > > blockquotes, emphasis, bibliography, perhaps a graphic or two. The > > publisher wants the thing in Word, naturally. The last time I did > > something like this I set up a markdown document and just exported > > it to both docx and to context. For simple documents this is at > > least workable, but I'd prefer to write in context, not markdown. > > While I /do/ understand you (it's the same with me, only that I'm more > comfortable with LaTeX), have you considered Org-mode? It's > similar to markdown (though better IMHO), but it comes with great > support in Emacs. And you get export to odt "for free". (Also to > LaTeX, though unfortunately not to ConTeXt; OTOH, writing a ConTeXt > exporter should be fairly easy, and a simple exporter could be done in > a few days - the framework for writing exporters to different formats > is very well done. Incidentally, there's also a Markdown exporter, > so you could probably get to ConTeXt via markdown). > > > Best wishes > > Idris > > Best, > Org-mode does not simply come with great support in Emacs, it is essentially an emacs module I believe. Using ConTeXt (not emacs, markdown, or other such things...) you can indeed export to xml, xhtml, and create epub files. How these can get converted to Word is another problem that is to be addressed to the MS-Word community. Hans showed us at the last ConTeXt conference: MWE: \enablemode[export] \startmode[export] \setupbackend [export=yes, xhtml=yes, css=export-example.css] \setupexport [hyphen=yes, width=60em] \stopmode \starttext \startquotation \input darwin \stopquotation \stoptext The css example file can be found in the standalone: tex/texmf-context/tex/context/base/export-example.css This creates a filename-export directory. The xhtml file can be read in a browser. (some tools seem to have problem with the hyphen=yes option) You will also notice the message: backend > export > create epub with: mtxrun --script epub --make "filename" [--purge --rename --svgmath] Running mtxrun will create the epub file. I have tested reading it on an iPad. There must be some way to get this into Word... 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Center two frames
Dear Pablo, Following a post to which you had already answered, I have been able to do using a XTABLE. But I wanted to know if it was possible to do otherwise. But apparently not, so I'll hold your solution. Dear Wolfgang, Why is it better to use a framed text environment? ___ 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] Catalan especial character (l·l) in ConTeXt
Thanks to All, But your solutions do not like me. And I keep trying the option of Fontfeaturefile page in wiki and Adobe feature topic. - http://wiki.contextgarden.net/fontfeaturefiles - http://wiki.contextgarden.net/TrueType_fonts_in_luaTeX - http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html With this I had found 4 good solutions. I think that for Catalans, the best is gemkerndot.fea I attached files for test. This is a short sample context file with diferent feature files options # == geminated.tex = % Check each feature \definefontfeature[default][default][featurefile=gemligature.fea] %\definefontfeature[default][default][featurefile=gemkerndot.fea] %\definefontfeature[default][default][featurefile=gemkernpair.fea] %\definefontfeature[default][default][featurefile=gemkerntrio.fea] \starttext \section{Geminated l·l} COL·LEGI Col·legi Col·Legi CoL·legi \stoptext # 1.- Create a ligature from L· and l· to special characters This option substitute my SED command for replace L· and l· to respective special characters. # == gemligature.fea = # Script and language coverage languagesystem DFLT dflt; languagesystem latn dflt; # Ligature feature liga { # Create a ligature substitute l \u00b7 by \u0140; substitute L \u00b7 by \u013F; } liga; # 2.- Change kerning of middle dot. This option change middle dot kerning in all cases # == gemkerndot.fea = # Script and language coverage languagesystem DFLT dflt; languagesystem latn dflt; # Kerning feature kern { # All middle dots position \u00b7 <-330 0 -660 0>; } kern; # 3.- Change kerning of pair middle dot and L characters (suffix and prefix) This option only change middle dot and L kerning in pair cases # == gemkernpair.fea = # Script and language coverage languagesystem DFLT dflt; languagesystem latn dflt; # Kerning feature kern { # Middle dot pair arround 'L' position l \u00b7 -330; position \u00b7 l -330; position L \u00b7 -330; position \u00b7 L -330; } kern; # 4.- Change kerning only with trio of L·L and l·l This option only change middle dot kerning with trio L·L. Have a problem with different L uppercases L·l and l·L # == gemkerntrio = # Script and language coverage languagesystem DFLT dflt; languagesystem latn dflt; # Kerning feature kern { # Middle dot arround L·L and l·l position l \u00b7' <-330 0 -660 0> l; position L \u00b7' <-330 0 -660 0> L; } kern; # 19cat geminated.tex Description: Binary data gemligature.fea Description: Binary data gemkerndot.fea Description: Binary data gemkernpair.fea Description: Binary data gemkerntrio.fea Description: Binary data ___ 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] adapt fontsize to given width
Dear list, I have the following sample: \showframe \starttext {\setupbodyfont[120pt]My Title} \stoptext Is there a way to make ConTeXt automatically calculate the size of the \setupbodyfont, so that the passage fits exactly to text width? 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Center two frames
> Am 14.01.2015 um 13:14 schrieb Pablo Rodriguez : > > \defineframed > [Myframed] > [width=0.6\textwidth, >foregroundstyle={\switchtobodyfont[10pt]}, >align={high,flushleft}, >frame=off, >framecolor=0.625white, >background=borderline, >] You can replace the framed command with a framed text environment, e.g. \defineframedtext [Myframed] [width=0.6\textwidth, foregroundstyle={\switchtobodyfont[10pt]}, align={high,flushleft}, frame=off, framecolor=0.625white, background=borderline, location=middle, offset=.5ex] and change > \startmidaligned > \Myframed{\getbuffer} > \stopmidaligned to \startMyframed \getbuffer \stopMyframed 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 ___
Re: [NTG-context] Center two frames
On 01/13/2015 10:43 PM, Fabrice Couvreur wrote: > Hi, > I wish the second frameis centered with the first frame. I guess this is > the figure that prevents this. However, even by reducing the value of u, > it does not work. > Best regards, > Fabrice Hi Fabrice, I think that the figure gives a different width to center the frame. Reducing the value of u to 0.175cm does work (although this is almost useless :-)). An xtable may do what you need: %~ \showframe \definecolor[Border][c=0.00, m=0.00, y=0.00, k=0.25] \defineframed [Myframed] [width=0.6\textwidth, foregroundstyle={\switchtobodyfont[10pt]}, align={high,flushleft}, frame=off, framecolor=0.625white, background=borderline, ] \definefiller[dots][left=\dontleavehmode,right=\hskip\zeropoint\par] \starttext \startuniqueMPgraphic{borderline} path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; draw p withcolor \MPcolor{Border} dashed evenly withpen pencircle scaled 1.2pt ; \stopuniqueMPgraphic \defineoverlay[borderline][\uniqueMPgraphic{borderline}] \startxtable[frame=off] \startxrow \startxcell[align=normal] Compléter chacun des algorithmes ci-dessous afin qu'ils affichent en \unit{square meter}, puis en hectares, la superficie d'un terrain rectangulaire de longueur $L$ mètres et de largeur $l$ mètres, saisies en entrée. \stopxcell \startxcell \switchtobodyfont[7pt] \startMPcode numeric u; u=0.7cm; z0=(0,0) ; z1=(2.5u,0) ; z2=(2.5u,2.5u) ; z3=(0,2.5u) ; z4=(-0.2u,0) ; z5=(-0.2u,2.5u) ; z6=(0,2.7u) ; z7=(2.5u,2.7u) ; z8=(1.25u,1.25u) ; drawdblarrow z4--z5 ; drawdblarrow z6--z7 ; fill z0--z1--z2--z3--cycle withcolor green ; draw z0--z1--z2--z3--cycle ; label.top("\unit{100 meter}",0.5[z6,z7]) ; label.lft("\unit{100 meter}",0.5[z4,z5]) ; \stopMPcode \stopxcell \stopxrow \stopxtable \startbuffer \input knuth \stopbuffer \blank[big] \startmidaligned \Myframed{\getbuffer} \stopmidaligned \startbuffer \input ward \stopbuffer \blank[big] \startmidaligned \Myframed{\getbuffer} \stopmidaligned \stoptext I hope 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___