summaryrefslogtreecommitdiff
path: root/language/japanese/BX/bxcjkjatype/bxcjkvert.tex
blob: 5bbeb6ff6316b5ce96e2ba1f98c06cd8e62da79d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
% pdfLaTeX document; UTF-8
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern,textcomp}
\usepackage{geometry}
\usepackage{xcolor}
\usepackage[unicode,colorlinks]{hyperref}
\hypersetup{linkcolor=blue!75!black,urlcolor=green!45!black}
\usepackage{bxtexlogo}
\bxtexlogoimport{*}
\usepackage{shortvrb}
\MakeShortVerb{\|}
\usepackage{verbatim}
\newenvironment{myverbatim}
  {\begin{quote}\small\verbatim}
  {\endverbatim\end{quote}}
\newcommand{\PkgVersion}{0.5}
\newcommand{\PkgDate}{2023/07/23}
\newcommand{\Pkg}[1]{\textsf{#1}}
\newcommand{\Meta}[1]{$\langle$\textit{#1}$\rangle$}
\newcommand{\Note}{\par\noindent \emph{Note:}\quad}
\newcommand{\Means}{:\hspace{1em plus 1em}}
\newcommand{\wbr}{\linebreak[0]}
\newcommand{\Cs}[1]{\texttt{\symbol{`\\}#1}}
%-----------------------------------------------------------
\begin{document}
\title{The \Pkg{bxcjkvert} Package}
\author{Takayuki YATO (aka.~``ZR'')}
\date{v\PkgVersion\quad[\PkgDate]}
\maketitle

\begin{abstract}
This package is a tailored version of the \Pkg{CJKvert} package,
accommodated for Japanese typesetting,
where mixture of horizontal and vertical writings is common.
\end{abstract}

\tableofcontents

%===========================================================
\section{Package Loading}
\label{sec:loading}

\begin{verbatim}
\usepackage[<option>,...]{bxcjkvert}
\end{verbatim}

The \Pkg{CJKvert} package will be automatically loaded,
if not yet loaded.

The available options are described hereafter.

%-------------------
\subsection{Options for configuring font reset}

When a command for switching direction (|\CJKhorz| or |\CJKvert|)
is invoked, \Pkg{CJKvert} resets the current font parameter
by issuing |\normalfont|.
This feature is inconvenient, particularly
when authors mix different writing directions.
Thus \Pkg{bxcjkvert} suppresses the feature by default,
but it can be configured by the |resetfont| option.

\begin{itemize}
\item |resetfont=true|\Means
  Makes direction comamnds reset the current font by issuing
  the |\normalfont| command.
  \Note This is the original behavior of \Pkg{CJKvert}.
\item |resetfont=false| (default)\Means
  Makes direction comamnds retain the current font.
\end{itemize}

%-------------------
\subsection{Options for configuring adjustment of the baseline stretch}

\Pkg{CJKvert} makes some adjustment to the value of |\baselinestretch|
when the writing direction is changed.
Namely it makes the baseline stretch enlarged by the factor of
|\CJKbaselinestretch|%
\footnote{The value of \Cs{CJKbaselinestretch} is $1.3$ by default.}
when |\CJKvert| is used.

However as far as Japanese typesetting is concerned,
there is no need to tweak the baseline stretch value.
Thus \Pkg{bxcjkvert} suppresses this feature, but again
it can be configured by the |usebaselinestretch| option.


\begin{itemize}
\item |usebaselinestretch=true|\Means
  This is the same as the behavior of \Pkg{CJKvert} \emph{with}
  the |usebaselinestretch| option.
  When |\CJKvert| is invoked, the baseline stretch will be multiplied
  by the value of |\CJKbaselinestretch|.
  When |\CJKhorz| is invoked, the baseline stretch will be reverted.%
  \footnote{Note that, however, in this case the baseline stretch will
    be reverted to the value at the time when \Pkg{CJKvert} was loaded.
    it might be against authors' expectation.}
\item |usebaselinestretch=false|\Means
  This is the same as the behavior of \Pkg{CJKvert} \emph{without}
  the |usebaselinestretch| option.
  When |\CJKvert| is invoked, the baseline stretch will be set
  to the value of |\CJKbaselinestretch|.
  When |\CJKhorz| is invoked, the baseline stretch will be
  reset to $1$.
  This option ignores the user's setting to the baseline stretch.
\item |usebaselinestretch=retain| (default)\Means
  Makes direction comamnds leave the baseline stretch
  unchanged.
\end{itemize}

\Note If \Pkg{CJKvert} is loaded with the |usebaselinestretch|
option in advance,
then the value of |usebaselinestretch| of this package
will default to |true| instead of |retain|.

%-------------------
\subsection{Options for configuring initial writing direction}

\Pkg{CJKvert} sets the initial writing direction of the document
to vertical.
But \Pkg{bxcjkvert} allows authors to choose the initial direction.

\begin{itemize}
\item |main=true|\Means
  Sets the initial direction to vertical.
  \Note This is the original behavior of \Pkg{CJKvert}.
\item |main=false|\Means
  Sets the initial direction to horizontal.
\item |main=retain| (default)\Means
  Does not specify the initial direction.
  In this case, authors can use |\CJKvert| or |\CJKhorz|
  in the preamble to decide the initial direction.
\end{itemize}

%===========================================================
\end{document}