Skip to content

Commit b605e4c

Browse files
committed
ENH: Fix quoting for compatibility with LaTeX
Replace the literal double-quote character in LaTeX. It is for the rare cases where you actually want the ASCII " glyph, not typographic quotes. chktex warns when " character is used without explicit request for the type of quotes needed.
1 parent 60ef2a2 commit b605e4c

5 files changed

Lines changed: 16 additions & 13 deletions

File tree

SoftwareGuide/Latex/00-Preamble-Common.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
%\usepackage{siunitx}
1414
\usepackage[papersize={7.5in,9.25in},margin=1in]{geometry}
1515
\usepackage[utf8]{inputenc}
16+
\usepackage{csquotes}
17+
18+
\newcommand{\shelldblquotes}[1]{\textquotedbl{}#1\textquotedbl{}}
1619

1720
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1821
%

SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,7 @@ \section{Namespaces}%
14201420
14211421
When declaring or defining members of the \code{itk::} namespace, for example,
14221422
the \code{itk::} namespace prefix should not be added. That is, code within
1423-
\code{namespace itk \{ \ldots \}}" should not use \code{itk::}.
1423+
\code{namespace itk \{ \ldots \}} should not use \code{itk::}.
14241424
14251425
The \code{::} global namespace should be used when referring to a global
14261426
function, e.g.
@@ -3898,7 +3898,7 @@ \subsection{Regressions in Tests}%
38983898
38993899
When the magnitude of the error needs to be reported, as in the above examples,
39003900
the error message should be split into different lines, all starting with the
3901-
error output redirection \code{std::cerr << "";}. Care must be taken to
3901+
error output redirection \code{std::cerr << \shelldblquotes{};}. Care must be taken to
39023902
appropriately add white space for a correct formatting of the message.
39033903
39043904

SoftwareGuide/Latex/DesignAndFunctionality/DeformableRegistration4OnBrain.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
\end{table}
4343

4444
Here $\|G\|$ is the norm of the gradient at the current estimate of the
45-
minimum, $x$. ``Function Value" is the current value of the function, f(x).
45+
minimum, $x$. \enquote{Function Value} is the current value of the function, f(x).
4646

4747
The resulting deformation field that maps the moving to the fixed image is
4848
shown in~\ref{fig:DeformationFieldOutput}. A difference image of two slices

SoftwareGuide/Latex/DesignAndFunctionality/Registration.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ \section{Registration Framework}
8383
framework. First, we begin with some simple registration examples.
8484

8585

86-
\section{"Hello World" Registration}%
86+
\section{\shelldblquotes{Hello World} Registration}%
8787
\label{sec:IntroductionImageRegistration}
8888
\input{ImageRegistration1.tex}
8989

@@ -618,7 +618,7 @@ \subsection{General heuristics for parameter fine-tunning}
618618
of the bins. Then use a plotting program such as gnuplot,
619619
or Matlab, or even Excel and look at the distribution.
620620
The number of samples to take must be enough
621-
for producing the same "appearance" of the joint histogram.
621+
for producing the same \enquote{appearance} of the joint histogram.
622622
As an arbitrary rule of thumb you may want to start using
623623
a high number of samples (80\% - 100\%). And do not
624624
change it until you have mastered the other parameters
@@ -651,7 +651,7 @@ \subsection{General heuristics for parameter fine-tunning}
651651
1.0 / ( 10.0 * pixelspacing[1] * imagesize[1] )
652652

653653
This is telling the optimizer that you consider that rotating
654-
the image by 57 degrees is as "significant" as translating
654+
the image by 57 degrees is as \enquote{significant} as translating
655655
the image by half its physical extent.
656656

657657
Note that esoteric value has included the arbitrary number

SoftwareGuide/Latex/DevelopmentGuidelines/CreateAModule.tex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,8 +1033,8 @@ \subsubsection{C++ Runtime Tracing}%
10331033
are generated. Python wrapping must also be enabled.
10341034
This is accomplished by setting the CMake variables
10351035
1036-
\code{CMAKE\_BUILD\_TYPE:STRING="RelWithDebInfo"} and \code{ITK\_WRAP\_PYTHON:BOOL="On"}.
1037-
Note that the "RelWithDebInfo" build type is strongly encouraged over a "Debug"
1036+
\code{CMAKE\_BUILD\_TYPE:STRING=\shelldblquotes{RelWithDebInfo}} and \code{ITK\_WRAP\_PYTHON:BOOL=\shelldblquotes{ON}}.
1037+
Note that the \shelldblquotes{RelWithDebInfo} build type is strongly encouraged over a \shelldblquotes{Debug}
10381038
build as the former will build against a standard Python distribution.
10391039
See Section~\ref{sec:UsingCMakeForConfiguringAndBuildingITK} for a detailed
10401040
explanation of how to build ITK locally with CMake.
@@ -1062,13 +1062,13 @@ \subsubsection{C++ Runtime Tracing}%
10621062
\begin{itemize}
10631063
10641064
\item On a Windows operating system, Microsoft Visual Studio 2019 or a similar platform
1065-
can be used for attaching to a running process for debugging. Select "Attach To Process"
1066-
from the Debug menu, choose "Native" code, and then search for the process PID. If
1065+
can be used for attaching to a running process for debugging. Select \enquote{Attach To Process}
1066+
from the Debug menu, choose \enquote{Native} code, and then search for the process PID. If
10671067
debug symbols were generated correctly then ITK modules will appear under the list of
10681068
loaded modules.
10691069
10701070
In Visual Studio, debugging can be enabled right from the start if the Python script
1071-
is loaded into Visual Studio as part of a "Python Project".
1071+
is loaded into Visual Studio as part of a \enquote{Python Project}.
10721072
Mixed mode debugging needs to be enabled, as per Visual Studio
10731073
documentation\footnote{
10741074
\url{https://docs.microsoft.com/en-us/visualstudio/python/debugging-mixed-mode-c-cpp-python-in-visual-studio}}.
@@ -1139,10 +1139,10 @@ \subsubsection{C++ Runtime Tracing}%
11391139
\begin{itemize}
11401140
11411141
\item The Python process must be authorized for debugging. MacOS relies on the
1142-
process of "hardened" runtimes to mitigate security concerns, which reduces
1142+
process of \enquote{hardened} runtimes to mitigate security concerns, which reduces
11431143
the ability of debuggers such as \code{lldb} and other processes to attach
11441144
to and intercept the functions of other programs. Python distributions
1145-
are intentionally "hardened" in this way, but additional settings can be
1145+
are intentionally \enquote{hardened} in this way, but additional settings can be
11461146
enabled to allow just-in-time debugging.
11471147
11481148
\item It may be necessary to enter developer mode to allow Python debugging.

0 commit comments

Comments
 (0)