ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Images in MultiMarkdown -> context -> PDF
@ 2012-11-21  4:42 Guy Stalnaker
  2012-11-21 10:07 ` Martin Schröder
  0 siblings, 1 reply; 11+ messages in thread
From: Guy Stalnaker @ 2012-11-21  4:42 UTC (permalink / raw)
  To: ntg-context

Hello,

Thanks to Aditya I have discovered ConTeXt which, thus far, seems to 
give me much more control over the images than LaTex does. Yay! Before 
we get the reason for this post, I should note that my workflow is 
MultiMarkdown file, pandoc output of standalone context file, then 
context on that pandoc output. I have edited the context file to include 
a /defineexternalfigure directive to put a frame around all images. The 
images I have are all screenshots of application usage steps. The 
crucial output is html that goes into our online Knowledge base. 
Secondary output is PDF that will be used for our classroom training. 
The screen shots are mostly jpg with a scattering of png, and are all 
different sizes. The pandoc html output looks very much as we want it as 
we can use a css file to customize padding, etc.

I get a very good pdf document, but there is one bewildering issue -- 
the images in the ConTeXt output pdf document are scaled very small. All 
of them, that is, but two which are more correctly sized in the pdf 
document. Almost all of them are jpg images created on a MacOS VM using 
an application called Skitch. I have looked the images over and besides 
some differing exif data all of them have the expected xy dimension 
attributes and I can see no difference between the two that are 'right' 
in the pdf document and the rest that are too small. I've tried playing 
with scale=1000 and factor=<max,fit,broad> in the /defineexternalfigure 
directive and none help; scale=1000 changes nothing at all for the small 
images and scale values above 1000, while modifying the smaller images 
also make the correctly sized images too large. The factor values make 
all images scale to fit the textwidth without exception (that is, I can 
see no difference whatever in the three options), making smaller images 
far to large and pixelated. I took one image and used GIMP to modify its 
DPI to 300 thinking perhaps that might be a factor, but the 72dpi and 
300dpi images look identically sized in the PDF document.

The texexex output only says this about the images:

<quote>
  <./images/group54/26378/CMSLogin_300dpi.jpg>
figures         : dimensions of images/group54/26378/CMSLogin_300dpi.jpg 
loaded
  from figurefile itself
...
  <./images/group54/26378/CMSSelectProjectDropDown.jpg>
figures         : dimensions of 
images/group54/26378/CMSSelectProjectDropDown.j
pg loaded from figurefile itself
</quote>

That output is for both a 300dpi and a 72dpi image. Though is looks like 
dimensions are being read, both are too small in the pdf output. I 
quoted texexec because it showed output related to the images. Using 
'context <fname>' does not produce a similar console output, but the pdf 
doc created is the same with the same image size issues.

Also of note is that pdflatex output on a pandoc->latex file does almost 
exactly the opposite of what context does--all images are scaled to fit 
text width by default (like using factor=max in context). But that is 
just as unwanted as having the images too small. The html output when 
viewed in a browser shows the same images as expected. None of these 
images are the same size and using any width=X value cannot work. Some 
screen shots may be 1024 pixels wide while others only 150 pixels wide 
(a shot of a button or tab, for example).

I looked through 1.5 years of posts to the comp.tex.context news group 
looking for anything might be similar, but no luck. I have put several 
of the files involved on a publicly accessible web server. There are two 
screen shots of the pdf output showing incorrect image sizing and 
correct image sizing and the actual image files themselves. There is the 
markdown, context, html, and pdf documents.

https://mywebspace.wisc.edu/jstalnak/web/context/

I know that is a lot. I appreciate any help anyone can provide.

Best regards,

GuyS

-- 

"There is only love, and then oblivion. Love is all we have
to set against hatred." (paraphrased) Ian McEwan

Guy Stalnaker, I^2@DOIT, 1210 West Dayton Street, Room 3209 CSS, Madison
WI 53719-1220, jstalnak@wisc.edu, work 608.263.8035, cell 608.235.4718,
fax 608.265.6681, page page-guy@watchdog.doit.wisc.edu

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-11-23 23:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-21  4:42 Images in MultiMarkdown -> context -> PDF Guy Stalnaker
2012-11-21 10:07 ` Martin Schröder
2012-11-21 13:21   ` Guy Stalnaker
2012-11-21 14:35     ` Sietse Brouwer
2012-11-21 14:55       ` Guy Stalnaker
2012-11-21 17:44         ` Peter Rolf
     [not found]         ` <CAF=dkzwfNWgMQpGe3HXeuAZxpCjmzvJTHxxb-2pK6zKJ3+uBPw@mail.gmail.com>
2012-11-21 18:17           ` Guy Stalnaker
2012-11-21 20:36             ` Sietse Brouwer
2012-11-23 21:34               ` Guy Stalnaker
2012-11-23 21:45                 ` Aditya Mahajan
2012-11-23 23:25               ` Guy Stalnaker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).