Compare commits

...

8 Commits

Author SHA1 Message Date
Juergen Spitzmueller
52157c9318 Set appropriate tt font that supports CJK
The actual font should be discussed. This one is OSS and works well:
https://github.com/adobe-fonts/source-han-code-jp
2024-09-14 14:46:29 +02:00
Juergen Spitzmueller
7340fe5d65 Fixup some more Japanese templates
All of these rely on non-polyglossia language support
2024-09-14 14:43:43 +02:00
Juergen Spitzmueller
80fdb6ba42 Fixup Japanese Article template
This one relies on its own language support
2024-09-14 14:38:47 +02:00
Juergen Spitzmueller
250cb1401d Fixup Japanese Feynman example
Polyglossia is loaded after the user preamble
2024-09-14 14:36:18 +02:00
Juergen Spitzmueller
6d06f5fa55 Fixup Japanese Article example
This one relies on its own language support
2024-09-14 14:29:31 +02:00
Juergen Spitzmueller
c167bc90f5 Fixup test file for texF tests
Use proper fonts basically (the rest is format conversion)
2024-09-14 12:48:57 +02:00
Juergen Spitzmueller
30f170ea26 Revert "use std::move() instead of copying when value is no longer used"
This reverts commit e685d31f5a.
2024-09-14 10:59:13 +02:00
Juergen Spitzmueller
3a1c8897b1 Revert "Fix compiler warning"
This reverts commit 0a75854038.
2024-09-14 10:59:08 +02:00
16 changed files with 76 additions and 43 deletions

View File

@ -1,24 +1,26 @@
#LyX 2.4 created this file. For more info see https://www.lyx.org/ #LyX 2.4 created this file. For more info see https://www.lyx.org/
\lyxformat 573 \lyxformat 620
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties true \save_transient_properties true
\origin unavailable \origin unavailable
\textclass report \textclass report
\use_default_options false \use_default_options false
\maintain_unincluded_children false \maintain_unincluded_children no
\language chinese-traditional \language chinese-traditional
\language_package default \language_package default
\inputencoding utf8 \inputencoding utf8
\fontencoding auto \fontencoding auto
\font_roman "lmodern" "default" \font_roman "lmodern" "IPAexMincho"
\font_sans "default" "default" \font_sans "default" "IPAexMincho"
\font_typewriter "default" "default" \font_typewriter "default" "Source Han Code JP"
\font_math "auto" "auto" \font_math "auto" "auto"
\font_default_family default \font_default_family default
\use_non_tex_fonts false \use_non_tex_fonts false
\font_sc false \font_sc false
\font_osf false \font_roman_osf false
\font_sans_osf false
\font_typewriter_osf false
\font_sf_scale 100 100 \font_sf_scale 100 100
\font_tt_scale 100 100 \font_tt_scale 100 100
\font_cjk bsmi \font_cjk bsmi
@ -43,7 +45,7 @@
\pdf_colorlinks true \pdf_colorlinks true
\pdf_backref false \pdf_backref false
\pdf_pdfusetitle true \pdf_pdfusetitle true
\papersize a4paper \papersize a4
\use_geometry false \use_geometry false
\use_package amsmath 1 \use_package amsmath 1
\use_package amssymb 1 \use_package amssymb 1
@ -64,7 +66,9 @@
\suppress_date false \suppress_date false
\justification true \justification true
\use_refstyle 0 \use_refstyle 0
\use_formatted_ref 0
\use_minted 0 \use_minted 0
\use_lineno 0
\index 索引 \index 索引
\shortcut idx \shortcut idx
\color #008000 \color #008000
@ -72,7 +76,7 @@
\secnumdepth 3 \secnumdepth 3
\tocdepth 3 \tocdepth 3
\paragraph_separation skip \paragraph_separation skip
\defskip 2ex \defskip halfline
\is_math_indent 0 \is_math_indent 0
\math_numbering_side default \math_numbering_side default
\quotes_style english \quotes_style english
@ -83,9 +87,13 @@
\tablestyle default \tablestyle default
\tracking_changes false \tracking_changes false
\output_changes false \output_changes false
\change_bars false
\postpone_fragile_content false
\html_math_output 0 \html_math_output 0
\html_css_as_file 0 \html_css_as_file 0
\html_be_strict false \html_be_strict false
\docbook_table_output 0
\docbook_mathml_prefix 1
\end_header \end_header
\begin_body \begin_body
@ -148,7 +156,8 @@ The prefix
\emph on \emph on
Chapter Chapter
\emph default \emph default
in the chapter heading is not translated — not even with in the chapter heading is not translated —
not even with
\begin_inset Quotes eld \begin_inset Quotes eld
\end_inset \end_inset
@ -171,13 +180,16 @@ CJK
\begin_inset Quotes erd \begin_inset Quotes erd
\end_inset \end_inset
environment, Chinese characters in a section title lead to errors like environment,
Chinese characters in a section title lead to errors like
\end_layout \end_layout
\begin_deeper \begin_deeper
\begin_layout LyX-Code \begin_layout LyX-Code
\noindent \noindent
! Package inputenc Error: Unicode char 中 (U+4E2D) !
Package inputenc Error:
Unicode char 中 (U+4E2D)
\end_layout \end_layout
\begin_layout LyX-Code \begin_layout LyX-Code
@ -221,6 +233,7 @@ Section in Chinese 中文名
\begin_layout Standard \begin_layout Standard
This section head is in Chinese. This section head is in Chinese.
這節的標題是中文。 這節的標題是中文。
\end_layout \end_layout
\end_body \end_body

View File

@ -1,27 +1,26 @@
#LyX 2.4 created this file. For more info see https://www.lyx.org/ #LyX 2.4 created this file. For more info see https://www.lyx.org/
\lyxformat 573 \lyxformat 620
\begin_document \begin_document
\begin_header \begin_header
\save_transient_properties false \save_transient_properties false
\origin unavailable \origin unavailable
\textclass scrbook \textclass scrbook
\use_default_options false \use_default_options false
\maintain_unincluded_children false \maintain_unincluded_children no
\begin_local_layout
\end_local_layout
\language japanese \language japanese
\language_package default \language_package default
\inputencoding utf8 \inputencoding utf8
\fontencoding auto \fontencoding auto
\font_roman "lmodern" "IPAexMincho" \font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic" \font_sans "default" "IPAexGothic"
\font_typewriter "default" "default" \font_typewriter "default" "Source Han Code JP"
\font_math "auto" "auto" \font_math "auto" "auto"
\font_default_family default \font_default_family default
\use_non_tex_fonts false \use_non_tex_fonts false
\font_sc false \font_sc false
\font_osf false \font_roman_osf false
\font_sans_osf false
\font_typewriter_osf false
\font_sf_scale 100 100 \font_sf_scale 100 100
\font_tt_scale 100 100 \font_tt_scale 100 100
\use_microtype false \use_microtype false
@ -71,12 +70,14 @@
\suppress_date false \suppress_date false
\justification false \justification false
\use_refstyle 0 \use_refstyle 0
\use_formatted_ref 0
\use_minted 0 \use_minted 0
\use_lineno 0
\notefontcolor #0000ff \notefontcolor #0000ff
\branch OutDated \branch OutDated
\selected 0 \selected 0
\filename_suffix 0 \filename_suffix 0
\color #f5fae7 \color #f5fae7 #0a0518
\end_branch \end_branch
\index 索引 \index 索引
\shortcut idx \shortcut idx
@ -97,9 +98,13 @@
\tablestyle default \tablestyle default
\tracking_changes false \tracking_changes false
\output_changes false \output_changes false
\change_bars false
\postpone_fragile_content false
\html_math_output 0 \html_math_output 0
\html_css_as_file 0 \html_css_as_file 0
\html_be_strict true \html_be_strict true
\docbook_table_output 0
\docbook_mathml_prefix 1
\end_header \end_header
\begin_body \begin_body
@ -109,16 +114,18 @@ False positive error:
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
A listings inset in a Japanese document (both, platex and CJK) resulted A listings inset in a Japanese document (both,
in a platex and CJK) resulted in a
\end_layout \end_layout
\begin_layout LyX-Code \begin_layout LyX-Code
Encoding.cpp (251): Uncodable character in latexString! Encoding.cpp (251):
Uncodable character in latexString!
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
error messages in the terminal, even if the content is pure ASCII and error messages in the terminal,
even if the content is pure ASCII and
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
@ -126,8 +133,7 @@ the output is fine.
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
This is because it wants to put the translated listingsname into the preamble This is because it wants to put the translated listingsname into the preamble but does not believe it can be encoded there...
but does not believe it can be encoded there...
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard

View File

@ -38,7 +38,7 @@ EndPreamble
End End
\end_local_layout \end_local_layout
\language japanese \language japanese
\language_package default \language_package babel
\inputencoding utf8 \inputencoding utf8
\fontencoding auto \fontencoding auto
\font_roman "default" "default" \font_roman "default" "default"
@ -95,6 +95,7 @@ End
\suppress_date false \suppress_date false
\justification true \justification true
\use_refstyle 1 \use_refstyle 1
\use_formatted_ref 0
\use_minted 0 \use_minted 0
\use_lineno 0 \use_lineno 0
\index Index \index Index
@ -538,7 +539,6 @@ LaTeXプリアンブル
\end_layout \end_layout
\begin_layout JLReq Setup \begin_layout JLReq Setup
sidenote_type=symbol sidenote_type=symbol
\end_layout \end_layout

View File

@ -16,14 +16,16 @@
% email: lyx-docs@lists.lyx.org % email: lyx-docs@lists.lyx.org
% increase link area for cross-references and autoname them, % increase link area for cross-references and autoname them,
\AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}} \AtBeginDocument{
\newlength{\abc} \renewcommand{\ref}[1]{\mbox{\autoref{#1}}}
\settowidth{\abc}{\space} \newlength{\abc}
\addto\extrasenglish{ \settowidth{\abc}{\space}
\addto\extrasenglish{
\renewcommand{\equationautorefname}{\hspace{-\abc}} \renewcommand{\equationautorefname}{\hspace{-\abc}}
\renewcommand{\sectionautorefname}{sec.\negthinspace} \renewcommand{\sectionautorefname}{sec.\negthinspace}
\renewcommand{\subsectionautorefname}{sec.\negthinspace} \renewcommand{\subsectionautorefname}{sec.\negthinspace}
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}} \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}}
}
% wird benutzt, um Tabellenzellen zu vergrosern % wird benutzt, um Tabellenzellen zu vergrosern
\@ifundefined{extrarowheight} \@ifundefined{extrarowheight}
@ -58,6 +60,8 @@
\output_sync 0 \output_sync 0
\bibtex_command default \bibtex_command default
\index_command default \index_command default
\float_placement class
\float_alignment class
\paperfontsize 12 \paperfontsize 12
\spacing single \spacing single
\use_hyperref true \use_hyperref true
@ -94,6 +98,7 @@
\suppress_date true \suppress_date true
\justification true \justification true
\use_refstyle 0 \use_refstyle 0
\use_formatted_ref 0
\use_minted 0 \use_minted 0
\use_lineno 0 \use_lineno 0
\index Index \index Index

View File

@ -8,7 +8,7 @@
\use_default_options true \use_default_options true
\maintain_unincluded_children no \maintain_unincluded_children no
\language japanese \language japanese
\language_package default \language_package babel
\inputencoding utf8 \inputencoding utf8
\fontencoding auto \fontencoding auto
\font_roman "default" "default" \font_roman "default" "default"
@ -56,6 +56,7 @@
\suppress_date false \suppress_date false
\justification true \justification true
\use_refstyle 1 \use_refstyle 1
\use_formatted_ref 0
\use_minted 0 \use_minted 0
\use_lineno 0 \use_lineno 0
\index Index \index Index

View File

@ -8,7 +8,7 @@
\use_default_options true \use_default_options true
\maintain_unincluded_children no \maintain_unincluded_children no
\language japanese \language japanese
\language_package default \language_package babel
\inputencoding utf8 \inputencoding utf8
\fontencoding auto \fontencoding auto
\font_roman "default" "default" \font_roman "default" "default"
@ -56,6 +56,7 @@
\suppress_date false \suppress_date false
\justification true \justification true
\use_refstyle 1 \use_refstyle 1
\use_formatted_ref 0
\use_minted 0 \use_minted 0
\use_lineno 0 \use_lineno 0
\index Index \index Index

View File

@ -8,7 +8,7 @@
\use_default_options true \use_default_options true
\maintain_unincluded_children no \maintain_unincluded_children no
\language japanese \language japanese
\language_package default \language_package babel
\inputencoding utf8 \inputencoding utf8
\fontencoding auto \fontencoding auto
\font_roman "default" "default" \font_roman "default" "default"
@ -56,6 +56,7 @@
\suppress_date false \suppress_date false
\justification true \justification true
\use_refstyle 1 \use_refstyle 1
\use_formatted_ref 0
\use_minted 0 \use_minted 0
\use_lineno 0 \use_lineno 0
\index Index \index Index

View File

@ -8,7 +8,7 @@
\use_default_options true \use_default_options true
\maintain_unincluded_children no \maintain_unincluded_children no
\language japanese \language japanese
\language_package default \language_package babel
\inputencoding utf8 \inputencoding utf8
\fontencoding auto \fontencoding auto
\font_roman "default" "default" \font_roman "default" "default"
@ -56,6 +56,7 @@
\suppress_date false \suppress_date false
\justification true \justification true
\use_refstyle 1 \use_refstyle 1
\use_formatted_ref 0
\use_minted 0 \use_minted 0
\use_lineno 0 \use_lineno 0
\index Index \index Index

View File

@ -8,7 +8,7 @@
\use_default_options true \use_default_options true
\maintain_unincluded_children no \maintain_unincluded_children no
\language japanese \language japanese
\language_package default \language_package babel
\inputencoding utf8 \inputencoding utf8
\fontencoding auto \fontencoding auto
\font_roman "default" "default" \font_roman "default" "default"
@ -56,6 +56,7 @@
\suppress_date false \suppress_date false
\justification true \justification true
\use_refstyle 1 \use_refstyle 1
\use_formatted_ref 0
\use_minted 0 \use_minted 0
\use_lineno 0 \use_lineno 0
\index Index \index Index

View File

@ -8,7 +8,7 @@
\use_default_options true \use_default_options true
\maintain_unincluded_children no \maintain_unincluded_children no
\language japanese \language japanese
\language_package default \language_package babel
\inputencoding utf8 \inputencoding utf8
\fontencoding auto \fontencoding auto
\font_roman "default" "default" \font_roman "default" "default"
@ -56,6 +56,7 @@
\suppress_date false \suppress_date false
\justification true \justification true
\use_refstyle 1 \use_refstyle 1
\use_formatted_ref 0
\use_minted 0 \use_minted 0
\use_lineno 0 \use_lineno 0
\index Index \index Index

View File

@ -8,7 +8,7 @@
\use_default_options true \use_default_options true
\maintain_unincluded_children no \maintain_unincluded_children no
\language japanese \language japanese
\language_package default \language_package babel
\inputencoding utf8 \inputencoding utf8
\fontencoding auto \fontencoding auto
\font_roman "default" "default" \font_roman "default" "default"
@ -56,6 +56,7 @@
\suppress_date false \suppress_date false
\justification true \justification true
\use_refstyle 1 \use_refstyle 1
\use_formatted_ref 0
\use_minted 0 \use_minted 0
\use_lineno 0 \use_lineno 0
\index Index \index Index

View File

@ -8,7 +8,7 @@
\use_default_options true \use_default_options true
\maintain_unincluded_children no \maintain_unincluded_children no
\language japanese \language japanese
\language_package default \language_package babel
\inputencoding utf8 \inputencoding utf8
\fontencoding auto \fontencoding auto
\font_roman "default" "default" \font_roman "default" "default"
@ -56,6 +56,7 @@
\suppress_date false \suppress_date false
\justification true \justification true
\use_refstyle 1 \use_refstyle 1
\use_formatted_ref 0
\use_minted 0 \use_minted 0
\use_lineno 0 \use_lineno 0
\index Index \index Index

View File

@ -8,7 +8,7 @@
\use_default_options true \use_default_options true
\maintain_unincluded_children no \maintain_unincluded_children no
\language japanese \language japanese
\language_package default \language_package babel
\inputencoding utf8 \inputencoding utf8
\fontencoding auto \fontencoding auto
\font_roman "default" "default" \font_roman "default" "default"
@ -56,6 +56,7 @@
\suppress_date false \suppress_date false
\justification true \justification true
\use_refstyle 1 \use_refstyle 1
\use_formatted_ref 0
\use_minted 0 \use_minted 0
\use_lineno 0 \use_lineno 0
\index Index \index Index

View File

@ -1707,7 +1707,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
string label = dit.innerParagraph().getLabelForXRef(); string label = dit.innerParagraph().getLabelForXRef();
if (!label.empty()) { if (!label.empty()) {
// if the paragraph has a label, we refer to this // if the paragraph has a label, we refer to this
string const arg = (type.empty()) ? std::move(label) : std::move(label) + " " + type; string const arg = (type.empty()) ? label : label + " " + type;
lyx::dispatch(FuncRequest(LFUN_REFERENCE_INSERT, arg)); lyx::dispatch(FuncRequest(LFUN_REFERENCE_INSERT, arg));
break; break;
} else { } else {

View File

@ -798,7 +798,7 @@ docstring Encodings::convertLaTeXCommands(docstring const & str, bool const lite
if (!cnvtd.empty()) { if (!cnvtd.empty()) {
// it did, so we'll take that bit and proceed with what's left // it did, so we'll take that bit and proceed with what's left
ret += cnvtd; ret += cnvtd;
val = std::move(rem); val = rem;
continue; continue;
} }
// it's a command of some sort // it's a command of some sort

View File

@ -440,7 +440,7 @@ docstring nomenclWidest(Buffer const & buffer)
msymb.size(); msymb.size();
if (wx > w) { if (wx > w) {
w = wx; w = wx;
symb = std::move(symbol); symb = symbol;
} }
} }
} }