summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-05-25 22:32:04 +0000
committerKarl Berry <karl@freefriends.org>2018-05-25 22:32:04 +0000
commit6831c582e3c680827276b5089549bac3060a0891 (patch)
tree8832a5de93e3919b18af8e379b41c927d1e3f997
parentadb3d29549c984ed91b358c3246dcff9df449bc9 (diff)
semantic-markup (25may18)
git-svn-id: svn://tug.org/texlive/trunk@47837 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.pdfbin272931 -> 274152 bytes
-rw-r--r--Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.tex27
-rw-r--r--Master/texmf-dist/tex/latex/semantic-markup/semantic-markup.sty68
3 files changed, 77 insertions, 18 deletions
diff --git a/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.pdf b/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.pdf
index 7488c0e7bd6..cc01f01022d 100644
--- a/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.pdf
+++ b/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.tex b/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.tex
index 996242bcaef..c53f3953064 100644
--- a/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.tex
+++ b/Master/texmf-dist/doc/latex/semantic-markup/semantic-markup.tex
@@ -39,6 +39,22 @@ Use the \texttt{defaultquotes} package option to restore the default behavior of
\subsection{\texttt{endnotes}}
The \texttt{endnotes} option converts footnotes to endnotes, including footnotes created with this package's \texttt{Footnote} environment.
+On its own, this option loads the \texttt{endnotes} package and does everything
+necessary for endnotes.
+You can define the following commands to adjust the behavior:
+
+\begin{center}
+\begin{tabular}{ll}
+ Command & Default value \\ \hline
+ \verb|\DoBeforeEndnotes| & \verb|\clearpage| \\
+ \verb|\EndnoteFont| & Empty (normal font) \\
+\end{tabular}
+\end{center}
+
+If you want to setup the endnotes in a completely different way or avoid
+conflicts with another package, you can do
+\verb|\renewcommand{\SetupEndnotes}{}| to eliminate all of this or you can renew
+the command to do something else.
\section{Semantic Commands Defined Without Arguments}
@@ -50,6 +66,9 @@ For example, the command for a technical term, typically set in italics is defin
\end{verbatim}
To redefine it to be set in bold, for example, you can use the basic \LaTeX{} command \verb|\renewcommand{\term}{\textbf}|.
+The \verb|\strong| command is already defined in the \texttt{fontspec} package;
+if that package is loaded, this package will not redefine its command.
+
\begin{center}
\begin{tabularx}{\linewidth}{llX}
\toprule
@@ -97,10 +116,10 @@ Use like so:
\begin{verbatim}
Body text.%
- \begin{Footnote}
+\begin{Footnote}
Footnote text.
More footnote text.
- \end{Footnote}
+\end{Footnote}
Continuation of body text.
\end{verbatim}
@@ -111,6 +130,10 @@ These could be redefined to use Unicode symbols if the font contains them, or wi
Remember that like all commands without arguments, \LaTeX{} will ignore the space after the command-name, so you will need to write \verb|\fl{}| or \verb|\fl\ |.
There is also a command for octave numbers, for the system in which middle C begins the fourth octave.
+If the \texttt{musicography} package is loaded, it will redefine the commands
+\verb|\fl|, \verb|\sh|, and \verb|\na| to use nicer symbols from the MusiX\TeX{}
+fonts.
+
\begin{center}
\begin{tabular}{ll}
\toprule
diff --git a/Master/texmf-dist/tex/latex/semantic-markup/semantic-markup.sty b/Master/texmf-dist/tex/latex/semantic-markup/semantic-markup.sty
index c6d24f5cb55..e6d33668f98 100644
--- a/Master/texmf-dist/tex/latex/semantic-markup/semantic-markup.sty
+++ b/Master/texmf-dist/tex/latex/semantic-markup/semantic-markup.sty
@@ -1,7 +1,7 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{semantic-markup}[2016/10/28
+\ProvidesPackage{semantic-markup}[2018/05/21
Macros for TEI-like semantic markup]
-% Copyright 2016 Andrew A. Cashner, andrewacashner@gmail.com
+% Copyright 2018 Andrew A. Cashner, andrewacashner@gmail.com
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -18,8 +18,14 @@
% and the documentation file semantic-markup.tex.
% CHANGE LOG
-% 2016-09-22 `endnotes' option added
-% 2016-09-01 First version on CTAN
+% 2018-05-21 - Use fontspec's definition of `\strong` if it is loaded
+% - Use musicography's definition of `\fl`, `\sh`, `\na` commands if
+% it is loaded
+% - `\wtitle` and `\ptitle` shorthands added
+% - Customizable commands added for endnotes option
+%
+% 2016-09-22 - `endnotes' option added
+% 2016-09-01 - First version on CTAN
% Option to use csquotes default behavior instead of the
% US localized punctuation used in this package
@@ -46,12 +52,19 @@
\DeclareAutoPunct{.,!?}
\fi
+% NB: fontspec defines its own \strong command, so only define this if fontspec
+% not loaded
+\@ifpackageloaded{fontspec}{}{%
+ \NewDocumentCommand{\strong}{}
+ {\textbf}
+}
+
+
\NewDocumentCommand{\quoted}{}
{\textquote}
\NewDocumentCommand{\soCalled}{}
{\textquote}
-\NewDocumentCommand{\strong}{}
-{\textbf}
+
\NewDocumentCommand{\code}{}
{\texttt}
\NewDocumentCommand{\term}{}
@@ -60,11 +73,16 @@
{\emph}
\NewDocumentCommand{\foreign}{}
{\emph}
+
\NewDocumentCommand{\worktitle}{}
{\emph}
\NewDocumentCommand{\parttitle}{}
{\textquote}
+% Shorter versions of these frequently used commands
+\NewDocumentCommand{\wtitle}{}{\worktitle}
+\NewDocumentCommand{\ptitle}{}{\parttitle}
+
% editorial addition
\NewDocumentCommand{\add}{ m }
{[#1]}
@@ -82,12 +100,12 @@
%*******************
% Identify problem spot in draft
\NewDocumentCommand{\XXX}{ O{\add{FIX}} }{%
- \textbf{#1}%
+ \strong{#1}%
}
% Indicate citation to be filled in later
% Optional argument for indicating the source
\NewDocumentCommand{\citXXX}{ o }{%
- \footnote{\textbf{[Citation needed]\IfValueTF{#1}{#1}{}}}%
+ \footnote{\strong{\add{Citation needed}\IfValueTF{#1}{#1}{}}}%
}
%*******************
@@ -97,21 +115,39 @@
%******************
% Endnotes, if desired
-% Footnote environment adjusted to fix expansion problem
+
\ifendnotes
- \RequirePackage{endnotes}
- \RenewEnviron{Footnote}{\expandafter\footnote\expandafter{\BODY}}[]
- \let\footnote=\endnote
- \AtEndDocument{\theendnotes}
+ \RequirePackage{endnotes}
+
+ % Customize these commands with \renewcommand
+ \NewDocumentCommand{\DoBeforeEndnotes}{}{\clearpage}
+ \NewDocumentCommand{\EndnoteFont}{}{}
+
+ % Optionally remove this (\renewcommand{\MakeEndnotes}{})
+ % to avoid conflicts with endnotes or other packages
+ \NewDocumentCommand{\SetupEndnotes}{}{%
+ \let\footnote=\endnote
+ \AtEndDocument{\DoBeforeEndnotes{\EndnoteFont\theendnotes}}%
+ }
+
+ \AtBeginDocument{%
+ \SetupEndnotes{}%
+ % Footnote environment adjusted to fix expansion problem
+ \RenewEnviron{Footnote}{\expandafter\footnote\expandafter{\BODY}}[]%
+ }%
\fi
+%******************
%****************************************
% MUSIC SYMBOLS
% Accidentals using LaTeX symbols
-\NewDocumentCommand{\fl}{}{$\flat$}
-\NewDocumentCommand{\na}{}{$\natural$}
-\NewDocumentCommand{\sh}{}{$\sharp$}
+% Use better definitions from musicography if it was loaded first
+\@ifpackageloaded{musicography}{}{%
+ \NewDocumentCommand{\fl}{}{$\flat$}
+ \NewDocumentCommand{\na}{}{$\natural$}
+ \NewDocumentCommand{\sh}{}{$\sharp$}
+}
% Octave subscripts
\NewDocumentCommand{\octave}{ }{\textsubscript}