Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with the chapter number style in {oxforddown} #303

Closed
3 tasks done
bttomio opened this issue Apr 22, 2021 · 4 comments
Closed
3 tasks done

Problem with the chapter number style in {oxforddown} #303

bttomio opened this issue Apr 22, 2021 · 4 comments

Comments

@bttomio
Copy link

bttomio commented Apr 22, 2021

Hi,

When knitting the template {oxforddown} with tinytex_0.31.6, there is a bug the chapter number style.

This is the obtained style with my current session:

Screenshot from 2021-04-23 00-43-22

This is the expected result, showing a different style for the chapter number:

Screenshot from 2021-04-23 00-54-38

The expected result is obtained using TeX Live. I'm trying to debug it further (no clue so far, sorry). Thanks!

Session information:

R version 4.0.5 (2021-03-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.2 LTS, RStudio 1.4.1103

Locale:
  LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
  LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

Package version:
  base64enc_0.1.3   bookdown_0.22     compiler_4.0.5    digest_0.6.27     evaluate_0.14     glue_1.4.2       
  graphics_4.0.5    grDevices_4.0.5   highr_0.9         htmltools_0.5.1.1 jsonlite_1.7.2    knitr_1.32.9     
  magrittr_2.0.1    markdown_1.1      methods_4.0.5     mime_0.10         rlang_0.4.10      rmarkdown_2.7    
  stats_4.0.5       stringi_1.5.3     stringr_1.4.0     tinytex_0.31.6    tools_4.0.5       utils_4.0.5      
  xfun_0.22         yaml_2.2.1    

By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.org/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('tinytex'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('yihui/tinytex').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

@yihui
Copy link
Member

yihui commented Apr 23, 2021

I don't have time to figure out which package(s) caused the difference, but you may try to install these additional packages: tinytex:::install_yihui_pkgs()

@yihui
Copy link
Member

yihui commented Apr 23, 2021

At the moment I can only tell that below are the required packages that at least make the LaTeX compilation succeed after tinytex::install_tinytex():

pkgs1 = c("amsfonts", "amsmath", "appendix", "atbegshi", "atveryend", 
"auxhook", "babel", "babel-english", "babel-greek", "babel-latin", 
"biber", "biblatex", "bibtex", "bigintcalc", "bitset", "booktabs", 
"caption", "cbfonts-fd", "cm", "colortbl", "csquotes", "dehyph", 
"dvipdfmx", "dvips", "ec", "enumitem", "environ", "epstopdf-pkg", 
"eso-pic", "etex", "etexcmds", "etoolbox", "euenc", "everyshi", 
"fancyhdr", "fancyvrb", "filehook", "firstaid", "float", "fontspec", 
"framed", "geometry", "gettitlestring", "glyphlist", "graphics", 
"graphics-cfg", "graphics-def", "greek-fontenc", "grfext", "grffile", 
"helvetic", "hycolor", "hyperref", "hyph-utf8", "hyphen-base", 
"hyphen-greek", "hyphen-latin", "iftex", "inconsolata", "infwarerr", 
"intcalc", "knuth-lib", "kpathsea", "kvdefinekeys", "kvoptions", 
"kvsetkeys", "l3backend", "l3kernel", "l3packages", "latex", 
"latex-amsmath-dev", "latex-bin", "latex-fonts", "latex-tools-dev", 
"latexconfig", "latexmk", "letltxmacro", "lineno", "lm", "lm-math", 
"logreq", "ltxcmds", "lua-alt-getopt", "luahbtex", "lualatex-math", 
"lualibs", "luaotfload", "luatex", "makecell", "mdwtools", "metafont", 
"mfware", "microtype", "minitoc", "modes", "multirow", "natbib", 
"notoccite", "oberdiek", "pdfescape", "pdflscape", "pdfpages", 
"pdftex", "pdftexcmds", "plain", "quotchap", "refcount", "rerunfilecheck", 
"scheme-infraonly", "soul", "stringenc", "tabu", "tex", "tex-ini-files", 
"texlive-scripts", "texlive.infra", "threeparttable", "threeparttablex", 
"times", "tipa", "titlesec", "tocbibind", "tools", "trimspaces", 
"ulem", "unicode-data", "unicode-math", "uniquecounter", "units", 
"url", "varwidth", "wrapfig", "xcolor", "xetex", "xetexconfig", 
"xkeyval", "xunicode", "zapfding")

tinytex::tlmgr_install(pkgs1)

And these are the additional packages that can render the chapter numbers in the expected style:

pkgs2 = c("a4wide", "achemso", "adjustbox", "ae", "algorithmicx", "algorithms", 
"ametsoc", "amscls", "apacite", "babel-french", "bbm-macros", 
"beamer", "bookmark", "breakurl", "carlisle", "catoptions", "ccicons", 
"changepage", "charter", "chemgreek", "cite", "cleveref", "collectbox", 
"comment", "courier", "crop", "datetime", "dblfloatfix", "doclicense", 
"draftwatermark", "eepic", "endfloat", "endnotes", "epsf", "epstopdf", 
"esvect", "etex-pkg", "eurosym", "everysel", "expex", "extsizes", 
"floatflt", "floatrow", "fmtcount", "fontaxes", "footmisc", "forarray", 
"fp", "fpl", "hardwrap", "hyperxmp", "hyphen-french", "hyphenat", 
"ifmtarg", "jknapltx", "kastrup", "koma-script", "langsci", "lastpage", 
"lettrine", "lipsum", "listings", "ltxkeys", "ly1", "makecmds", 
"marginnote", "marvosym", "mathalpha", "mathpazo", "mathspec", 
"mathtools", "mdframed", "memoir", "metalogo", "mhchem", "minifp", 
"mnras", "morefloats", "moreverb", "ms", "mweights", "ncntrsbk", 
"needspace", "newfloat", "newtx", "ntgclass", "palatino", "paralist", 
"parskip", "pbox", "pdfsync", "pgf", "picinpar", "placeins", 
"polyglossia", "preprint", "preview", "psfrag", "psnfss", "ragged2e", 
"realscripts", "revtex4-1", "roboto", "rsfs", "sauerj", "sectsty", 
"seqsplit", "setspace", "sidecap", "siunitx", "soulutf8", "srcltx", 
"standalone", "stix", "stmaryrd", "sttools", "subfig", "subfigure", 
"symbol", "tabto-ltx", "tcolorbox", "tex-gyre", "textcase", "thmtools", 
"thumbpdf", "totcount", "totpages", "translator", "tufte-latex", 
"ucs", "upquote", "urlbst", "utopia", "vmargin", "vruler", "wallpaper", 
"xargs", "xifthen", "xltxtra", "xstring", "xwatermark", "xypic", 
"zapfchan", "zref")

tinytex::tlmgr_install(pkgs2)

But I don't know which packages in pkgs2 are needed to generate the expected style. You or someone will need to bisect them to figure it out (e.g., first tlmgr_remove() half of them, re-render the book, check the style, and remove the other half or half from the first half, and so on...).

@bttomio
Copy link
Author

bttomio commented Apr 23, 2021

Thank you very much for your help, @yihui. It's a very constructive answer, which helped me to learn a debugging technique. I wish I knew how to map the packages like that.

By bisecting the second package list (pkgs2), the specific package that generates the expected style is psnfss. This is intriguing for me, being aware of your solution for the problem related to the NFSS system in the oxforddown template. Are they related somehow? Previously, the document knitted perfectly after the manual installation of the package cbfonts-fd, as mentioned here.

@yihui
Copy link
Member

yihui commented Apr 23, 2021

Great work! I really appreciate it.

After looking at the LaTeX log for a while, I didn't find a clue that would tell me to automatically install psnfss. There is no error, and the warning messages are obscure to me.

An easy way to solve this problem is to bundle psnfss in the default TinyTeX distribution, since it seems to be one of the "required" packages: https://ctan.org/pkg/required The size of psnfss is about 440Kb. Not too big. Not too small. Perhaps I should just do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants