# Preface

I tried searching for questions about this problem, haven't found anything, maybe partly because I have no idea what's causing it. My assumption is it's a bug but I may be wrong.

Also, I can't put here a MWE because the book I'm working on is copyright protected and to be able to give you the code this occurs in, I'd have to probably put the whole book here because when I've tried to create a document with the part of the code the issue occurs in, it didn't reproduce.

# The Problem

I'm typesetting a two column book with a lot of figures, tables and equations. There are also Greek letters, both in the equations and in the text itself. I've encountered an issue where (even in the same paragraph) one of two or more occurrences of the same Greek letter renders differently sized. When I try moving the wrongly rendering part of the code with some minimal context to a different place in the paragraph, it remains wrongly rendered while the other instances continue to render correctly. When I move only the letter itself elsewhere, it behaves like the other ones and renders correctly.

The instance of the problem I'm presenting here in the screenshot and the part of the code below is occurring on a caption of a table but if memory serves me well, I've seen it in normal text too (as of this writing, the document has about 1.2 millions of characters and I'm working on it for half a year already so you can image I'm not exactly sure where else have I seen this; sorry about that).

A screenshot of the issue (the orange circled is the wrong one, the green circled is the right one):

The code of the caption the screenshot is presenting:

    \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í.}


As you can see, I'm using upright Greek letters here because it's outside of an equation. Not sure if that's somehow relevant. Also, the issue doesn't occur only with the \upmu letter, I'm posistive I've seen it somewhere in the document with another letter, too.

For a reference, I'm adding also the complete "usepackage" part because I believe that might be relevant (leaving out commented lines but keeping there my own comments roughly documenting what the packages are there for):

\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


Update:

# Package versions

I grepped the package versions out of the .log file as per the ask in the bellow comments:

\$ 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)


Would you, dear reader, kindly look at the above and let me know if you happen to have an idea what might be causing this? Thanks a lot.

I'm aware I might be missing something obvious but I don't have an idea what to look for.

I'm compiling the document on Ubuntu 18.04 using LuaLaTeX: LuaTeX, Version 1.0.4 (TeX Live 2017/Debian).

Please let me know if you believe any other information I may provide seems relevant to this problem.

Note: I tried compiling the document on another computer running Xubuntu 18.04 and the same version of LuaLaTeX. The result was the same after 1st and 2nd compile (didn't try more).

• You should still try to make a mwe, as lo g as others cannot reproduce there is not much we can do. Besides why are you manually typing units when you're loading siunitx, use \si for that and  \SI if there is a value and unit. – daleif Dec 29 '19 at 16:34
• I don't think there's a point in making a MWE when not even me can reproduce it at will anywhere else then where the issue occurs. I tried, as stated in the my question above. MWE which doesn't demonstrate the issue is pointless, is it not? – edison23 Dec 29 '19 at 18:23
• Only a preamble is even more pointless. If you can't show a complete example that demonstrates the problem, it doesn't make much sense to ask on a site like this for help. Btw: don't use \usepackage{lmodern} with lualatex. And better update your texsystem. lualatex has changed quite a lot in the last years and you can't expect support for an outdated system. – Ulrike Fischer Dec 29 '19 at 21:57
• Plus we are not asking you to copy your clients text. You should be able to use sample texts. – daleif Dec 30 '19 at 9:19
• The "solution" is wrong if you are using lualatex - you shouldn't use T1-encoding with this engine. It is quite easy to show only the code of your screenshot - if this doesn't violate the clients copyright the code won't either. We can't tell you if your problem has been fixed or not as you didn't show the code, but if it is fixed in a newer version you will have to install a vanilla tex and not rely on the ubuntu repos. – Ulrike Fischer Dec 30 '19 at 9:25

You won't have this problem using the siunitx package for units instead of using the upshape greek letters from upgreek. Anyway the symbol for micro is not exactly a mu – it has a serif. Furthermore, you'll automatically have a correct spacing, and a simpler typing through abbreviations.

However, there is no abbreviation to type a microsiemens, so I declared one.

    \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}


• I'm accepting your answer because it does solve the problem. However, I have a a few questions: The main one - why is the symbol for micro different from the Greek letter μ? 2nd one - is there any reason to use \Siemens for the unit of Siemens when the symbol for the unit is just Latin letter S? And lastly - the problem I was facing seems to be a LuaLaTeX bug then? I'm asking because if I were to use actual Greek letters, not units, this would not solve the problem I presented above. Anyway, thanks for your answer. – edison23 Dec 29 '19 at 18:18
• 1) Actually, one can also use an upshape Greek μ (unicode \03BC ) but there a specific micro symbol (unicode 00B5). 2) One could imagine \S as an abbreviation in siunitx, but it is already used for the § symbol. But you can declare as an abbreviated code \Sm, for instance, which is not defined anywhere, as far as I know (they defined shortcuts only for the most common units) . 3) I don't think it is a bug: the upgreek glyphs are taken from another font than the default cm or lm – either the Euler fonts (default) or Adobe Symbol ([Symbol] or [Symbolsmallscale] option). – Bernard Dec 29 '19 at 18:49
• 1/ thanks, I take that just that the symbol for micro for some reason defers from the μ letter in that particular font. 2/ My question was rather why not use just Latin letter S? (We all do, I believe, but I don't understand why should we do otherwise (use the siunitx code). 3/ As I demostrated in the screenshot, the two cases of one letter (\upmu) rendered differently without any reason apparent to me, that's why I think it's a bug. – edison23 Dec 29 '19 at 18:58
• For your question 2, which is clearer with this precision, you can use, say \si{\micro S}, but I though it shorter to use \si{\uS}. The \SI command is also useful to have a correct (unbreakable) spacing between number and unit. – Bernard Dec 29 '19 at 19:11