### Basic Document Setup with JLREQ Source: https://github.com/abenori/jlreq/blob/master/README.md Example of setting up a document using the jlreq class. Demonstrates specifying document class, writing mode (horizontal/vertical), and document type (article, report, book). ```latex \documentclass{jlreq} % To specify engine: % \documentclass[platex]{jlreq} % \documentclass[uplatex]{jlreq} % \documentclass[lualatex]{jlreq} % To switch to vertical writing: % \documentclass[tate]{jlreq} % To set document type: % \documentclass[report]{jlreq} % \documentclass[book]{jlreq} % Example for vertical book: % \documentclass[tate,book]{jlreq} % Other common options: % oneside/twoside/onecolumn/twocolumn/titlepage/notitlepage/draft/final/landscape/openright/openany/leqno/fleqn % disablejfam: disables Japanese fonts for math \begin{document} Hello, world! \end{document} ``` -------------------------------- ### Package Initialization and Configuration Source: https://github.com/abenori/jlreq/blob/master/jlreq-trimmarks.md How to load the package with engine/driver specifications and configure settings using the setup command. ```APIDOC ## \usepackage[options]{jlreq-trimmarks} ### Description Loads the package and specifies the TeX engine and DVI driver. This must be used instead of the document class 'tombow' option. ### Parameters #### Package Options - **platex/uplatex/lulatex** (string) - Optional - Sets the TeX engine. - **dvipdfmx/dvips/dviout** (string) - Optional - Sets the DVI driver. - **trimmarks_paper** (string) - Optional - Defines the paper size including trim marks (e.g., 'a4', 'a4+2cm'). - **landscape** (boolean) - Optional - Swaps width and height of the trimmarks_paper. - **show** (list) - Optional - Specifies types of marks to output (trimmarks, banner, digital). - **bleed_margin** (key-value) - Optional - Sets margins for the bleed area (top, bottom, gutter, fore-edge). ### Request Example \usepackage[dvipdfmx,platex,trimmarks_paper=a4+1cm,show={trimmarks,banner}]{jlreq-trimmarks} ## \jlreqtrimmarkssetup{key=value} ### Description Allows for additional configuration of trim mark settings after the package has been loaded. ### Parameters - **key-value pairs** (object) - Required - Configuration keys matching package options. ``` -------------------------------- ### Configure jlreq-complements in Preamble Source: https://github.com/abenori/jlreq/blob/master/README.md Shows how to load the package and define customization settings within the LaTeX document preamble using the setup command. ```latex \usepackage[uplatex,setupname=jlreqcomplementssetup]{jlreq-complements} \jlreqcomplementssetup{ thebibliography_heading={\section*{\refname}}, thebibliography_indent=1em } ``` -------------------------------- ### JLREQ Setup Command Source: https://github.com/abenori/jlreq/blob/master/README.md Demonstrates the use of the \jlreqsetup command in the preamble for configuring document settings. Settings can be applied via class options or this command. ```latex \documentclass{jlreq} \jlreqsetup{abstract_with_maketitle=true} \title{My Document} \author{Me} \date{\today} \begin{document} \maketitle % ... document content ... \end{document} ``` -------------------------------- ### Install JLREQ Package Files Source: https://github.com/abenori/jlreq/blob/master/README.md Commands to generate and install JFM and class files for the jlreq package. Requires a LaTeX distribution and Make utility. Files are moved to specific TEXMF directories. ```bash make # *.tfm -> $TEXMF/fonts/tfm/public/jlreq # *.vf -> $TEXMF/fonts/vf/public/jlreq # jfm-jlreq.lua, jfm-jlreqv.lua, jfm-jlreq-jidori.lua, jfm-jlreqv-jidori.lua -> $TEXMF/tex/luatex/jlreq # jlreq.cls, jlreq-helpers.sty -> $TEXMF/tex/latex/jlreq make install ``` -------------------------------- ### Basic Document Setup with jlreq Source: https://context7.com/abenori/jlreq/llms.txt Loads the jlreq document class to create a Japanese document with default typography settings. It automatically detects the engine and provides article-like formatting. ```latex \documentclass{jlreq} \begin{document} \section{はじめに} 日本語組版処理の要件に基づいた文書クラスです。 \end{document} ``` -------------------------------- ### Setup Trim Marks and PDF Boxes Source: https://context7.com/abenori/jlreq/llms.txt Configures the jlreq-trimmarks package to add crop marks, bleed margins, and define PDF boxes for professional printing. ```latex \documentclass{jlreq} \usepackage[ platex, dvipdfmx, trimmarks_paper=a4+{6mm,6mm}, bleed_margin=3mm, show={trimmarks,banner,digital} ]{jlreq-trimmarks} \begin{document} トンボ付きの出力です。TrimBoxとBleedBoxも設定されます。 \end{document} ``` -------------------------------- ### Customize thebibliography Environment Source: https://github.com/abenori/jlreq/blob/master/README.md Demonstrates how to adjust the heading, indentation, and spacing for the bibliography environment using package-specific keys. ```latex \jlreqcomplementssetup{ thebibliography_heading={\section*{\refname}}, thebibliography_after_label_space=1em, thebibliography_indent=2em } ``` -------------------------------- ### Customize theindex Environment Source: https://github.com/abenori/jlreq/blob/master/README.md Demonstrates how to configure the index environment, including column settings and page styles. ```latex \jlreqcomplementssetup{ theindex_twocolumn=true, theindex_column_gap=2em, theindex_pagestyle=plain } ``` -------------------------------- ### Configure Caption Styles Source: https://github.com/abenori/jlreq/blob/master/README.md Demonstrates how to customize caption fonts, labels, and alignment using \jlreqsetup. Settings can be scoped to specific environments like tables. ```latex \jlreqsetup{ caption_font=\normalsize, table={caption_font=\Large}, caption_label_format={#1:}, caption_align={center,*left} } ``` -------------------------------- ### Customize Theorem Environments Source: https://context7.com/abenori/jlreq/llms.txt Styles theorem and proof environments using the amsthm package, with custom fonts, indentation, and spacing. ```latex \documentclass{jlreq} \usepackage{amsthm} \jlreqsetup{ theorem_beforeafter_space=0.5\baselineskip, theorem_label_font=\bfseries\sffamily, theorem_font=\normalfont, theorem_indent=1zw, proof_label_font=\bfseries } \newtheorem{theorem}{定理}[section] \newtheorem{lemma}[theorem]{補題} \begin{document} \section{定理} \begin{theorem}[重要な定理] 定理の内容がここに入ります。 \end{theorem} \begin{proof} 証明がここに入ります。 \end{proof} \end{document} ``` -------------------------------- ### JLREQ Complements Package Usage Source: https://github.com/abenori/jlreq/blob/master/README.md Demonstrates how to load and use the jlreq-complements package with various options. ```APIDOC ## Loading and Using jlreq-complements `jlreq-complements` is a package that customizes the environments that are typically provided by LaTeX document classes. You can use it as follows. It accepts the following options: * `platex`, `uplatex`, `lulalatex`: Specify the engine. * `setupname=`: Specify the name of the command for customization. The default is `jlreqcomplementssetup`, and you can set it by writing `\jlreqcomplementssetup{}` in the preamble. In `jlreq`, it is loaded as `\usepackage[,setupname=jlreqsetup]{jlreq-complements}`, so you can customize the environments with the usual `\jlreqsetup`. ### `thebibliography` environment options * `thebibliography_heading=`: Specify the command to output the heading of the `thebibliography` environment. Use it like `thebibliography_heading={\section*{\refname}}`. * `thebibliography_after_label_space=`: Specify the space after the label of each item in the `thebibliography` environment. * `thebibliography_indent=`: Specify the indentation of the entire `thebibliography` environment. * `thebibliography_mark=`: Specify the code to register the heading of the `thebibliography` environment in the column. * `thebibliography_precode=`, `thebibliography_postcode=`: Specify the code that is executed before and after the `thebibliography` environment, respectively. ### `theindex` environment options * `theindex_heading=`: Specify the command to output the heading of the `theindex` environment. * `theindex_mark=`: Specify the code to register the heading of the `theindex` environment in the column. * `theindex_twocolumn=[true/false]`: Specify whether to output the `theindex` environment in two columns. * `theindex_column_gap=`: Specify the column gap in the `theindex` environment when `theindex_twocolumn=true`. * `theindex_column_rule_width=`: Specify the value of `\columnseprule` in the `theindex` environment when `theindex_twocolumn=true`. * `theindex_pagestyle=`: Specify the page style for the `theindex` environment. * `theindex_postcode=`, `theindex_precode=`: Specify the code that is executed before and after the `theindex` environment, respectively. ### Theorem environment options * `theorem_beforeafter_space=`: Specify the space before and after the theorem environment. * `theorem_label_font=`: Specify the font for the label part of the theorem environment. * `theorem_font=`: Specify the font for the body of the theorem environment. * `theorem_indent=`: Specify the indentation of the body of the theorem environment. * `proof_label_font=`: This setting is only valid when the `amsthm` package is loaded. Specify the font for the label of the `proof` environment. When the `amsthm` package is loaded, a new theorem style `jlreq` is defined and the current style is changed to `jlreq`. In this case, the above settings function as settings for this `jlreq` style. ``` -------------------------------- ### Load jlreq-trimmarks package Source: https://github.com/abenori/jlreq/blob/master/jlreq-trimmarks.md Demonstrates how to load the package in a LaTeX document by specifying the TeX engine and DVI driver. This should be used instead of the document class 'tombow' option. ```latex \usepackage[dvipdfmx,platex]{jlreq-trimmarks} ``` -------------------------------- ### Front Matter Configuration in LaTeX Source: https://context7.com/abenori/jlreq/llms.txt Configures pagination, page styles, and heading behavior for front matter, main matter, and back matter using \jlreqsetup. Allows independent settings for different document sections. ```latex \documentclass[book]{jlreq} \jlreqsetup{ frontmatter_pagebreak=cleardoublepage, frontmatter_pagination={roman,independent}, frontmatter_pagestyle={plain}, mainmatter_pagebreak=cleardoublepage, backmatter_heading={chapter={number=false}} } \begin{document} \frontmatter \chapter{序文} ページ番号はローマ数字です。 \mainmatter \chapter{第一章} ページ番号はアラビア数字にリセットされます。 \backmatter \chapter{あとがき} 番号なしの章見出しです。 \end{document} ``` -------------------------------- ### Define a New Tobira Heading Source: https://github.com/abenori/jlreq/blob/master/README.md Demonstrates how to use the \NewTobiraHeading command to create a custom heading with specific formatting and label handling. ```latex \NewTobiraHeading{myheading}{1}{type=naka, label_format={Chapter \thechapter}, format={(\jlreqHeadingLabel{#1}) \jlreqHeadingText{#2}}} ``` -------------------------------- ### POST /jlreqsetup/frontmatter Source: https://github.com/abenori/jlreq/blob/master/README.md Configures the behavior of front matter, main matter, back matter, and appendix sections. ```APIDOC ## POST /jlreqsetup/frontmatter ### Description Defines page breaks, counter resets, heading styles, and pagination formats for document structure commands. ### Method POST ### Endpoint \jlreqsetup{frontmatter_...} ### Parameters #### Request Body - **frontmatter_pagebreak** (string) - Optional - Page break command (cleardoublepage/clearpage). - **frontmatter_counter** (object) - Optional - Counter definitions and restoration settings. - **frontmatter_heading** (object) - Optional - Heading command behavior modifications. - **frontmatter_pagination** (string) - Optional - Page number format (e.g., roman). ### Request Example \jlreqsetup{frontmatter_pagebreak=clearpage, frontmatter_pagination=roman} ### Response #### Success Response (200) - **status** (string) - Structure configuration applied successfully. ``` -------------------------------- ### JLREQ Abstract Environment Source: https://github.com/abenori/jlreq/blob/master/README.md Illustrates how to use the abstract environment with \maketitle in jlreq. Deprecated method shown, with a note on the preferred \jlreqsetup approach. ```latex \documentclass{jlreq} % \jlreqsetup{abstract_with_maketitle=true} % Preferred method \title{My Document} \author{Me} \date{\today} \begin{document} % \begin{abstract} % Deprecated method % This is the abstract content. % \end{abstract} \maketitle % ... document content ... \end{document} ``` -------------------------------- ### Configure Banners with jlreqtrimmarkssetup Source: https://github.com/abenori/jlreq/blob/master/jlreq-trimmarks.md Configures the content and positioning of banners on pages. Supports specific placements like top-right or bottom-center and handles parity-based content (odd/even pages). ```latex \jlreqtrimmarkssetup{ banner={ top-right={ vertical={ odd={In the right of the top, only in odd pages, vertical mode.}, even={In the right of the top, only in even pages, vertical mode.}, }, horizontal={In the right of the top, horizontal mode.}, corner={In the corner of the right of the top, horizontal mode.}, in-horizontal={In the right of the top, horizontal mode, in the trim area.}, in-vertical={In the right of the top, vertical mode, in the trim area.}, }, bottom-center={ left={In the left in the center of the bottom}, right={In the right in the center of the bottom}, in={In the trim area in the center of the bottom.}, } } } ``` -------------------------------- ### POST /jlreqsetup/caption Source: https://github.com/abenori/jlreq/blob/master/README.md Configures the appearance and behavior of figure and table captions. ```APIDOC ## POST /jlreqsetup/caption ### Description Configures caption settings including fonts, spacing, label formats, and alignment. Settings can be environment-specific. ### Method POST ### Endpoint \jlreqsetup{caption_...} ### Parameters #### Request Body - **caption_font** (string) - Optional - Font setting code for the caption. - **caption_label_font** (string) - Optional - Font setting code for the label. - **caption_after_label_space** (dimension) - Optional - Space between label and text. - **caption_label_format** (string) - Optional - Format of the label (e.g., {#1:}). - **caption_align** (string) - Optional - Alignment (left/right/center/bottom/top). ### Request Example \jlreqsetup{caption_font=\normalsize, caption_align=center} ### Response #### Success Response (200) - **status** (string) - Configuration applied successfully. ``` -------------------------------- ### Customize Index Environment Source: https://context7.com/abenori/jlreq/llms.txt Configures the index layout, enabling two-column mode and setting custom spacing and page styles. ```latex \documentclass{jlreq} \jlreqsetup{ theindex_heading={\section*{索引}}, theindex_twocolumn=true, theindex_column_gap=2zw, theindex_pagestyle=plain } \begin{document} \begin{theindex} \item 用語A, 1 \item 用語B, 5 \subitem 副項目, 6 \item 用語C, 10 \end{theindex} \end{document} ``` -------------------------------- ### JLREQ Sidenote Usage Source: https://github.com/abenori/jlreq/blob/master/README.md Demonstrates the \sidenote command for adding sidenotes, which is enabled when a positive sidenote width is configured. Shows basic and symbol-based usage. ```latex \documentclass{jlreq} \jlreqsetup{sidenote_width=2cm} \begin{document} Capable of publishing \sidenote{manuscript}{by methods such as printing...} % With symbol type: % \jlreqsetup{sidenote_type=symbol} % \sidenote{relevant item}{note} \end{document} ``` -------------------------------- ### Configure Front Matter Behavior Source: https://github.com/abenori/jlreq/blob/master/README.md Sets up page breaks, counter resets, and heading styles for the front matter section of a document. ```latex \jlreqsetup{ frontmatter_pagebreak=clearpage, frontmatter_counter={chapter={value=0,the={[\arabic{chapter}]}}}, frontmatter_pagination=roman } ``` -------------------------------- ### JLREQ Endnote Usage Source: https://github.com/abenori/jlreq/blob/master/README.md Shows how to use the \endnote command for endnotes in jlreq. Includes basic usage and how to control output position with \jlreqsetup and \theendnotes. ```latex \documentclass{jlreq} % \jlreqsetup{endnote_position=before_heading} % Default behavior \begin{document} This is the main content with an \endnote{This is the endnote content.}. % To output endnotes on the spot: % \theendnotes \end{document} ``` -------------------------------- ### Quote Environment Customization in LaTeX Source: https://context7.com/abenori/jlreq/llms.txt Configures indentation, spacing, and font size for quote, quotation, and verse environments using \jlreqsetup. This allows for fine-tuning the appearance of quoted text. ```latex \documentclass{jlreq} \jlreqsetup{ quote_indent=2zw, quote_end_indent=0zw, quote_beforeafter_space=0.5\baselineskip, quote_fontsize=small } \begin{document} 以下は引用です。 \begin{quote} 引用文がここに入ります。字下げと字上げ、前後の空きが設定されています。 \end{quote} 本文に戻ります。 \end{document} ``` -------------------------------- ### Output Abstract with Maketitle Source: https://context7.com/abenori/jlreq/llms.txt Configures the abstract to span the full width of the page, even when the document is in two-column mode. ```latex \documentclass[twocolumn]{jlreq} \jlreqsetup{abstract_with_maketitle=true} \title{論文タイトル} \author{著者名} \begin{abstract} この要旨は二段組でも段抜きで出力されます。 \end{abstract} \begin{document} \maketitle 本文は二段組で出力されます。 \end{document} ``` -------------------------------- ### Configure Consecutive Block Heading Spacing with \SetBlockHeadingSpaces Source: https://github.com/abenori/jlreq/blob/master/README.md Sets spacing rules for block headings that appear consecutively. It allows defining line spacing, before/after line spacing, and specific inter-heading spaces based on heading types and order. This is useful for maintaining consistent visual flow between sequential headings. ```latex \SetBlockHeadingSpaces { {_part{lines=3,before_lines=1},_section{lines=2},_subsection{lines=2}} [lines=5]{_section,23pt,_subsection,16pt} } ``` -------------------------------- ### JLREQ Akigumi (Character Spacing) Source: https://github.com/abenori/jlreq/blob/master/README.md Illustrates the \akigumi command for character spacing within a specified dimension in jlreq. Note: Correct output is primarily achieved with LuaLaTeX. ```latex \documentclass{jlreq} \begin{document} % Space characters within a dimension (best with LuaLaTeX) \akigumi{10pt}{Spacing Example} \end{document} ``` -------------------------------- ### Configure Trim Marks Banners Source: https://context7.com/abenori/jlreq/llms.txt Adds custom job information banners to specific positions around the trim marks using the jlreqtrimmarkssetup command. ```latex \documentclass{jlreq} \usepackage[dvipdfmx,platex,show]{jlreq-trimmarks} \jlreqtrimmarkssetup{ banner={ top-left={ horizontal={発行日:2024年1月}, vertical={odd={奇数ページ}} }, top-right={ horizontal={\jobname} }, bottom-center={ left={\thepage/\pageref{LastPage}} } } } \begin{document} \label{LastPage} バナー付きトンボが出力されます。 \end{document} ``` -------------------------------- ### Define Run-in Headings with \NewRuninHeading Source: https://github.com/abenori/jlreq/blob/master/README.md Creates run-in headings, where the heading text follows immediately after its label on the same line. This command allows customization of font, indentation, spacing after the label and after the heading, and label formatting. It also supports numbering control. ```latex \NewRuninHeading {} { font=, indent=, after_label_space=, label_format=, after_space=, number=[true/false] } ``` -------------------------------- ### Define a New Block Heading Source: https://github.com/abenori/jlreq/blob/master/README.md Shows the usage of \NewBlockHeading to define a block-style heading with custom font settings, subtitle formatting, and overall layout. ```latex \NewBlockHeading{myblock}{1}{font=\Large\bfseries, subtitle_font=\normalsize, subtitle_format={“#1”}, format={\jlreqHeadingLabel{#1} \jlreqHeadingText{#2} \jlreqHeadingSubtitle{#3}}} ``` -------------------------------- ### Configure bleed margin Source: https://github.com/abenori/jlreq/blob/master/jlreq-trimmarks.md Shows how to set specific bleed margins for different sides of the page using the package options. ```latex \usepackage[bleed_margin={top=3mm,bottom=5mm,gutter=0mm,fore-edge=2mm}]{jlreq-trimmarks} ``` -------------------------------- ### Custom Page Styles in LaTeX Source: https://context7.com/abenori/jlreq/llms.txt Creates custom page styles with flexible header and footer positioning using \NewPageStyle. Allows defining running heads, page numbers, and their placement and formatting. ```latex \documentclass{jlreq} \NewPageStyle{myheader}{ yoko, running_head_position=top-left, running_head_font=\small, nombre_position=bottom-center, nombre_font=\small, odd_running_head=_section, even_running_head=_chapter, nombre={\thepage}, mark_format={ _section={第\thesection 節\quad #1}, _chapter={第\thechapter 章\quad #1} } } \pagestyle{myheader} \begin{document} \chapter{章} \section{節} カスタムページスタイルが適用されています。 \end{document} ``` -------------------------------- ### Customize Bibliography Environment Source: https://context7.com/abenori/jlreq/llms.txt Modifies the appearance of the bibliography, including heading text, indentation, and spacing after labels. ```latex \documentclass{jlreq} \jlreqsetup{ thebibliography_heading={\section*{参考文献}}, thebibliography_mark={\markboth{参考文献}{参考文献}}, thebibliography_indent=2zw, thebibliography_after_label_space=1zw } \begin{document} \begin{thebibliography}{99} \bibitem{ref1} 著者名『書籍タイトル』出版社、2024年。 \bibitem{ref2} 著者名「論文タイトル」『雑誌名』第1巻、2024年。 \end{thebibliography} \end{document} ``` -------------------------------- ### Enable Reverse Pagination Source: https://context7.com/abenori/jlreq/llms.txt Enables page numbering from the end of the document, providing access to the reverse page count. ```latex \documentclass[use_reverse_pagination]{jlreq} \begin{document} 現在のページは\thepage ページで、最後から\thejlreqreversepage ページ目です。 % Can use \arabic, \value etc. 残り\arabic{jlreqreversepage}ページ \end{document} ``` -------------------------------- ### Creating Run-in Headings in LaTeX Source: https://context7.com/abenori/jlreq/llms.txt Creates run-in (inline) headings that appear on the same line as the subsequent text using \NewRuninHeading. Allows customization of font, label format, indentation, and spacing. ```latex \documentclass{jlreq} \NewRuninHeading{myrunin}{4}{ font=\bfseries, label_format={\themyrunin}, indent=1zw, after_label_space=0.5zw, after_space=1zw } \begin{document} \myrunin{見出し}本文がこの後に続きます。見出しと同じ行から始まります。 \end{document} ``` -------------------------------- ### Configure Opening Bracket Positioning Source: https://context7.com/abenori/jlreq/llms.txt Controls the indentation behavior of opening brackets at the beginning of lines and paragraphs. ```latex % Option 1: Full-width indent at paragraph start, flush at line break \documentclass[open_bracket_pos=zenkaku_tentsuki]{jlreq} % Option 2: Full-width indent at paragraph start, half-width at line break \documentclass[open_bracket_pos=zenkakunibu_nibu]{jlreq} % Option 3: Half-width indent at paragraph start, flush at line break \documentclass[open_bracket_pos=nibu_tentsuki]{jlreq} \begin{document} 「括弧」で始まる段落の字下げ方法が設定されています。 \end{document} ``` -------------------------------- ### Page Layout Configuration in jlreq Source: https://context7.com/abenori/jlreq/llms.txt Sets margins, gutter, and column settings for professional page layouts. Uses head_space and foot_space to position the text block. ```latex \documentclass[ paper=b5j, gutter=25mm, fore-edge=20mm, head_space=25mm, foot_space=25mm, headfoot_sidemargin=15mm, twocolumn, column_gap=2zw ]{jlreq} \begin{document} \section{段組レイアウト} 二段組のレイアウトで、のど側と小口側の余白を設定しています。 \end{document} ``` -------------------------------- ### Use Japanese Font Size Command Source: https://context7.com/abenori/jlreq/llms.txt Utilizes the \jafontsize command to specify font sizes based on Japanese font dimensions, independent of European font scaling. ```latex \documentclass[jafontscale=0.9]{jlreq} \begin{document} % With jafontscale=0.9: % \fontsize{10pt}{15pt} -> Japanese font is 9pt % \jafontsize{10pt}{15pt} -> Japanese font is 10pt, European is ~11.1pt {\jafontsize{12pt}{18pt}\selectfont 和文12ポイント} {\fontsize{12pt}{18pt}\selectfont 欧文12ポイント(和文は10.8pt)} \end{document} ``` -------------------------------- ### Balance Columns on Last Page Source: https://github.com/abenori/jlreq/blob/master/README.md Demonstrates how to use the nidanfloat package to balance columns on the final page of a document. Note that this may affect the behavior of \newpage and \clearpage. ```latex \usepackage[balance]{nidanfloat} ``` -------------------------------- ### Customize Japanese Character Spacing Source: https://github.com/abenori/jlreq/blob/master/README.md Shows how to redefine the \jlreqkanjiskip macro to adjust the space between Japanese characters. This allows for fine-tuning the spacing parameters beyond the default settings. ```latex \documentclass{jlreq} \renewcommand{\jlreqkanjiskip}{0pt plus .1\zw minus .01\zw} \begin{document} (Main text) \end{document} ``` -------------------------------- ### Itemization Customization in LaTeX Source: https://context7.com/abenori/jlreq/llms.txt Adjusts spacing before, after, and between list items at different nesting levels using \jlreqsetup. This provides control over the vertical spacing of bulleted and enumerated lists. ```latex \documentclass{jlreq} \jlreqsetup{ itemization_beforeafter_space={0.5\baselineskip, i=1\baselineskip, ii=0.25\baselineskip}, itemization_itemsep=0pt } \begin{document} \begin{itemize} \item 第一レベル項目 \begin{itemize} \item 第二レベル項目 \item 第二レベル項目 \end{itemize} \item 第一レベル項目 \end{itemize} \end{document} ``` -------------------------------- ### Creating Custom Block Headings in LaTeX Source: https://context7.com/abenori/jlreq/llms.txt Defines new block heading commands with custom formatting, label formats, line spacing, and indentation using \NewBlockHeading. This allows for creating unique sectioning styles. ```latex \documentclass{jlreq} \NewBlockHeading{mysection}{1}{ font=\Large\bfseries\sffamily, label_format={第\thesection 章}, lines=3, after_label_space=1zw, indent=0pt, afterindent=true, pagebreak=clearpage } \begin{document} \mysection{カスタム見出し}[副題もつけられます] 本文が続きます。 \end{document} ``` -------------------------------- ### Save and Restore Heading Definitions with \SaveHeading Source: https://github.com/abenori/jlreq/blob/master/README.md Saves the current definition of a heading command to a new command name, enabling temporary redefinition and later restoration. This is useful for applying specific styles for a section of the document and then reverting to the original heading format. ```latex \SaveHeading{}{} ... \restore % Example: \restoresection ``` -------------------------------- ### Sidenotes Configuration in jlreq Source: https://context7.com/abenori/jlreq/llms.txt Enables sidenotes by setting 'sidenote_length' and configures their appearance using '\jlreqsetup'. Supports symbol or text-based sidenotes. ```latex \documentclass[sidenote_length=10zw]{jlreq} \jlreqsetup{ sidenote_type=symbol, sidenote_symbol={※}, sidenote_keyword_font=\bfseries } \begin{document} 印刷可能な\sidenote{原稿}{印刷などの方法により複製できる形式の文書}を準備します。 \end{document} ``` -------------------------------- ### JLREQ Section with Subtitle Source: https://github.com/abenori/jlreq/blob/master/README.md Shows the extended \section command in jlreq, which allows for an optional subtitle in addition to the heading and running head. ```latex \section*[Running Head]{Heading}[Subtitle] ``` -------------------------------- ### JLREQ Jidori (Justified Content) Source: https://github.com/abenori/jlreq/blob/master/README.md Shows the \jidori command in jlreq for justifying content to a specified dimension. This command is intended for use with LuaLaTeX. ```latex \documentclass{jlreq} \begin{document} % Justify content to a specific width \jidori{5cm}{This text will be justified to a width of 5cm.} \end{document} ``` -------------------------------- ### JLREQ Tatechuyoko (Horizontal-in-Vertical) Source: https://github.com/abenori/jlreq/blob/master/README.md Demonstrates the \tatechuyoko command for outputting horizontal text within a vertical writing mode in jlreq. Includes behavior for non-vertical contexts. ```latex \documentclass[tate]{jlreq} \begin{document} % In vertical writing mode: \tatechuyoko{Horizontal Text} % \tatechuyoko*{Horizontal Text} % Outputs as is in non-vertical mode \end{document} ``` -------------------------------- ### Section Commands with Subtitles in jlreq Source: https://context7.com/abenori/jlreq/llms.txt Extends section commands (part, chapter, section, etc.) to accept subtitles as an optional trailing argument. The starred version omits numbering but can still have running heads and subtitles. ```latex \documentclass[book]{jlreq} \begin{document} \chapter{Requirements for Japanese Text Layout}[日本語組版処理の要件] \section{Introduction}[はじめに] This section introduces the basics. \subsection*[Running Head]{Heading Text}[Subtitle] The starred version omits numbering but can still have running head and subtitle. \end{document} ``` -------------------------------- ### Creating Cut-in Headings in LaTeX Source: https://context7.com/abenori/jlreq/llms.txt Creates cut-in (window) headings that function as inline elements with automatic line breaking using \NewCutinHeading. Supports customization of font, indentation, spacing, and maximum line lengths. ```latex \documentclass{jlreq} \NewCutinHeading{mycutin}{5}{ font=\bfseries, indent=0pt, after_space=0pt, onelinemax=6zw, twolinemax=20zw } \begin{document} \mycutin{短い見出し}本文が続きます。 \mycutin{少し長めの窓見出しテキスト}これは二行で表示されます。 \end{document} ``` -------------------------------- ### Consecutive Heading Spacing in LaTeX Source: https://context7.com/abenori/jlreq/llms.txt Configures spacing between consecutive headings using \SetBlockHeadingSpaces. Allows specifying different spacing rules for combinations of heading levels. ```latex \documentclass[book]{jlreq} \SetBlockHeadingSpaces{ {_chapter{lines=5,after_lines=1},_section{lines=2}} [lines=6]{_chapter,24pt,_section,16pt} } \begin{document} \chapter{章見出し} \section{節見出し} 連続する見出しの行取りが設定されています。 \end{document} ``` -------------------------------- ### Define Cut-in Headings with \NewCutinHeading Source: https://github.com/abenori/jlreq/blob/master/README.md Defines cut-in headings, where the heading text appears on a new line before the main text. Customization options include font, indentation, and spacing after the heading. It also provides parameters to control whether the heading is displayed on one, two, or three lines based on its length. ```latex \NewCutinHeading {} { font=, indent=, after_space=, onelinemax=, twolinemax= } ``` -------------------------------- ### Paper Size and Font Configuration in jlreq Source: https://context7.com/abenori/jlreq/llms.txt Configures paper size, font sizes, and line layout through class options. Supports Q and H units (0.25mm) for Japanese typography standards. ```latex \documentclass[ paper=a5paper, fontsize=10pt, jafontsize=13Q, jafontscale=0.92, line_length=40zw, number_of_lines=35, baselineskip=21Q ]{jlreq} \begin{document} 文字サイズと行送りを設定した文書です。 \end{document} ``` -------------------------------- ### Define Page Style in LaTeX Source: https://github.com/abenori/jlreq/blob/master/README.md Defines a custom page style in LaTeX using \NewPageStyle. It accepts a page style name and settings in keyval format to control layout, fonts, and running heads/footers. Dependencies include the JLREQ class file. ```latex \NewPageStyle{}{} ``` -------------------------------- ### JLREQ Japanese Font Size Source: https://github.com/abenori/jlreq/blob/master/README.md Explains the \jafontsize command in jlreq, which allows setting Japanese font sizes independently of European font sizes, similar to \fontsize. ```latex \documentclass{jlreq} % Example: \documentclass[jafontscale=0.9]{jlreq} \begin{document} % Set Japanese font size to 9pt with 15pt line spacing \jafontsize{9pt}{15pt} % Compare with \fontsize: % \fontsize{9pt}{15pt} % (This would result in 8.1pt for Japanese if jafontscale=0.9) \end{document} ``` -------------------------------- ### Caption Customization in LaTeX Source: https://context7.com/abenori/jlreq/llms.txt Customizes the appearance of figure and table captions using \jlreqsetup. Allows modification of font, spacing, label format, and alignment for captions. ```latex \documentclass{jlreq} \jlreqsetup{ caption_font=\small, caption_label_font=\bfseries\sffamily, caption_after_label_space=1zw, caption_label_format={#1:}, caption_align=left, table={\caption_font=\footnotesize} } \begin{document} \begin{figure}[h] \centering % figure content \caption{図のキャプション} \end{figure} \begin{table}[h] \centering % table content \caption{表のキャプション} \end{document} ``` -------------------------------- ### Japanese Font Metrics (JFM) Naming Convention for pLaTeX/upLaTeX Source: https://github.com/abenori/jlreq/blob/master/README.md Illustrates the naming convention for Japanese Font Metrics (JFMs) used with pLaTeX and upLaTeX. The format [u][b][z]jlreq[g][-v] indicates options for upLaTeX, hanging punctuation, bracket spacing, gothic fonts, and vertical writing. ```text [u][b][z]jlreq[g][-v] ``` -------------------------------- ### Configure Itemization Spacing Source: https://github.com/abenori/jlreq/blob/master/README.md Defines vertical space before and after itemized lists, with support for level-specific adjustments using Roman numerals. ```latex \jlreqsetup{ itemization_beforeafter_space={0pt,i=10pt,ii=5pt}, itemization_itemsep=2pt } ``` -------------------------------- ### Engine and Document Type Options in jlreq Source: https://context7.com/abenori/jlreq/llms.txt Specifies the TeX engine (e.g., lualatex) and chooses the document type (article, report, or book). Common layout options like twoside and twocolumn are also supported. ```latex \documentclass[lualatex,book,twoside,openright]{jlreq} \begin{document} \frontmatter \chapter{まえがき} 前付きの章です。 \mainmatter \chapter{第一章} 本文の章です。 \backmatter \chapter{あとがき} 後付きの章です。 \end{document} ``` -------------------------------- ### Modify Existing Page Style in LaTeX Source: https://github.com/abenori/jlreq/blob/master/README.md Modifies an existing page style defined in LaTeX. This command allows for adjustments to previously defined styles. ```latex \ModifyPageStyle{}{} ``` -------------------------------- ### Modify Existing Heading Settings with \ModifyHeading Source: https://github.com/abenori/jlreq/blob/master/README.md Allows modification of settings for an already defined heading command. This command is useful for fine-tuning spacing, font, or other properties of existing headings without redefining the entire command. It does not allow changing the type of heading. ```latex \ModifyHeading{}{=} ``` -------------------------------- ### JLREQ Class Option for Notes Source: https://github.com/abenori/jlreq/blob/master/README.md Activates notifications for settings that contradict Japanese typesetting conventions when the 'jlreq_notes' class option is passed. ```latex \documentclass[jlreq_notes]{jlreq} ``` -------------------------------- ### Jidori (Character Justification) in LaTeX Source: https://context7.com/abenori/jlreq/llms.txt Justifies text to a specific width by adjusting character spacing using the \jidori command. This is useful for aligning text elements like names and addresses. ```latex \documentclass{jlreq} \begin{document} \jidori{6zw}{氏名}:山田太郎 \jidori{8zw}{住所}:東京都千代田区 \end{document} ``` -------------------------------- ### Adjusting Kanjiskip and Xkanjiskip in jlreq Source: https://context7.com/abenori/jlreq/llms.txt This snippet demonstrates how to override the default spacing parameters in the jlreq document class. By redefining \jlreqkanjiskip and \jlreqxkanjiskip, users can control the flexible spacing between Japanese characters and between Japanese and European characters respectively. ```latex \documentclass{jlreq} \renewcommand{\jlreqkanjiskip}{0pt plus .1\zw minus .01\zw} \renewcommand{\jlreqxkanjiskip}{0.25\zw plus .15\zw minus .06\zw} \begin{document} 和文間の空き(kanjiskip)と和欧文間の空き(xkanjiskip)を調整しています。 This is English text mixed with 日本語 in the same paragraph. \end{document} ``` -------------------------------- ### Warichu (Inline Split Annotations) in jlreq Source: https://context7.com/abenori/jlreq/llms.txt Inserts warichu (split annotations) that flow inline with the text. Line breaks are calculated automatically, or can be specified manually. ```latex \documentclass{jlreq} \jlreqsetup{ warichu_opening={(}, warichu_closing={)} } \begin{document} 日本語組版処理の要件\warichu{W3Cが策定した日本語組版に関する技術文書}に基づいています。 % Manual line break specification \warichu*{一行目前 & 一行目後\\ 二行目前 & 二行目後} \end{document} ``` -------------------------------- ### Vertical Page Style for Traditional Layout in LaTeX Source: https://context7.com/abenori/jlreq/llms.txt Creates vertical page styles for traditional layouts with headers positioned on the fore-edge using \NewPageStyle with the 'tate' option. Suitable for vertical writing modes. ```latex \documentclass[tate,book]{jlreq} \NewPageStyle{tateheader}{ tate, running_head_position=3zw, nombre_position=3zw, running_head_font=\small, nombre_font=\small, odd_running_head=_section, nombre={\thepage} } \pagestyle{tateheader} \begin{document} \chapter{序章} 縦書きのヘッダとフッタです。 \end{document} ``` -------------------------------- ### Define Custom Trim Mark Patterns Source: https://github.com/abenori/jlreq/blob/master/jlreq-trimmarks.md Sets the shape of trim marks using LaTeX commands. The pattern defined for the top-center is rotated for other positions, though individual positions can be overridden. ```latex \jlreqtrimmarkssetup{ trimmarks_pattern = { centers = { \raisebox{3mm}{ \vrule width10mm height\jlreqtrimmarkswidth depth 0pt \vrule height10mm width\jlreqtrimmarkswidth depth 3mm \vrule width10mm height\jlreqtrimmarkswidth depth 0pt } } } } ``` -------------------------------- ### Customize Quotation Spacing and Font Source: https://github.com/abenori/jlreq/blob/master/README.md Adjusts the indentation, end indentation, vertical spacing, and font size for block quotations. ```latex \jlreqsetup{ quote_indent=2\zw, quote_beforeafter_space=1\baselineskip, quote_fontsize=small } ``` -------------------------------- ### Enable Hanging Punctuation Source: https://context7.com/abenori/jlreq/llms.txt Activates hanging punctuation, allowing punctuation marks to extend beyond the line margin for better Japanese typesetting. ```latex \documentclass[hanging_punctuation]{jlreq} \begin{document} ぶら下げ組みが有効になっています。行末の句読点が版面からはみ出すことを許容します。 「括弧類」もぶら下げの対象になります。 \end{document} ``` -------------------------------- ### Endnotes Configuration in jlreq Source: https://context7.com/abenori/jlreq/llms.txt Configures endnotes to appear at the end of sections or chapters. The output position can be controlled with 'endnote_position', and indentation with 'endnote_second_indent'. ```latex \documentclass{jlreq} \jlreqsetup{ endnote_position=headings, endnote_second_indent=1zw } \begin{document} \section{第一節} 本文の説明\endnote{詳細は参考文献を参照してください。}です。 \section{第二節} % Endnotes from previous section automatically output here 新しい節の内容です。 % Or manually output endnotes: \theendnotes \end{document} ``` -------------------------------- ### Japanese Font Metrics (JFM) Naming Convention for LuaLaTeX Source: https://github.com/abenori/jlreq/blob/master/README.md Specifies the Japanese Font Metrics (JFMs) used for LuaLaTeX. 'jlreq' is used for horizontal writing and 'jlreqv' for vertical writing, with gothic fonts sharing the same JFMs. ```text Horizontal: jlreq Vertical: jlreqv ```