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/
\lyxformat 573
\lyxformat 620
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass report
\use_default_options false
\maintain_unincluded_children false
\maintain_unincluded_children no
\language chinese-traditional
\language_package default
\inputencoding utf8
\fontencoding auto
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexMincho"
\font_typewriter "default" "Source Han Code JP"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts 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_tt_scale 100 100
\font_cjk bsmi
@ -43,7 +45,7 @@
\pdf_colorlinks true
\pdf_backref false
\pdf_pdfusetitle true
\papersize a4paper
\papersize a4
\use_geometry false
\use_package amsmath 1
\use_package amssymb 1
@ -64,7 +66,9 @@
\suppress_date false
\justification true
\use_refstyle 0
\use_formatted_ref 0
\use_minted 0
\use_lineno 0
\index 索引
\shortcut idx
\color #008000
@ -72,7 +76,7 @@
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip 2ex
\defskip halfline
\is_math_indent 0
\math_numbering_side default
\quotes_style english
@ -83,9 +87,13 @@
\tablestyle default
\tracking_changes false
\output_changes false
\change_bars false
\postpone_fragile_content false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\docbook_table_output 0
\docbook_mathml_prefix 1
\end_header
\begin_body
@ -148,7 +156,8 @@ The prefix
\emph on
Chapter
\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
\end_inset
@ -171,13 +180,16 @@ CJK
\begin_inset Quotes erd
\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
\begin_deeper
\begin_layout LyX-Code
\noindent
! Package inputenc Error: Unicode char 中 (U+4E2D)
!
Package inputenc Error:
Unicode char 中 (U+4E2D)
\end_layout
\begin_layout LyX-Code
@ -221,6 +233,7 @@ Section in Chinese 中文名
\begin_layout Standard
This section head is in Chinese.
這節的標題是中文。
\end_layout
\end_body

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1707,7 +1707,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
string label = dit.innerParagraph().getLabelForXRef();
if (!label.empty()) {
// 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));
break;
} else {

View File

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

View File

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