summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/etoc/README.md11
-rw-r--r--macros/latex/contrib/etoc/etoc.dtx93
-rw-r--r--macros/latex/contrib/etoc/etoc.pdfbin850065 -> 851744 bytes
-rw-r--r--macros/latex/contrib/zennote/README.txt25
-rw-r--r--macros/latex/contrib/zennote/zennote.pdfbin0 -> 72865 bytes
-rw-r--r--macros/latex/contrib/zennote/zennote.sty94
-rw-r--r--macros/latex/contrib/zennote/zennote.tex206
-rw-r--r--macros/luatex/latex/luaquotes/README3
-rw-r--r--macros/luatex/latex/luaquotes/luaquotes-documentation.pdfbin113378 -> 104899 bytes
-rw-r--r--macros/luatex/latex/luaquotes/luaquotes-documentation.tex1459
-rw-r--r--macros/luatex/latex/luaquotes/luaquotes.sty113
-rw-r--r--macros/unicodetex/latex/njuthesis/README.md2
-rw-r--r--macros/unicodetex/latex/njuthesis/njuthesis.dtx279
-rw-r--r--macros/unicodetex/latex/njuthesis/njuthesis.ins4
-rw-r--r--macros/unicodetex/latex/njuthesis/njuthesis.pdfbin1176569 -> 1203786 bytes
15 files changed, 850 insertions, 1439 deletions
diff --git a/macros/latex/contrib/etoc/README.md b/macros/latex/contrib/etoc/README.md
index e431588369..d0d1f1ea32 100644
--- a/macros/latex/contrib/etoc/README.md
+++ b/macros/latex/contrib/etoc/README.md
@@ -1,6 +1,6 @@
<!-- -->
- Source: etoc.dtx (1.1a)
+ Source: etoc.dtx (1.1b)
Author: Jean-Francois Burnol
Info: Completely customisable TOCs
License: LPPL 1.3c
@@ -97,8 +97,15 @@ etoc.sty, etoc.tex, etoc.pdf, etoc.dvi.
RECENT CHANGES
==============
+1.1b \[2023/01/15\]
+-------------------
+
+Documentation fix, 1.1a forgot to mention the following change:
+`\etocthelinkedname`, `\etocthelinkednumber`, `\etocthelinkedpage`
+are now always hyperlinks independently of linktoc status.
+
1.1a \[2023/01/14\]
-----------------------
+-------------------
This version brings no new functionality, despite the number bump.
It implements a complete rewrite of old legacy core internals.
diff --git a/macros/latex/contrib/etoc/etoc.dtx b/macros/latex/contrib/etoc/etoc.dtx
index 89e7b3a109..9512121efb 100644
--- a/macros/latex/contrib/etoc/etoc.dtx
+++ b/macros/latex/contrib/etoc/etoc.dtx
@@ -2,20 +2,20 @@
% N.B.: this dtx file is NOT for use with \DocInput. The latex source of the
% user manual is not prefixed with percent signs.
%<*none>
-\def\etocdtxtimestamp {Time-stamp: <14-01-2023 at 21:26:57 CET>}%
+\def\etocdtxtimestamp {Time-stamp: <15-01-2023 at 11:56:19 CET>}%
%</none>
%<*!readme>
%%
%% Package: etoc
-%% Version: 1.1a
+%% Version: 1.1b
%% License: LPPL 1.3c
%% Copyright (C) 2012-2023 Jean-Francois Burnol
%% <jfbu at free dot fr>
%</!readme>
%<*none>
-\def\etocpkgdate {2023/01/14}
-\def\etocdocdate {2023/01/14}
-\def\etocpkgversion {1.1a}
+\def\etocpkgdate {2023/01/15}
+\def\etocdocdate {2023/01/15}
+\def\etocpkgversion {1.1b}
\def\etocpkgdescription {Completely customisable TOCs (JFB)}
%% German translation was last udpated on April 2015 and all new material
%% was included since in English. During 2020/2021/2022 emerged a still
@@ -33,7 +33,7 @@
\catcode32=13\catcode`\\=12^^Brelax^^A
^^Bfirstofone{^^Bendgroup^^Bdef^^BetocLicense^^A
{% Package: etoc
-% Version: 1.1a
+% Version: 1.1b
% License: LPPL 1.3c
% Copyright (C) 2012-2023 Jean-Francois Burnol <jfbu at free dot fr>
%
@@ -60,7 +60,7 @@
%<*readme>
<!-- -->
- Source: etoc.dtx (1.1a)
+ Source: etoc.dtx (1.1b)
Author: Jean-Francois Burnol
Info: Completely customisable TOCs
License: LPPL 1.3c
@@ -157,8 +157,15 @@ etoc.sty, etoc.tex, etoc.pdf, etoc.dvi.
RECENT CHANGES
==============
+1.1b \[2023/01/15\]
+-------------------
+
+Documentation fix, 1.1a forgot to mention the following change:
+`\etocthelinkedname`, `\etocthelinkednumber`, `\etocthelinkedpage`
+are now always hyperlinks independently of linktoc status.
+
1.1a \[2023/01/14\]
-----------------------
+-------------------
This version brings no new functionality, despite the number bump.
It implements a complete rewrite of old legacy core internals.
@@ -3668,7 +3675,9 @@ hyperlinks. No such problem arises either when using |forest| or the native
|tikz| syntax for trees (which will be illustrated in the next section).} The
commands \csb{etocname}, etc\dots, are robust, it is easier to work with
\csb{etocthelinkednumber}, \csb{etocthelinkedname}, and \csb{etocthelinkedpage}
-which contain the same information in an easier accessible form.
+which contain the same information in an easier accessible form.%
+%
+\normalmarginpar\marginpar{\footnotesize\rmfamily\itshape\RaggedRight At \texttt{1.1a} the commands \csa{etocthelinkedname}, etc\dots, are always providing an hyperlink, so it is not true that \csb{etocname}, etc\dots, are always simply their robust variants.}
For this |forest| tree we have designed very special \etoc styles for sections
and subsections. They use a token list register called |\treetok| and a
@@ -4659,21 +4668,31 @@ The meanings of these commands
can be stored for delayed usage. For example this is
done in the \hyperref[tocastree]{examples with trees}.
-Notice though the following facts:
+There has been a \textbf{breaking change} at |1.1a|. Here is the behavior
+\emph{prior} to this release:
\begin{itemize}[noitemsep]
-\item \csb{etocthelinkednumber} and \csb{etocthelinkedname} are hyperlinks
+\item \csb{etocthelinkedname} and \csb{etocthelinkednumber} were hyperlinks
only if \ctanpkg{hyperref} was configured via |linktoc=all| or
|linktoc=section| (the default),
-\item \csb{etocthelinkedpage} is an hyperlink only if \ctanpkg{hyperref} was
- configured via |linktoc=all| or |linktoc=page|. \emph{Furthermore}, the
- page number must not be empty: if it is empty no hyperlink is added (this
- matches the \ctanpkg{hyperref} behavior when \etoc is not loaded).
+\item \csb{etocthelinkedpage} was an hyperlink only if \ctanpkg{hyperref} was
+ configured via |linktoc=all| or |linktoc=page| and the page number was not empty.
\end{itemize}
+This behavior was coherent with the commands \csb{etocname}, \csb{etocnumber},
+and \csb{etocpage} being the robust variants of \csb{etocthelinkedname},
+\csb{etocthelinkednumber}, and \csb{etocthelinkedpage}.
-It may be a bit strange that the link is not sytematically added despite the
-command names, but this is legacy behavior of the package. It is coherent
-with the commands \csb{etocname}, \csb{etocnumber}, and \csb{etocpage} being
-their robust variants.
+At |1.1a| it was decided that the commands should match their denominations.%
+%
+\footnote{To tell the whole truth, the author in refactoring the code completely at \texttt{1.1a} was tricked by the names and forgot to read the old documentation so the new behavior was implemented and it was decided to keep the change.}
+%
+So they are now \emph{always} hyperlinks independently of |linktoc| \ctanpkg{hyperref}
+option (\csb{etocthelinkedpage} has no hyperlink if the page number is empty,
+to match \ctanpkg{hyperref} behavior):
+\begin{itemize}[noitemsep]
+\item \csb{etocthelinkedname} and \csb{etocthelinkednumber} and
+ \csb{etocthelinkedpage} are always (in presence of \ctanpkg{hyperref})
+ hyperlinks (for \csb{etocthelinkedpage} the page number must not be empty).
+\end{itemize}
A further command is provided: \csb{etocthelink}, which wraps%
@@ -4684,11 +4703,6 @@ an hyperlink around its argument: |\etocthelink|\marg{foo} hyperlinks an
arbitrary text \meta{foo} to the target sectioning unit in the document.
The command \csb{etoclink} is its robust variant.
-Thus, \csb{etocthelinkednumber} is essentially
-\csb{etocthelink}|{|\csb{etocthenumber}|}| if |linktoc| is |all| or the
-default |section|, else it is an alias to \csb{etocthenumber}. Similarly for
-the other two.
-
% They too
% contain the hyperlink destination in already expanded form since |1.08a| for
% the first three, since |1.08j| for \csb{etoclink}.
@@ -6510,11 +6524,9 @@ number.
On the other hand \csb{etocthename}, \csb{etocthenumber}, \csb{etocthepage}
are \emph{not} protected against expansion. And neither are
\csb{etocthelinkedname}, \csb{etocthelinkednumber}, \csb{etocthelinkedpage}.
-The latter three are hyperlinks only if \ctanpkg{hyperref} |linktoc| option
-has the suitable value: |section| (which is default) or |all| for name and
-number to be hyperlinks, |page| or |all| for the page number (which must not
-be empty). The commands \csb{etocname}, \csb{etocnumber}, and \csb{etocpage}
-are their robust variants.
+They were modified at |1.1a| and now are always hyperlinks (except for the
+latter if the page number is empty), if
+\ctanpkg{hyperref} is present, independently of |linktoc| status.
The commands \csb{etoclink} and \csb{etocifnumbered} are also
protected against premature expansion. Also \csb{etociffirst} and
@@ -6677,7 +6689,13 @@ version is \texttt{\etocpkgversion}, of \texttt{\etocpkgdate}.
\def {\ifvmode\advance\jfverbadim.5em\relax\else\expandafter\jfverbaspace\fi}}\x
\makeatother
\begin{jfverbatim}
-1.1a [2023/01/14]^
+1.1b [2023/01/15]^
+
+ Documentation fix, 1.1a forgot to mention the following change:
+ \etocthelinkedname, \etocthelinkednumber, \etocthelinkedpage
+ are now always hyperlinks independently of linktoc status.
+
+~1.1a [2023/01/14]^
This version brings no new functionality, despite the number bump.
It implements a complete rewrite of old legacy core internals.
@@ -7670,7 +7688,7 @@ of real structure in a \LaTeX{} document body).
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\ProvidesPackage{etoc}
-[2023/01/14 v1.1a Completely customisable TOCs (JFB)]
+[2023/01/15 v1.1b Completely customisable TOCs (JFB)]
\RequirePackage{multicol}
\DeclareOption*{\PackageWarning{etoc}{Option `\CurrentOption' is unknown.}}
\ProcessOptions\relax
@@ -8071,6 +8089,19 @@ of real structure in a \LaTeX{} document body).
% target from
% the \ctanpkg{hyperref} hacked arguments of \csa{l@section} et al, rather
% than picking it from the fourth argument of \csa{contentsline}.
+%
+% Another \textbf{breaking change} (documented only at |1.1b|): all three
+% of \csbc{etocthelinkedname}, \csbc{etocthelinkednumber}, and
+% \csbc{etocthelinkedpage} are always hyperlinks (for the latter, only if
+% page number is not empty to match \ctanpkg{hyperref} ways).
+% Formerly they obeyed the |linktoc| status,
+% somewhat counterintuitively, but this meant that \csbc{etocname} etc...
+% were their robust variants, which meant one could store easily for later
+% usage (see the documentation examples with ``treetoks'') their precise
+% meaning. The breaking change happened in part because I was fooled myself
+% by the macro names, and refactored the code in two steps separated by months
+% so in second step I forgot I had only provisory code. And I decided finally
+% to keep the breaking change.
% \begin{macrocode}
\def\Etoc@lxyz #1#2#3{%
\ifEtoc@hyperref
diff --git a/macros/latex/contrib/etoc/etoc.pdf b/macros/latex/contrib/etoc/etoc.pdf
index 545546bd53..e6bca78501 100644
--- a/macros/latex/contrib/etoc/etoc.pdf
+++ b/macros/latex/contrib/etoc/etoc.pdf
Binary files differ
diff --git a/macros/latex/contrib/zennote/README.txt b/macros/latex/contrib/zennote/README.txt
new file mode 100644
index 0000000000..3115509c61
--- /dev/null
+++ b/macros/latex/contrib/zennote/README.txt
@@ -0,0 +1,25 @@
+Package Name
+
+zennote (Please read the documentation on CTAN for detailed usage.)
+
+
+
+Author
+
+Yifan Liang (Github User Name: futurelyf)
+You may contact me via Github.
+
+
+
+Basic Functions
+
+This zennote package aims to provide you with an easy interface to speed up the process when organizing and producing elegant notes.
+All the tables, figures, equations, and listings are labeled according to the notenumber with the \titlebox command.
+The noteframe environment helps you generate fancy colored boxes to emphasize the important information (e.g. Theorems, Equations, Proof, etc.) in your document. You can customize the style and color to denote different categories, too.
+
+
+
+License
+
+This work is licensed under Creative Commons ”Attribution 4.0 International” license.
+For detailed information about the license, please visit the Creative Commons’ website. \ No newline at end of file
diff --git a/macros/latex/contrib/zennote/zennote.pdf b/macros/latex/contrib/zennote/zennote.pdf
new file mode 100644
index 0000000000..a8fe571a5a
--- /dev/null
+++ b/macros/latex/contrib/zennote/zennote.pdf
Binary files differ
diff --git a/macros/latex/contrib/zennote/zennote.sty b/macros/latex/contrib/zennote/zennote.sty
new file mode 100644
index 0000000000..2bb39f0d49
--- /dev/null
+++ b/macros/latex/contrib/zennote/zennote.sty
@@ -0,0 +1,94 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{zennote}[2023/01/10 Version 1.0.0]
+
+\RequirePackage[most]{tcolorbox}
+
+\newcounter{notenumber}
+\setcounter{notenumber}{1}
+\counterwithin{equation}{notenumber}
+\counterwithin{figure}{notenumber}
+\counterwithin{table}{notenumber}
+\AtBeginDocument{\counterwithin{lstlisting}{notenumber}}
+\ExplSyntaxOn
+\keys_define:nn{titlebox}{
+ top-left.tl_set:N = \l_titlebox_topleft_tl,
+ top-right.tl_set:N = \l_titlebox_topright_tl,
+ bottom-left.tl_set:N = \l_titlebox_bottomleft_tl,
+ bottom-right.tl_set:N = \l_titlebox_bottomright_tl,
+ notenumber.code:n = {\setcounter{notenumber}{#1}},
+ topic.tl_set:N = \l_titlebox_topic_tl,
+ type.tl_set:N = \l_titlebox_type_tl,
+}
+
+\NewDocumentCommand{\titlebox}{m}{
+ \group_begin:
+ \keys_set:nn{titlebox}{#1}
+ \begin{center}
+ \framebox{
+ \vbox{\vspace{2mm}
+ \hbox to .98\textwidth {\hspace*{2mm}\tl_use:N \l_titlebox_topleft_tl
+ \hfill \tl_use:N \l_titlebox_topright_tl\hspace*{2mm}}
+ \vspace{4mm}
+ \hbox to .98\textwidth { \large\hfill \tl_use:N \l_titlebox_type_tl{~}\thenotenumber\c_colon_str {~} \tl_use:N \l_titlebox_topic_tl \hfill}
+ \vspace{2mm}
+ \hbox to .98\textwidth {\hspace*{2mm}\tl_use:N \l_titlebox_bottomleft_tl \hfill \tl_use:N \l_titlebox_bottomright_tl\hspace*{2mm}}
+ \vspace{2mm}}
+ }
+ \end{center}
+ \group_end:
+}
+
+\tl_new:N \l_noteframe_style_tl
+
+\tl_const:Nn \c_noteframe_style_zero_tl {}
+\tl_const:Nn \c_noteframe_style_one_tl {
+ borderline~west={3pt}{0pt}{\l_noteframe_color_tl!85!black}
+}
+\tl_const:Nn \c_noteframe_style_two_tl {
+ borderline~west={3pt}{0pt}{\l_noteframe_color_tl!85!black},
+ borderline~east={3pt}{0pt}{\l_noteframe_color_tl!85!black}
+}
+
+\keys_define:nn{noteframe}{
+ color.tl_set:N = \l_noteframe_color_tl,
+ style.tl_set:N = \l_noteframe_style_tl,
+ title.tl_set:N = \l_noteframe_title_tl,
+}
+
+\keys_set:nn{noteframe}{
+ color = {cyan},
+ style = {one},
+ title = {}
+}
+
+\NewDocumentEnvironment{noteframe}{O{}+b}{
+ \group_begin:
+
+ \keys_set:nn{noteframe}{#1}
+ \use:x {
+ \exp_not:n{\begin{tcolorbox}}[
+ enhanced,
+ boxrule=0pt,
+ frame~hidden,
+ \exp_not:v {c_noteframe_style_ \l_noteframe_style_tl _tl},
+ colback=\tl_use:N \l_noteframe_color_tl!10!white,
+ sharp~corners
+ ]
+ \exp_not:n{
+ \tl_if_empty:NTF\l_noteframe_title_tl{}{
+ \textbf{\Large \textcolor{\tl_use:N \l_noteframe_color_tl!85!black}{\tl_use:N \l_noteframe_title_tl}\\\vspace*{-2mm}\\ }
+ }
+ #2
+ \end{tcolorbox}
+ }
+ \group_end:
+ }
+}{
+
+}
+
+\ExplSyntaxOff
+
+\pagestyle{plain}
+
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/zennote/zennote.tex b/macros/latex/contrib/zennote/zennote.tex
new file mode 100644
index 0000000000..48c59db9eb
--- /dev/null
+++ b/macros/latex/contrib/zennote/zennote.tex
@@ -0,0 +1,206 @@
+\documentclass{article}
+\usepackage[margin = 1in]{geometry}
+% packages %
+\usepackage{graphicx}
+\usepackage{tabularray}
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage[dvipsnames]{xcolor}
+\usepackage{caption}
+\usepackage{hologo}
+\usepackage{fontspec}
+\usepackage{unicode-math}
+\usepackage[hidelinks]{hyperref}
+\usepackage[type={CC},modifier={by},version={4.0}]{doclicense}
+\usepackage{zennote}
+% format %
+\setlength{\parindent}{0pt}
+\linespread{1.3}
+\renewcommand{\contentsname}{\centering Table of Contents}
+% font %
+\setmainfont{TeX Gyre Pagella}
+\setmathfont{TeX Gyre Pagella Math}
+\newfontfamily\textcm{CMU Serif}
+\hypersetup{
+ colorlinks = True,
+ allcolors = cyan
+ }
+
+
+% document %
+\begin{document}
+
+\titlebox{
+ top-left = {{\bf{\textcm \LaTeX}}},
+ top-right = {{\bf Packages}},
+ bottom-left = {{\sl Author: Yifan Liang}},
+ bottom-right = {{\sl Version: 1.0.0}},
+ notenumber = {1},
+ topic = {{\tt zennote} for Fancy Notes},
+ type = {Manual}
+ }
+
+
+\begin{tblr}{
+cell{1}{1} = {r=2}{},
+colspec = {X[1]|X[20]}
+}
+\textbf{Note} & This documentation/manual is suggested to be compiled in {\textcm \hologo{XeLaTeX}} or {\textcm \hologo{LuaLaTeX}}, and is available on the CTAN website. \\
+ & The {\tt zennote} package itself can be compiled in any major {\textcm \hologo{LaTeX}} compiler.
+\end{tblr}
+
+
+\thispagestyle{empty}
+\tableofcontents
+
+\newpage
+\setcounter{page}{1}
+
+\section{Introduction}
+\subsection{Basic Functions}
+This {\tt zennote} package aims to provide you with an easy interface to speed up the process when organizing and producing elegant notes.\\
+\\
+All the tables, figures, equations, and listings are labeled according to the {\tt notenumber} with the \verb+\titlebox+ command.\\
+\\
+The {\tt noteframe} environment helps you generate fancy colored boxes to emphasize the important information (e.g. Theorems, Equations, Proof, etc.) in your document. You can customize the style and color to denote different categories, too.
+
+\subsection{License}
+This work is licensed under \href{https://creativecommons.org/licenses/by/4.0/}{Creative Commons "Attribution 4.0 International" license}.\\
+\\
+For detailed information about the license, please visit the Creative Commons' website by clicking the \textcolor{Cyan}{cyan text above} or the license image below.
+\\
+\begin{flushright}
+ \doclicenseImage
+\end{flushright}
+
+\newpage
+
+\section{Note Title}
+{\tt zennote} provides \verb+\titlebox{<settings>}+ command to generate the following title box for your note, where {\tt settings} help you set the key information of your note, including:
+\begin{itemize}
+ \item \verb+top-left+, Text on Top-Left Corner;
+ \item \verb+top-right+, Text on Top-Right Corner;
+ \item \verb+bottom-left+, Text on Bottom-Left Corner;
+ \item \verb+bottom-right+, Text on Bottom-Right Corner;
+ \item \verb+notenumber+, Note Number;
+ \item \verb+topic+, Note Topic;
+ \item \verb+type+, Note Type (e.g. Chapter, Unit, Note).
+\end{itemize}
+
+\subsection{Usage}
+\begin{flushleft}
+\begin{verbatim}
+\titlebox{
+ top-left = {topleft},
+ top-right = {topright},
+ bottom-left = {bottomleft},
+ bottom-right = {bottomright},
+ notenumber = {1},
+ topic = {topic},
+ type = {Note}
+}
+\end{verbatim}
+\end{flushleft}
+
+\subsection{Result}
+\titlebox{
+ top-left = {topleft},
+ top-right = {topright},
+ bottom-left = {bottomleft},
+ bottom-right = {bottomright},
+ notenumber = {1},
+ topic = {topic},
+ type = {Note}
+}
+
+\newpage
+
+\section{Note Highlighter}
+{\tt zennote} provides \verb+noteframe+ environment to generate the following "highlighter boxes." Users can set the key values in options to customize the styles of the frame, which includes:
+\begin{itemize}
+ \item \verb+color+, The color of the frame, which can be chosen from \verb+\usepackage[dvipsnames]{xcolor}+. The default color is \textcolor{cyan}{\bf cyan};
+ \item \verb+style+, The edge of the frame, which can be chosen from \verb+zero+, \verb+one+, and \verb+two+. The default edge style is \verb+one+;
+ \item \verb+title+, The title of the frame.
+\end{itemize}
+
+\subsection{Examples}
+\subsubsection{Usage 1}
+\begin{flushleft}
+\begin{verbatim}
+\begin{noteframe}[title = {Default}]
+ Cyan Box Example Content.
+\end{noteframe}
+\end{verbatim}
+\end{flushleft}
+
+\subsubsection{Result 1}
+\begin{noteframe}[title = {Default}]
+ Cyan Box Example Content.
+\end{noteframe}
+
+\begin{flushright}
+{\sl (To be continued on the next page...)}
+\end{flushright}
+
+\newpage
+
+\subsubsection{Usage 2}
+\begin{flushleft}
+\begin{verbatim}
+\begin{noteframe}[
+ title = {style: two and color: LimeGreen},
+ color = {LimeGreen},
+ style = {two}
+]
+ LimeGreen Box Example Content.
+ \begin{align}
+ a^2 + b^2 = c^2
+ \end{align}
+\end{noteframe}
+\end{verbatim}
+\end{flushleft}
+
+\subsubsection{Result 2}
+\begin{noteframe}[
+ title = {style: two and color: LimeGreen},
+ color = {LimeGreen},
+ style = {two}
+]
+ LimeGreen Box Example Content.
+ \begin{align}
+ a^2 + b^2 = c^2
+ \end{align}
+\end{noteframe}
+
+\begin{flushright}
+{\sl (To be continued on the next page...)}
+\end{flushright}
+
+\newpage
+
+\subsubsection{Usage 3}
+\begin{flushleft}
+\begin{verbatim}
+\begin{noteframe}[style = {zero}]
+ Cyan Box Example Content.
+ \begin{center}
+ \includegraphics[width = 5cm]{example-image-a}
+ \captionof{figure}{this is a picture.}
+ \end{center}
+\end{noteframe}
+\end{verbatim}
+\end{flushleft}
+
+\subsubsection{Result 3}
+\begin{noteframe}[style = {zero}]
+ Cyan Box Example Content.
+ \begin{center}
+ \includegraphics[width = 5cm]{example-image-a}
+ \captionof{figure}{this is a picture.}
+ \end{center}
+\end{noteframe}
+
+\subsection{Caveats}
+It is crucial to write \verb+\usepackage{zennote}+ \textbf{\textit{after}} \verb+\usepackage[dvipsnames]{xcolor}+ to prevent potential error when coloring the frame.
+
+\end{document} \ No newline at end of file
diff --git a/macros/luatex/latex/luaquotes/README b/macros/luatex/latex/luaquotes/README
index 963efc971d..89663013c2 100644
--- a/macros/luatex/latex/luaquotes/README
+++ b/macros/luatex/latex/luaquotes/README
@@ -1,6 +1,6 @@
luaquotes - smart quotes with lua
-version: 1.2.2
+version: 1.3.0
This package automatically creates smart quotes using lua filters and provides auxiliary commands for typesetting specific lua punctuation
@@ -12,6 +12,7 @@ For suggestions, feature requests, and bug reports, please use the project's
GitHub site: https://github.com/ezgranet/luaquotes
Version history:
+15/01/2023—fixed single quotations within parentheses
12/12/2022-added degm function
23/11/2022-walking back automatic elision for now
25/10/2022—support for elision
diff --git a/macros/luatex/latex/luaquotes/luaquotes-documentation.pdf b/macros/luatex/latex/luaquotes/luaquotes-documentation.pdf
index 991ae4c461..9017157b1a 100644
--- a/macros/luatex/latex/luaquotes/luaquotes-documentation.pdf
+++ b/macros/luatex/latex/luaquotes/luaquotes-documentation.pdf
Binary files differ
diff --git a/macros/luatex/latex/luaquotes/luaquotes-documentation.tex b/macros/luatex/latex/luaquotes/luaquotes-documentation.tex
index f77f8f956a..0ac2417deb 100644
--- a/macros/luatex/latex/luaquotes/luaquotes-documentation.tex
+++ b/macros/luatex/latex/luaquotes/luaquotes-documentation.tex
@@ -283,46 +283,31 @@ For certain Polynesian languages, a letter called the \okina Okina is used; whil
\begin{minted}[
frame=lines,
-framesep=2mm,
baselinestretch=1.2,
-bgcolor=LightGray,
fontsize=\footnotesize,
linenos,
breaklines,
firstnumber=last
]
{latex}
-\def\luaquotesversionnumber{1.1}
-\ProvidesPackage{dev-lua}
- [2022/10/25\luaquotesversionnumber smart quotes with lua]
+
+\def\luaquotesversionnumber{1.3.0}
+\ProvidesPackage{luaquotes}
+ [2023/15/15\luaquotesversionnumber smart quotes with lua]
% !TeX program = lualatex
% !TeX encoding = utf8
% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
+% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
+% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Elijah Z Granet
-\end{minted}
-\subsection{LuaTeX check}
-
-\begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% to show the package only works with Lua
@@ -338,21 +323,6 @@ firstnumber=last
{You are using XeTeX but this package only works
\MessageBreak with LuaTeX}{}
}\fi\fi
-\end{minted}
-
-\subsection{Dependencies}
-
-\begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Dependency
@@ -368,37 +338,12 @@ firstnumber=last
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{fontspec}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
- \end{minted}
-
- \subsection{Avoiding smart quotes in monospace}
-
-\begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% removing the effects for monospace
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{luacode}
-\begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
local uchar = unicode.utf8.char
fonts.handlers.otf.addfeature{
name = "qtbye",
@@ -413,32 +358,8 @@ local uchar = unicode.utf8.char
‹ = 0x0027,
› = 0x0027
},
- }\end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
+ }
\end{luacode}
- \end{minted}
- \subsection{Quote replacement functions}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -450,371 +371,146 @@ firstnumber=last
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\luaexec{\end{minted}
-\begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
+\luaexec{
function doublequotes ( s )
return ( s:gsub ( '"(..-)"' , "“\%1”" ) )
- end\end{minted}
-\begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
-}
+ end}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Assuming ' at the start of the line means an opening quotation mark not an apostrophe
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\luaexec{\end{minted}
-\begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-function singlequotelinestart ( s )
+\luaexec{function singlequotelinestart ( s )
return (s:gsub ("^'","‘" ) )
- end
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }
- \luaexec{
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
+ end}
+
-%function abbrevsingle ( s )
-% return ( s:gsub ( " '(..-) " , " ’\%1 " ) )
-% end
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
-
- }
+% \luaexec{
+% function abbrevsingle ( s )
+% return ( s:gsub ( " '(..-) " , " ’\%1 " ) )
+% end}
-
-\luaexec{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-function singlequotes ( s )
+\luaexec{function singlequotes ( s )
return ( s:gsub ( " '"," ‘" ) )
- end\end{minted}
-\begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
-}
-\end{minted}
-\subsection{Activation commands}
-\begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
+ end}
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% activation and deactivation
+% parentheses
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newcommand\doublequoteson{\directlua{
-\end{minted}
-\begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
+\newcommand{\sqoneleft}{{\addfontfeature{RawFeature={-qtbye,-tlig}}‘}}
+\luaexec{function psinglequotes ( s )
+ return ( s:gsub ( "\%('",[[(\sqoneleft]] ) )
+ end}
+
+\newcommand\singlequotespon{\directlua{
luatexbase.add_to_callback (
- "process_input_buffer" , doublequotes , "doublequotes" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
+ "process_input_buffer" , psinglequotes , "psinglequotes" )
}}
-\newcommand\doublequotesoff{\directlua{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-luatexbase.remove_from_callback (
- "process_input_buffer" ,
- "doublequotes" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
-}}
-%\newcommand\abbrevsingleon{\directlua{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
+\newcommand\singlequotespoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "psinglequotes" )}}
-%
-%luatexbase.add_to_callback (
-% "process_input_buffer" ,
-% abbrevsingle ,
-% "abbrevsingle" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% DE parentheses
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\newcommand{\sqoneleft}{{\addfontfeature{RawFeature={-qtbye,-tlig}}‘}}
-
-% }}
-%\newcommand\abbrevsingleoff{\directlua{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
+\luaexec{function depsinglequotes ( s )
+ return ( s:gsub ( "\%('",[[(‚]] ) )
+ end}
-%luatexbase.remove_from_callback (
-% "process_input_buffer" ,
-% "abbrevsingle" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
+\newcommand\desinglequotespon{\directlua{
+luatexbase.add_to_callback (
+ "process_input_buffer" , depsinglequotes , "depsinglequotes" )
+ }}
+\newcommand\desinglequotespoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "depsinglequotes" )}}
-% }}
+\luaexec{function depsinglequotesclose ( s )
+ return ( s:gsub ( "'\%)",[[\sqoneleft)]] ) )
+ end}
+\newcommand\desinglequotespcloseon{\directlua{
+luatexbase.add_to_callback (
+ "process_input_buffer" , depsinglequotesclose , "depsinglequotesclose" )
+ }}
+\newcommand\desinglequotespcloseoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "depsinglequotesclose" )}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% FR Parentheses
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand{\sglmtlp}{{\addfontfeature{RawFeature={-qtbye,-tlig}}‹\hskip .16667em}}
+\newcommand{\sglmtrp}{{\addfontfeature{RawFeature={-qtbye,-tlig}}\hskip .16667em›}}
+
+\luaexec{function frpsinglequotes ( s )
+ return ( s:gsub ( "\%('",[[(\sglmtlp]] ) )
+ end}
+\luaexec{function frpsinglequotesclose ( s )
+ return ( s:gsub ( "'\%)",[[\sglmtrp)]] ) )
+ end}
+
+\newcommand\frsinglequotespon{\directlua{
+luatexbase.add_to_callback (
+ "process_input_buffer" , frpsinglequotes , "frpsinglequotes" )
+ }}
+\newcommand\frsinglequotespoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "frpsinglequotes" )}}
+\newcommand\frsinglequotespcloseon{\directlua{
+luatexbase.add_to_callback (
+ "process_input_buffer" , frpsinglequotesclose , "frpsinglequotesclose" )
+ }}
+\newcommand\frsinglequotespcloseoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "frpsinglequotesclose" )}}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% activation and deactivation
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand\doublequoteson{\directlua{luatexbase.add_to_callback (
+ "process_input_buffer" ,
+ doublequotes ,
+ "doublequotes" )}}
+\newcommand\doublequotesoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" ,
+ "doublequotes" )}}
+% \newcommand\abbrevsingleon{\directlua{luatexbase.add_to_callback (
+% "process_input_buffer" ,
+% abbrevsingle ,
+% "abbrevsingle" )}}
+% \newcommand\abbrevsingleoff{\directlua{luatexbase.remove_from_callback (
+% "process_input_buffer" ,
+% "abbrevsingle" )}}
+
\newcommand\singlequotelinestarton{\directlua{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
luatexbase.add_to_callback (
"process_input_buffer" , singlequotelinestart , "singlequotelinestart" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
}}
-\newcommand\singlequotelinestartoff{\directlua{ \end{minted}
-\begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
+\newcommand\singlequotelinestartoff{\directlua{
luatexbase.remove_from_callback (
"process_input_buffer" , "singlequotelinestart" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
}}
\newcommand\singlequoteson{\directlua{
luatexbase.add_to_callback (
- "process_input_buffer" , singlequotes , "singlequotes" ) \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
+ "process_input_buffer" , singlequotes , "singlequotes" )
}}
-\newcommand\singlequotesoff{\directlua{
-\end{minted}
-\begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-luatexbase.remove_from_callback (
- "process_input_buffer" , "singlequotes" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
-}}
- %%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand\singlequotesoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "singlequotes" )}}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% global functions, useful for things like this
%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -822,53 +518,23 @@ firstnumber=last
\newcommand{\smartquotes}{%
\doublequoteson%
\singlequotelinestarton%
-%\abbrevsingleon%
-\singlequoteson}
+% \abbrevsingleon%
+\singlequoteson
+\singlequotespon}
\newcommand{\dumbquotes}{
\doublequotesoff
-%\abbrevsingleoff
+% \abbrevsingleoff
\singlequotelinestartoff
- \singlequotesoff}
- \end{minted}
- \subsection{English option}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
-
- \DeclareOption{en}{
-\AtBeginDocument{
-\frsmartquotes
-\frdumbquotes
-\desmartquotes
-\dedumbquotes
-\degmsmartquotes
-\degmdumbquotes
-\smartquotes}
+ \singlequotesoff
+ \singlequotespoff
+ }
+
+ \DeclareOption{en}{
+\AtBeginDocument{\frsmartquotes\frdumbquotes%
+\desmartquotes\dedumbquotes\degmsmartquotes\degmdumbquotes\smartquotes}
\renewcommand{\texttt}[1]{{\ttfamily\addfontfeature{RawFeature={+qtbye,-tlig}} #1}}
}
- \end{minted}
- \subsection{Auxiliary punctuation}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% auxiliary punctuation
@@ -892,6 +558,8 @@ firstnumber=last
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\desingle}{{\addfontfeature{RawFeature={-qtbye,-tlig}}\symbol{"201A}}}
\newcommand{\dedouble}{{\addfontfeature{RawFeature={-qtbye,-tlig}}\symbol{"201E}}}
+\newcommand{\degmsingle}{{\addfontfeature{RawFeature={-qtbye,-tlig}}\symbol{"203A}}}
+\newcommand{\degmdouble}{{\addfontfeature{RawFeature={-qtbye,-tlig}}\symbol{"00BB}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% backtick
@@ -934,279 +602,56 @@ firstnumber=last
\newcommand{\sqtworight}{{\addfontfeature{RawFeature={-qtbye,-tlig}}”}}
\newcommand{\sqoneright}{{\addfontfeature{RawFeature={-qtbye,-tlig}}’}}
\newcommand{\apost}{{\addfontfeature{RawFeature={-qtbye,-tlig}}’}}
-\newcommand{\sqoneleft}{{\addfontfeature{RawFeature={-qtbye,-tlig}}‘}}
+%sqoneleft command moved because order mattered
\newcommand{\glmtl}{{\addfontfeature{RawFeature={-qtbye,-tlig}}«\,}}
\newcommand{\glmtr}{{\addfontfeature{RawFeature={-qtbye,-tlig}}\,»}}
\newcommand{\sglmtl}{{\addfontfeature{RawFeature={-qtbye,-tlig}}‹\,}}
\newcommand{\sglmtr}{{\addfontfeature{RawFeature={-qtbye,-tlig}}\,›}}
- \end{minted}
- \subsection{The German option}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
+\newcommand{\degmtl}{{\addfontfeature{RawFeature={-qtbye,-tlig}}»}}
+\newcommand{\degmtr}{{\addfontfeature{RawFeature={-qtbye,-tlig}}«}}
+\newcommand{\desgmtl}{{\addfontfeature{RawFeature={-qtbye,-tlig}}›}}
+\newcommand{\desgmtr}{{\addfontfeature{RawFeature={-qtbye,-tlig}}‹}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DEUTSCH
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\luaexec{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-function dedoublequotes ( s )
+\luaexec{function dedoublequotes ( s )
return ( s:gsub ( '"(..-)"' , "„\%1“" ) )
- end
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }
-\luaexec{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-function desinglequotelinestart ( s )
+ end}
+\luaexec{function desinglequotelinestart ( s )
return (s:gsub ("^'","‚" ) )
- end
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }
-\luaexec{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-function desinglequotesclose( s )
+ end}
+\luaexec{function desinglequotesclose( s )
return ( s:gsub ( " '(..-)'", " ‚\%1`" ) )
- end
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }
+ end}
%% Two utility macros to activate/deactivate the Lua function:
-\newcommand\dedoublequoteson{\directlua{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-luatexbase.add_to_callback (
- "process_input_buffer" , dedoublequotes , "dedoublequotes" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }}
+\newcommand\dedoublequoteson{\directlua{luatexbase.add_to_callback (
+ "process_input_buffer" , dedoublequotes , "dedoublequotes" )}}
\newcommand\dedoublequotesoff{\directlua{luatexbase.remove_from_callback (
- "process_input_buffer" , "dedoublequotes" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
-}}
-\newcommand\desinglequotelinestarton{\directlua{
-\end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-luatexbase.add_to_callback (
- "process_input_buffer" , desinglequotelinestart , "desinglequotelinestart" )\end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }}
-\newcommand\desinglequotelinestartoff{\directlua{
-\end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-luatexbase.remove_from_callback (
- "process_input_buffer" , "desinglequotelinestart" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }}
-\newcommand\desinglequotescloseon{\directlua{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
- luatexbase.add_to_callback (
- "process_input_buffer" , desinglequotesclose , "desinglequotesclose" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }}
-\newcommand\desinglequotescloseoff{\directlua{
-\end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-luatexbase.remove_from_callback (
- "process_input_buffer" , "desinglequotesclose" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }}
+ "process_input_buffer" , "dedoublequotes" )}}
+\newcommand\desinglequotelinestarton{\directlua{luatexbase.add_to_callback (
+ "process_input_buffer" , desinglequotelinestart , "desinglequotelinestart" )}}
+\newcommand\desinglequotelinestartoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "desinglequotelinestart" )}}
+ \newcommand\desinglequotescloseon{\directlua{luatexbase.add_to_callback (
+ "process_input_buffer" , desinglequotesclose , "desinglequotesclose" )}}
+\newcommand\desinglequotescloseoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "desinglequotesclose" )}}
\newcommand{\desmartquotes}{\dedoublequoteson
\desinglequotelinestarton
-\desinglequotescloseon}
+\desinglequotescloseon
+\desinglequotespon
+\desinglequotespcloseon
+}
\newcommand{\dedumbquotes}{\dedoublequotesoff
\desinglequotelinestartoff
-\desinglequotescloseoff}
+\desinglequotescloseoff
+\desinglequotespoff
+\desinglequotespcloseoff
+}
\DeclareOption{de}{
\AtBeginDocument{
\frsmartquotes
@@ -1216,268 +661,35 @@ firstnumber=last
\desmartquotes}
\renewcommand{\texttt}[1]{{\ttfamily\addfontfeature{RawFeature={+qtbye,-tlig}} #1}}
}
- \end{minted}
- \subsection{The German with French-style quotes (\texttt{degm}) option}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SCHÖNERES DEUTSCH
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\luaexec{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-function degmdoublequotes ( s )
+\luaexec{function degmdoublequotes ( s )
return ( s:gsub ( '"(..-)"' , "»\%1«" ) )
- end
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }
-\luaexec{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-function degmsinglequotelinestart ( s )
+ end}
+\luaexec{function degmsinglequotelinestart ( s )
return (s:gsub ("^'","›" ) )
- end
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }
-\luaexec{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-function degmsinglequotesclose( s )
+ end}
+\luaexec{function degmsinglequotesclose( s )
return ( s:gsub ( " '(..-)'", " ‚\%1‹" ) )
- end
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }
+ end}
%% Two utility macros to activate/deactivate the Lua function:
-\newcommand\degmdoublequoteson{\directlua{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-luatexbase.add_to_callback (
- "process_input_buffer" , degmdoublequotes , "degmdoublequotes" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }}
+\newcommand\degmdoublequoteson{\directlua{luatexbase.add_to_callback (
+ "process_input_buffer" , degmdoublequotes , "degmdoublequotes" )}}
\newcommand\degmdoublequotesoff{\directlua{luatexbase.remove_from_callback (
- "process_input_buffer" , "degmdoublequotes" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
-}}
-\newcommand\degmsinglequotelinestarton{\directlua{
-\end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-luatexbase.add_to_callback (
- "process_input_buffer" , degmsinglequotelinestart , "degmsinglequotelinestart" )\end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }}
-\newcommand\degmsinglequotelinestartoff{\directlua{
-\end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-luatexbase.remove_from_callback (
- "process_input_buffer" , "degmsinglequotelinestart" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }}
-\newcommand\degmsinglequotescloseon{\directlua{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
- luatexbase.add_to_callback (
- "process_input_buffer" , degmsinglequotesclose , "degmsinglequotesclose" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }}
-\newcommand\degmsinglequotescloseoff{\directlua{
-\end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-luatexbase.remove_from_callback (
- "process_input_buffer" , "degmsinglequotesclose" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }}
+ "process_input_buffer" , "degmdoublequotes" )}}
+\newcommand\degmsinglequotelinestarton{\directlua{luatexbase.add_to_callback (
+ "process_input_buffer" , degmsinglequotelinestart , "degmsinglequotelinestart" )}}
+\newcommand\degmsinglequotelinestartoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "degmsinglequotelinestart" )}}
+ \newcommand\degmsinglequotescloseon{\directlua{luatexbase.add_to_callback (
+ "process_input_buffer" , degmsinglequotesclose , "degmsinglequotesclose" )}}
+\newcommand\degmsinglequotescloseoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "degmsinglequotesclose" )}}
\newcommand{\degmsmartquotes}{\degmdoublequoteson
\degmsinglequotelinestarton
\degmsinglequotescloseon}
@@ -1493,303 +705,57 @@ firstnumber=last
\degmsmartquotes}
\renewcommand{\texttt}[1]{{\ttfamily\addfontfeature{RawFeature={+qtbye,-tlig}} #1}}
}
- \end{minted}
- \subsection{The French option}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Français
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\luaexec{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-function frdoublequotes ( s )
+\luaexec{function frdoublequotes ( s )
return ( s:gsub ( '"(..-)"' , "«\\,\%1\\,»" ) )
- end
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
-}
-\luaexec{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-function frsinglequotelinestart ( s )
+ end}
+
+
+\luaexec{function frsinglequotelinestart ( s )
return (s:gsub ("^'","'" ) )
- end \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
-}
-\luaexec{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-function frsinglequotesclose( s )
+ end}
+\luaexec{function frsinglequotesclose( s )
return ( s:gsub ( " '(..-)'", " ‹\\,\%1\\,›" ) )
- end
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }
+ end}
+
%% Two utility macros to activate/deactivate the Lua function:
-\newcommand\frdoublequoteson{\directlua{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-luatexbase.add_to_callback (
- "process_input_buffer" ,frdoublequotes , "frdoublequotes" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }}
-\newcommand\frdoublequotesoff{\directlua{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-luatexbase.remove_from_callback (
- "process_input_buffer" , "frdoublequotes" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }}
-\newcommand\frsinglequotelinestarton{\directlua{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-luatexbase.add_to_callback (
- "process_input_buffer" ,frsinglequotelinestart , "frsinglequotelinestart" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }}
-\newcommand\frsinglequotelinestartoff{\directlua{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-luatexbase.remove_from_callback (
- "process_input_buffer" , "frsinglequotelinestart" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
- }}
- \newcommand\frsinglequotescloseon{\directlua{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
- luatexbase.add_to_callback (
- "process_input_buffer" ,frsinglequotesclose , "frsinglequotesclose" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
-}}
-\newcommand\frsinglequotescloseoff{\directlua{
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{lua}
-luatexbase.remove_from_callback (
- "process_input_buffer" , "frsinglequotesclose" )
- \end{minted}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
-}}
+\newcommand\frdoublequoteson{\directlua{luatexbase.add_to_callback (
+ "process_input_buffer" ,frdoublequotes , "frdoublequotes" )}}
+\newcommand\frdoublequotesoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "frdoublequotes" )}}
+\newcommand\frsinglequotelinestarton{\directlua{luatexbase.add_to_callback (
+ "process_input_buffer" ,frsinglequotelinestart , "frsinglequotelinestart" )}}
+\newcommand\frsinglequotelinestartoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "frsinglequotelinestart" )}}
+ \newcommand\frsinglequotescloseon{\directlua{luatexbase.add_to_callback (
+ "process_input_buffer" ,frsinglequotesclose , "frsinglequotesclose" )}}
+\newcommand\frsinglequotescloseoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "frsinglequotesclose" )}}
+ \newcommand{\frsmartquotes}{\frdoublequoteson
+ \frsinglequotespon
+ \frsinglequotespcloseon
\frsinglequotelinestarton
\frsinglequotescloseon}
\newcommand{\frdumbquotes}{\frdoublequotesoff
+ \frsinglequotespoff
+ \frsinglequotespcloseoff
\frsinglequotelinestartoff
\frsinglequotescloseoff}
\DeclareOption{fr}{
-\AtBeginDocument{\desmartquotes\dedumbquotes\smartquotes\dumbquotes\dumbquotes\frsmartquotes}
+\AtBeginDocument{\desmartquotes\dedumbquotes%
+\degmsmartquotes\degmdumbquotes%
+\smartquotes\dumbquotes%
+\dumbquotes\frsmartquotes}
\renewcommand{\texttt}[1]{{\ttfamily\addfontfeature{RawFeature={+qtbye,-tlig}} #1}}
+
}
- \end{minted}
- \subsection{Process Options}
- \begin{minted}[
-frame=lines,
-framesep=2mm,
-baselinestretch=1.2,
-bgcolor=LightGray,
-fontsize=\footnotesize,
-linenos,
-breaklines,
-firstnumber=last
-]
-{latex}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Default option is English
%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1797,32 +763,37 @@ firstnumber=last
\ExecuteOptions{en}%
\ProcessOptions*
-
+
+
\end{minted}
\section{Version History}
-\subsection{\normalfont\texttt{1.2.2}}
+\subsection*{\normalfont\texttt{1.3.0}}
+\ttfamily 15 January 2023 fixed single quotes and parentheses
+
+
+\subsection*{\normalfont\texttt{1.2.2}}
\ttfamily Added the "degm" option
-\subsection{\normalfont\texttt{1.2.1}}
+\subsection*{\normalfont\texttt{1.2.1}}
\ttfamily Suspended automatic elision support due to implementation issues
-\subsection{\normalfont\texttt{1.1.0}}
+\subsection*{\normalfont\texttt{1.1.0}}
\ttfamily 25 October 2022: Added support for elision
-\subsection{\normalfont\texttt{1.0.1}}
+\subsection*{\normalfont\texttt{1.0.1}}
\ttfamily 30 August 2022: Further corrections to bug preventing non-English usage
-\subsection{\normalfont\texttt{1.0.1}}
+\subsection*{\normalfont\texttt{1.0.1}}
\ttfamily 28 August 2022: Change bug preventing non-English usage
-\subsection{\normalfont\texttt{1.0.0}}
+\subsection*{\normalfont\texttt{1.0.0}}
\ttfamily 21 August 2022: Package creation
diff --git a/macros/luatex/latex/luaquotes/luaquotes.sty b/macros/luatex/latex/luaquotes/luaquotes.sty
index c07785bcd6..7b93a4f9c0 100644
--- a/macros/luatex/latex/luaquotes/luaquotes.sty
+++ b/macros/luatex/latex/luaquotes/luaquotes.sty
@@ -1,6 +1,6 @@
-\def\luaquotesversionnumber{1.2.2}
+\def\luaquotesversionnumber{1.3.0}
\ProvidesPackage{luaquotes}
- [2022/12/09\luaquotesversionnumber smart quotes with lua]
+ [2023/15/15\luaquotesversionnumber smart quotes with lua]
% !TeX program = lualatex
% !TeX encoding = utf8
% This work may be distributed and/or modified under the
@@ -102,6 +102,87 @@ function doublequotes ( s )
\luaexec{function singlequotes ( s )
return ( s:gsub ( " '"," ‘" ) )
end}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% parentheses
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand{\sqoneleft}{{\addfontfeature{RawFeature={-qtbye,-tlig}}‘}}
+
+\luaexec{function psinglequotes ( s )
+ return ( s:gsub ( "\%('",[[(\sqoneleft]] ) )
+ end}
+
+\newcommand\singlequotespon{\directlua{
+luatexbase.add_to_callback (
+ "process_input_buffer" , psinglequotes , "psinglequotes" )
+ }}
+\newcommand\singlequotespoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "psinglequotes" )}}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% DE parentheses
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%\newcommand{\sqoneleft}{{\addfontfeature{RawFeature={-qtbye,-tlig}}‘}}
+
+\luaexec{function depsinglequotes ( s )
+ return ( s:gsub ( "\%('",[[(‚]] ) )
+ end}
+
+\newcommand\desinglequotespon{\directlua{
+luatexbase.add_to_callback (
+ "process_input_buffer" , depsinglequotes , "depsinglequotes" )
+ }}
+\newcommand\desinglequotespoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "depsinglequotes" )}}
+
+\luaexec{function depsinglequotesclose ( s )
+ return ( s:gsub ( "'\%)",[[\sqoneleft)]] ) )
+ end}
+
+\newcommand\desinglequotespcloseon{\directlua{
+luatexbase.add_to_callback (
+ "process_input_buffer" , depsinglequotesclose , "depsinglequotesclose" )
+ }}
+\newcommand\desinglequotespcloseoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "depsinglequotesclose" )}}
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% FR Parentheses
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand{\sglmtlp}{{\addfontfeature{RawFeature={-qtbye,-tlig}}‹\hskip .16667em}}
+\newcommand{\sglmtrp}{{\addfontfeature{RawFeature={-qtbye,-tlig}}\hskip .16667em›}}
+
+\luaexec{function frpsinglequotes ( s )
+ return ( s:gsub ( "\%('",[[(\sglmtlp]] ) )
+ end}
+\luaexec{function frpsinglequotesclose ( s )
+ return ( s:gsub ( "'\%)",[[\sglmtrp)]] ) )
+ end}
+
+\newcommand\frsinglequotespon{\directlua{
+luatexbase.add_to_callback (
+ "process_input_buffer" , frpsinglequotes , "frpsinglequotes" )
+ }}
+\newcommand\frsinglequotespoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "frpsinglequotes" )}}
+\newcommand\frsinglequotespcloseon{\directlua{
+luatexbase.add_to_callback (
+ "process_input_buffer" , frpsinglequotesclose , "frpsinglequotesclose" )
+ }}
+\newcommand\frsinglequotespcloseoff{\directlua{luatexbase.remove_from_callback (
+ "process_input_buffer" , "frpsinglequotesclose" )}}
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% activation and deactivation
@@ -145,12 +226,15 @@ luatexbase.add_to_callback (
\doublequoteson%
\singlequotelinestarton%
% \abbrevsingleon%
-\singlequoteson}
+\singlequoteson
+\singlequotespon}
\newcommand{\dumbquotes}{
\doublequotesoff
% \abbrevsingleoff
\singlequotelinestartoff
- \singlequotesoff}
+ \singlequotesoff
+ \singlequotespoff
+ }
\DeclareOption{en}{
\AtBeginDocument{\frsmartquotes\frdumbquotes\desmartquotes\dedumbquotes\degmsmartquotes\degmdumbquotes\smartquotes}
@@ -224,11 +308,12 @@ luatexbase.add_to_callback (
\newcommand{\sqtworight}{{\addfontfeature{RawFeature={-qtbye,-tlig}}”}}
\newcommand{\sqoneright}{{\addfontfeature{RawFeature={-qtbye,-tlig}}’}}
\newcommand{\apost}{{\addfontfeature{RawFeature={-qtbye,-tlig}}’}}
-\newcommand{\sqoneleft}{{\addfontfeature{RawFeature={-qtbye,-tlig}}‘}}
+%sqoneleft command moved because order mattered
\newcommand{\glmtl}{{\addfontfeature{RawFeature={-qtbye,-tlig}}«\,}}
\newcommand{\glmtr}{{\addfontfeature{RawFeature={-qtbye,-tlig}}\,»}}
\newcommand{\sglmtl}{{\addfontfeature{RawFeature={-qtbye,-tlig}}‹\,}}
\newcommand{\sglmtr}{{\addfontfeature{RawFeature={-qtbye,-tlig}}\,›}}
+
\newcommand{\degmtl}{{\addfontfeature{RawFeature={-qtbye,-tlig}}»}}
\newcommand{\degmtr}{{\addfontfeature{RawFeature={-qtbye,-tlig}}«}}
\newcommand{\desgmtl}{{\addfontfeature{RawFeature={-qtbye,-tlig}}›}}
@@ -263,10 +348,16 @@ return ( s:gsub ( " '(..-)'", " ‚\%1`" ) )
"process_input_buffer" , "desinglequotesclose" )}}
\newcommand{\desmartquotes}{\dedoublequoteson
\desinglequotelinestarton
-\desinglequotescloseon}
+\desinglequotescloseon
+\desinglequotespon
+\desinglequotespcloseon
+}
\newcommand{\dedumbquotes}{\dedoublequotesoff
\desinglequotelinestartoff
-\desinglequotescloseoff}
+\desinglequotescloseoff
+\desinglequotespoff
+\desinglequotespcloseoff
+}
\DeclareOption{de}{
\AtBeginDocument{
\frsmartquotes
@@ -352,13 +443,17 @@ return ( s:gsub ( " '(..-)'", " ‹\\,\%1\\,›" ) )
\newcommand\frsinglequotescloseoff{\directlua{luatexbase.remove_from_callback (
"process_input_buffer" , "frsinglequotesclose" )}}
\newcommand{\frsmartquotes}{\frdoublequoteson
+ \frsinglequotespon
+ \frsinglequotespcloseon
\frsinglequotelinestarton
\frsinglequotescloseon}
\newcommand{\frdumbquotes}{\frdoublequotesoff
+ \frsinglequotespoff
+ \frsinglequotespcloseoff
\frsinglequotelinestartoff
\frsinglequotescloseoff}
\DeclareOption{fr}{
-\AtBeginDocument{\desmartquotes\dedumbquotes\degmsmartquotes\degmdumpquotes\smartquotes\dumbquotes\dumbquotes\frsmartquotes}
+\AtBeginDocument{\desmartquotes\dedumbquotes\degmsmartquotes\degmdumbquotes\smartquotes\dumbquotes\dumbquotes\frsmartquotes}
\renewcommand{\texttt}[1]{{\ttfamily\addfontfeature{RawFeature={+qtbye,-tlig}} #1}}
@@ -373,4 +468,4 @@ return ( s:gsub ( " '(..-)'", " ‹\\,\%1\\,›" ) )
-
+ \ No newline at end of file
diff --git a/macros/unicodetex/latex/njuthesis/README.md b/macros/unicodetex/latex/njuthesis/README.md
index e366833206..a0f6cf8195 100644
--- a/macros/unicodetex/latex/njuthesis/README.md
+++ b/macros/unicodetex/latex/njuthesis/README.md
@@ -46,4 +46,4 @@ version.
-----
-Copyright (C) 2021 - 2022 by NJU LUG.
+Copyright (C) 2021 - 2023 by NJU LUG.
diff --git a/macros/unicodetex/latex/njuthesis/njuthesis.dtx b/macros/unicodetex/latex/njuthesis/njuthesis.dtx
index 1a87ed55fc..37a19e1c98 100644
--- a/macros/unicodetex/latex/njuthesis/njuthesis.dtx
+++ b/macros/unicodetex/latex/njuthesis/njuthesis.dtx
@@ -2,7 +2,7 @@
% !TeX program = XeLaTeX
% !TeX encoding = UTF-8
%
-% Copyright (C) 2021 - 2022
+% Copyright (C) 2021 - 2023
% by Nanjing University Linux User Group
% <git+nju-lug-email-3104-issue-@yaoge123.cn>
%
@@ -35,11 +35,6 @@
% for those people who are interested.
%
%<*internal>
-\iffalse
-%</internal>
-%
-%<*internal>
-\fi
\begingroup
\def\NameOfLaTeXe{LaTeX2e}
\expandafter\endgroup\ifx\NameOfLaTeXe\fmtname\else
@@ -53,7 +48,7 @@
\preamble
-Copyright (C) 2021 - 2022
+Copyright (C) 2021 - 2023
by Nanjing University Linux User Group
<git+nju-lug-email-3104-issue-@yaoge123.cn>
@@ -112,14 +107,9 @@ To produce the documentation run the original source files ending with
\fi
%</internal>
%
-% ^^A 故意留白
-% ^^A 故意留白
-%
%<class>\NeedsTeXFormat{LaTeX2e}
%<*!(driver|install)>
-% ^^A 诚耀百廿,雄创一流
-% ^^A 南京大学一百二十周年华诞邀您共襄盛举!
-%<+!driver>\GetIdInfo $Id: njuthesis.dtx 1.1.1 2022-12-04 00:00:00
+%<+!driver>\GetIdInfo $Id: njuthesis.dtx 1.1.2 2023-01-15 14:35:00
%<+!driver> +0800 NJU LUG <git+nju-lug-email-3104-issue-@yaoge123.cn>$
%<class> {Thesis template for Nanjing University}
%<class>\ProvidesExplClass{njuthesis}
@@ -127,6 +117,8 @@ To produce the documentation run the original source files ending with
%<def-u>\ProvidesExplFile{njuthesis-undergraduate.def}
%<def-g> {Graduate definition file for njuthesis}
%<def-g>\ProvidesExplFile{njuthesis-graduate.def}
+% ^^A 诚耀百廿,雄创一流
+% ^^A 南京大学一百二十周年华诞邀您共襄盛举!
%<def-p> {Postdoctoral definition file for njuthesis}
%<def-p>\ProvidesExplFile{njuthesis-postdoctoral.def}
%<!driver> {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -141,9 +133,9 @@ To produce the documentation run the original source files ending with
contents={\njuemblem[white!85!gray]{22cm}{!}},
scale=1, angle=0, hshift=-4cm
}
-\definecolor{olgreen}{HTML}{138a07}
+\definecolor{tpblue}{HTML}{495A80}
\renewcommand\emph[1]{\CJKunderdot[textformat=\itshape]{#1}}
-\newcommand\olbutton[1]{\textcolor{olgreen}{\bfseries #1}}
+\newcommand\tpbutton[1]{\textcolor{tpblue}{\bfseries #1}}
\newcommand\tikzlogo{Ti\emph{k}Z}
\newcommand\OPT[1]{\textcolor{njuyellow}{\bfseries#1}}
\hypersetup{
@@ -153,7 +145,7 @@ To produce the documentation run the original source files ending with
citecolor = njublue,
linkcolor = njuviolet,
urlcolor = njumagenta}
-\UseTblrLibrary{booktabs,diagbox,siunitx}
+\UseTblrLibrary{booktabs,siunitx}
\DefTblrTemplate{caption-tag}{default}{表\hspace{0.25em}\thetable}
\SetTblrStyle{caption-tag}{font=\bfseries}
\SetTblrInner{row{1}={font=\bfseries}}
@@ -347,16 +339,6 @@ To produce the documentation run the original source files ending with
%</driver>
% \fi
%
-% \title{\color{njuviolet}{The \cls{njuthesis} class\\
-% \textbf{南京大学学位论文模板}}}
-%
-% \author{^^A
-% 南京大学 Linux 用户组
-% \thanks{E-mail: \href{mailto:git+nju-lug-email-3104-issue-@yaoge123.cn}
-% {git+nju-lug-email-3104-issue-@yaoge123.cn}}}
-%
-% \date{v1.1.1 \quad 2022-12-04}
-%
% \changes{v0.1}{2021/09/04}{开始开发。}
% \changes{v0.2}{2021/09/07}{初步搭建了可用的模板。}
% \changes{v0.3}{2021/09/09}{使用自动构建工具进行测试。}
@@ -388,18 +370,28 @@ To produce the documentation run the original source files ending with
% \changes{v1.0}{2022/07/23}{新增博士后出站报告模板。}
% \changes{v1.0}{2022/07/28}{在手册中以不同颜色指示不同模块。}
% \changes{v1.0}{2022/08/02}{删除 \LaTeX 基础用法的说明。}
+% \changes{v1.1}{2023/01/05}{适配2023届本科生毕业毕业论文(设计)规范。}
+% \changes{v1.1}{2023/01/05}{适配新版南大 \LaTeX 在线编辑器。}
+%
+% \title{\color{njuviolet}{The \cls{njuthesis} class\\
+% \textbf{南京大学学位论文模板}}}
+%
+% \author{南京大学 Linux 用户组
+% \thanks{E-mail: \href{mailto:git+nju-lug-email-3104-issue-@yaoge123.cn}
+% {git+nju-lug-email-3104-issue-@yaoge123.cn}}}
%
+% \date{v1.1.2 \quad 2023-01-15}
%
% \maketitle
%
+% \let\abstractname\relax
% \begin{abstract}
% \cls{njuthesis} 是制作南京大学本科生毕业论文、研究生学位论文、博士后出站报告的
% \LaTeX 文档类。本模板基于本科生院的论文撰写规范制作,同时参考研究生院提供的硕士、
-% 博士学位材料包,用于生成符合南京大学排版要求和相应的国家规范、行业标准的学位论
+% 博士学位材料包,用于生成符合南京大学排版要求和相应的国家标准的学位论
% 文,力求通过 \LaTeX3 语法实现清晰的实现逻辑、较高的可定制性以及友好的用户接口。
% \end{abstract}
%
-% \def\abstractname{Abstract}
% \begin{abstract}
% The \cls{njuthesis} class is intended for typesetting Nanjing University
% dissertations with \LaTeX, providing support for bachelor, master,
@@ -438,57 +430,54 @@ To produce the documentation run the original source files ending with
% 用户组维护的,用于处理本校学生毕业论文排版需求的 \LaTeX 模板。
%
% 本模板使用的本科生毕业论文模板格式依据
-% 《关于启动南京大学2022届本科毕业论文(设计)工作的通知》\cite{nju-bachelor-2022},
+% 《关于启动南京大学2023届本科毕业论文(设计)工作的通知》\cite{nju-bachelor-2023},
% 研究生学位论文格式依据研究生院提供的材料包\cite{nju-master-2022,nju-doctor-2022}。
% 博士后出站报告格式要求与博士学位论文一致\cite{nju-postdoc-2022},
% 封面、摘要的设计参考了部分既有报告。
%
%
-% ^^A \subsection{开始之前}
-% ^^A \label{subsec:first-things-first}
-%
-% ^^A 在本文正式介绍 \cls{njuthesis} 论文模板前,您也许并不熟悉 \TeX{}
-% ^^A 排版系统。话不多说,请先按部就班体验一遍下述的工作流程:
-%
-% ^^A \bigskip
-% ^^A \fcolorbox{olgreen}{gray!5}{\parbox{\textwidth-5em}{%
-% ^^A \hspace{2em}\begin{minipage}[c]{10cm}
-% ^^A \begin{enumerate}
-% ^^A \item 访问 \url{https://tex.nju.edu.cn}
-% ^^A \item 点击右上角~\olbutton{注册}~按钮,
-% ^^A 用\href{https://itsc.nju.edu.cn/1b/ce/c21586a334798/page.htm}
-% ^^A {南大邮箱}注册账号
-% ^^A \item 登录您的账号
-% ^^A \item 点击左上角~\olbutton{创建新项目}~按钮,选择~\olbutton{论文模板}
-% ^^A \item 随意取名,点击~\olbutton{创建}~按钮
-% ^^A \end{enumerate}
-% ^^A \end{minipage}}}
-%
-% ^^A \bigskip
-% ^^A 稍等片刻,您会在浏览器右侧发现一份新生成的空白论文。
-% ^^A 如果它的效果令您满意,不妨以本模板为基础开始写作。
-%
-% ^^A \subparagraph{我一定要体验上述流程吗?}
-% ^^A 是,但也不一定。有人坚持认为应该做一些\emph{直观、清晰、有手就行、一
-% ^^A 条路走到底}的教程,而不是\emph{长篇累牍的精细介绍},其核心论据在于:
-% ^^A 现代人类总体上需要快速取得成就感,而且大部分可能用到本模板的同学不
-% ^^A 会具备必要的基础知识。反驳的观点在于过分简单的实验总是浪费时间的,
-% ^^A 尤其是在您可能早已掌握基本用法的情况下。但,不论如何,这番操作总会
-% ^^A 使您预览到 \cls{njuthesis} 论文模板的实际样式。
-%
-% ^^A \subparagraph{我并没有见到理想的结果。}
-% ^^A 具体是哪里不满意?如果是\emph{样式存在偏差},请联系模板的作者;如果
-% ^^A \emph{不能访问前文提到的在线编译网站},请考虑检查网络连接,依次咨询
-% ^^A 本校\href{https://itsc.nju.edu.cn}{信息化管理建设服务中心}和该网站
-% ^^A 的维护者\href{mailto:my@yaoge123.cn}{姚舸老师};如果\emph{报错},请
-% ^^A 点击左上角的菜单按钮,查看编译器是否显示为 |XeLaTeX|;
-% ^^A 再如果\emph{还有其他原因},通过这几分钟的实验我们也可以得到一个极其
-% ^^A 有益的结论:\emph{也许 Word 模板更加适合您}。这可以节省下熟悉
-% ^^A \TeX{} 排版软件使用方法所需的可观时间。
-%
-% ^^A \subparagraph{但我依然对 \LaTeX 一无所知!}
-% ^^A 这意味着您真的得花些时间在\emph{长篇累牍的精细介绍}上。
-% ^^A 如果您已经下定决心,请接着向后阅读,有需要时善用搜索引擎。
+% \subsection{开始之前}
+% \label{subsec:first-things-first}
+%
+% 在本文正式介绍 \cls{njuthesis} 论文模板前,您也许并不熟悉 \LaTeX 模板的使用方法。
+% 话不多说,请先按部就班体验一遍下述的工作流程:
+%
+% \bigskip
+% \fcolorbox{tpblue}{gray!5}{\parbox{\textwidth-5em}{%
+% \hspace{2em}\begin{minipage}[c]{10cm}
+% \begin{enumerate}
+% \item 访问 \url{https://tex.nju.edu.cn}
+% \item 点击\tpbutton{使用南大统一身份认证登录}
+% \item 点击右上角\tpbutton{LaTeX 模板},选择\tpbutton{南京大学学位论文}
+% \item 点击进入刚刚新建的项目
+% \end{enumerate}
+% \end{minipage}}}
+%
+% \bigskip
+% 稍等片刻,您会在浏览器右侧发现一份新生成的空白论文。
+% 如果它的效果令您满意,不妨以 \file{njuthesis-sample.tex} 为基础开始写作。
+%
+% \subparagraph{我一定要体验上述流程吗?}
+% 是,但也不一定。有人坚持认为应该做一些\emph{直观、清晰、有手就行、一
+% 条路走到底}的教程,而不是\emph{长篇累牍的精细介绍},其核心论据在于:
+% 现代人类总体上需要快速取得成就感,而且大部分可能用到本模板的同学不
+% 会具备必要的基础知识。反驳的观点在于过分简单的实验总是浪费时间的,
+% 尤其是在您可能早已掌握基本用法的情况下。但,不论如何,这番操作总会
+% 使您预览到 \cls{njuthesis} 论文模板的实际样式。
+%
+% \subparagraph{我并没有见到理想的结果。}
+% 具体是哪里不满意?如果是\emph{样式存在偏差},请联系模板的作者;如果
+% \emph{不能访问前文提到的在线编译网站},请考虑检查网络连接,依次咨询
+% 本校\href{https://itsc.nju.edu.cn}{信息化管理建设服务中心}和该网站
+% 的维护者\href{mailto:my@yaoge123.cn}{姚舸老师};如果\emph{报错},请
+% 点击左上角的菜单按钮,查看编译器是否显示为 |XeLaTeX|;
+% 再如果\emph{还有其他原因},通过这几分钟的实验我们也可以得到一个极其
+% 有益的结论:\emph{也许 Word 模板更加适合您}。这可以节省下熟悉
+% \TeX{} 排版软件使用方法所需的可观时间。
+%
+% \subparagraph{但我依然对 \LaTeX 一无所知!}
+% 这意味着您真的得花些时间在\emph{长篇累牍的精细介绍}上。
+% 如果您已经下定决心,请接着向后阅读,有需要时善用搜索引擎。
%
%
% \subsection{历史沿革}
@@ -527,9 +516,9 @@ To produce the documentation run the original source files ending with
%
% 目前,本模板的主要维护者包括:
% \begin{itemize}
-% \item 赵懿晨
+% ^^A \item 赵懿晨
% \item 熊煜
-% \item 马畅
+% ^^A \item 马畅
% \end{itemize}
%
%
@@ -546,8 +535,8 @@ To produce the documentation run the original source files ending with
% 如果您希望在使用本模板前了解一些关于这个排版软件的基础知识,在此尝试列举一些有
% 所帮助的资料:
% \begin{description}
-% \item[\textit{lshort}] 著名的介绍文档,已被译为多种语言,可以参考英文版
-% \cite{lshort}及其中文翻译版\cite{lshort-zh-cn}。
+% \item[\textit{lshort}] 著名的介绍文档,已被译为多种语言,
+% 推荐通读其中文版\cite{lshort-zh-cn}。
% \item[《\LaTeX 入门》] 刘海洋著\cite{刘海洋2013latex入门}。
% \end{description}
%
@@ -574,7 +563,7 @@ To produce the documentation run the original source files ending with
% \cls{njuthesis} 文档类,或者在本文中简称为本模板。
%
% \subparagraph{版权信息}
-% 本模板之版权隶属于 © 2021 - 2022 南京大学 Linux 用户组。
+% 本模板之版权隶属于 © 2021 - 2023 南京大学 Linux 用户组。
%
% \subparagraph{发布和修改}
% 本模板的发布和(或)修改遵守 LaTeX Project Public License(版本 1.3c 或更高)
@@ -731,11 +720,11 @@ To produce the documentation run the original source files ending with
% \label{tab:texdistribution}
% \begin{tabular}{cccc}
% \toprule
-% \TeX & Windows & macOS & Linux \\
+% \TeX & Windows & macOS & Linux \\
% \midrule
-% \TL & $\bullet$ & & $\bullet$ \\
-% \MacTeX & & $\bullet$ & \\
-% \MiKTeX & $\bullet$ & $\bullet$ & $\bullet$ \\
+% \TL & $\bullet$ & & $\bullet$ \\
+% \MacTeX & & $\bullet$ & \\
+% \MiKTeX & $\bullet$ & $\bullet$ & $\bullet$ \\
% \bottomrule
% \end{tabular}
% \end{table}
@@ -865,49 +854,30 @@ To produce the documentation run the original source files ending with
% 速度的差异,同一个模板在 Linux 编译可以相对 Windows 节省约一半耗时。}。
% 拒绝接受这些麻烦的同学可以尝试本节介绍的在线编译方法。
%
-% {\color{red}|[!]|} 请注意,在线编辑器不一定提供良好的文件恢复和版本管理机制。
-% 请谨慎备份您的心血结晶。
-%
-% ^^A \subsubsection{南大 \TeX 平台简介}
-% ^^A \changes{v0.2}{2021/09/07}{添加对南大 \TeX 的支持。}
-%
-% ^^A \href{https://tex.nju.edu.cn}{南大 \TeX} 基于开源的 Overleaf 社区版平台构建
-% ^^A \footnote{理论上在\href{https://doc.nju.edu.cn/books/latex}{这个网站}能找到
-% ^^A 一段平台简介,实际上大家都有意无意地鸽了,下次一定补上。},于2021年3月4日正
-% ^^A 式上线,是 \href{https://sci.nju.edu.cn/}{eScience 中心}为南大在校师生提供的
-% ^^A \LaTeX 在线编辑器,首次使用需凭学校邮箱自助注册账号。
-%
-% ^^A {\color{red}|[!]|} 在 2022 年 5 月的运行中,该网站出现了多次崩溃事件,
-% ^^A 初步判断原因是由社区版并没有为高并发数做优化引发的。
-% ^^A 高峰时期,仍然建议在本地部署 \TeX 发行版。
+% {\color{red}|[!]|} 使用在线编辑器时请谨慎备份您的心血结晶。
%
-% ^^A \subsubsection{操作步骤}
+% \subsubsection{南大 \TeX 平台简介}
+% \changes{v0.2}{2021/09/07}{添加对南大 \TeX 的支持。}
%
-% ^^A 本说明手册开头的 \ref{subsec:first-things-first} 即呈现了网站内嵌的
-% ^^A \cls{njuthesis} 模板的使用方法。由于南大 \TeX 网站已预装 \cls{njuthesis},
-% ^^A 可以直接编写正文,无需 \file{.cls} 等格式文件。
-% ^^A 如果有其他要求,也可以按如下步骤手动上传包含模板的压缩包。
+% 当前的\href{https://tex.nju.edu.cn}{南大 \TeX} 基于
+% \href{https://www.texpage.com}{TeXPage} 提供的服务,
+% 是 \href{https://sci.nju.edu.cn/}{eScience 中心}为南大在校师生提供的
+% 免费 \LaTeX 在线编辑器,首次使用时需凭统一身份认证激活账号。
%
-% ^^A \begin{enumerate}
-% ^^A \item 访问\href{https://tex.nju.edu.cn}{南大 \TeX 网站},
-% ^^A 点击界面右上方“注册”按钮,使用\emph{南京大学邮箱}注册账号并登录
-% ^^A \item 新建空白项目,或者上传 \ref{subsubsec:on-the-fly-installation} 节得到的压缩文件。
-% ^^A \item 在项目页面左上角的“菜单”中,确认编译器为 |XeLaTeX| 或者 |LuaLaTeX|
-% ^^A \item 仿照 \file{njuthesis-sample.tex} 编写论文
-% ^^A \item 点击“重新编译”按钮进行编译和预览
-% ^^A \end{enumerate}
%
+% \subsubsection{操作步骤}
%
-% ^^A \subsubsection{其他平台}
+% 本说明手册开头的 \ref{subsec:first-things-first} 即呈现了网站内嵌的
+% \cls{njuthesis} 模板的使用方法。
+% 如果网站更新不及时,也可以按如下步骤手动上传包含模板的压缩包。
%
-% \subparagraph{Overleaf}
-% \changes{v0.12}{2021/12/07}{更新了对 Overleaf 的支持情况。}
-% \pkg{njuthesis} 现已支持 \href{https://www.overleaf.com/}{Overleaf} 平台。
-%
-% \subparagraph{TeXPage}
-% \href{https://www.texpage.com/}{TeXPage} 是国人研发的 \LaTeX 在线编辑器,
-% 当前版本已具备较为完善的编辑编译功能,而且免费版相对 Overleaf 增加了公式识别、
-% 编辑历史等实用工具,也可以作为一个备选项。
+% \begin{enumerate}
+% \item 登录\href{https://tex.nju.edu.cn}{南大 \TeX 网站}
+% \item 上传~\ref{subsubsec:on-the-fly-installation}~节得到的压缩文件。
+% \item 在项目页面左上角的\tpbutton{设置}中,确认编译器为 |XeLaTeX| 或者 |LuaLaTeX|
+% \item 仿照 \file{njuthesis-sample.tex} 编写论文
+% \item 点击右上角\tpbutton{编译}按钮进行编译和预览
+% \end{enumerate}
%
%
% \subsection{版本升级}
@@ -1600,9 +1570,9 @@ To produce the documentation run the original source files ending with
% \begin{function}{\chaptermark,\sectionmark}
% \begin{syntax}
% \tn{chapter}\oarg{用在页眉的章标题}\marg{完整的章标题}
-% \tn{sectionmark}\marg{用在目录的章标题}
+% \tn{sectionmark}\marg{用在目录中的章标题}
% \tn{section}\oarg{用在页眉的章标题}\marg{完整的节标题}
-% \tn{sectionmark}\marg{用在目录节标题}
+% \tn{sectionmark}\marg{用在目录中的节标题}
% \end{syntax}
% 如果页眉内容发生了冲突,可使用这两个命令细化定制。
% \end{function}
@@ -1682,7 +1652,7 @@ To produce the documentation run the original source files ending with
% \OPT{style} = <(plain)|pifont|circled|circled*>
% \end{syntax}
% 设置脚注编号样式。默认为普通数字;使用 \opt{pifont} 可修改为带圈数字,
-% 此样式受到字符闲置,单页不建议超过10条脚注;使用 \opt{circled} 或 \opt{circled*}
+% 由于字体包含的字符数量有限,单页不建议超过10条脚注;使用 \opt{circled} 或 \opt{circled*}
% 选项同样可修改为带圈数字,且不受单页脚注数量的限制,带星号的选项为黑底白字(阴文)。
% \footnote{此功能依赖的 \pkg{circledtext} 宏包于 2022 年 4 月发布,可能需要手动安装。}
% \end{function}
@@ -1992,7 +1962,7 @@ To produce the documentation run the original source files ending with
% \end{description}
%
% 对于本科生而言,学校规定文件表明参考文献表应当“用数字加方括号
-% 表示”\cite{nju-bachelor-2022},符合顺序编码制的格式,保持默认设置即可。
+% 表示”\cite{nju-bachelor-2023},符合顺序编码制的格式,保持默认设置即可。
%
% \begin{function}[added=2022-02-15]{bib/option}
% \begin{syntax}
@@ -2050,7 +2020,7 @@ To produce the documentation run the original source files ending with
%
% 假如需要在每章末尾附上单独的参考文献表,导言区添加以下设置,
% 并在每章后使用 \tn{printbibliography} 即可。
-% \begin{latexexample}[moretexcs={\njusetup},emph={[2]bib}]
+% \begin{latexexample}[moretexcs={\njusetup},emph={[2]bib},emph={[3]option}]
% \njusetup[bib/option]{refsection = chapter}
% \end{latexexample}
%
@@ -2563,11 +2533,11 @@ To produce the documentation run the original source files ending with
% \newblock \textit{信息与文献\quad 参考文献著录规则: GB/T 7714--2015} [S].
% \newblock 北京: 中国标准出版社, 2015
%
-% \bibitem{nju-bachelor-2022}
+% \bibitem{nju-bachelor-2023}
% 南京大学本科生院.
% \newblock \textit{关于启动南京大学2022届本科毕业论文(设计)工作的通知} [EB/OL].
-% \newblock (2021-12-14)
-% \urlprefix\url{https://jw.nju.edu.cn/7c/86/c26263a556166/page.htm}
+% \newblock (2022-12-19)
+% \urlprefix\url{https://jw.nju.edu.cn/29/d8/c26263a600536/page.htm}
%
% \bibitem{nju-master-2022}
% 南京大学研究生院.
@@ -2873,10 +2843,10 @@ To produce the documentation run the original source files ending with
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\g_@@_opt_second_supv_bool}
+% \begin{variable}{\g_@@_opt_supvii_bool}
% 定义用于判断是否有第二导师的变量。
% \begin{macrocode}
-\bool_new:N \g_@@_opt_second_supv_bool
+\bool_new:N \g_@@_opt_supvii_bool
% \end{macrocode}
% \end{variable}
%
@@ -4227,11 +4197,12 @@ To produce the documentation run the original source files ending with
%
% \begin{macro}{\njusetname,\njusetname*,\njusettext,\njusettext*}
% \changes{v0.17}{2022/04/01}{提供修改固定文本的接口。}
+% \changes{v1.1}{2022/12/12}{修复 \tn{njusetname} 和 \tn{njusettext} 的可选参数问题。}
% 定义修改固定文本的接口。
% \begin{macrocode}
-\NewDocumentCommand \njusetname { s m o m }
+\NewDocumentCommand \njusetname { s m O{} m }
{ \@@_set_tokenlist:nnnnn {#1} {#2} {#3} {#4} { name } }
-\NewDocumentCommand \njusettext { s m o m }
+\NewDocumentCommand \njusettext { s m O{} m }
{ \@@_set_tokenlist:nnnnn {#1} {#2} {#3} {#4} { text } }
% \end{macrocode}
% \end{macro}
@@ -4651,8 +4622,9 @@ To produce the documentation run the original source files ending with
{ \clist_use:Nn \g_@@_info_supv_clist { \@@_hskip: } }
\clist_if_empty:NF \g_@@_info_supvii_clist
{
+ \bool_gset_true:N \g_@@_opt_supvii_bool
\tl_gput_right:Nx \g_@@_info_supvfull_tl
- { \@@_quad: \clist_use:Nn \g_@@_info_supv_clist { \@@_hskip: } }
+ { \@@_quad: \clist_use:Nn \g_@@_info_supvii_clist { \@@_hskip: } }
}
\tl_set_eq:NN \g_@@_info_supvfull_en_tl \g_@@_info_supv_en_tl
\tl_if_empty:NF \g_@@_info_supvii_en_tl
@@ -4800,7 +4772,7 @@ To produce the documentation run the original source files ending with
% 这是 macOS 预装的字体版本较旧导致的。
% \begin{macrocode}
\fontspec_if_small_caps:F
- {
+ {
\msg_warning:nn { njuthesis } { no-small-caps }
\__fontspec_main_setmainfont:nn
{ \c_@@_name_gyrefeature_clist } { texgyretermes }
@@ -4833,13 +4805,13 @@ To produce the documentation run the original source files ending with
% 用于 \pkg{fontspec} 的 \TeX Gyre 字体特性列表。
% \begin{macrocode}
\clist_const:Nn \c_@@_name_gyrefeature_clist
- {
- Extension = .otf,
- UprightFont = *-regular,
- BoldFont = *-bold,
- ItalicFont = *-italic,
- BoldItalicFont = *-bolditalic
- }
+ {
+ Extension = .otf,
+ UprightFont = *-regular,
+ BoldFont = *-bold,
+ ItalicFont = *-italic,
+ BoldItalicFont = *-bolditalic
+ }
% \end{macrocode}
% \end{variable}
%
@@ -4976,7 +4948,7 @@ To produce the documentation run the original source files ending with
\setCJKfamilyfont { zhhei } { Noto~Sans~CJK~SC }
\setCJKfamilyfont { zhfs } { FZFangSong-Z02 }
\setCJKfamilyfont { zhkai } { FZKai-Z03 }
- [AutoFakeBold=2.17]
+ [ \c__nju_name_fakebold_tl ]
}
% \end{macrocode}
% \end{macro}
@@ -6380,14 +6352,14 @@ To produce the documentation run the original source files ending with
% \subparagraph{封面}
%
% \begin{macro}{u/cover/emblem-img}
+% \changes{v1.1}{2023/01/15}{本科生模板封面校徽居中。}
% 本科生封面校徽图片实例。
% \begin{macrocode}
%<*def-u>
\@@_declare_element:nn { u / cover / emblem-img }
{
content = \@@_emblem:N \c_@@_emblemwd_dim,
- bottom-skip = 10 pt,
- align = l
+ bottom-skip = 10 pt
}
% \end{macrocode}
% \end{macro}
@@ -6456,7 +6428,7 @@ To produce the documentation run the original source files ending with
\@@_cover_entry:NNNnn #1 \l_@@_tmpb_dim #4 { grade } { id }
\@@_cover_entry:NNNn #1 #2 #4 { author }
\@@_cover_entry_supv:NNNn #1 \l_@@_tmpb_dim #4 { supv }
- \bool_if:NT \g_@@_opt_second_supv_bool
+ \bool_if:NT \g_@@_opt_supvii_bool
{ \@@_cover_entry_supv:NNNn #1 \l_@@_tmpb_dim #4 { supvii } }
\@@_cover_entry:NNNn #1 #2 #4 { submitdate }
}
@@ -6688,7 +6660,8 @@ To produce the documentation run the original source files ending with
\skip_vertical:n { .5 cm }
{ Supervised~ by }
\skip_vertical:N \c_zero_skip
- \textsf { \g_@@_info_supvfull_en_tl },
+ \textsf { \g_@@_info_supv_en_tl
+ \tex_par:D \g_@@_info_supvii_en_tl },
format = \zihao { 4 },
bottom-skip = 0 pt plus 1.2 fil
}
@@ -7037,7 +7010,7 @@ To produce the documentation run the original source files ending with
\c_@@_name_email_tl & \g_@@_info_email_tl \\
\c_@@_name_supvb_tl &
\clist_item:Nn \g_@@_info_supv_clist { 1 }
- \bool_if:NT \g_@@_opt_second_supv_bool
+ \bool_if:NT \g_@@_opt_supvii_bool
{ \@@_quad: \clist_item:Nn \g_@@_info_supvii_clist { 1 } } \\
\end{tblr}
}
@@ -7755,6 +7728,7 @@ To produce the documentation run the original source files ending with
%
% \begin{macro}{\@@_abs_info_en_g:N}
% \changes{v1.0}{2022/07/01}{移除研究生英文摘要的下划线。}
+% \changes{v1.1}{2022/12/12}{恢复研究生英文摘要的下划线。}
% 绘制研究生英文摘要信息栏。
% \begin{arguments}
% \item 分隔符
@@ -7762,8 +7736,15 @@ To produce the documentation run the original source files ending with
% \begin{macrocode}
\cs_new_protected:Npn \@@_abs_info_en_g:N #1
{
- \clist_map_inline:nn { title, major, author, supvfull }
- { \@@_name:n { ##1 _en } #1 \@@_info:n { ##1 _en } \\ }
+ \@@_uline_list:NNx \g_@@_info_title_en_tl \g_@@_abs_title_left_skip
+ { \c_@@_name_title_en_tl #1 }
+ \clist_map_inline:nn { major, author, supvfull }
+ {
+ \tex_par:D
+ \@@_get_width_print:Nx \l_@@_tmpa_dim
+ { \@@_name:n { ##1 _en } #1 }
+ \@@_box_ulined_info:Nn \l_@@_tmpa_dim { ##1 _en }
+ }
}
%</def-g>
% \end{macrocode}
diff --git a/macros/unicodetex/latex/njuthesis/njuthesis.ins b/macros/unicodetex/latex/njuthesis/njuthesis.ins
index 82a71afd74..9e4fb8aa64 100644
--- a/macros/unicodetex/latex/njuthesis/njuthesis.ins
+++ b/macros/unicodetex/latex/njuthesis/njuthesis.ins
@@ -6,7 +6,7 @@
%%
%% njuthesis.dtx (with options: `install')
%%
-%% Copyright (C) 2021 - 2022
+%% Copyright (C) 2021 - 2023
%% by Nanjing University Linux User Group
%% <git+nju-lug-email-3104-issue-@yaoge123.cn>
%%
@@ -29,7 +29,7 @@
\preamble
-Copyright (C) 2021 - 2022
+Copyright (C) 2021 - 2023
by Nanjing University Linux User Group
<git+nju-lug-email-3104-issue-@yaoge123.cn>
diff --git a/macros/unicodetex/latex/njuthesis/njuthesis.pdf b/macros/unicodetex/latex/njuthesis/njuthesis.pdf
index 7ce01c2b6c..adf77bfb13 100644
--- a/macros/unicodetex/latex/njuthesis/njuthesis.pdf
+++ b/macros/unicodetex/latex/njuthesis/njuthesis.pdf
Binary files differ