iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🖋

Kakenhi-LaTeX Tips for JSPS Research Fellowship Applications

に公開

This article is for Day 6 of the TeX & LaTeX Advent Calendar 2020. Yesterday's article was Leveraging LaTeX as a Form Generation Tool by doraTeX.

https://adventar.org/calendars/5111


I have compiled a collection of tips I used when writing an application for the JSPS Research Fellowship (commonly known as Gakushin) using "KakenhiLaTeX." You can read through this article from top to bottom and follow along, or use it as a reverse-lookup manual when you wonder, "Can I do something like this?"

I started writing about half of this article in May 2020 after finishing my DC1 application, but I had left it untouched since then. I managed to complete it just in time for the Advent Calendar. I hope it will be helpful for those applying from next year onwards.

What is KakenhiLaTeX?

Applying for a JSPS Research Fellowship (DC1, DC2, PD, etc.) requires an Application Content File (hereafter referred to as the application) created using a prescribed format. While the officially distributed files are only in Word and PDF formats, a LaTeX version is also officially introduced with a disclaimer stating it is not supported. That is "KakenhiLaTeX" which this article covers. Although the name contains "Kakenhi" (Grants-in-Aid for Scientific Research), templates are distributed for both Research Fellowships and Kakenhi applications.

http://osksn2.hep.sci.osaka-u.ac.jp/~taku/kakenhiLaTeX/

The article for Day 5 of the Advent Calendar introduced a form creation method of "using an existing PDF as a base and overlaying text on top." KakenhiLaTeX is also built on this policy, so the instructional text looks identical to the official JSPS templates. This makes it less likely for administrative staff at your institution to point out that the appearance looks off.

Why use KakenhiLaTeX?

In the Research Fellowship format, you are not allowed to change or add pages, so many applicants fill the space with text and figures without gaps. Trying to do this in Word requires difficult tasks such as fine-tuning page shifts and image placement.

A page from the author's application
A page from the author's application

Therefore, the benefits of using KakenhiLaTeX for Gakushin applications include:

  1. Reducing the effort spent on layout, allowing you to concentrate on the content.
  2. Using LaTeX features to insert and reference figures, tables, and references.
  3. If you manage the source files with Git, you can easily check corrected parts as diffs on GitHub after receiving feedback.

KakenhiLaTeX has been continuously maintained by Professor Taku Yamanaka of Osaka University since 2006. Let's create our applications while being grateful that we can use the latest formats comfortably.

Information Sources for KakenhiLaTeX

  • KakenhiLaTeX FAQ
    • Official collection of frequently asked questions. It is quite comprehensive, covering everything from tips to error handling.
  • Kakenhi Macro & LaTeX Bulletin Board
    • Issues found in the latest formats are sometimes discussed here.
    • Past logs are also useful, so try searching if you encounter any trouble.

Purpose of this Article

KakenhiLaTeX incorporates various techniques to support the unique formats of Gakushin applications. Furthermore, those filling them out often find themselves forced to write in ways different from their usual LaTeX usage for papers. Given this background, I have summarized the points I devised while preparing my own DC1 application as tips.

  • Since I will explain based on the DC format, some parts may differ from other KakenhiLaTeX formats such as PD.
  • If you find any mistakes, please let me know.

My Environment

  • LaTeX: TeXLive 2020
  • Editor: Visual Studio Code

Even if you write \subsection or \subsubsection to create a heading, it won't be displayed

From the 2021 edition of the format, heading commands (\subsection, \subsubsection) have become usable as the boxes for each item were removed. Therefore, this section contains old information. If you are interested, please see it from the toggle below.

Content written in 2020

Phenomenon

Many people would want to organize the structure of their text using LaTeX heading commands.

dc_03-04_preparation_etc.tex
\newcommand{\現在までの研究状況}{%
%begin  現在までの研究状況===================
  \section{This is a section}

  ↑This is a section

  \subsection{This is a subsection}

  ↑This is a subsection

  \subsubsection{This is a subsubsection}

  ↑This is a subsubsection

When you compile this, it looks like the following. For some reason, the section and subsection are not displayed, and only the subsubsection is reflected in the PDF.

section and subsection are not displayed
section and subsection are not displayed

Searching the template for the cause, I found this specification in forms/preamble.tex.

forms/preamble.tex
% Dummy section and subsection commands.
% With these, some editors (such as TeXShop, etc.) can jump to the (sub)sections.
\newcommand{\dummy}{dummy}%
\renewcommand{\section}[1]{\renewcommand{\dummy}{#1}}
\renewcommand{\subsection}[1]{\renewcommand{\dummy}{#1}}

In KakenhiLaTeX, \section and \subsection seem to be dummies for jumping to each section in the editor. While you could rewrite this part, I was a bit hesitant to modify the template itself. Furthermore, Professor Yamanaka himself stated in a bulletin board post that "one should not use section for the purpose of adjusting the appearance inside a box."

Solution

Therefore, I decided to define new heading commands for my own use in the preamble of dc.tex (this method was introduced on the bulletin board). By doing this, you can manage the appearance of headings in one place.
I did it as follows:

dc.tex
\usepackage{udline} % \ul command

\newcommand{\mysubsection}[1]{\noindent\subsection*{\textbf{\ul{#1}}}}
\newcommand{\mysubsubsection}[1]{\noindent\textbf{#1}}

As you can see from the content, I just removed the indentation and added bold text or underlines, so unfortunately, section numbers are not automatically attached. If you need numbers, it's easiest to add them yourself as follows:

dc_03-04_preparation_etc.tex
\newcommand{\現在までの研究状況}{%
%begin  現在までの研究状況===================
  \mysubsection{1. This is a mysubsection}

  ↑This is a mysubsection

  \mysubsubsection{1.1. This is a mysubsubsection}

  ↑This is a mysubsubsection

  \mysubsection{2. This is a mysubsection}

  ↑This is a mysubsection

  \mysubsubsection{2.1. This is a mysubsubsection}

  ↑This is a mysubsubsection

Display of mysubsection and mysubsubsection
Display of mysubsection and mysubsubsection

Another thing to note is that these custom heading commands are internally just paragraphs, not headings. Therefore, if you don't include an empty line, they will stick to the text below.
However, you can exploit (?) this behavior to purposely start the text without a line break after the heading when the text absolutely won't fit in the box (use this in moderation as it makes it harder to read).

dc_03-04_preparation_etc.tex
  \mysubsection{1. This is a mysubsection}

  ↑This is a mysubsection

  \mysubsection{2. This is a mysubsection}  ←This is a space-saving version of mysubsection

Saving space by purposely not inserting an empty line
Saving space by purposely not inserting an empty line

Shading headings

Many people who create applications in Word use shading to emphasize headings. In Gakushin documents, which are printed in grayscale and have limited space, this is an effective way to make headings stand out without using color or extra margins.

Since there is no direct command for shading in LaTeX, you need to assemble it yourself. There seem to be several ways, but here we use the method using the \colorbox command included in the color package.
Since declaring colorbox every time is tedious, it's recommended to define a command like \mysubsection and reuse it.

dc.tex
\usepackage{color}

\newcommand{\mysubsection}[1]{\subsection{\colorbox[gray]{0.8}{#1}}}

Shaded heading
Shaded heading

Headings can now be identified at a glance.

Using Circled Numbers

When you want to list things with numbers, you usually use numbered lists. However, since space is limited in Gakushin applications, you may sometimes be forced to list things within sentences using numbers (①, ②, ......).

The KakenhiLaTeX FAQ introduces the \textcircled command. While this can display the numbers, they often appear off-center within the circle.

Standard circled numbers
Standard circled numbers

Therefore, it is better to load the otf package and use the \ajMaru command as described in the second item of the FAQ.

dc.tex
\usepackage{otf}

Clean circled numbers
Clean circled numbers

Making Reference Numbers Continuous Across Multiple \thebibliography Environments

When mentioning related research in a Gakushin application, you must provide appropriate citations just as in a research paper.
Since the Gakushin form is divided into sections, there are several strategies for how to write citations.
I did the following:

  1. Manage references with numbers like [1], [2], ...... and list them together at the bottom of the section where they are first mentioned.
  2. Use continuous reference numbering across all sections (if you assign them per section, it causes confusion when you want to refer to a reference in another section).

Now, since the \thebibliography environment in LaTeX automatically assigns citation numbers with the \cite command, we definitely want to use it in Gakushin applications as well.

dc_03-04_preparation_etc.tex
  Therefore, I changed the research subject from the largest animal \underline{on Earth} to the largest animal \underline{on land}~\cite{teramura}.

  \begin{thebibliography}{99}
    \bibitem{teramura} Teruo Teramura, "Boku wa Osama - Zo no Tamago no Tamagoyaki".
  \end{thebibliography}

  This is a sentence for citing the second reference~\cite{teramura2}.

  \begin{thebibliography}{99}
    \bibitem{teramura2} Teruo Teramura 2, "Boku wa Osama 2 - Zo no Tamago no Tamagoyaki".
  \end{thebibliography}
%end  Current Research Situation ====================

However, if you write multiple \thebibliography environments, the numbering starts from 1 every time.

Reference numbers starting from 1 every time
Reference numbers starting from 1 every time

To solve this problem, mycc.sty is useful. This is a style file for when you want to use continuous numbering in list environments, published by Professor Numata of Shinshu University on his website.

http://math.shinshu-u.ac.jp/~nu/html/texmacros/mycc/

dc.tex
\usepackage{mycc}

After that, inserting \begin{myenumiv} after opening the \thebibliography environment and \end{myenumiv} before closing it will share the citation number counter.

dc_03-04_preparation_etc.tex
  Therefore, I changed the research subject from the largest animal \underline{on Earth} to the largest animal \underline{on land}~\cite{teramura}.

  \begin{thebibliography}{99}
    \begin{myenumiv}
      \bibitem{teramura} Teruo Teramura, "Boku wa Osama - Zo no Tamago no Tamagoyaki".
    \end{myenumiv}
  \end{thebibliography}

  This is a sentence for citing the second reference~\cite{teramura2}.

  \begin{thebibliography}{99}
    \begin{myenumiv}
      \bibitem{teramura2} Teruo Teramura 2, "Boku wa Osama 2 - Zo no Tamago no Tamagoyaki".
    \end{myenumiv}
  \end{thebibliography}
%end  Current Research Situation ====================

Reference numbers no longer overlap
Reference numbers no longer overlap

As the number of sections increases, nesting the environments every time is tedious, so it is also good to declare an environment like mythebibliography to make it easier to write.

dc.tex
\newenvironment{mythebibliography}{%
  \begin{thebibliography}{99}%
  \begin{myenumiv}%
}{%
  \end{myenumiv}%
  \end{thebibliography}%
}

Saving space in the \thebibliography environment

Before the \thebibliography environment, the word "References" is displayed. In a Gakushin application, every bit of empty space is valuable, so let's remove this. The method is simple: just set the \refname command to empty.

dc.tex
\renewcommand{\refname}{}

Use a different symbol when referring to your own achievements

In the application, you will list the applicant's major past achievements in the "Research Performance (Self-analysis of Research Performance from the 2021 application onwards)" section. While these are also numbered, using different symbols for related research and your own achievements helps prevent any potential misreading.

Current KakenhiLaTeX has a built-in custom command \KLcite for referencing research achievements. In its default state, it refers using [number], just like the \cite command. Therefore, referring to this blog, we can redefine \KLcite to refer to achievements with any symbol you like.

https://takehikom.hateblo.jp/entry/20131010/1381351482

dc.tex
\renewcommand{\KLcite}[1]{$^{\ref{#1})}$\,}
\newcommand{\KLciteii}[2]{$^{\ref{#1},~\ref{#2})}$\,}
\newcommand{\KLciteiii}[3]{$^{\ref{#1},~\ref{#2},~\ref{#3})}$\,}

Now, achievements are referred to with a superscripted number) (the superscript is just a personal preference and is not required).

\KLciteii and \KLciteiii are necessary when you want to list two or three achievements respectively. As Professor Yamanaka answered on the bulletin board, \KLcite only passes one argument to \ref and changes the format; it does not have the functionality to list multiple items.

Formatting the numbered list for research achievements

A command called \KLbibitem is provided for lists of research achievements. However, this command is not a substitute for the \item command in itemize or enumerate environments. Since usage examples are not included in the sample files, it seems that modern templates do not expect the use of \KLbibitem as-is.

Therefore, let's modify and use \KLbibitem to improve the appearance of your achievements list. In the example below, the command implementation is copied from forms/kakenhi6.sty, with only the 5th line modified.

dc.tex
\makeatletter
  \renewcommand{\KLbibitem}[1]{%
    \stepcounter{KLBibCounter}%
    \let \@currentlabel \theKLBibCounter
    \item[\arabic{KLBibCounter})]\label{#1}%
  }
\makeatother

With this command, \item displays the literature number (KLBibCounter) and passes the argument to \label to enable referencing via \KLcite. The label format is specified as number) to match the achievement numbering format mentioned earlier.

To use it, simply replace \item with \KLbibitem{label}. Since it uses a unique counter, it's also nice that it provides continuous numbering across multiple lists without having to use mycc.sty.

dc_08_publications.tex
\begin{enumerate}
  \KLbibitem{yukawa2003} R.~Kipling, \underline{H. Yukawa},
      ``The Elephant's Child (Why the Elephant's Trunk is Long)'',
      Nature, {\bf 999}, 777-779, (2003).
\end{enumerate}

Example used in the sample "Research Performance" section
Example used in the sample "Research Performance" section (Note: This is the format up to the 2020 application)

Save as much space as possible in the list of achievements

The default list environment has a bit too much space. Let's adjust the layout using the enumitem package, which allows you to flexibly configure the appearance of list environments.

http://konoyonohana.blog.fc2.com/blog-entry-58.html

dc.tex
\usepackage{enumitem}

If you don't use the enumerate environment anywhere else besides the achievements list, you can change the global format with the \setlist command. I configured it as follows. I minimized the top and left margins as much as possible and set the spacing between items to 0.

dc.tex
\setlist[enumerate]{leftmargin=5truemm,noitemsep,topsep=3pt}

Example of adjusted format for the enumerate environment
Example of adjusted format for the enumerate environment (Note: This is the format up to the 2020 application)

It looks like many achievements will fit.

Note that if you would be troubled by all enumerate environments changing, you can avoid this by using the description environment for the achievements list instead. The description environment has bold labels by default, so if you dislike that, specify font=\normalfont additionally.

dc.tex
\setlist[description]{font=\normalfont,leftmargin=5truemm,noitemsep,topsep=3pt}

Automatically convert PDF to grayscale

JSPS applications (and Kakenhi documents as well) are printed in grayscale during the review process. Therefore, it is important to finish the application such that figures and tables remain legible even in grayscale.

To check the appearance in grayscale, methods such as converting to grayscale in a PDF viewer or actually printing in grayscale are naturally options. However, if you automatically convert the PDF compiled by LaTeX into grayscale, these tasks become unnecessary.

Here, I will introduce a method to convert to grayscale by calling Ghostscript via the callback function of latexmk. latexmk allows you to execute additional commands after a successful compilation by writing $success_cmd = 'command'; in your .latexmkrc (there are also $failure_cmd and others for when compilation fails).

https://tex.stackexchange.com/questions/291204/latexmk-how-to-use-compiling-cmd-success-cmd-failure-cmd

.latexmkrc
$success_cmd  = "gs -q -r600 -dNOPAUSE -sDEVICE=pdfwrite -o %A_gray.pdf
                 -dPDFSETTINGS=/prepress -dOverrideICC -sProcessColorModel=DeviceGray
                 -sColorConversionStrategy=Gray -sColorConversionStrategyForImage=Gray
                 -dGrayImageResolution=600 -dMonoImageResolution=600
                 -dColorImageResolution=600 %D";

Now, for example, after dc.tex is compiled and dc.pdf is created, a grayscale version will be created as dc_gray.pdf. Using this file for submission should be foolproof.

Grayscale PDF created
Grayscale PDF created


Tomorrow's article for the TeX & LaTeX Advent Calendar 2020 is "Using planetary symbols nicely in LaTeX formulas" by CareleSmith9.

GitHubで編集を提案

Discussion