Re: [NTG-context] compresslevel and png graphics (mkiv)
Am 2011-05-26 um 19:43 schrieb mathew: Some numbers: SVG to PDF: Two diagrams, 25k. SVG to EPS: Same two diagrams, 54k. Difference: 29k. Document rendered using the PDFs: 535k. Document rendered using the EPSs: 463k. Difference: 72k in the opposite direction. Be aware that ConTeXt needs to convert EPS (or SVG) to PDF before including - so providing EPS might elongate processing time. And PDF sizes depend very much on the used tools, e.g. Acrobat Distiller PDFs are often smaller than GhostScript PDFs, even if there's no downgrading of pixel images involved. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___ 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] Why \goto not wok in ConTeXt in Win7
Am 27.05.2011 um 04:17 schrieb 王雨施: > Hi, everyone , I use the newest ConTeXt in Win7 , the version information as > follow > > mtx-context | main context file: > d:/context/tex/texmf-context/tex/context/ba > se/context.mkiv > mtx-context | current version: 2011.05.06 16:52 > > When I use goto in my document , it does not work, like the following, can > anyone > help me. Thanks Add “\setupinteraction[state=start]” to your document. 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 ___
[NTG-context] Why \goto not wok in ConTeXt in Win7
Hi, everyone , I use the newest ConTeXt in Win7 , the version information as follow mtx-context | main context file: d:/context/tex/texmf-context/tex/context/ba se/context.mkiv mtx-context | current version: 2011.05.06 16:52 When I use goto in my document , it does not work, like the following, can anyone help me. Thanks I use context --mode=screen test to compile the document \starttext \title[content]{mulu} \placecontent \chapter{One} \setuppagenumbering [style=\tfx, location=] \startmode[screen] \switchtobodyfont[8pt] \setupfootertexts [{haha}][{\goto{back}[content]}] [{\goto{back}[content]}][{haha}] \stopmode \input knuth \chapter{Two} \input knuth \chapter{Three} \input knuth \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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] compresslevel and png graphics (mkiv)
On Wed, May 25, 2011 at 11:40 AM, Hans Hagen wrote: > On 25-5-2011 2:43, Peter Rolf wrote: >> >> Hi, >> >> I just made a one pager (TEXpage) out of a big png graphic (5900x4094). >> The compressed size of the graphics is normally around 1.37MB on the >> highest png compress level (9) and 1.32MB after using optipng (only >> around 3% reduction this time). To my surprise the size of the final PDF >> was about 2.3MB. After adding '\pdfcompresslevel9' the size went down to >> 1.48MB. Still not what I wanted... > > Normally I convert such images to pdf first (using acrobat or gs) simply > because inclusion of pdf is much faster. I too convert images to pdf first, but my mainly because I can control the details of the conversion to get the best result for each (type of) image. Some images are well suited to jpeg compression, others are better with reduced color space and lossless compression. The ability to directly include images in tex should be seen as a convenience, but not a basis for a workflow where the final product has requirements for minimal size, color rendition, etc. There are many free image to pdf tools that all do the easy cases adequately but don't give the level of control needed for the difficult cases. SVG is different because much of it is based on a graphics model that resembles PDF. Some SVG documents translate directly to PDF, but others, e.g., markers, may "blow up" when translated. -- George N. White III Head of St. Margarets Bay, Nova Scotia ___ 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] TOC : Chapter title under its number (separate lines)
Am 26.05.2011 um 18:48 schrieb Alan Braslau: > \define[3]\ChapterList > {\vbox{\par\noindent\currentlistsymbol#1\crlf#2\enspace\listdots\enspace#3}} Your \par is useless here because we’re in a box. > \setuplist[chapter][label=yes,alternative=vertical,command=\ChapterList,interaction=all] > > Almost works. Almost in that all lines get indented by one level, > and then the page number (and the title if it is long and multi-line) > stick(s) out by this much on the right. > > The manual is a bit cryptic concerning horizontal and vertical: > "As an alternative for none, we can use horizontal and vertical. > Both commands have their spacing tuned for typesetting lists in > for instance menus." I don’t read the manual very often, so i missed this. There are two ways to have a interactive list: 1. Patch the command alternative 2. Introduce a new alternative which has interactive support plus a few more missing features (e.g. label support) 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] compresslevel and png graphics (mkiv)
2011/5/25 Hans Hagen : > Normally I convert such images to pdf first (using acrobat or gs) simply > because inclusion of pdf is much faster. - > podofoimg2pdf --help Usage: podofoimg2pdf [output.pdf] [-useimgsize] [image1 image2 image3 ...] Options: -useimgsizeUse the imagesize as page size, instead of A4 PoDoFo Version: "0.8.4" This tool will combine any number of images into a single PDF. This is useful to create a document from scanned images. Large pages will be scaled to fit the page and imags smaller than the defined page size, will be centered. Supported image formats: JPEG PNG TIFF - I haven't tested it. Best Martin ___ 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] compresslevel and png graphics (mkiv)
On Thu, May 26, 2011 at 12:32, mathew wrote: > But I just experimentally preconverted all my PNGs to PDF using > ImageMagick, and my document dropped from 411k to 98k. The PNGs had > previously been optimized with pngnq, so they were only 99k, and are > 177k when converted to PDF, so this result is surprising. Unfortunately, it looks as if it's not as general a result as the "use EPS rather than PDF for SVG" rule. I just tried another document, and that one grew by 90k when I preconverted the PNGs to PDF (again using ImageMagick). So it seems the answer to whether PDF or PNG gives better final document size is to try both and see what happens. Not really ideal. mathew ___ 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] compresslevel and png graphics (mkiv)
On Thu, May 26, 2011 at 12:32, mathew wrote: > Wow, that's odd. I've found that SVG -> PDF -> MkIV results in huge > document bloat, whereas SVG -> EPS -> MkIV works much better. (Using > Inkscape for both SVG conversions.) Some numbers: SVG to PDF: Two diagrams, 25k. SVG to EPS: Same two diagrams, 54k. Difference: 29k. Document rendered using the PDFs: 535k. Document rendered using the EPSs: 463k. Difference: 72k in the opposite direction. Documents otherwise identical. These are some small diagrams, too. With larger diagrams I started getting PDFs so huge that Okular wouldn't display them. mathew ___ 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] compresslevel and png graphics (mkiv)
On Wed, May 25, 2011 at 09:40, Hans Hagen wrote: > Normally I convert such images to pdf first (using acrobat or gs) simply > because inclusion of pdf is much faster. Wow, that's odd. I've found that SVG -> PDF -> MkIV results in huge document bloat, whereas SVG -> EPS -> MkIV works much better. (Using Inkscape for both SVG conversions.) But I just experimentally preconverted all my PNGs to PDF using ImageMagick, and my document dropped from 411k to 98k. The PNGs had previously been optimized with pngnq, so they were only 99k, and are 177k when converted to PDF, so this result is surprising. Are my experiences with SVG to PDF atypical? Should I try to put together an example for debugging? mathew -- http://www.pobox.com/~meta/> ___ 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] \definehead \setuphead new type included in a list such as TOC
Am 26.05.2011 um 18:15 schrieb Mathieu DUPONT: > > Hi, > > In the following example, I define 2 new heads, and I want them to : > > 1- inherits from Title (or Chapter would be fine) > 2- show in the TOC > 3- not be counted (CHAPTER should be 1) > > Is there an option I can put into \setuphead[Abstract][] so it gets included > in the TOC ? > That would be the easiest way of getting the three desired results. Your own headings aren’t shown in the TOC because you use \completecontent which lists only the default numbered headings (\part, \chapter etc.) There are different solution: 1. Replace \completecontent with the following \title{Contents} \placelist[part,chapter,Abstract,Intro, section,...] 2. Redefine \completecontent (it’s explained in the big manual): \definecombinedlist[content][part,chapter,Abstract,Intro, section,...] 3. Create your own combinedlist: \definecombinedlist[mycontent][part,chapter,Abstract,Intro, section,...] \setupheadtext[mycontent=Contents] \starttext \completemycontent \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] TOC : Chapter title under its number (separate lines)
On Thu, May 26, 2011 at 05:30:55PM +0200, Wolfgang Schuster wrote: > > Am 26.05.2011 um 17:13 schrieb Alan Braslau: > > > This solution: [alternative=command,command=\ChapterList] > > breaks interaction; How can one get [interaction=all] to work? > > Something like this: > > \setupinteraction[state=start] > > \define[3]\ChapterList > {\vbox{#1\crlf#2\hfill#3}} > > \setuplist > [chapter] > [alternative=vertical, >command=\ChapterList, >interaction=all] > > \starttext > > \completecontent > > \chapter{One} > \chapter{Two} > > \stoptext > > I guess i should take a closer look at “horizontal” and “vertical” > because the label key has no effect for them. > > Wolfgang > \define[3]\ChapterList {\vbox{\par\noindent\currentlistsymbol#1\crlf#2\enspace\listdots\enspace#3}} \setuplist[chapter][label=yes,alternative=vertical,command=\ChapterList,interaction=all] Almost works. Almost in that all lines get indented by one level, and then the page number (and the title if it is long and multi-line) stick(s) out by this much on the right. The manual is a bit cryptic concerning horizontal and vertical: "As an alternative for none, we can use horizontal and vertical. Both commands have their spacing tuned for typesetting lists in for instance menus." 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] compresslevel and png graphics (mkiv)
Am 26.05.2011 12:52, schrieb Peter Rolf: > Am 25.05.2011 21:54, schrieb Hartmut Henkel: [..] >> >> no. There is a "PNG Copy" function for literal embedding of the PNG >> file, but that triggers only, if the file simultaneously satisfies quite >> a few conditions, which are about: non-interlaced, no palette, no >> transparency, no gamma coming with it, no gamma modification requested, >> no white adjustment in the PNG, and a few more rare others. Else it's >> de-compressed and then re-compressed to the \pdfcompresslevel, and >> additional streams and dicts are added. You see in the log if it finally >> was "PNG Copy" or not. >> [..] >> >> These are about the factors affecting the PNG to PDF size. For your big >> PNG graphic you may find a preprocessing (e. g., pngtopnm | pnmtopng >> will definitely remove all fat) that makes it compliant with the "PNG >> copy". >> > I will give that a try. But I doubt that there is much 'fat' on that > graphic. Anyhow, you never know before you have tried it. :-) > No luck. I used imagemagick to convert to pnm and back. Transparency was removed before by adding a white background, also all not critical chunks (ICC profile, backgroundcolor, resolution, creation and modify date, comment) were removed. The graphic is a valid PNG (TweakPNG) and aside from the size, there is nothing special with this graphic. Still no '(PNG copy)'. @luigi: an ICC profile definitely breaks the rules The only chunks left are IHDRPNG image header: 5900x4094, 8bits/sample, truecolor, noninterlaced IDATPNG image data .. IDATPNG image data IENDend-of-image marker Mh, where is the show stopper? The compression method? Regards, 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 ___
[NTG-context] \definehead \setuphead new type included in a list such as TOC
Hi, In the following example, I define 2 new heads, and I want them to : 1- inherits from Title (or Chapter would be fine)2- show in the TOC3- not be counted (CHAPTER should be 1) Is there an option I can put into \setuphead[Abstract][] so it gets included in the TOC ?That would be the easiest way of getting the three desired results. Thanks ! \definehead[Abstract][title]\setuphead[Abstract][]\definehead[Intro][title]\setuphead[Intro][] \starttext \startfrontmatter\placecontent\Abstract{ABSTRACT}\stopfrontmatter \startbodymatter\Intro{INTRODUCTION}\chapter{CHAPTER}\stopbodymatter \stoptext Mathieu ___ 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] \crlf breaks alignment inheritance
Wolfgang Schuster writes: > Am 26.05.2011 um 16:02 schrieb Marco Pessotto: > >> In the example I provided, I can't break the line without starting a new >> paragraph and without messing it, unless I reset the "middle" in the nested >> alignment. So I believe there's something in the inheritance that breaks. > > The “middle” is necessary because \crlf use a flag insert \hfill at > the end of the line where it was put when you have left aligned text. > > This flag is reset with \setupalign and also \startalignment and > the command thinks you have left aligned text unless you add the “middle” > keyword and \crlf does now know that it shouldn’t insert \hfill. > > With a new paragraph this doesn’t happen and you get always the correct > output. > > Wolfgang Thanks again :-) -- Marco ___ 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] TOC : Chapter title under its number (separate lines)
Am 26.05.2011 um 17:13 schrieb Alan Braslau: > This solution: [alternative=command,command=\ChapterList] > breaks interaction; How can one get [interaction=all] to work? Something like this: \setupinteraction[state=start] \define[3]\ChapterList {\vbox{#1\crlf#2\hfill#3}} \setuplist [chapter] [alternative=vertical, command=\ChapterList, interaction=all] \starttext \completecontent \chapter{One} \chapter{Two} \stoptext I guess i should take a closer look at “horizontal” and “vertical” because the label key has no effect for them. 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] Removing page numbering on the first page of a list such as the TOC
Thank you ! Mathieu From: schuster.wolfg...@googlemail.com Date: Thu, 26 May 2011 13:29:46 +0200 To: ntg-context@ntg.nl Subject: Re: [NTG-context] Removing page numbering on the first page of a list such as the TOC Am 26.05.2011 um 11:10 schrieb Mathieu DUPONT:Hi, I can't find out how to remove the header on the first page of a list, e.g the TOC. \setuphead[content][header=empty] won't do anything. Anyone has an idea ? There is no heading with the name “content”. \definehead[content][title] \setuphead[content][header=empty] \starttext \content{Contents} \placecontent \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 ___ ___ 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] TOC : Chapter title under its number (separate lines)
On Tue, May 24, 2011 at 01:42:41PM +0200, Wolfgang Schuster wrote: > > Am 24.05.2011 um 00:59 schrieb Mathieu DUPONT: > > > Hi, > > Is there a simple way to obtain the following result in the table of > content : > > Contents > CHAPTER 1 > Title of chapter2 > 1.1Title of section2 > > (the chapter title underneath its number and left aligned, just like > everything else) > > The following code used to do the job with MkII but it doesn't anymore > with > MkIV : > > \setuplabeltext[chapter=CHAPTER~] > \setuplist[chapter][label=yes, style={\blank[0cm]}] > \starttext > > \startfrontmatter > \completecontent > \stopfrontmatter > > \startbodymatter > \chapter{Title of chapter} > \section{Title of section} > \stopbodymatter > > \stoptext > > Instead, I get something like this (I hope it turns out readable through > the email) : > > Contents > CHAPTER 1 > Title of chapter2 > 1.1Title of section2 > > where the 2 lines of the chapter, together with their alignment with the > frame, get tossed to the right... > > > I do get with MkIV the first example like you expect but “style={\blank[0cm]}” > is the wrong way. Such a layout can be easily done with your own list-command > for chapter but the labeltext is tricky: > > \setuplabeltext[chapter=CHAPTER~] > > % \define[3]\ChapterList % no label! > % {#1\crlf#2\wordright{#3}} > > % \define[3]\ChapterList % fixed label, wrong for appendices! > % {\labeltext{chapter}#1\crlf#2\wordright{#3}} > > \define[3]\ChapterList > {\currentlistsymbol\crlf#2\wordright{#3}} > > \setuplist[chapter][label=yes,alternative=command,command=\ChapterList] > > \starttext > > \startfrontmatter > \completecontent > \stopfrontmatter > > \startbodymatter > \chapter{Title of chapter} > \section{Title of section} > \stopbodymatter > > \stoptext > > Wolfgang > Wolfgang, This solution: [alternative=command,command=\ChapterList] breaks interaction; How can one get [interaction=all] to work? 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] \crlf breaks alignment inheritance
Am 26.05.2011 um 16:02 schrieb Marco Pessotto: > In the example I provided, I can't break the line without starting a new > paragraph and without messing it, unless I reset the "middle" in the nested > alignment. So I believe there's something in the inheritance that breaks. The “middle” is necessary because \crlf use a flag insert \hfill at the end of the line where it was put when you have left aligned text. This flag is reset with \setupalign and also \startalignment and the command thinks you have left aligned text unless you add the “middle” keyword and \crlf does now know that it shouldn’t insert \hfill. With a new paragraph this doesn’t happen and you get always the correct output. 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] \crlf breaks alignment inheritance
Wolfgang Schuster writes: > Am 26.05.2011 um 16:02 schrieb Marco Pessotto: > >> So what's the correct way to force a line break without starting a new >> paragraph, like \\ in LaTeX? Maybe the paragraph is marked also by more >> spacing, and that particular linebreak is not meant to be a paragraph >> ending. Like, e.g., for poems. And I believed the \crlf was the correct >> way to do it. Please correct me if I'm wrong. > > To suppress whitespace between paragraph you can use the packed environment. > > For poems i suggest to use the lines environment where the end of each line > is also the end of a paragraph, you can also change the alignment of > the content with the align key of the environment, e.g. > > \startlines[align=middle] > … > \stoplines > > or change the settings global (i.e. \setuplines[align=middle]). > > Wolfgang Ok, thanks for your answers. -- Marco ___ 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] \crlf breaks alignment inheritance
Am 26.05.2011 um 16:02 schrieb Marco Pessotto: > So what's the correct way to force a line break without starting a new > paragraph, like \\ in LaTeX? Maybe the paragraph is marked also by more > spacing, and that particular linebreak is not meant to be a paragraph > ending. Like, e.g., for poems. And I believed the \crlf was the correct > way to do it. Please correct me if I'm wrong. To suppress whitespace between paragraph you can use the packed environment. For poems i suggest to use the lines environment where the end of each line is also the end of a paragraph, you can also change the alignment of the content with the align key of the environment, e.g. \startlines[align=middle] … \stoplines or change the settings global (i.e. \setuplines[align=middle]). 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] \crlf breaks alignment inheritance
Wolfgang Schuster writes: > Am 26.05.2011 um 15:25 schrieb Marco Pessotto: > >> Wolfgang Schuster writes: >> >>> Am 26.05.2011 um 10:53 schrieb Marco Pessotto: >>> Hello there! I've found a problem with the latest ConTeXt, but I guess it's been present for a while. >>> >>> Use \par or an empty line. >>> >>> Wolfgang >> >> The workaround was already present in the minimal example (setting again >> the middle alignment). I was just reporting a problem. > > \par (or a empty line) isn’t a workaround, it’s the correct way to end > a paragraph and \crlf is the workaround which doesn’t work in all cases. So what's the correct way to force a line break without starting a new paragraph, like \\ in LaTeX? Maybe the paragraph is marked also by more spacing, and that particular linebreak is not meant to be a paragraph ending. Like, e.g., for poems. And I believed the \crlf was the correct way to do it. Please correct me if I'm wrong. In the example I provided, I can't break the line without starting a new paragraph and without messing it, unless I reset the "middle" in the nested alignment. So I believe there's something in the inheritance that breaks. Bests -- Marco ___ 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] \crlf breaks alignment inheritance
Am 26.05.2011 um 15:25 schrieb Marco Pessotto: > Wolfgang Schuster writes: > >> Am 26.05.2011 um 10:53 schrieb Marco Pessotto: >> >>> >>> Hello there! >>> >>> I've found a problem with the latest ConTeXt, but I guess it's been >>> present for a while. >> >> Use \par or an empty line. >> >> Wolfgang > > The workaround was already present in the minimal example (setting again > the middle alignment). I was just reporting a problem. \par (or a empty line) isn’t a workaround, it’s the correct way to end a paragraph and \crlf is the workaround which doesn’t work in all cases. 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] \crlf breaks alignment inheritance
Wolfgang Schuster writes: > Am 26.05.2011 um 10:53 schrieb Marco Pessotto: > >> >> Hello there! >> >> I've found a problem with the latest ConTeXt, but I guess it's been >> present for a while. > > Use \par or an empty line. > > Wolfgang The workaround was already present in the minimal example (setting again the middle alignment). I was just reporting a problem. Cheers <#secure method=pgpmime mode=sign> -- Marco ___ 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] linux / tetex
Hi, I don't know who maintains this http://wiki.contextgarden.net/Installation but the reference to tetex looks obsolete to me Hans - 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] \crlf breaks alignment inheritance
Am 26.05.2011 um 10:53 schrieb Marco Pessotto: > > Hello there! > > I've found a problem with the latest ConTeXt, but I guess it's been > present for a while. Use \par or an empty line. 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] Removing page numbering on the first page of a list such as the TOC
Am 26.05.2011 um 11:10 schrieb Mathieu DUPONT: > > Hi, > > I can't find out how to remove the header on the first page of a list, e.g > the TOC. > > \setuphead[content][header=empty] > > won't do anything. > > Anyone has an idea ? There is no heading with the name “content”. \definehead[content][title] \setuphead[content][header=empty] \starttext \content{Contents} \placecontent \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] compresslevel and png graphics (mkiv)
On Thu, May 26, 2011 at 12:52 PM, Peter Rolf wrote: > Am 25.05.2011 21:54, schrieb Hartmut Henkel: >> On Wed, 25 May 2011, Hans Hagen wrote: >>> On 25-5-2011 2:43, Peter Rolf wrote: I just made a one pager (TEXpage) out of a big png graphic (5900x4094). The compressed size of the graphics is normally around 1.37MB on the highest png compress level (9) and 1.32MB after using optipng (only around 3% reduction this time). To my surprise the size of the final PDF was about 2.3MB. After adding '\pdfcompresslevel9' the size went down to 1.48MB. Still not what I wanted... So I was wondering: is there an option to embed the png graphic as it is (no re-compression)? >> >> no. There is a "PNG Copy" function for literal embedding of the PNG >> file, but that triggers only, if the file simultaneously satisfies quite >> a few conditions, which are about: non-interlaced, no palette, no >> transparency, no gamma coming with it, no gamma modification requested, >> no white adjustment in the PNG, and a few more rare others. Else it's >> de-compressed and then re-compressed to the \pdfcompresslevel, and >> additional streams and dicts are added. You see in the log if it finally >> was "PNG Copy" or not. >> > Sigh, most of my graphics use (and need) transparency. > So the only advantage I get from optipng is the smaller file size on my > disk. Sad, but good to know. ;-) > >> Preprocessing the PNG, e. g., by convert, sometimes changes it that it >> gets copyable. Obviously flattening transparency also helps. >> >> Anyway direct embedding or not can have positive or negative influence >> on the PDF file size. E. g. if a PNG is copied verbatim, and it contains >> lots of meta-data info, the PDF file will probably get larger, since >> normal PNG embedding removes all these info chunks. >> > And what about icc profiles? removed, I suppose. Not really a big problem, and doable in mkiv (see Hacked image color space. in texmf-dist/doc/pdftex/manual/samplepdf of a recent texlive) -- luigi ___ 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] compresslevel and png graphics (mkiv)
Am 25.05.2011 21:54, schrieb Hartmut Henkel: > On Wed, 25 May 2011, Hans Hagen wrote: >> On 25-5-2011 2:43, Peter Rolf wrote: >>> >>> I just made a one pager (TEXpage) out of a big png graphic >>> (5900x4094). The compressed size of the graphics is normally around >>> 1.37MB on the highest png compress level (9) and 1.32MB after using >>> optipng (only around 3% reduction this time). To my surprise the >>> size of the final PDF was about 2.3MB. After adding >>> '\pdfcompresslevel9' the size went down to 1.48MB. Still not what I >>> wanted... >>> >>> So I was wondering: is there an option to embed the png graphic as >>> it is (no re-compression)? > > no. There is a "PNG Copy" function for literal embedding of the PNG > file, but that triggers only, if the file simultaneously satisfies quite > a few conditions, which are about: non-interlaced, no palette, no > transparency, no gamma coming with it, no gamma modification requested, > no white adjustment in the PNG, and a few more rare others. Else it's > de-compressed and then re-compressed to the \pdfcompresslevel, and > additional streams and dicts are added. You see in the log if it finally > was "PNG Copy" or not. > Sigh, most of my graphics use (and need) transparency. So the only advantage I get from optipng is the smaller file size on my disk. Sad, but good to know. ;-) > Preprocessing the PNG, e. g., by convert, sometimes changes it that it > gets copyable. Obviously flattening transparency also helps. > > Anyway direct embedding or not can have positive or negative influence > on the PDF file size. E. g. if a PNG is copied verbatim, and it contains > lots of meta-data info, the PDF file will probably get larger, since > normal PNG embedding removes all these info chunks. > And what about icc profiles? > Another factor influencing the size is if it's PDF-1.4 or PDF-1.5: If > you have a 16 bit PNG, for PDF-1.4 it will be automatically reduced to 8 > bit by luatex and pdftex, so suddenly the PDF file gets smaller, but > actually also the image quality (silently) went down. > > These are about the factors affecting the PNG to PDF size. For your big > PNG graphic you may find a preprocessing (e. g., pngtopnm | pnmtopng > will definitely remove all fat) that makes it compliant with the "PNG > copy". > I will give that a try. But I doubt that there is much 'fat' on that graphic. Anyhow, you never know before you have tried it. :-) Thanks Hartmut for the very detailed and interesting answer. Regards, Peter >> Otherwise the time consuming usage of optipng would be a complete >> waste of time. Believe it or not, but size matters :-) > > yes :-) > >> This one is for Hartmut to answer. Keep in mind that pdf does support >> pgn and jpg compression, which is not the same as 'inclusion as-is'. > > fwiw, jpg is always embedded literally (no re-compression). > >> The compresslevel concerns copyright free zip compression of streams >> (that can happen to gave image data). > > Regards, Hartmut > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Removing page numbering on the first page of a list such as the TOC
Hi, I can't find out how to remove the header on the first page of a list, e.g the TOC. \setuphead[content][header=empty] won't do anything. Anyone has an idea ? Thanks. Mathieu ___ 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] TOC : margin size doesn't reset if next section is a chapter
Until then, this works fine for me now.Thank you ! Mathieu From: schuster.wolfg...@googlemail.com Date: Thu, 26 May 2011 06:23:08 +0200 To: ntg-context@ntg.nl CC: pra...@wxs.nl Subject: Re: [NTG-context] TOC : margin size doesn't reset if next section is a chapter Am 25.05.2011 um 22:08 schrieb Mathieu DUPONT:It bugs on the \leftskip command.Any idea why ? I forgot that \listparameter can’t handle arguments in braces(e.g. \listparameter{before}), this is a real limitation and i hopeHans is going to change this. \unprotect\define[3]\ChapterList {\par \listparameter\c!before \leftskip\listparameter\c!margin \noindent\currentlistsymbol\crlf#2\enspace\listdots\enspace#3\par \listparameter\c!after}\protect 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 ___ ___ 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] \crlf breaks alignment inheritance
Hello there! I've found a problem with the latest ConTeXt, but I guess it's been present for a while. See the following example: cut here \starttext \startalignment[middle,nothyphenated,nothanging,stretch] centered \startalignment[hyphenated] this is centered. No problem \stopalignment \startalignment[hyphenated] Why this is not centered?\crlf Becaouse of the \textbackslash crlf \stopalignment \startalignment[hyphenated, middle] this is centered. \crlf No problem \stopalignment centered \stopalignment regular \stoptext cut here Best wishes -- Marco pgp4YflUExBl4.pgp Description: PGP signature ___ 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] TOC : margin size doesn't reset if next section is a chapter
On 26-5-2011 6:23, Wolfgang Schuster wrote: Am 25.05.2011 um 22:08 schrieb Mathieu DUPONT: It bugs on the \leftskip command. Any idea why ? I forgot that \listparameter can’t handle arguments in braces (e.g. \listparameter{before}), this is a real limitation and i hope Hans is going to change this. \unprotect \define[3]\ChapterList {\par \listparameter\c!before \leftskip\listparameter\c!margin \noindent\currentlistsymbol\crlf#2\enspace\listdots\enspace#3\par \listparameter\c!after} \protect we can use the command handler instead but it will need some testing (i'll have a look at it) Hans - 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 ___