前言

前言

前言

我尝试搜索有关此问题的问题,但一无所获,部分原因可能是我不知道是什么原因造成的。我假设这是一个错误,但我可能错了。

此外,我不能在这里放 MWE,因为我正在写的书是受版权保护的,为了能够给你提供出现这种情况的代码,我可能不得不把整本书放在这里,因为当我尝试创建一个包含出现问题的代码部分的文档时,它没有重现。

问题

我正在排版一本两栏的书,里面有很多图表、表格和方程式。方程式和文本本身中都有希腊字母。我遇到了一个问题,即(即使在同一个段落中)两个或多个相同的希腊字母中的其中一个呈现不同的大小。当我尝试将错误渲染的代码部分以及一些最少的上下文移动到段落中的其他位置时,它仍然被错误渲染,而其他实例继续正确渲染。当我只将字母本身移动到其他地方时,它的行为与其他字母一样并正确渲染。

这里我在屏幕截图和下面的代码部分中展示的问题实例发生在表格的标题上,但如果我没记错的话,我也在普通文本中看到过它(截至撰写本文时,该文档有大约 120 万个字符,我已经为此工作了半年,所以你可以想象我不太确定我在哪里见过这种情况;对此我很抱歉)。

屏幕截图问题(橙色圈出的是错误的,绿色圈出的是正确的): 在此处输入图片描述

标题代码截图显示:

    \caption{Příklady dlouhodobého chemického složení vod povrchových toků na hlinitokřemičitém podloží a vápenci. Hodnoty jsou v~\upmu mol~l\sups{−1}, kromě vodivosti (\upmu S~cm\sups{−1} při 25\,°C), rozpuštěného organického uhlíku (DOC,~mg~l\sups{−1}) a pH. Všechna povodí jsou v~horských povodích (Slavkovský les a Šumava) kromě River Enborne (Anglie) a potoku Ladná (jižní Morava), která jsou zemědělská. Potok PL-IV je podzemní.}

如您所见,我在这里使用了直立的希腊字母,因为它不在等式中。不确定这是否有某种相关性。此外,问题不仅仅发生在字母上\upmu,我确信我在文档中的某个地方也看到过另一个字母也出现过这个问题。

作为参考,我还添加了完整的“usepackage”部分,因为我相信这可能是相关的(省略注释行,但保留我自己的注释,大致记录这些包的用途):

\directlua{pdf.setminorversion(7)}
\documentclass[10pt,openany,oneside,twocolumn]{book}
\usepackage[paperheight=280mm,paperwidth=205mm,top=26mm,bottom=26mm,margin=20mm]{geometry} % remove heightrounded from the parameters
\usepackage{lmodern}
\usepackage[greek,english,czech]{babel}
\usepackage{csquotes}
\usepackage[hyphens]{url}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{nameref} % Defines a \nameref command, that makes reference to an object by its name (e.g., the title of a section or chapter)
\usepackage{multirow} % Make an entry that will span multiple rows of a table.
\usepackage{array} % An extended implementation of the array and tabular environments which extends the options for column formats (e.g. padding)
\usepackage{gensymb} % Provides generic commands \degree, \celsius, \perthousand, \micro and \ohm which work both in text and maths mode
\usepackage{amsmath} % so we can use multiline equations with equation* or align* environments (uses multline env.)
\usepackage{fancyhdr} % Allows us to set nice headers
\usepackage{tabularx} % Autofit columns to text width
\usepackage[newcommands]{ragged2e} % hyphenation inside table cells - https://tex.stackexchange.com/questions/16842/auto-fit-table-column-widths-based-on-content/16867
\usepackage{lscape} % landscape certain pages
\usepackage{url} % print URLs nicely
\usepackage{wrapfig} % text flow around images
\usepackage{placeins} % force a float to be in the exact place where we say when it's wrapped surrounded by \FloatBarrier
\usepackage{siunitx} % typeset units properly -- we won't use this because the typesetting is problematic for the sed script to replace: \SI{1.55}{\micro\metre}
\usepackage{caption} % figure/tables tweaking
\usepackage{upgreek} % typeset greek letters straight (not italics) outside of math env (we need to do some hardcore regexing to replace this only outside of math env)
\usepackage{xfrac} % this enables us to use the small diagonal fractions with \sfrac{num}{denum} (in math mode)
\usepackage{dblfloatfix} % redefines latex core to enable images in twocolumn layout "be placed in the right order and introduces position [tbp]"
\usepackage{cuted} % this enables us to use env. strip (for quotes at the chapter beginning)
\usepackage{epigraph} % package for the quotes we have at the beginning of each chapter;; not used right now
\usepackage{microtype} % microtypography to adjust the subtle stuff normal mortals don't see (not even me actually)
\usepackage[dvipsnames]{xcolor} % allows to use colors in the document, dvipsnames allows more names of the colors than the basic package setting
\usepackage{makecell} % create cell boxes inside table cells to be able to wrap text inside them
\usepackage{enumitem} % This package provides user control over the layout of enumerate, itemize and description. (e.g. for changing numbering style)
\usepackage{extarrows} % package allowing variable arrows in the document, e.g. \xrightarrow[{}]{} . Details here: http://www.sascha-frank.com/Arrow/latex-arrows.html
\usepackage{sectsty} % allow coloring the chapter/section headings (colors, alignment, ...)
\usepackage{flushend} % distribute the text between the two columns at the end of chapters

更新:

软件包版本

.log我按照下面评论中要求的那样,从文件中提取了软件包版本:

$ grep -e "Package: " my-book.log
Package: geometry 2010/09/12 v5.6 Page Geometry
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
Package: lmodern 2009/10/30 v1.6 Latin Modern Fonts
Package: babel 2018/02/14 3.18 The Babel package
Package: csquotes 2018/02/11 v5.2c context-sensitive quotations (JAW)
Package: etoolbox 2018/02/11 v2.5e e-TeX tools for LaTeX (JAW)
Package: url 2013/09/16  ver 3.4  Verb mode for urls, etc.
Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
Package: setspace 2011/12/19 v6.7a set line spacing
Package: nameref 2016/05/21 v2.44 Cross-referencing by name of section
Package: refcount 2016/05/16 v3.5 Data extraction from label references (HO)
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
Package: gettitlestring 2016/05/16 v1.5 Cleanup title references (HO)
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package: multirow 2016/11/25 v2.2 Span multiple rows of a table
Package: array 2016/10/06 v2.4d Tabular extension package (FMi)
Package: gensymb 2003/07/02 v1.0 (WaS)
Package: amsmath 2017/09/02 v2.17a AMS math features
Package: amstext 2000/06/29 v2.01 AMS text
Package: amsbsy 1999/11/29 v1.2d Bold Symbols
Package: amsopn 2016/03/08 v2.02 operator names
Package: fancyhdr 2017/06/30 v3.9a Extensive control of page headers and footers
Package: tabularx 2016/02/03 v2.11 `tabularx' package (DPC)
Package: ragged2e 2009/05/21 v2.1 ragged2e Package (MS)
Package: everysel 2011/10/28 v1.2 EverySelectfont Package (MS)
Package: lscape 2000/10/22 v3.01 Landscape Pages (DPC)
Package: wrapfig 2003/01/31  v 3.6
Package: placeins 2005/04/18  v 2.2
Package: expl3 2018/02/21 L3 programming layer (loader) 
Package: expl3 2018/02/21 L3 programming layer (code)
Package: xparse 2018/02/21 L3 Experimental document command parser
Package: siunitx 2017/11/26 v2.7k A comprehensive (SI) units package
Package: l3keys2e 2018/02/21 LaTeX2e option processing using LaTeX3 keys
Package: translator 2018/01/04 v1.12 Easy translation of strings in LaTeX
Package: caption 2016/02/21 v3.3-144 Customizing captions (AR)
Package: caption3 2016/05/22 v1.7-166 caption3 kernel (AR)
Package: upgreek 2003/02/12 v2.0 (WaS)
Package: textcomp 2017/04/05 v2.0i Standard LaTeX package
Package: xtemplate 2018/02/21 L3 Experimental prototype document functions
Package: xfrac 2018/02/21 L3 Experimental split-level fractions
Package: dblfloatfix 2012/12/31 v1.0a (JAW)
Package: fixltx2e 2016/12/29 v2.1a fixes to LaTeX (obsolete)
Package: cuted 2012/10/04 v1.5 Mixing onecolumn and twocolumn modes
Package: epigraph 2009/09/02 v1.5c typesetting epigraphs
Package: microtype 2018/01/14 v2.7a Micro-typographical refinements (RS)
Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK)
Package: makecell 2009/08/03 V0.1e Managing of Tab Column Heads and Cells
Package: enumitem 2011/09/28 v3.5.2 Customized lists
Package: extarrows 2008/05/15 v1.0b Some extensible arrows
Package: sectsty 2002/02/25 v2.0.2 Commands to change all sectional heading styl
Package: flushend 2017/03/27 v3.3 Balancing columns in twocolumn mode
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
Package: pdftexcmds 2018/01/21 v0.26 Utility functions of pdfTeX for LuaTeX (HO)

询问

亲爱的读者,请您看一下上面的内容,如果您知道是什么原因造成的,请告诉我。非常感谢。

我知道我可能遗漏了一些显而易见的东西但我不知道要寻找什么。

我正在使用 LuaLaTeX 在 Ubuntu 18.04 上编译文档:LuaTeX, Version 1.0.4 (TeX Live 2017/Debian)

如果您认为我提供的任何其他信息与此问题相关,请告诉我。

笔记:我尝试在另一台运行 Xubuntu 18.04 和相同版本的 LuaLaTeX 的电脑上编译该文档。第一次和第二次编译后的结果相同(没有再尝试)。

答案1

siunitx使用单位包而不是使用 中的上形希腊字母,您就不会遇到这个问题upgreek。无论如何, 的符号micro并不完全是 mu – 它有衬线。此外,您将自动获得正确的间距,并通过缩写更简单地输入。

但是,没有微西门子类型的缩写,因此我声明了一个。

    \documentclass{article}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage{siunitx}

    \DeclareSIUnit{\uSm}{\micro\siemens}

    \begin{document}

     \begin{table} 
\caption{Příklady dlouhodobého chemického složení vod povrchových toků na hlinitokřemičitém podloží a vápenci. Hodnoty jsou v~\si{ \umol\per\l}, kromě vodivosti (\si{\uSm\per\cm} při \SI{25}{\celsius}), rozpuštěného organického uhlíku (DOC, \si{\mg\per\l}) a pH. Všechna povodí jsou v~horských povodích (Slavkovský les a Šumava) kromě River Enborne (Anglie) a potoku Ladná (jižní Morava), která jsou zemědělská. Potok PL-IV je  podzemní.}
     \end{table}

    \end{document} 

在此处输入图片描述

相关内容