Dear LyX users,

I came across an (for me) unexpected behavior in LyX 2.3 that probably requires 
me to change my whole document...

For typesetting units and values correctly, I used the package siunitx. Since I 
got a new notebook and now have LyX 2.3.7 (+MiTeX) instead of 2.3.5-1 (in 
addition to package updates) there is now an error about the incompatibility of 
the packages units and siunitx. The issue here is: I do not have the 
\usepackage{units} in my custom document preamble.

After some investigation I found out that LyX in nevertheless including the 
\usepackage{units}  in the LaTeX code (export -> LaTeX (pdflatex)). See code 
below.

Has anybody else experienced that issue? Recommendations for mitigation?

BTW: uninstalling the package from MikTeX and removing the "units" entries in 
.sty files in the LyX folder does not work :)

Thanks,
Julian

###############################
### For Reference - User specific LaTeX Preamble:
\usepackage{url}
\usepackage{breakurl}

% Package for correct format of number and unit
\usepackage{siunitx}

% COlor Package for use with ANS.1 definition
\usepackage{xcolor}


%%%
% [...] removed formatting commands
%%

%Set Path for graphics
\graphicspath{pics}

% TikZ Package for R graphics
%\usepackage{tikz} 

\usepackage{asn1}
\lstdefinelanguage{ASN1}
{
morekeywords=[1]{DEFINITIONS,AUTOMATIC,TAGS,BEGIN,END,%
SEQUENCE,OF,CHOICE,ENUMERATED,NULL,SIZE,OPTIONAL,%
OCTET,BIT,STRING,INTEGER,REAL,BOOLEAN,WITH,COMPONENTS},%
commentstyle=\itshape,%
morecomment=[l][\color{gray}]{--},%
morecomment=[n]{/*}{*/}
}

% Front part of the book
\frontmatter


#############################
### For Reference - the LaTeX export code:
\documentclass[a4paper,english,DIV=13,BCOR=10mm,toc=flat,listof=totoc]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\setcounter{tocdepth}{1}
\usepackage{babel}
\usepackage{units}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{nomencl}
% the following is useful when we have the old nomencl.sty package
\providecommand{\printnomenclature}{\printglossary}
\providecommand{\makenomenclature}{\makeglossary}
\makenomenclature
\usepackage[unicode=true,
 bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=2,
 breaklinks=false,pdfborder={0 0 
0},pdfborderstyle={},backref=false,colorlinks=false]
 {hyperref}
\hypersetup{pdftitle={ },
 pdfauthor={ },
 pdfsubject={ },
 pdfkeywords={}
}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth

%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\newenvironment{lyxcode}
        {\par\begin{list}{}{
                \setlength{\rightmargin}{\leftmargin}
                \setlength{\listparindent}{0pt}% needed for AMS classes
                \raggedright
                \setlength{\itemsep}{0pt}
                \setlength{\parsep}{0pt}
                \normalfont\ttfamily}%
         \item[]}
        {\end{list}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{url}
\usepackage{breakurl }
 --> Continue with the custom preamble
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users

Reply via email to