Edit Links |
Examples /
ModernCVClassIssues
<< | Page list | >>
How to Correct a Few Flaws in the LyX Output Using the moderncv Class How to Correct a Few Flaws in the LyX Output Using the moderncv ClassAs of LyX version 1.5.2, LyX has a couple of problems generating correct PDF output for the popular moderncv document class [CTAN]. The first issue discussed below is easily fixed by a workaround; the second requires hacking the style file. These are both minor edits, but they correct noticeable flaws that affect the impression the CV will make. Table of contents (hide) 1. Formatting the header of the CVTwo minor issues related to the formatting of the CV header (name/title and address area). Both require hacking the style file, but are very easy. 1.1 Expanding the area in the upper right to accommodate more stuffIf you don't intend to put a photo in the upper right (as here: http://tug.ctan.org/macros/latex/contrib/moderncv/examples/template_classic_green.pdf), it's nice to use more of the white space at the top to include a web address or other information. For example, a long place name would get wrapped a lot using the standard style file, as shown here. The same thing would happen if you used a web address in this area. A simple change to one line of the style file ( Start by changing the name of the style file that you'll edit to something like
Using our example, you'll change it to this:
The name of the edited style file should correspond to " The edit to the style file will be on or around line 122, a line that reads like this:
Change it to this:
in order to add more space to the section on the right. Our example here. Notice that the name/title of the CV gets pushed around as well, and may not be satisfactory. A good fix requires one more edit to the style file (next). 1.2 Vertically centering the name/titleOn or around line 112 will be a line that reads like this:
Change it to this (same as above):
Our example here. This may not be entirely correct tinkering for the minipages (e.g., pdflatex generates an error about overflow), but it works. You get the idea if you need to tinker with it some more. How you generate the PDF from the TeX file and the edited style file will depend on your operating system. For Windows, it's as simple as having both files in the same directory, navigating to that directory from a command prompt, and typing:
Once the run completes, press the Up arrow and run the same command another three times in a row (you might only need 2, but do 3 for good measure). The PDF (and three files you don't necessarily need to keep) will be created in the same directory. Note: One may have to run the command "texhash" from the command line after editing the style file in order to have LyX find the newly named file. 2. ContributorsDavid Hewitt, Andreas Karlsson (ERT hack for #1), Liviu Andronic, Paul Rubin (explanation for #1), JPaul Rinehimer (hacks to the style file for #2) |