Skip to content
This repository has been archived by the owner on Jun 8, 2018. It is now read-only.

Installing #7

Closed
jamesray1 opened this issue Jan 30, 2018 · 10 comments
Closed

Installing #7

jamesray1 opened this issue Jan 30, 2018 · 10 comments

Comments

@jamesray1
Copy link

Is it sufficient to just add ocgx2.sty to the same directory as the .tex file, for most intents and purposes?

@jamesray1
Copy link
Author

jamesray1 commented Jan 30, 2018

Unfortunately it seems that it isn't.

After adding the file I get another Travis build error:
https://travis-ci.org/ethereum/yellowpaper/builds/335012552?utm_source=github_status&utm_medium=notification

$ ./build.sh
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
...
(./ocgx2.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3names.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3bootstrap.sty))
(/usr/share/texlive/texmf-dist/tex/latex/etex-pkg/etex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3basics.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3expan.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3tl.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3seq.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3int.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3quark.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3prg.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3clist.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3token.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3prop.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3msg.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3file.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3skip.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3keys.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3fp.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3box.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3coffins.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3color.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3luatex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3candidates.sty)))
(/usr/share/texlive/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty)
! Undefined control sequence.
l.151 \sys_if_engine_xetex:T
                            {
!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on Paper.log.

@jamesray1
Copy link
Author

Ah I see that ocgx2.sty has \RequirePackage{ocgbase}.

@jamesray1
Copy link
Author

After adding ocgx2.sty and ocgbase.sty, I'm still getting an error:

! Undefined control sequence.
l.151 \sys_if_engine_xetex:T
                            {
!  ==> Fatal error occurred, no output PDF file produced!

@jamesray1
Copy link
Author

Using texlive texlive-latex3 and texlive-latex-extra on Trusty.

@jamesray1
Copy link
Author

It's using pdfTeX as shown in this build output.

@jamesray1
Copy link
Author

jamesray1 commented Jan 30, 2018

I found this:

latex3/latex3@d230e78#diff-ec781ddf43396a57dd5e8997241927c7R288

There are other results for \sys_if_engine_xetex:T on that page, but that one looks like it is the most relevant with the gset option.

This is the latest version:
https://github.com/latex3/latex3/blob/master/l3trial/l3benchmark/l3benchmark.dtx

There are 5 results for \sys_if_engine_xetex:T in that latest version, and https://github.com/latex3/latex3/blob/master/l3trial/l3benchmark/l3benchmark.dtx#L301 uses gset.

I don't know why you're using \bool_gset_true:N\g_ocgxii_dvipdfmx_bool, nor do I understand lines 301–312, and don't have the time to learn at the moment, so I'll give you some time to figure out how to solve this.

@jamesray1
Copy link
Author

In your file:

%process package options
\ProcessKeysOptions{ocgx2}
\sys_if_engine_xetex:T{
  \bool_gset_true:N\g_ocgxii_dvipdfmx_bool
  %we use the period `.' from this downscaled font at the end of ocgcolorlinks,
  %preventing empty links from flooding the page with link color
  \font\g_ocgxii_lmroman_tl="[lmroman5-regular.otf]"~scaled~1
}

@agrahn
Copy link
Owner

agrahn commented Jan 30, 2018

Well, LaTeX packages may depend on other packages and even more, they may require a minimum version of such a dependency. Instead of using an old frozen or split up TeX distro as they are usually provided by Linux distributions such as Ubuntu (TL-2013, see above), it is much safer to download the current vanilla TeXLive distribution from CTAN and to install it into the $HOME directory. This spares you a lot of time and frustration trying to figure out manually the dependencies required. I did the same. From time to time I run the TL package manager (tlmgr update --all --self) to update installed packages and get new ones as they appear on CTAN. Most package authors, and this sounds quite natural to me, test their developments against the current package versions, available on CTAN/TeXLive, if they depend on those.

@agrahn agrahn closed this as completed Jan 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants