2

I want to submit a manuscript to NRC journal. According to the guide, I want to build a simple example. However I encounter a lot of problems and need help!

The Error Information:

Command Line:   latex.exe --src --interaction=errorstopmode --synctex=-1 "test.tex"
Startup Folder: D:\TEST

My .log:

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)
entering extended mode
(D:\TEST\test.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 68 languages loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\nrc\nrc2.cls"
Document Class: nrc2 2013/02/02 v2.01a NRC 2-column journal class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\fleqn.clo")
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"))

Class nrc2 Warning: GUTenberg Babel french style detected -- 
(nrc2)              some corruption of NRC-defined format may occur.

("C:\Program Files\MiKTeX 2.9\tex\latex\tools\multicol.sty"))
("C:\Program Files\MiKTeX 2.9\tex\latex\babel\babel.sty"
*************************************
* Local config file bblopts.cfg used
*
("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\bblopts.cfg")
("C:\Program Files\MiKTeX 2.9\tex\latex\babel-french\frenchb.ldf"
("C:\Program Files\MiKTeX 2.9\tex\latex\babel\babel.def"))
("C:\Program Files\MiKTeX 2.9\tex\latex\babel-english\english.ldf"))
("C:\Program Files\MiKTeX 2.9\tex\latex\carlisle\scalefnt.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty") (D:\TEST\test.aux
) ("C:\Program Files\MiKTeX 2.9\tex\latex\psnfss\ot1ptm.fd")
Runaway argument?
\bbl@scset \refname \frenchrefname \bbl@scset \abstractname \frenchabstractname
 \ETC.
! Paragraph ended before \NRC@stripdef@ was complete.
<to be read again> 
                   \par 
l.162 

? 

The .tex file:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Typeset by                  , Research Press, NRC
%% Date:
%% NRC, <name of journal>
%%
%%%%%%%%%%%%%%
%%
%% 1. See original preamble material (at bottom of file) for
%%    details on source of current .tex file: conversion
%%    from word-processing program or author-generated TeX
%%    code.
%%
%% 2. This template includes most options and packages used by
%%    all the NRC journals. UNcomment those packages and options
%%    which are REQUIRED.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%% 1. Class file (nrc1 or nrc2) + options (see userguide, pp.1-2; p.9):
\documentclass[%%french,        %% use with \usepackage[french]{babel}
               %% leqno,         %% only for nrc1 (default is right eqno)
               reqno,         %% only for nrc2 (default is left eqno)
               nonumbib,      %% biblio entries without nos.
%
               %% breakaddress,  %% linebreak btwn author(s) + address(es)
               %% twocolid,      %% IDbox spans 2 cols
               %% twocolid*,     %% 2-col IDbox
               %% preprint,      %% removes identifying nos. from headers/footers
               %% proof,         %% `Proof/Epreuve' in footer
               %% pagnf,         %% `Pagination not final/Pagination non finale'
               %% trimmarks,     %% add trimmarks
               %% finalverso,    %% final blank verso NOT included in pagerange
]{nrc2}                          %% choose one: nrc1 or nrc2

%% NOTE: authors may use the following options, which should be
%%       DELETED once the file comes in-house:
%%
%%          usecmfonts    type1rest     genTeX


%% 2. Frequently used packages -- see pp.2-3 of userguide:
%%    a. graphics-related:
%%    \usepackage{graphicx}       %% color not usually needed
%%    \usepackage[figuresright]{rotating} %% for landscape tables

%%    b. math-related:
%%    \usepackage{amsmath}        %% math macros in wide use
%%    \usepackage{amssymb}        %% additional math symbols
%%    \usepackage{dcolumn}        %% decimal alignment for tables
%%    \usepackage{bm}             %% `bold math' via \bm command

%%    c. for website addresses:
%%    \usepackage{url}            %% inserts linebreaks automatically
%%    \NRCurl{url}

%%    d. biblio-related:
%%    \usepackage{cite}           %% enhances options for \cite commands

%%    e. for English-language papers:
    \usepackage[french,english]{babel}

%%    f. for French-language papers:
%%    \usepackage[english,french]{babel}  %% remember to add french as a
                                          %% CLASS option, above
%%    g. for ragged-right tables:
%%    \usepackage{array}
%%    \newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}
%%    \let\PBS=\PreserveBackslash

%%    h. for left curly brace to span several lines of equations:
%%    \usepackage{cases}
%%    \expandafter\let\csname numc@left\expandafter\endcsname\csname
%%                 z@\endcsname


%% 3. Resetting float parameters:
%%    a. in nrc1:
%%    \renewcommand{\topfraction}{.95}
%%    \renewcommand{\textfraction}{.05}
%%    \renewcommand{\floatpagefraction}{.95}

%%    b. in nrc2:
%%    \renewcommand{\topfraction}{.95}
%%    \renewcommand{\floatpagefraction}{.95}
%%    \renewcommand{\dbltopfraction}{.95}
%%    \renewcommand{\textfraction}{.05}
%%    \renewcommand{\dblfloatpagefraction}{.95}


%% 4. Resetting journal-specific parameters:
%%    a. eqn nos. with section nos.:
%%    \numberby {equation}{section}
%%    \setcounter{equation}{0}

%%    b. in-line citations to use ( ) instead of default [ ]:
%%   \renewcommand{\citeleft}{(}
%%   \renewcommand{\citeright}{)}

%%    c. for JEES (to expand inter-line spacing; see p.12 of guide):
%%    \easebaselines


%% 5. Miscellaneous macros to always have available:
%%    a. shorthands:
\let\p=\phantom
\let\mc=\multicolumn

%%    b. struts for vertical spacing above/below rules in tables:
%%%%%%%%%%%%%%%%%%  beginning of Claudio Beccari's code:
%% Spacing commands for {tabular} (from TTN 2,3:10 -- Claudio
%%                                                    Beccari):
%% Usage: a. use \T to put space below a line
%%           (e.g., at top of a `cell' of text)
%%        b. use \B to put space above a line
%%           (e.g., at bottom of a `cell' of text)
\newcommand\T{\rule{0pt}{2.6ex}}            % = `top' strut
\newcommand\B{\rule[-1.2ex]{0pt}{0pt}}      % = `bottom' strut
%%%%%%%%%%%%%%%%%%  end of Claudio's code

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   end of class and package
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   options, additional macros


%% Journal-specific information for opening page -- pp.9-11 of guide:
%% a. numbers:
\setcounter{page}{1}             %% replace 1 with starting page no.
\volyear{XX}{2001}               %% volume, year of journal
\journal{Can. Geotech. J.}            %% jrnl. abbrev. (see App.A of guide)
\journalcode{cgj}                   %% jrnl. acro    (see App.A of guide)
\filenumber{}                    %% NRC file number
%% \filenumber*{}                %% prefixes \filenumber to all page nos.
                                 %% NOTE: COMMENT OUT class options
                                 %%             pagnf
                                 %%             proof
                                 %%       once no longer needed


%% b. dates:
\received{2014}                      %% insert date, no period
\revreceived{}                   %% <same>
\accepted{}                      %% <same>
\revaccepted{}                   %% <same>
%% \IDdates{}                       %% <same>. Use for `Revised ...' etc.
%% \webpub{}                        %% insert date
%% \commdate{}                      %% <same>


%% c. miscellaneous:
%%   \assoced{}                  %% insert name of Associate ed.
%%   \corred{}                   %% insert name of Corresponding ed.
%%   \dedication{}               %% insert text as neede
%%   \abbreviations{}            %% insert as needed

\begin{document}
%% Reversed titlebar -- see p.11 of userguide:
%% \specialtitle{}      %% for black stripe + text + regular title
%% \specialtitle*{}     %% black stripe + text only




%% Title, Author(s), Address(es) -- see p.4 of userguide for
%%    various options to save time and keyboarding, esp. where
%%    authors share same address(s).

\title{A Digital Image Processing Based Numerical Method for the Analysis on Permeability of Heterogeneous Geomaterials}

%% Author 1:
\author[J.L. Humar]{John Larry Humar} %% opt. arg. ONLY if IDbox
                                      %% name is diff. from
                                      %% titleblock name
\address{University of Waterloo}                            %% address of 1st author


%% Author 2:
\author{M.A. Rahgozar}
\address{}

%% Author 3:
\author{Fred Murray}
\address{}


\shortauthor{Humar, Rahgozar, and Murray} %% for headers

%%%%%%%%
%% This line goes here in nrc1.
%\maketitle 
%%%%%%%%


%% Abstract/Resume area -- see pp.5,12 of userguide:
\begin{abstract}
   Abstract text
%\keywords{Hello}
%\translation
\end{abstract}

%
\begin{resume}
   Texte du resume
%% \motscles{}
%% \Traduit %% or \traduit
\end{resume}
\maketitle
%%%%%%%%

%% This line goes here in nrc2.
%\maketitle         
%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%   END OF TEMPLATE   %%%%%%%%%%%%%%%%%%%%%%
%% Ch. -- 11 NOV 02
This is a template.
\end{document} 
Werner
  • 603,163
孟庆祥
  • 21
  • 1

2 Answers2

2

The problem seems to be “solved” with an up-to-date TeX systems. Actually it isn't, because it is just bypassed due to the internal change in babel that now returns frenchb instead of french when the language name is asked for.

The issue is still present in the nrc2.cls class file; compiling the example file with an updated (November 2015) TeX Live 2015 doesn't raise errors, like with TeX Live 2014. But changing french into frenchb in the language call gives the error again.

The problem can be clearly seen from the following code:

161 \ifx\NRC@french@lang\@empty
162 \else
163   \AtBeginDocument{%
164     \expandafter\NRC@stripdef{\NRC@french@lang}\figurename
165     \expandafter\NRC@stripdef{\NRC@french@lang}\tablename
166     \expandafter\NRC@stripdef{\NRC@french@lang}\abstractname
167     \expandafter\NRC@stripdef{\NRC@french@lang}\refname
168     \@ifpackageloaded{babel}{%
169       \expandafter\addto\csname extras\NRC@french@lang\endcsname
170         {\bbl@nonfrenchitemize}%
171     }{}%
172   }
173 \fi

where TeX is instructed to try and expand {, which is of course ineffective.

Lines 164–167 should be

164     \expandafter\NRC@stripdef\expandafter{\NRC@french@lang}\figurename
165     \expandafter\NRC@stripdef\expandafter{\NRC@french@lang}\tablename
166     \expandafter\NRC@stripdef\expandafter{\NRC@french@lang}\abstractname
167     \expandafter\NRC@stripdef\expandafter{\NRC@french@lang}\refname

There no way to solve the issue at document level, because the code is injected in the “begin document hook” by the class. Making a local copy with the changed lines is the only effective action until NRC fixes the code.

egreg
  • 1,121,712
0

There seems to not be much productive advice about this problem. I updated my TeX Live compiler and all the sudden ALL of my articles got this error and would not compile. I am not very good at LaTeX, but there seems to be a conflict in the command :

\usepackage[french,english]{babel}

Deleting french allowed my TeX files to compile properly. My accents in the French parts are always written the annoying slow way (i.e. {\'e}) so it still was able to display the french sections. I realize that I am no expert but at least with this quick fix I was able to compile again.

Werner
  • 603,163
Alex
  • 51