lib/review/layout.tex.erb in review-1.4.0 vs lib/review/layout.tex.erb in review-1.5.0
- old
+ new
@@ -4,10 +4,14 @@
\usepackage[dvipdfmx]{graphicx}
\usepackage{framed}
\usepackage{wrapfig}
\definecolor{shadecolor}{gray}{0.9}
\definecolor{shadecolorb}{gray}{0.1}
+\definecolor{reviewgreen}{rgb}{0,0.4,0}
+\definecolor{reviewblue}{rgb}{0.2,0.2,0.4}
+\definecolor{reviewred}{rgb}{0.7,0,0}
+\definecolor{reviewdarkred}{rgb}{0.3,0,0}
\usepackage[utf8]{inputenc}
\usepackage{ascmac}
\usepackage{float}
\usepackage{alltt}
\usepackage{amsmath}
@@ -40,10 +44,47 @@
\usepackage[dvipdfm,bookmarks=true,bookmarksnumbered=true,colorlinks=true,%
pdftitle={<%= values["booktitle"] %>},%
pdfauthor={<%= values["aut"] %>}]{hyperref}
+<% if config["highlight"] && config["highlight"]["latex"] == "listings" %>
+<% if config["language"] == "ja" %>
+\usepackage{listings,jlisting}
+<% else %>
+\usepackage{listings}
+<% end %>
+\renewcommand{\lstlistingname}{<%I18n.t("list")%>}
+\lstset{%
+ breaklines=true,%
+ breakautoindent=false,%
+ breakindent=0pt,%
+ fontadjust=true,%
+ backgroundcolor=\color{shadecolor},%
+ frame=single,%
+ framerule=0pt,%
+ basicstyle=\ttfamily\scriptsize,%
+ commentstyle=\color{reviewgreen},%
+ identifierstyle=\color{reviewblue},%
+ stringstyle=\color{reviewred},%
+ keywordstyle=\bfseries\color{reviewdarkred},%
+}
+\lstnewenvironment{reviewemlistlst}[1][]{%
+ \lstset{#1}}{}
+
+\lstnewenvironment{reviewemlistnumlst}[1][]{%
+ \lstset{numbers=left, #1}}{}
+
+\lstnewenvironment{reviewlistlst}[1][]{%
+ \lstset{#1}}{}
+
+\lstnewenvironment{reviewlistnumlst}[1][]{%
+ \lstset{numbers=left, #1}}{}
+
+\lstnewenvironment{reviewcmdlst}[1][]{%
+ \lstset{backgroundcolor=\color{white}, frameround=tttt, frame=trbl, #1}}{}
+<% end %>
+
\newenvironment{reviewimage}{%
\begin{figure}[H]
\begin{center}}{%
\end{center}
\end{figure}}
@@ -81,11 +122,11 @@
}{%
\end{framed}
\vspace{2zw}}
\newcommand{\reviewcolumnhead}[2]{%
-{\noindent\large ■コラム: #2}}
+{\noindent\large <%= I18n.t("column_head")%>: #2}}
\newcommand{\reviewtablecaption}[1]{%
\caption{#1}}
\newcommand{\reviewbackslash}[0]{%
@@ -105,25 +146,29 @@
\newcommand{\reviewboxcaption}[1]{%
\medskip{\small\noindent #1}\vspace*{-1.3zw}}
\newcommand{\reviewimageref}[2]{%
- 図 #1}
+ <%= I18n.t("image")%> #1}
\newcommand{\reviewtableref}[2]{%
- 表 #1}
+ <%= I18n.t("table")%> #1}
\newcommand{\reviewlistref}[1]{%
- リスト #1}
+ <%= I18n.t("list")%> #1}
\newcommand{\reviewbibref}[2]{%
#1}
\newcommand{\reviewcolumnref}[2]{%
- コラム #1}
+ <%= I18n.t("columnname")%> #1}
\newcommand{\reviewsecref}[2]{%
#1}
\newcommand{\reviewminicolumntitle}[1]{%
- {\large ■メモ:#1}\\}
+ {\large <%= I18n.t("memo_head")%>: #1}\\}
+<% if values["toctitle"].present? %>
+\renewcommand{\contentsname}{<%= values["toctitle"]%>}
+<% end %>
+
\newenvironment{reviewminicolumn}{%
\vspace{1.5zw}\begin{screen}}{%
\end{screen}\vspace{2zw}}
\newcommand{\reviewkw}[1]{%
@@ -160,10 +205,12 @@
\clearpage}
\newcommand{\reviewappendix}[0]{%
\appendix}
\makeatletter
+%% maxwidth is the original width if it is less than linewidth
+%% otherwise use linewidth (to make sure the graphics do not exceed the margin)
\def\maxwidth{%
\ifdim\Gin@nat@width>\linewidth
\linewidth
\else
\Gin@nat@width
@@ -201,10 +248,10 @@
\lineskip .75em
\begin{tabular}[t]{c}%
<%= authors %>
\end{tabular}\par}%
\vfill
- {\large <%= values["date"] %> 版\hspace{2zw}<%= values["prt"] %> 発行\par}%
+ {\large <%= values["date"] %> <%= I18n.t("version")%>\hspace{2zw}<%= I18n.t("published_by", values["prt"])%>\par}%
\vskip4zw\mbox{}
\end{center}%
\end{titlepage}
<% end %>
<% end %>