summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/semantic-markup
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 /Master/texmf-dist/tex/latex/semantic-markup
parentadb3d29549c984ed91b358c3246dcff9df449bc9 (diff)
semantic-markup (25may18)
git-svn-id: svn://tug.org/texlive/trunk@47837 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/semantic-markup')
-rw-r--r--Master/texmf-dist/tex/latex/semantic-markup/semantic-markup.sty68
1 files changed, 52 insertions, 16 deletions
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}