<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to ImageStudy</title><link>https://sourceforge.net/p/simpletextformatter/wiki/ImageStudy/</link><description>Recent changes to ImageStudy</description><atom:link href="https://sourceforge.net/p/simpletextformatter/wiki/ImageStudy/feed" rel="self"/><language>en</language><lastBuildDate>Wed, 16 Aug 2017 00:55:34 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/simpletextformatter/wiki/ImageStudy/feed" rel="self" type="application/rss+xml"/><item><title>ImageStudy modified by bstanly</title><link>https://sourceforge.net/p/simpletextformatter/wiki/ImageStudy/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;/p&gt;&lt;center&gt;&lt;font size="+3"&gt;Image Study&lt;/font&gt;&lt;/center&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;center&gt;Written by&lt;/center&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;center&gt;Barry Stanly&lt;/center&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;center&gt;Printed on August 14, 2017&lt;/center&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;center&gt;Copyright 2017 by Barry Stanly&lt;/center&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Permission is granted to copy, distribute and/or modify this document&lt;br/&gt;
under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at: &lt;a class="" href="https://www.gnu.org/copyleft/fdl.html" rel="nofollow"&gt;https://www.gnu.org/copyleft/fdl.html&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;center&gt;For more information, see &lt;i&gt;Nuances In Computing&lt;/i&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hosted at &lt;a class="" href="https://sourceforge.net/p/simpletextformatter"&gt;https://sourceforge.net/p/simpletextformatter&lt;/a&gt;&lt;/p&gt;&lt;/center&gt;&lt;p&gt;&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;&lt;a name="P1"&gt; &lt;/a&gt;&lt;/p&gt;
&lt;h1 id="preface"&gt;Preface&lt;/h1&gt;
&lt;p&gt;I was recently faced with the problem of taking images of a document taken on a cell phone and creating a printable document with the maximum resolution of the copied text&lt;a href="#FN1"&gt;&lt;sup&gt;(1)&lt;/sup&gt;&lt;/a&gt;. I felt that the process of processing the images was of sufficient interest to document it.&lt;/p&gt;
&lt;hr/&gt;
&lt;h1 id="wzxhzdk24c-o-n-t-e-n-t-swzxhzdk25"&gt;&lt;center&gt;C O N T E N T S&lt;/center&gt;&lt;/h1&gt;
&lt;p&gt;&lt;a class="" href="#P1"&gt;Preface&lt;/a&gt;&lt;br/&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="#L1"&gt;1 Introduction&lt;/a&gt;&lt;br/&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="#L2"&gt;2 Process&lt;/a&gt;&lt;br/&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="#L3"&gt;3 Comments&lt;/a&gt;&lt;br/&gt;
&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;&lt;/p&gt;&lt;br/&gt;
&lt;a name="L1"&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;
&lt;h1 id="1wzxhzdk32introduction"&gt;1 Introduction&lt;/h1&gt;
&lt;p&gt;In reading this document, Familiarity with the &lt;a class="" href="https://sourceforge.net/p/simpletextformatter/wiki/STFXLateSummary"&gt;STF Syntax Summary&lt;/a&gt; is assumed. (&lt;a class="" href="https://sourceforge.net/projects/simpletextformatter/files/ImageStudy.pdf"&gt;Download document PDF&lt;/a&gt;)&lt;br/&gt;
&lt;/p&gt;&lt;br/&gt;
&lt;a name="L2"&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;
&lt;h1 id="2wzxhzdk36process"&gt;2 Process&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The first step was to use GIMP&lt;a href="#FN2"&gt;&lt;sup&gt;(2)&lt;/sup&gt;&lt;/a&gt; to take each page and split it into two or three sub-images. Care was exercised to trim as much white space as possible. The result was 27 images to be stretched to fit a page to be included in the correct order.&lt;br/&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Because each sub-image was named by document paragraph, the images appeared in sorted order.&lt;br/&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A dos shell window was opened&lt;a href="#FN3"&gt;&lt;sup&gt;(3)&lt;/sup&gt;&lt;/a&gt;.&lt;br/&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Next a Windows &lt;span style="font-family: monospace;"&gt;dir/b&lt;/span&gt; command&lt;a href="#FN4"&gt;&lt;sup&gt;(4)&lt;/sup&gt;&lt;/a&gt; displayed the file names in the correct order.&lt;br/&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Another Windows trick is: Right-click in the upper left corner of the shell window and select &lt;span style="font-family: monospace;"&gt;Mark&lt;/span&gt;. Then drag the cursor over the desired text, highlighting it. Then press enter (or right-click again.) This was used to copy the file names to the paste buffer in sorted order&lt;a href="#FN5"&gt;&lt;sup&gt;(5)&lt;/sup&gt;&lt;/a&gt;&lt;br/&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;An STF document was created and the file names pasted into it.&lt;br/&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The next step was to reference each file in a &lt;span style="font-family: monospace;"&gt;.Figure&lt;/span&gt; command. The XEmacs macro facility was used to modify the text, as described in &lt;i&gt;Nuances In Computing&lt;/i&gt;, to change each text line containing a file name to &lt;span style="font-family: monospace;"&gt;.Figure 'Image-name',,Sec 'Image-name'&lt;/span&gt;. This included each image as a figure into the document and added an entry to the list of figures.&lt;br/&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;At the same time that XEmacs was used to insert the &lt;span style="font-family: monospace;"&gt;.Figure&lt;/span&gt; commands, it was also used to insert a paragraph command (&lt;span style="font-family: monospace;"&gt;.hl 1, Figures&lt;/span&gt;) after every five &lt;span style="font-family: monospace;"&gt;.Figure&lt;/span&gt; commands. The reason for this is LaTeX has a limitation in that if too many figures are inserted into a paragraph, it barfs and generates an error; and the desired output was a PDF document, so LaTeX was required.&lt;br/&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The next consideration was to use landscape mode. This would provide the maximum image magnification. This was accomplished by commanding STF to insert a landscape command at the start (and end) of each paragraqph, as follows:&lt;br/&gt;
&lt;span style="font-family: monospace;"&gt;.PS 1,\landscape{begin}&lt;/span&gt;&lt;br/&gt;
&lt;span style="font-family: monospace;"&gt;.pe F, 1, \landscape{end}&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Since it was desired to have as much document real estate devoted to images as possible, the document margins were changed to 5 mm; and the images were set to fill the page.The document source appeared as shown below:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;table border="1" bordercolor="#000000" cellpadding="5" cellspacing="0"&gt;
&lt;tbody&gt;&lt;tr valign="top"&gt;
&lt;td style=""&gt;&lt;p&gt;.pc&lt;br/&gt;
.ifc latex&lt;br/&gt;
.verbatim \geometry{left=5mm,right=5mm,top=5mm,bottom=5mm}&lt;br/&gt;
.endc&lt;br/&gt;
\Cover{.CN T, .FG T}&lt;br/&gt;
\endcover{}&lt;br/&gt;
.sf D,width=\linewidth,height=\textheight,keepaspectratio=true,scale=5&lt;br/&gt;
.sf H,800x1000.&lt;br/&gt;
.PS 1,\landscape{begin}&lt;br/&gt;
.pe F, 1, \landscape{end}&lt;br/&gt;
.hl 1,Figures&lt;br/&gt;
.Figure 01-04.jpg,,Sec 01-04&lt;br/&gt;
.Figure 05-10.jpg,,Sec 05-10&lt;br/&gt;
.Figure 11-14.jpg,,Sec 11-14&lt;br/&gt;
.Figure 15-17.jpg,,Sec 15-17&lt;br/&gt;
.Figure 18-20.jpg,,Sec 18-20&lt;br/&gt;
&lt;b&gt;...&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;br/&gt;
&lt;a name="L3"&gt;&lt;/a&gt;&lt;p&gt;&lt;/p&gt;
&lt;h1 id="3wzxhzdk40comments"&gt;3 Comments&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;The &lt;span style="font-family: monospace;"&gt;.pc&lt;/span&gt; command means to insert the following text at the end of the preamble section. Since this is only applicable to LaTeX, it is enclosed in a conditional, limiting its applicability to LaTeX.&lt;br/&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The &lt;span style="font-family: monospace;"&gt;.sf D&lt;/span&gt; command sets the image size to span the page and stop when the vertical or horizontal dimension hits a margin. See &lt;i&gt;&lt;a class="" href="https://sourceforge.net/p/simpletextformatter/wiki/WorkingWithImages"&gt;Working With Images&lt;/a&gt;&lt;/i&gt; in the STF documentation.It took longer to describe, than do; but hopefully it is instructive. As an aside, it is difficult to insert 27 images into a word processor. As involved as the above process seems, it is a sanity saver compared to trying to do it using a word processor.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h1 id="wzxhzdk41f-o-o-t-n-o-t-e-swzxhzdk42"&gt;&lt;center&gt;F O O T N O T E S&lt;/center&gt;&lt;/h1&gt;
&lt;p style="border-top: none; border-bottom: 1px solid #000000; border-left: none; border-right: none; padding-top: 0in; padding-bottom: 0.03in; padding-left: 0in; padding-right: 0in;"&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;

&lt;p&gt;&lt;a name="FN1"&gt;&lt;/a&gt;(1) Someone wanted help understanding a section and this was the only way available to provide it.&lt;/p&gt;
&lt;p&gt;&lt;a name="FN2"&gt;&lt;/a&gt;(2) GNU Image Processing Program, &lt;a class="" href="https://www.gimp.org/" rel="nofollow"&gt;https://www.gimp.org/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a name="FN3"&gt;&lt;/a&gt;(3) One way to open a shell in Windows is to create a bat file with &lt;span style="font-family: monospace;"&gt;cmd&lt;/span&gt; in it, say &lt;span style="font-family: monospace;"&gt;0dos.bat&lt;/span&gt;. Then double click &lt;span style="font-family: monospace;"&gt;0Dos.bat&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a name="FN4"&gt;&lt;/a&gt;(4) In UNIX, &lt;span style="font-family: monospace;"&gt;ls -1&lt;/span&gt; is the equivalient.&lt;/p&gt;
&lt;p&gt;&lt;a name="FN5"&gt;&lt;/a&gt;(5) Windows tricks are discussed in &lt;i&gt;Nuances In Computing&lt;/i&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">bstanly</dc:creator><pubDate>Wed, 16 Aug 2017 00:55:34 -0000</pubDate><guid>https://sourceforge.net3c82977522cc68d2f4028b5dd74867315bb8be4c</guid></item></channel></rss>