(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 29 Sep 2020, 01:28
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
.sty files (Tex Programming) and input Options
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Thu 09 Jul 2020, 02:57    Post subject:  .sty files (Tex Programming) and input Options  

I was troubleshooting a texlive installation that was likely missing some files due to insufficient memory during installation (at least that's my working theory).

I got the following error:

Code:

No driver specified
You should make a default driver option in a file
graphics.cfg


Here, is the code that produces the error:

Code:

\if!\Gin@driver!
  \PackageError{graphics}
    {No driver specified}
    {You should make a default driver option in a file \MessageBreak
     graphics.cfg\MessageBreak
     eg: \protect\ExecuteOptions{textures}%
     }
\else
  \PackageInfo{graphics}{Driver file: \Gin@driver}
  \@ifundefined{ver@\Gin@driver}{\input{\Gin@driver}}{}
\fi

From lines 97 to 107 of:
/usr/local/texlive/2020/texmf-dist/tex/latex-dev/graphics/graphics.sty

The solution is to add the [drive] option as an input to the usepackage command as follows:
Code:

\usepackage[pdftex]{graphicx}


According to the following link one shouldn't need to do this:
https://latex.org/forum/viewtopic.php?t=21570
due to good auto-detection. I haven't tried to get autodetection to work. In some packages you can specify autdetect. For example:
Code:

\usepackage[driver=none]{geometry}

http://texdoc.net/texmf-dist/doc/latex/geometry/geometry.pdf

I notice that for the geometry pacakge the name of the driver is previxed with "driver=" but for the graphicx package using this (asignment style) prefix will break the latex document. What I don't understand is why we don't use this asignment style prefix in the graphicx package when specifying the driver. Some code from the graphicx package:

Code:

LN#65 \providecommand\Gin@driver{}
...
LN#72 \DeclareOption{pdftex}{\def\Gin@driver{pdftex.def}}


It seems that \DeclareOption must be an input option (like an argument) rather then some kind of select case control structure. I was originally thinking it was like select case so that when I pass driver=pdftex, we would select the case based on the value of the driver variable and return a configuration file for that driver (e.g. pdftex.def). However, this initial understanding was wrong and the option is an input argument rather than a branch in a case statement.

Since the notion for the geometry package is how I originally expected the graphicx package to work, I should look at how the coding differs. I'll probably paste this on a subsequent post.

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0367s ][ Queries: 11 (0.0149s) ][ GZIP on ]