|
For example in jreport.cls (Japanese report style file), it originally looks like:
\newcommand{\section}{\@startsection{section}{1}{\z@}% {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}% {.5\Cvs \@plus.3\Cvs}% {\reset@font\Large\bfseries}} |
Here, {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs} adjusts the amount of space above a \section, and {.5\Cvs \@plus.3\Cvs} the amount of space below. The way to read them is
{A \@plusB \@minusC}: leave a space of A by default, at most A+B, at least A-C |
\Cvs is a space unit used for Japanese language which amounts to \baselineskip, i.e., the basic amount of vertical space between two lines. Other units can be used, for example 3ex or 0.3cm. For example, in report.cls, commonly used for western documents, the definition goes as
\newcommand\section{\@startsection {section}{1}{\z@}% {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% {\normalfont\Large\bfseries}}}} |
The sign in front of the units is related to indentation of the text that comes after the \section title: when it is negative, such as in -3.5ex, the following text is NOT indented. Personally, I used {2.5ex \@plus1ex \@minus.5ex} in my thesis. For journal or conference papers, looking at the default in the style files provided and starting from there should be a good strategy.
The amount of space around \subsection, etc., can be adjusted similarly.
This can be done by redefining, in the .cls file, the variables \abovedisplayskip and \belowdisplayskip. In general, these variables are originally defined in files like size10.clo,or size12.clo, depending on the font size (jsize12.clo, etc., for Japanese documents). For example, for 12 points fonts, you can change the original
\setlength\abovedisplayskip{12\p@ \@plus3\p@ \@minus7\p@} |
into
\setlength\abovedisplayskip{11\p@ \@plus3\p@ \@minus7\p@} |
by adding this last line into your .cls file.
Quite often, it looks like the space around an equation could be shrinked to make one or two more lines fit in a page, and yet Latex does not shrink that space (annoying, isn't it?). In this kind of situation, a potential solution is to change the values of the skips temporarily. It is indeed possible to adjust these values directly inside the .tex file, the only thing to be careful about is that the way units are written changes. By writing
{\setlength\abovedisplayskip{11pt plus 3pt minus 7pt} \setlength\belowdisplayskip{11pt plus 3pt minus 7pt} ... (Equation(s)) ... } |
the variables are redefined only inside the brackets {}.
In the same way, one can tweak \abovecaptionskip. For example, in table environments the caption usually comes above the table, but as by default no space is put below captions, the table is stuck to the caption. To avoid this, one can modify the .cls file in the following way:
\setlength\belowcaptionskip{5\p@} |
When using for example the align environment, equations can span several lines and become a huge block which Latex considers as unbreakable. When that block cannot fit into the current page, Latex puts on the next page, leaving massive blank spaces inbetween paragraphs in the current page (very ugly). The killer command in this kind of situations is:
{\allowdisplaybreaks ... \begin{align} ... \end{align} } |
This command can be used both globally and locally (within brackets {}). (I somewhat recommend the temporary one. This is still a hack, so it may be better to avoid it when it's unnecessary.)
The setspace package is here for you. For example, by putting
\RequirePackage{setspace} \setstretch{1.3} |
in the .sty file, the interline space in the text becomes 1.3 times \baselineskip, but captions stay in single interline space.
The \raggedbottom command must be hidden somewhere in your .sty or .cls file. When it is effective, all the extra amount of space in a page is gathered at the bottom of the page. When commenting out, the text of each page nicely comes up to the bottom of the page, but the space between paragraphs sometimes becomes very large, making some pages very ugly. The tricks given above for the adjustement of space around equations and titles of sections should then be used. When none of these work, one can try to add some extra \vspace as a last resort.
(eval-after-load gtex-modeh e(fset etex-font-lock-suscript eignore)) |
dvipdfmx -f msembed.map file.dvi |
f msembed.map |
On the Western fonts side, Times and Helvetica also often fail to be embedded. Following this page, the problem can be solved similarly with
dvipdfmx -f dlbase14.map file.dvi |
/.standardfonts [ % /Courier /Courier-Bold /Courier-Oblique /Courier-BoldOblique % /Helvetica /Helvetica-Bold /Helvetica-Oblique /Helvetica-BoldOblique % /Times-Roman /Times-Bold /Times-Italic /Times-BoldItalic % /Symbol /ZapfDingbats ] readonly def |
DICTIONARY: C:\meadow\packages\etc\ispell\US-xlg.hash ISPELL_DICTDIR: C:\meadow\packages\etc\ispell |