質問用フォーラムです。ご質問の前に質問のしかたをご覧ください。

pLaTeX2e / upLaTeX2e コミュニティ版 2017/10/28

- aminophen の投稿
pLaTeX2e 2017/10/28 と upLaTeX2e 2017/10/28u01 をリリースしました。
今回は以下の修正が入っています:

[1] LaTeX2e との互換性向上
* \ref の結果が英大文字の場合のスペースファクターを考慮
(従来は,例えば see Appendix A. の A. を \ref で取得した場合,
その後が文末空白にならなかった)
* \verb+ abc+ のように最初が半角空白の場合,それを行頭に書くと
空白が消滅していたのを修正
* \textbf などの書体変更命令で,その直前との間にイタリック補正が
入らなかったのを修正
[2] tabbing 環境の各行の最初の項目が始め括弧類などで始まる場合に
入っていた JFM グルーを抑制
[3] \inhibitglue の省略形命令 \< が段落頭(垂直モード)でも効くように改良

いつものように pLaTeX ニュースの PDF 版 (plnewsc*pdf) が
https://drive.google.com/folderview?id=0B6Eau41oUFv-V25oeUc1ckxvd2s&usp=sharing
にあります。今回のものは plnewsc08.pdf です。

ダウンロードして解凍したスタイルファイルが認識されない.

- 長島 隆廣 の投稿
新しくダウンロードして,解凍したスタイルファイルが認識されず,
LaTeXソース・ファイルがコンパイルできません.
PCは,Windows 10 を使用しております.以前,Windows 7 を使用していた時は,
プログラムの指定として,texmklsr を実行すれば使えましたが,
Windows 10 の場合は,それが出来ません.

Windows 10 の場合は,どうすれば,スタイルファイルが認識できるでしょうか?
ご指導を,よろしくお願いします.

natbib/setcitestyle での全角丸括弧の使用

- oxon oxon の投稿

natbib で setcitestyle を使用して、日本語文章中に現れる引用文献を全角の丸括弧で囲みたいと考えています。デフォルトの英文丸括弧では、日本語文章中に現れると美しくないためです。

しかしこれで PDF を出力すると、添付のように「)」と「。」の間を自動で詰めてくれません。この字間調整を考慮して natbib の設定をいじるには、どのようにすれば良いでしょうか。

\documentclass{jsbook}


article{Swordy2001,
  Author = {Swordy, S. P.},
 Journal = {Space Science Reviews},
 Pages = {85--94},
 Title = {The Energy Spectra and Anisotropies of Cosmic Rays},
 Volume = {99},
 Year = {2001},
}

コマンドラインでのコンパイルの方法について

- 大山 睦夫 の投稿
時々、思い出したようにお世話になっております。

最近、Go言語という言語でプログラムをすることになり、その出力がPDF
で必要となりました。
デバッグ中は、Go言語でつくった 拡張子 .tex のテキストファイルを 最新のMacOS-X へ 美文書7とそれに基づきインストールしたTeX環境で問題なく、PDFファイルを出力できました。

そして、いよいよデバッグも大詰めに成り、Go言語から子プロセスとして LaTeXを使い、PDFファイルを手に入れようとしているところです。

で、奥村さんの美文書7の P18 から始まる、「コマンドで LaTeXを起動」というところを参照して、コマンドラインからコンパイルに(手作業で)挑戦したのですが、

! LaTeX Error: This file needs format `pLaTeX2e'

but this is `LaTeX2e'.


というエラーが出て、先に進みません。


このエラーの対処方法としては、TeXshopなどの環境設定を変えるというアドバイスはすぐに見つかるのですが、コマンドラインの場合は、何をどのように変えたら良いのか、TeXの動いている環境をしっかり把握していない私には、例えば適当にPATHをいじったりするようなことは、怖くてできないのが実情です。


おそらく、判っている方には、簡単なことだと思いますが、アドバイスいただけないでしょうか。


ちなみに、コンパイルしたい ソースは、こんなふうになっています。


¥documentclass[11pt,landscape,a5paper,dvipdfmx]{jsarticle}

¥usepackage[margin=5mm]{geometry}

%¥usepackage{color}

%¥usepackage{otf}

¥usepackage{okumacro}

¥usepackage{tikz}

¥pagestyle{empty}

¥begin{document}

¥hspace{15mm}

¥usefont{T1}{lmtt}{m}{n}{¥selectfont SLITHERLINK} ¥hspace{20mm}★★★★★ ★★★

¥vspace{13mm}


¥begin{tikzpicture}[x=5.7mm, y=5.7mm]

¥useasboundingbox(-22mm,-11mm) rectangle (121mm,104mm);

¥draw[rounded corners=5pt,black!20] (-0.3,-0.3) rectangle (17+0.3,19+0.3);

¥foreach ¥x in {0,1,...,17} ¥foreach ¥y in {0,1,...,19} ¥fill[black!30] (¥x,¥y) circle(0.05);

¥draw (0.5,18.5) node {¥hbox{{¥fontsize{11.4}{11.4}¥usefont{T1}{lmtt}{m}{n}¥selectfont 3}}};

¥draw (2.5,18.5) node {¥hbox{{¥fontsize{11.4}{11.4}¥usefont{T1}{lmtt}{m}{n}¥selectfont 3}}};

%

% 略

%

¥draw (15.5,0.5) node {¥hbox{{¥fontsize{11.4}{11.4}¥usefont{T1}{lmtt}{m}{n}¥selectfont 2}}};

¥end{tikzpicture}

¥begin{flushright}

¥vspace{-8mm}

q19x17¥_186789¥_162.sq¥hspace{20mm} CMP TIME:236.59 ms ¥hspace{70mm} by m.o

¥end{flushright}

¥end{document}


よろしくお願いいたします。


コンパイルしてくれません。

- 宮沢 弘 の投稿
以下のソースファイルがどうしてもコンパイルしてくれません。

------------------------------------------------
\documentclass[a4,11pt]{article}
\usepackage{amsmath, amssymb}
\usepackage{latexsym}
%\usepackage{overcite}
\usepackage{amsthm}
\usepackage{color}
\begin{document}
I have a question in the text book written by Weinberg, In page 232, (page 316 in the Japanese translation version), there is a following description. \\

The spin representations, for which $A+B$ is half an odd integer, can similarly be constructed from the direct product of these tensor representations and the Dirac representation $(\frac{1}{2}, 0)\oplus(0, \frac{1}{2})$. For instance, taking the direct product of the vector $( \frac{1}{2}, \frac{1}{2})$ representation and the Dirac $(\frac{1}{2}, 0)\oplus(0, \frac{1}{2})$ representation gives a spinor-vector $\Psi^{\mu}$, that transforms according to the reducible representation
\[ ( \frac{1}{2}, \frac{1}{2})\otimes [(\frac{1}{2}, 0)\oplus(0, \frac{1}{2})]=(\frac{1}{2},1)\oplus(\frac{1}{2},0)\oplus(1,\frac{1}{2})\oplus(0, \frac{1}{2}). \]
\\

There are not definitions of $\oplus$ and $\otimes$ in the text book, so I can't understand above equation. If you know the definitions, let me know. If you don't know, please ask members of your laboratory.
------------------------------------------------
ログは
----------------------------------------------
This is e-pTeX, Version 3.14159265-p3.7.2-170924-2.6 (utf8.sjis) (TeX Live 2017/W32TeX) (preloaded format=platex)
restricted \write18 enabled.
entering extended mode
(./Diracrepresentation.tex
pLaTeX2e <2017/10/28>+2 (based on LaTeX2e <2017-04-15>)
Babel <3.15> and hyphenation patterns for 84 language(s) loaded.
(c:/w32tex/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(c:/w32tex/share/texmf-dist/tex/latex/base/size11.clo))
(c:/w32tex/share/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(c:/w32tex/share/texmf-dist/tex/latex/amsmath/amstext.sty
(c:/w32tex/share/texmf-dist/tex/latex/amsmath/amsgen.sty))
(c:/w32tex/share/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(c:/w32tex/share/texmf-dist/tex/latex/amsmath/amsopn.sty))
(c:/w32tex/share/texmf-dist/tex/latex/amsfonts/amssymb.sty
(c:/w32tex/share/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(c:/w32tex/share/texmf-dist/tex/latex/base/latexsym.sty)
(c:/w32tex/share/texmf-dist/tex/latex/amscls/amsthm.sty)
(c:/w32tex/share/texmf-dist/tex/latex/graphics/color.sty
(c:/w32tex/share/texmf-dist/tex/latex/graphics-cfg/color.cfg)
(c:/w32tex/share/texmf-dist/tex/latex/graphics-def/dvips.def)
(c:/w32tex/share/texmf-dist/tex/latex/graphics/dvipsnam.def))

LaTeX Warning: Unused global option(s):
[a4].

(./Diracrepresentation.aux)
(c:/w32tex/share/texmf-dist/tex/latex/amsfonts/umsa.fd)
(c:/w32tex/share/texmf-dist/tex/latex/amsfonts/umsb.fd)
(c:/w32tex/share/texmf-dist/tex/latex/base/ulasy.fd) [1]
(./Diracrepresentation.aux) )
Output written on Diracrepresentation.dvi (1 page, 2312 bytes).
SyncTeX written on Diracrepresentation.synctex.gz.
Transcript written on Diracrepresentation.log.
Diracrepresentation -> Diracrepresentation.pdf

dvipdfmx:fatal: Unable to open "Diracrepresentation.pdf".

Output file removed.
------------------------------------------------
と出ます。ログの読み方を知らないので、どう直せばよいのかわからないのです。
なお、TeXは
簡単LaTeXインストールwindows編(2016年4月版)をダウンロードして使っています。私のPCのOSはwindows8.1です。
どう直したいかというと、添付ファイルの中の1行立ての式の中括弧を削除したファイルを作りたいです。

どうすればよいでしょうか?

「仁丹の町名看板をよすがに京めぐり」第29,30回アップロード

- 藤田 の投稿

明けましておめでとうございます.
藤田です.

昨年末に,

「仁丹の町名看板をよすがに京めぐり」シリーズの

第29,30回をアップロードしました.

http://xymtex.com/kyomeguri/

第29回は,北は御池通,南は六角通,西は西洞院通,東は烏丸通に
囲まれた区画,
第30回は,北は六角通,南は四条通,西は西洞院通,東は烏丸通に
囲まれた区画を紹介しています.どちらも,祇園祭には山鉾が建つ
地域です.

これまで通り,LaTeX用に開発した,縦組和文プログラムを利用して
作成しています.

cleverefのcrefと全角カンマのスペースを狭めたい

- 石井 徹 の投稿

初めまして。
cleverefパッケージの\crefコマンド利用時のラベル間のスペースについてお尋ねしたい事があり投稿しました。

\crefコマンドを使って複数のラベルを参照し、ラベルの間をカンマで区切ろうとしています。この時、参照したラベルとカンマの間のスペースが広くなりすぎてしまいます。このスペースを\refコマンドのあとにカンマを打ったときと同じスペースにするにはどのようにすればよいのでしょうか。

次がLaTeXのソースファイルで、添付は出力結果です。

\documentclass[a4paper]{jsarticle}
\usepackage{cleveref}
\newcommand{\crefrangeconjunction}{--}
\newcommand{\crefpairconjunction}{,}
\newcommand{\crefmiddleconjunction}{--}
\newcommand{\creflastconjunction}{,}
\crefformat{enumi}{#2(#1)#3}
\crefrangeformat{enumi}{#3(#1)#4--#5(#2)#6}
\crefmultiformat{enumi}{#2(#1)#3}{,#2(#1)#3}{,#2(#1)#3}{,#2(#1)#3}
\begin{document}
\begin{enumerate}
 \item \texttt{\textbackslash cref}に\label{enum:1}
 \item 複数のラベルを指定すると\label{enum:2}
 \item スペースが\label{enum:3}
 \item 広くなりすぎてしまいます\label{enum:4}
\end{enumerate}
参照すると次のようになります。\\
\texttt{\textbackslash cref}(まとめて):\\
\cref{enum:1,enum:2,enum:4}\\
%
\texttt{\textbackslash cref}(個別に):\\
\cref{enum:1},\cref{enum:2},\cref{enum:4}\\
%
\texttt{\textbackslash ref}(期待出力):\\
(\ref{enum:1}),(\ref{enum:2}),(\ref{enum:4})
\end{document}
環境は次のとおりです。

OS: Windows 10 (64bit)
LaTeX環境: TexLive 2017
コンパイル手順:
  1. platex sample.tex
  2. platex sample.tex
  3. dvipdfmx sample.dvi

どうかご教示の程をよろしくお願いします。

参考文献リストの番号が横向きに。

- 匿 名 の投稿

Linux Mint 18.3 MATE 64bit で platex を利用させていただいております。

現在、縦書きの文書を作成中なのですが、

「参考文献」に付与される数字([1]など)が横向きになってしまいます。

どうすれば縦向きになるでしょうか。

ソースコードはこんな感じです。

ーーーここからーーー

\documentclass[a4j,12pt]{tarticle}
\usepackage{okumacro}
\begin{document}

\section{おわりに}

\begin{thebibliography}{99}
\item
奥村晴彦、黒木裕介『[改訂第6版]\LaTeXe 美文書作成入門』
(技術評論社、2013年)
\end{thebibliography}

\end{document}

ーーーここまでーーー

texstudioにおいてソースコードを自動整形する方法

- aoi taka の投稿
はじめまして
最近texstudioを使うようになり便利さに感動しております.

今回,題名の通りtexstudioにおいてリアルタイムまたは後から,
ソースコードのインデントを自動で整形する方法を探しております.

「LaTex -> 表の操作 -> 列を揃える」というのはやってみましたが,
align等の中身まですべて左端に寄せられてしまい,
逆に見にくくなってしまいました.

「列を揃える」の揃え方の設定または,まったく別の揃え方などを
教えていたければと思います.よろしくお願いします.

追記:
texstudio特有の機能などあまり知られていない便利な機能がありましたら
追加で教えて頂ければ幸いです.