Paul Johnson Ben Kite 04-14-2015 Making sure MikTeX and LyX work well together on windows. Problem: MikTeX defaults to a minimal install. LyX requires many additional MikTeX packages. When LyX asks for packages, they are installed in the individual user's account, in the directory C:\Users\username\AppData\Roaming\MiKTeX\2.9\tex\latex >dir When a user runs LyX for the first time, we can monitor that directory to see what packages are installed. We did that on 2015-04-11, and these packages were installed in the account of user "b087k169" >dir Directory of C:\Users\b087k169\AppData\Roaming\MiKTeX\2.9\tex\latex 04/14/2015 10:57 AM . 04/14/2015 10:57 AM .. 04/14/2015 10:46 AM aastex 04/14/2015 10:46 AM achemso 04/14/2015 10:47 AM aguplus 04/14/2015 10:52 AM algorithms 04/14/2015 10:47 AM apa 04/14/2015 10:47 AM apacite 04/14/2015 10:52 AM arabi 04/14/2015 10:47 AM arabtex 04/14/2015 10:55 AM arydshln 04/14/2015 10:56 AM ascii 04/14/2015 10:53 AM base 04/14/2015 10:57 AM bbding 04/14/2015 10:47 AM beamer 04/14/2015 10:55 AM bera 04/14/2015 10:52 AM bezos 04/14/2015 10:52 AM bibtopic 04/14/2015 10:52 AM booktabs 04/14/2015 10:52 AM braille 04/14/2015 10:55 AM braket 04/14/2015 10:52 AM breakurl 04/14/2015 10:55 AM cancel 04/14/2015 10:46 AM caption 04/14/2015 10:55 AM ccfonts 04/14/2015 10:51 AM changepage 04/14/2015 10:51 AM cite 04/14/2015 10:52 AM cjk 04/14/2015 10:46 AM cleveref 04/14/2015 10:55 AM cmbright 04/14/2015 10:55 AM colortbl 04/14/2015 10:52 AM covington 04/14/2015 10:53 AM csquotes 04/14/2015 10:48 AM ctex 04/14/2015 10:53 AM cyrillic 04/14/2015 10:48 AM dinbrief 04/14/2015 10:48 AM dtk 04/14/2015 10:55 AM eco 04/14/2015 10:49 AM elsarticle 04/14/2015 10:49 AM elsevier 04/14/2015 10:47 AM endfloat 04/14/2015 10:47 AM endnotes 04/14/2015 10:50 AM enumitem 04/14/2015 10:48 AM epsf 04/14/2015 10:53 AM esint 04/14/2015 10:53 AM eso-pic 04/14/2015 10:49 AM europecv 04/14/2015 10:49 AM extsizes 04/14/2015 10:53 AM fancybox 04/14/2015 10:48 AM fancyhdr 04/14/2015 10:49 AM fancyvrb 04/14/2015 10:55 AM feyn 04/14/2015 10:48 AM filecontents 04/14/2015 10:51 AM footmisc 04/14/2015 10:56 AM fourier 04/14/2015 10:53 AM framed 04/14/2015 10:49 AM frletter 04/14/2015 10:49 AM g-brief 04/14/2015 10:53 AM greek-inputenc 04/14/2015 10:46 AM harvard 04/14/2015 10:53 AM hyphenat 04/14/2015 10:46 AM ieeetran 04/14/2015 10:51 AM ifmtarg 04/14/2015 10:57 AM ifsym 04/14/2015 10:53 AM jurabib 04/14/2015 10:49 AM kluwer 04/14/2015 10:51 AM koma-script 04/14/2015 10:45 AM l3kernel 04/14/2015 10:46 AM l3packages 04/14/2015 10:48 AM lastpage 04/14/2015 10:50 AM lettre 04/14/2015 10:53 AM lettrine 04/14/2015 10:47 AM lineno 04/14/2015 10:53 AM ltfonts 04/14/2015 10:56 AM luxi 04/14/2015 10:55 AM marginnote 04/14/2015 10:50 AM marvosym 04/14/2015 10:47 AM mciteplus 04/14/2015 10:50 AM memoir 04/14/2015 10:53 AM mhchem 04/14/2015 10:51 AM microtype 04/14/2015 10:50 AM moderncv 04/14/2015 10:54 AM mongolian-babel 04/14/2015 10:49 AM ms 04/14/2015 10:50 AM mwcls 04/14/2015 10:46 AM natbib 04/14/2015 10:54 AM nomencl 04/14/2015 10:50 AM paper 04/14/2015 10:51 AM paralist 04/14/2015 10:54 AM pdfpages 04/14/2015 10:48 AM pgf 04/14/2015 10:55 AM picinpar 04/14/2015 10:52 AM placeins 04/14/2015 10:54 AM polyglossia 04/14/2015 10:50 AM powerdot 04/14/2015 10:54 AM prettyref 04/14/2015 10:54 AM preview 04/14/2015 10:50 AM pst-grad 04/14/2015 10:48 AM pst-node 04/14/2015 10:54 AM refstyle 04/14/2015 10:51 AM revtex4 04/14/2015 10:49 AM rotating 04/14/2015 10:54 AM rotfloat 04/14/2015 10:51 AM sauerj 04/14/2015 10:48 AM savesym 04/14/2015 10:51 AM seminar 04/14/2015 10:55 AM sidecap 04/14/2015 10:51 AM simplecv 04/14/2015 10:48 AM skak 04/14/2015 10:54 AM soul 04/14/2015 10:51 AM spie 04/14/2015 10:54 AM splitindex 04/14/2015 10:47 AM sttools 04/14/2015 10:54 AM subfig 04/14/2015 10:52 AM textcase 04/14/2015 10:57 AM textgreek 04/14/2015 10:56 AM tipa 04/14/2015 10:52 AM titlesec 04/14/2015 10:51 AM tufte-latex 04/14/2015 10:50 AM tugboat 04/14/2015 10:54 AM turkmen 04/14/2015 10:47 AM txfonts 04/14/2015 10:51 AM type1cm 04/14/2015 10:49 AM ucs 04/14/2015 10:49 AM ulem 04/14/2015 10:54 AM undertilde 04/14/2015 10:54 AM units 04/14/2015 10:49 AM upquote 04/14/2015 10:57 AM wasysym 04/14/2015 10:54 AM wrapfig 04/14/2015 10:55 AM xargs 04/14/2015 10:48 AM xcolor 04/14/2015 10:52 AM xifthen 04/14/2015 10:56 AM zhmetrics Problem: If 10 users run LyX, then there are 10 sets of MikTeX packages scattered about in the computer. Solution 1: As the administrator, make sure those same packages are installed in C:\Program Files\MiKTeK 2.9\tex\latex It is possible that simply running LyX as an administrator will cause those packages to be downloaded and installed there. We believe we have observed it happen that way on some occasions, but not always. Solution 2: manually copy the package directories from the user's AppData/Roaming folder and drop them into the MikTeX location under "Program Files". It is vital next to update the MikTeX database (equivalent of running texhash or mktexslr in Unix). This is done by going to the start menu, Choosing MikTeX, then Settings (Admin). On the top right there is a button called "Refresh FNDB". FNDB = File Name Data Base. Run that, all should be well. While you are on the Settings (Admin) pane, please check for the default paper size. It may be set for the European standard A4 and we wish it would be letter size in the USA. After that, when a user runs LyX for the first time, his/her user account will not fill up with fresh package downloads. Users who have used LyX in the past will find their sessions do not "know" about the system-wide packages that have been installed. They have to tell LyX to go look for them. That is done by starting LyX and running Tools | Reconfigure. Problem: Every time any user runs LyX and a package is required, we notice either of 2 difficulties. Sometimes packages accumulate in the individual accounts of the users. If some user is ambitious, there may be as much as 2GB of package data accumulated. Ideally, we wish that would migrate into the system package collection, but this appears to be labor intensive for system administrators. Sometimes users are refused the right to install new packages and a system administrator's intervention is required. We have not yet deduced the pattern for this latter problem. Here is the important part I am trying to get fixed before our workshop on Saturday, April 18, 2015. Problem: The KU LaTeX Thesis template prepared by CRMDA includes some components that need to be installed system-wide, or else users are bothered by a lot of noise. There are 2 things that need installation. One is a LyX layout file, the other is a LaTeX class file. If you can log in as an administrator, this is the solution. Download the "KU-thesis-20130520.zip" folder from http://pj.freefaculty.org/guides/Computing-HOWTO/, unzip the folder. A. Install the layout. Go to KU-thesis-20130520\stylefiles, find the kuthesis.layout file. A copy of that file needs to be placed in "Program Files\LyX\Resources\layouts". (Find wherever LyX is installed, possibly in "Program Files (x86)" or whatnot). B. Install the LaTeX class file. Next find the kuthesis.cls file in the KU-thesis-20130520 folder. Place the .cls file in Program Files\MiKTeK 2.9\tex\latex\local (if the local folder does not exist, create it) C. Update FNDB. Now MiKTeX needs to be updated. Click the start button, all programs, and find MiKTeX 2.9. Select "Maintenance (Admin)", then select "Settings (Admin)". Click on "Refresh FNDB", then ensure that the paper format is set to "Letter", click "Apply" then "OK". The administrative work is done, however, we have this problem: People who have run LyX before will not know about the new files installed. Hence it would be wise to D. Warn the users that they need to reconfigure LyX. To monitor this, a user can proceed as follows. Open Lyx, select "View" on the toolbar, then select "View Messages". This will allow one to see what LyX is doing while it reconfigures. Click on "Tools" on the toolbar, then select "Reconfigure". Once LyX is done reconfiguring you should get a message telling you that the system has been reconfigured and you need to restart LyX. Click "OK", close LyX. Now check to see if it worked. Go to the KU-thesis-20130520 folder and open the "thesis-ku.lyx" file. If you get any error message upon opening, something is wrong. Click on the eyeballs towards the top left of the window, then see if the document compiles to a pdf. If it does without error, then you were successful.