summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/csquotes/csquotes.cfg
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/csquotes/csquotes.cfg
Initial commit
Diffstat (limited to 'macros/latex/contrib/csquotes/csquotes.cfg')
-rw-r--r--macros/latex/contrib/csquotes/csquotes.cfg247
1 files changed, 247 insertions, 0 deletions
diff --git a/macros/latex/contrib/csquotes/csquotes.cfg b/macros/latex/contrib/csquotes/csquotes.cfg
new file mode 100644
index 0000000000..321b8a0dc5
--- /dev/null
+++ b/macros/latex/contrib/csquotes/csquotes.cfg
@@ -0,0 +1,247 @@
+\ProvidesFile{csquotes.cfg}
+
+% Put your definitions here.
+
+\endinput
+
+% What follows are examples of what you will typically do in this
+% file. Note that you need to move the examples above \endinput if
+% you want to try them out.
+
+% PRESETTING PACKAGE OPTIONS
+
+% Use \ExecuteQuoteOptions to preset package options if you are not
+% satisfied with the built-in defaults. Options given here will be
+% processed before any options specified in the document preamble,
+% so you can still override them in the preamble.
+
+\ExecuteQuoteOptions{strict=true,autostyle=try}
+
+% CHANGING THE DEFAULT PARAMETERS
+
+% Even if you modify the package defaults here, all preset values
+% may still be changed in the document preamble as usual. The
+% following values are the built-in package defaults:
+
+\SetBlockEnvironment{quote}
+\SetBlockThreshold{3}
+\SetCiteCommand{\cite}
+
+% SETTING UP A NEW QUOTE STYLE
+
+% Here's an example of a new quote style with several variants (look
+% up \DeclareQuoteStyle in the manual for all the details):
+
+\DeclareQuoteStyle[quotes]{example}% [variant]{style}
+ {\textquotedblleft}% opening outer mark
+ {\textquotedblright}% closing outer mark
+ {\textquoteleft}% opening inner mark
+ {\textquoteright}% closing inner mark
+\DeclareQuoteStyle[quotes*]{example}
+ {\quotedblbase}
+ {\textquotedblright}
+ [0.1em]% kern adjoining marks
+ {\quotesinglbase}
+ {\textquoteright}
+\DeclareQuoteStyle[everypar]{example}
+ {\guillemotleft}
+ [\guilsinglleft]% middle outer mark
+ {\guillemotright}
+ {\textquotedblleft}
+ [\textquoteleft]% middle inner mark
+ {\textquotedblright}
+
+% Defining the default variant of the style:
+
+\DeclareQuoteAlias[quotes]{example}{example}
+
+% Defining a second-level alias:
+
+\DeclareQuoteAlias{example}{demo}
+
+% Adding a package option for the style:
+
+\DeclareQuoteOption{example}
+
+% DEFINING SHORT COMMAND NAMES
+
+% The names of all macros which csquotes provides by default are
+% rather verbose. They are meant to be self-explanatory. You may
+% find names like \hyphentextquote a bit too verbose, however,
+% especially if you use them frequently. It is very easy to define
+% shorter command names on top of the verbose ones. The trick is to
+% exclude the arguments such that the short definition is a simple
+% pointer to the full name:
+%
+% \newcommand*{\htquote}{\hyphentextquote}
+%
+% Here are a few useful shorthands:
+
+\newcommand*{\tquote}{\textquote}
+\newcommand*{\tcquote}{\textcquote}
+
+\newcommand*{\bquote}{\blockquote}
+\newcommand*{\bcquote}{\blockcquote}
+
+% You can even include language switches in the definition of the
+% short command form:
+%
+% \newcommand*{\usquote}{\hyphentextquote{american}}
+%
+% That, however, will not work as expected if you try to use the
+% starred version because
+%
+% \usquote*{quotation}
+%
+% will not yield
+%
+% \hyphentextquote*{american}{quotation}
+%
+% but rather
+%
+% \hyphentextquote{american}*{quotation}
+%
+% which is invalid syntax. The following little macro takes care of
+% that. If you prefix a definition which consists of a macro name
+% and one argument with \@checkstar, it will check if the starred
+% version of the command was requested and rearrange the syntax
+% accordingly:
+
+\newrobustcmd*{\@checkstar}[2]{%
+ \@ifstar{#1*{#2}}{#1{#2}}}
+
+% If we define our \usquote shorthand like that:
+%
+% \newcommand*{\usquote}{\@checkstar\hyphentextquote{american}}
+%
+% then
+%
+% \usquote*{quotation}
+%
+% will correctly yield
+%
+% \hyphentextquote*{american}{quotation}
+%
+% Here are a few useful shorthands:
+
+\newrobustcmd*{\dequote}{%
+ \@checkstar\hyphenquote{german}}
+\newrobustcmd*{\frquote}{%
+ \@checkstar\hyphenquote{french}}
+\newrobustcmd*{\ukquote}{%
+ \@checkstar\hyphenquote{british}}
+\newrobustcmd*{\usquote}{%
+ \@checkstar\hyphenquote{american}}
+
+\newrobustcmd*{\detquote}{%
+ \@checkstar\hyphentextquote{german}}
+\newrobustcmd*{\frtquote}{%
+ \@checkstar\hyphentextquote{french}}
+\newrobustcmd*{\uktquote}{%
+ \@checkstar\hyphentextquote{british}}
+\newrobustcmd*{\ustquote}{%
+ \@checkstar\hyphentextquote{american}}
+
+\newrobustcmd*{\debquote}{%
+ \@checkstar\hyphenblockquote{german}}
+\newrobustcmd*{\frbquote}{%
+ \@checkstar\hyphenblockquote{french}}
+\newrobustcmd*{\ukbquote}{%
+ \@checkstar\hyphenblockquote{british}}
+\newrobustcmd*{\usbquote}{%
+ \@checkstar\hyphenblockquote{american}}
+
+\newrobustcmd*{\detcquote}{%
+ \@checkstar\hyphentextcquote{german}}
+\newrobustcmd*{\frtcquote}{%
+ \@checkstar\hyphentextcquote{french}}
+\newrobustcmd*{\uktcquote}{%
+ \@checkstar\hyphentextcquote{british}}
+\newrobustcmd*{\ustcquote}{%
+ \@checkstar\hyphentextcquote{american}}
+
+\newrobustcmd*{\debcquote}{%
+ \@checkstar\hyphenblockcquote{german}}
+\newrobustcmd*{\frbcquote}{%
+ \@checkstar\hyphenblockcquote{french}}
+\newrobustcmd*{\ukbcquote}{%
+ \@checkstar\hyphenblockcquote{british}}
+\newrobustcmd*{\usbcquote}{%
+ \@checkstar\hyphenblockcquote{american}}
+
+% It is also possible to define shorter environment names. In this
+% case, the opening part of the environment definition should be the
+% verbose environment name with a backslash; the closing definition
+% should be the verbose name preceded by 'end' plus a backslash:
+
+\newenvironment*{dquote}
+ {\displayquote}
+ {\enddisplayquote}
+
+\newenvironment*{dcquote}
+ {\displaycquote}
+ {\enddisplaycquote}
+
+% Short environment definitions may also include language switches.
+% In this case, the language name is included in the opening part of
+% the environment definition. Here are a few useful examples:
+
+\newenvironment*{dedquote}
+ {\hyphendisplayquote{german}}
+ {\endhyphendisplayquote}
+\newenvironment*{frdquote}
+ {\hyphendisplayquote{french}}
+ {\endhyphendisplayquote}
+\newenvironment*{ukdquote}
+ {\hyphendisplayquote{british}}
+ {\endhyphendisplayquote}
+\newenvironment*{usdquote}
+ {\hyphendisplayquote{american}}
+ {\endhyphendisplayquote}
+
+\newenvironment*{dedcquote}
+ {\hyphendisplaycquote{german}}
+ {\endhyphendisplaycquote}
+\newenvironment*{frdcquote}
+ {\hyphendisplaycquote{french}}
+ {\endhyphendisplaycquote}
+\newenvironment*{ukdcquote}
+ {\hyphendisplaycquote{british}}
+ {\endhyphendisplaycquote}
+\newenvironment*{usdcquote}
+ {\hyphendisplaycquote{american}}
+ {\endhyphendisplaycquote}
+
+% DEFINING ENVIRONMENTS FOR PARAGRAPH QUOTATIONS
+
+% Here are some alternative environments for paragraph quotations
+% (block and display). The first one decreases the font size of
+% the 'quote' environment by one step:
+
+\RequirePackage{relsize}
+
+\newenvironment*{smallquote}
+ {\quote\smaller}
+ {\endquote}
+
+\SetBlockEnvironment{smallquote}
+
+% This environment forces indentation after all paragraph quotations:
+
+\newenvironment*{paraquote}
+ {\begingroup\quote}
+ {\endquote\endgroup}
+
+\SetBlockEnvironment{paraquote}
+
+% The last environment combines the previous ones:
+
+\RequirePackage{relsize}
+
+\newenvironment*{smallparaquote}
+ {\begingroup\quote\smaller}
+ {\endquote\endgroup}
+
+\SetBlockEnvironment{smallparaquote}
+
+\endinput