[NTG-context] Re: creating a printed book

2024-10-13 Thread Henning Hraban Ramm

Am 13.10.24 um 00:32 schrieb angel.of.no...@gmail.com:

I think that there is a bug in your docx2ctx.py.  It works for files which do 
not have embedded pngs  in them.  But for files which do:
TypeError: unsupported operand type(s) for /: 'str' and 'str'


I forgot a pathlib.Path, it’s fixed now. Apparently I never had embedded 
images since I changed that code…


Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: creating a printed book

2024-10-13 Thread Henning Hraban Ramm

Am 12.10.24 um 19:59 schrieb Hans Hagen via ntg-context:

On 10/11/2024 10:16 PM, Hraban Ramm wrote:

Am 11.10.24 um 18:19 schrieb David Roderick:
I have created 22 MSword files mainly text with embedded PNG 
diagrams.  I am seeking to have these converted to Context and to 
redo the (simple) diagrams.  I was thinking of using MetaPost.  I am 
seeking to pay a typesetter to assist me in this task.  I would be 
willing to pay for your time or for the time of a colleague you could 
direct me to.  I am seeking to have typeset a book.  The MSWord files 
have already been professionally proof-read, and the subject matter 
is political economy from the 18th century and how this translates to 
and may contradict conventional wisdom within the field of modern 
economics.


Other typesetters I have contacted have suggested running pandoc to 
create a LaTeX file and use Tikz for the diagrams.  But I have spent 
3 days reading on advancements in the ConText side of the industry 
which I suspect is far more advanced.  I would prefer to use better 
tools as a longer term solution.  Can you advise me?


Hi David,

I would take your order, but you can also try it yourself with my tools:
https://codeberg.org/fiee/context-tools/src/branch/master/docx2ctx

Pandoc can also generate ConTeXt code; try which you like better.


I'd never go that route when, as mentioned, a high quality document is 
needed which can involve control (for which one can e.g. use instances 
for specific components). Coding in TeX speak is not that bad. Also, one 
is more likely to get answers for specific problems on the list.


I don’t suggest using DOC(X) to directly create PDF via Pandoc and 
ConTeXt, just converting DOC(X) to ConTeXt for further processing.


The direct approach works only with simple and/or very consistently 
styled documents.


For my youth novel, I’m writing in LibreOffice, convert ODS to DOCX, 
convert that to ConTeXt with my script and finalize the code with an 
additional script, so that it doesn’t need further tweaking. This works 
only because I control the source and the converter.


My script is not trying to keep the layout, just the structure and some 
formatting.


It can extract embedded images (again, since I fixed the bug) and 
creates an \externalfigure, but that usually isn’t enough. Similar 
situation with embedded tables (the conversion is not good, I’ll 
probably enhance it a bit as soon as I need it).


Hraban
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: creating a printed book

2024-10-13 Thread angel . of . north
Hi Hans,
Are you suggesting that both of Hraban's options you would not go for, or just 
the latter (pandoc)?  What would you recommend to take a MSWord file and 
produce a ConText document?  Should I be thinking of doing all the ConText 
markups manually?  

David
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: creating a printed book

2024-10-13 Thread Hans Hagen via ntg-context

On 10/13/2024 2:19 PM, angel.of.no...@gmail.com wrote:

Hi Hans,
Are you suggesting that both of Hraban's options you would not go for, or just 
the latter (pandoc)?  What would you recommend to take a MSWord file and 
produce a ConText document?  Should I be thinking of doing all the ConText 
markups manually?


It depends on the document. You could do an initial conversions "a la 
Rhaban" but from then on work in "tex lingua". Once you are accustomed 
to it, it's not that hard.


I admit that I never had to work in Word or something other than TeX 
(before that ascii with simple markup a bit like markdown but that was 
ages ago before there was markdown so i wrote a parser and made sure all 
was formatted well for a daisy wheel line printer and/or laser printer).


Maybe just look around abit on the documentation (source) tree to see 
how larger documents look in tex code.


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] GB7714-2015 of author-year format

2024-10-13 Thread wangzhongtian
sorry,corrected the title .I am trying to implement bibliography management in GB/T 7714-2015 (Chinese bibliography style standard), of Author-Year format. The bib list should be sorted by language, author, year, and then the title of the book. The sorting algorithm should use PinYin of Chinese characters to compare the order. I am wondering is this feature already implemented for LuaMetatex? Or if not, any suggestions on how can I implemented this? Like1. How to implement the sorting algorithm?2. Which part of the source code can I rewrite to implement this feature?Thank you all for your time!Best,zhongtian wang Shijiazhuang YouWen Information Technology Co.,Ltd,China13311202589 wang...@189.cn -- 原始邮件 --发件人:wangzhongtian "wang...@189.cn"时 间:2024/10/12 15:03:51 周六收件人:mailing list for ConTeXt users "ntg-context@ntg.nl"抄送人:主 题:[NTG-context] Re: Artifact in flow cell connectionI am trying to implement bibliography management in GB/T 7714-2015 (Chinese bibliography style standard), of Author-Year format. The bib list should be sorted by language, author, year, and then the title of the book. The sorting algorithm should use PinYin of Chinese characters to compare the order. I am wondering is this feature already implemented for LuaMetatex? Or if not, any suggestions on how can I implemented this? Like1. How to implement the sorting algorithm?2. Which part of the source code can I rewrite to implement this feature?Thank you all for your time!Best,zhongtian wang Shijiazhuang YouWen Information Technology Co.,Ltd,China13311202589 wang...@189.cn -- 原始邮件 --发件人:Bernd Donner via ntg-context "ntg-context@ntg.nl"时 间:2024/10/12 04:47:29 周六收件人:ntg-context@ntg.nl抄送人:Bernd Donner "bleau1...@googlemail.com"主 题:[NTG-context] Artifact in flow cell connectionHi,I have a broken flow cell connection in this minimal example. The broken flow cell is only triggered when drawn within a subsection with an overlay. The logic to create the underlined subsection is by the way copied from the metafun manual source. I do not have the slightest clue what is going wrong in this example. Thanks for ideas.Best, Bernd\usemodule[chart]\startuniqueMPgraphic{SectionUnderline}   path p;p:= unitsquare xscaled OverlayWidth yscaled OverlayHeight;   draw llcorner p -- lrcorner p;   setbounds currentpicture to p; \stopuniqueMPgraphic\defineoverlay[SectionUnderline][\uniqueMPgraphic{SectionUnderline}]\starttexdefinition unexpanded ChapterCommand #1#2  \framed [background="" {#2}\stoptexdefinition\setuphead  [subsection]  [command=\ChapterCommand]\starttext\subsection[title=Introduction]\startFLOWchart[toolchain]\startFLOWcell  \location{1,1}  \connection [bt] {compiler}\stopFLOWcell\startFLOWcell  \name {compiler}  \location{1,2}  \shape{product}\stopFLOWcell\stopFLOWchart\FLOWchart[toolchain]\stoptext___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___