[Insight-users] Re: latex and IJ journal
Luis Ibanez
luis.ibanez at kitware.com
Sat Sep 9 15:32:47 EDT 2006
Hi Mathieu,
I can replicate the error in Cygwin,
but have no problem doing the same in Debian Linux.
That is, it works fine in Linux, and it fails on
Cygwin.
---
Note that in Cygwin, despite the error messages, the
pdf is created fine. (?!) surprising because from the
Makefile... there is no way that the command could
have got to the pdf without creating first the .dvi.
I'm guessing that in Cygwing Latex figures out that it
should run in PDFlatex mode by looking at the internal
commands used in the .tex file.
Here is what I found in google:
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=nonpdfsp
so... here are two options:
A) Build it on Linux
B) Used the attached template that has removed all the
pdfinfo commands. This modified files worked for me
in Cygwin.
Note that by removing the pdfinfo statement the only
thing that we lose is the author infor that appears
in Acrobat Reader when you look at the properties of
the document.
Very unlikely that anybody will complain about that :-)
Let me know if that works for you.
Luis
--------------------------
Mathieu Malaterre wrote:
> Ok I gave up, hopefully someone on comp.tex will know:
>
> http://groups.google.com/group/comp.text.tex/browse_frm/thread/d4699f4d411036a0/057035c67726c2d0
>
>
> Alex, I will prepare the tarball with source only until the issue with
> the pdf is solved.
>
> Mathieu
>
> On 9/7/06, Mathieu Malaterre <mathieu.malaterre at gmail.com> wrote:
>
>> Luis have you ever seen this error (*)
>>
>> to reproduce:
>> $ wget
>> http://public.kitware.com/pub/itk/InsightJournal/InsightJournalSubmissionTemplate.tgz
>>
>> $ tar xvfz InsightJournalSubmissionTemplate.tgz
>> cd SubmissionTemplate/Document/LaTeX
>> $ make
>>
>> Thanks
>> (*)
>> dvips -o ArticleExample.ps ArticleExample.dvi
>> This is dvips(k) 5.95a Copyright 2005 Radical Eye Software
>> (www.radicaleye.com)
>> dvips: ! DVI file can't be opened.
>> make: [ArticleExample.ps] Error 1 (ignored)
>> ps2pdf ArticleExample.ps
>> Error: /undefinedfilename in (ArticleExample.ps)
>> Operand stack:
>>
>> Execution stack:
>> %interp_exit .runexec2 --nostringval-- --nostringval--
>> --nostringval-- 2 %stopped_push --nostringval--
>> --nostringval-- --nostringval-- false 1 %stopped_push
>> Dictionary stack:
>> --dict:1119/1686(ro)(G)-- --dict:0/20(G)-- --dict:70/200(L)--
>> Current allocation mode is local
>> Last OS error: 2
>> GPL Ghostscript 8.50: Unrecoverable error, exit code 1
>> make: [ArticleExample.pdf] Error 1 (ignored)
>>
>>
>>
>> $ dvips --version
>> /tmp/ij/SubmissionTemplate/Document/LaTeX
>> dvips(k) 5.95a
>> kpathsea version 3.5.4
>> Copyright (C) 2005 Radical Eye Software.
>> There is NO warranty. You may redistribute this software
>> under the terms of the GNU General Public License
>> and the Dvips copyright.
>> For more information about these matters, see the files
>> named COPYING and dvips.h.
>> Primary author of Dvips: T. Rokicki; -k maintainer: T. Kacvinsky/ S.
>> Rahtz.
>>
>>
>>
>> On 9/6/06, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>> > Hi Mathieu,
>> >
>> > Yes, you can.
>> >
>> >
>> > IJ just take your PDF regardless of how you generate it.
>> > It could be simply exported from Word, or PowerPoint.
>> > The style is just suggested as a guideline to give some
>> > uniformity to the papers in the Journal.
>> >
>> > Is there something that is missing in the current
>> > suggested class document ?
>> >
>> >
>> > Maybe we should improve it...
>> >
>> >
>> > Please let me know,
>> >
>> >
>> > Thanks
>> >
>> >
>> > Luis
>> >
>> >
>> > ------------------------
>> > Mathieu Malaterre wrote:
>> > > Luis,
>> > >
>> > > Can I use any class of document (*.cls) to submit the article to
>> > > Insight Journal ?
>> > >
>> > > Thanks
>> >
>> >
>> >
>>
>>
>> --
>> Mathieu
>>
>
>
-------------- next part --------------
%
% Complete documentation on the extended LaTeX markup used for Insight
% documentation is available in ``Documenting Insight'', which is part
% of the standard documentation for Insight. It may be found online
% at:
%
% http://www.itk.org/
\documentclass{InsightArticle}
\usepackage{graphicx}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% hyperref should be the last package to be loaded.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[
bookmarks,
bookmarksopen,
backref,
colorlinks,linkcolor={blue},citecolor={blue},urlcolor={blue},
]{hyperref}
% This is a template for Papers to the Insight Journal.
% It is comparable to a technical report format.
% The title should be descriptive enough for people to be able to find
% the relevant document.
\title{The Importance of Open Access in Scientific Publications}
% Increment the release number whenever significant changes are made.
% The author and/or editor can define 'significant' however they like.
\release{0.00}
% At minimum, give your name and an email address. You can include a
% snail-mail address if you like.
\author{Galileo Galilei$^{1}$, Giordano Bruno$^{2}$ and Anthony Leeuwenhoek$^{3}$}
\authoraddress{$^{1}$Pisa University, Tower drive\\
$^{2}$Rome University, Inquisition street\\
$^{3}$Netherlands Pragmatic University, Port street}
\begin{document}
%
% Commands for including Graphics when using latex
%
\DeclareGraphicsExtensions{.eps,.jpg,.gif,.tiff,.bmp,.png}
\DeclareGraphicsRule{.jpg}{eps}{.jpg.bb}{`convert #1 eps:-}
\DeclareGraphicsRule{.gif}{eps}{.gif.bb}{`convert #1 eps:-}
\DeclareGraphicsRule{.tiff}{eps}{.tiff.bb}{`convert #1 eps:-}
\DeclareGraphicsRule{.bmp}{eps}{.bmp.bb}{`convert #1 eps:-}
\DeclareGraphicsRule{.png}{eps}{.png.bb}{`convert #1 eps:-}
\maketitle
\ifhtml
\chapter*{Front Matter\label{front}}
\fi
% The abstract should be a paragraph or two long, and describe the
% scope of the document.
\begin{abstract}
\noindent
This document describes a new algorithm implemented using the Insight Toolkit
ITK \url{www.itk.org}. The code of the algorithm is written following the
ITK CodingStyle as described in the directory
\code{Insight/Documentation/Style.pdf}
This paper is accompanied with the source code, input data, parameters and
output data that the authors used for validating the algorithm described in
this paper. This adheres to the fundamental principle that scientific
publications must facilitate reproducibility of the reported results.
\end{abstract}
\tableofcontents
Using filters from the Insight Toolkit, we develop an algorithm for detecting
and tracking thje movement of solar spots. As it is widely known, celestial
objects such as the sun are ethereal and perfect, and therefore can not harbor
artifacts such as spots. However, observations performed with our open source
telescope have revealed the presence of such spots. The spots seems to continuously change positions on the solar surface.
Automatic detection and tracking of the solar spot movements are of fundamental
importance for allowing the authors to dedicate more time to perfectioning
optical instruments and less time to the supervised acquisition of reliable
data.
The reader should be warned that direct observation of the sun without proper
equipment may result in personal injury, loss of vision and burned brains.
\section{Principles of Solar Spot Detection}
Solar spots can be classified as the darkest objects present on an image of the
solar surface. Algorithms such as watersheds, statistical classification and
mathematical morphology are suitable for automatically detecting these features
in images of the solar surface.
\section{Why Image Processing Papers must include Source Code, Images and Parameters }
Modern Image Processing is most of the time performed with computers. An
attempt to replicate the results of an algorithm described in a paper entails
to reimplement the algorithm into source code. This task is far from trivial
and consumes months of work. The final result can not be guarranted to be
equivalent to the actual code that was used for testing the algorithm when the
paper was written, and therefore it cannot be considered a baseline for
comparing the algoritm with other algorithms availble to the reader.
Papers to the Insight Journal are written in the spirit of facilitating and
encouraging readers to perform replication of work. In this sense, the Insight
Journal is compliant with essential concepts of the scientific method.
Since the code is included with the paper, less time has to be spent in
describing the code, and more time can be used for describing how to use the
algorithm in particular types of images.
For questions on the basis of the scientific method the reader is refered to
\cite{Popper2002,Popper1971}.
\section{Pointing to other material}
The format of this LaTeX file, allows authors to include code snippets, like
the following
\small
\begin{verbatim}
typedef itk::Image< unsigned char, 3 > ImageType;
ImageType::Pointer image = ImageType::New();
\end{verbatim}
\normalsize
and to cite the online documentation of the Insitght Toolkit, for example, the
link to the doxygen documentation of the ImageToImageFilter
\doxygen{ImageToImageFilter}
LaTeX macros are also available for typesetting code in familiar courier fonts.
Like the following method of an ITK class.
\code{SetNumberOfIterations()}
\section{Software Requirements}
You need to have the following software installed:
% The {itemize} environment uses a bullet for each \item. If you want the
% \item's numbered, use the {enumerate} environment instead.
\begin{itemize}
\item Insight Toolkit 2.4.
\item CMake 2.2
\end{itemize}
Note that other versions of the Insight Toolkit are also available in the
testing framework of the Insight Journal. Please refere to the following page
for details
\url{http://www.insightsoftwareconsortium.org/wiki/index.php/IJ-Testing-Environment}
% The preceding sections will have been written in a gentler,
% introductory style. You may also wish to include a reference
% section, documenting all the functions/exceptions/constants.
% Often, these will be placed in separate files and input like this:
\appendix
\section{This is an Appendix}
To create an appendix in a Insight HOWTO document, use markup like
this:
\begin{verbatim}
\appendix
\section{This is an Appendix}
To create an appendix in a Insight HOWTO document, ....
\section{This is another}
Just add another \section{}, but don't say \appendix again.
\end{verbatim}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Example on how to insert a figure
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}
\center
\includegraphics[width=0.8\textwidth]{RegistrationComponentsDiagram.eps}
\itkcaption[Registration Framework Components]{The basic components of the
registration framework are two input images, a transform, a metric, an
interpolator and an optimizer.}
\label{fig:RegistrationComponents}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Example on how to insert an equation.
% Never forget to put an equation in your paper.
% They make them look professional and impress the reviewers.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
To support shape-guidance, the generic level set equation
(Eqn(~\ref{eqn:ShapeInfluenceTerm})) is extended to incorporate a shape guidance
term:
\begin{equation}
\label{eqn:ShapeInfluenceTerm}
\xi \left(\psi^{*}(\mathbf{x}) - \psi(\mathbf{x})\right)
\end{equation}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Insert the bibliography using BibTeX
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibliographystyle{plain}
\bibliography{InsightJournal}
\end{document}
-------------- next part --------------
%
% InsightArticle.cls for the Insight Journal
%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{InsightArticle}
[1998/02/25 Document class (Insight Article)]
%
% Change this to say a4paper instead of letterpaper if you want A4. These
% are the latex defaults.
%
\newcommand{\itk at paper}{letterpaper}
\newcommand{\itk at ptsize}{11pt}
%
% Commands for image and figure captions
%
\newcommand{\itkcaption}[2][]{\caption[{#1}]{\small \textsf{{#2}} \normalsize}}
\newcommand{\itkpiccaption}[2][]{\piccaption[{#1}]{\small \textsf{{#2}} \normalsize}}
% These set up the fonts for the documents.
%
% The "times" package makes the default font the PostScript Times
% font, which makes for smaller PostScript and a font that more people
% like.
%
\RequirePackage{times}\typeout{Using Times instead of Computer Modern.}
% Change the options here to get a different set of basic options, This
% is where to add things like "a4paper" or "10pt".
%
\LoadClass[\itk at paper,\itk at ptsize]{article}
\setcounter{secnumdepth}{1}
% Optional packages:
%
% If processing of these documents fails at your TeX installation,
% these may be commented out (independently) to make things work.
% These are both supplied with the current version of the teTeX
% distribution.
%
% The "fancyhdr" package makes nicer page footers reasonable to
% implement, and is used to put the chapter and section information in
% the footers.
%
\RequirePackage{fancyhdr}\typeout{Using fancier footers than usual.}
% Required package:
%
% This gives us all the Insight-specific markup that we really want.
% This should come last. Do not change this.
%
\RequirePackage{InsightJournal}
% support for module synopsis sections:
\newcommand{\itk at ModSynopsisFilename}{\jobname.syn}
% need to do one of these....
\newcommand{\itk at doHorizontalRule}{\rule{\textwidth}{1pt}}
% Define command to make reference to on-line Doxygen documentation
\newcommand{\doxygen}[1]{
\href{http://www.itk.org/Doxygen/html/classitk_1_1#1.html}{\code{itk::#1}}}
% Define command to make reference to on-line Doxygen documentation
\newcommand{\subdoxygen}[2]{
\href{http://www.itk.org/Doxygen/html/classitk_1_1#1_1_1#2.html}{\code{itk::#1::#2}}}
% Define command for the standard comment introducing classes with similar functionalities
\newcommand{\relatedClasses}{
\textbf{The following classes provide similar functionality:}}
% Change the title page to look a bit better, and fit in with the
% fncychap ``Bjarne'' style a bit better.
%
\renewcommand{\maketitle}{
\itk at doHorizontalRule
\begin{flushright}
{\rm\Huge\itk at HeaderFamily \@title} \par
{\em\large\itk at HeaderFamily \itk at release} \par
\vspace{25pt}
{\Large\itk at HeaderFamily \@author} \par
\vspace{25pt}
\@date \par
\itk at authoraddress \par
\end{flushright}
\@thanks
\setcounter{footnote}{0}
\let\thanks\relax\let\maketitle\relax
\gdef\@thanks{}\gdef\@author{}\gdef\@title{}
}
\let\itk at OldTableofcontents=\tableofcontents
\renewcommand{\tableofcontents}{
\begingroup
\parskip = 0mm
\itk at OldTableofcontents
\endgroup
\itk at doHorizontalRule
\vspace{12pt}
\itk at doing@page at targetstrue
}
% Fix the theindex environment to add an entry to the Table of
% Contents; this is much nicer than just having to jump to the end of
% the book and flip around, especially with multiple indexes.
%
\let\itk at OldTheindex=\theindex
\renewcommand{\theindex}{
\clearpage
\itk at OldTheindex
\addcontentsline{toc}{section}{\indexname}
}
\@ifundefined{fancyhf}{
\pagestyle{plain}}{
\pagestyle{normal}} % start this way; change for
\pagenumbering{arabic} % ToC & chapters
\setcounter{secnumdepth}{2}
\thispagestyle{empty}
More information about the Insight-users
mailing list