Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

column中のtableがpdfに出てこない #222

Closed
yanzm opened this issue Dec 29, 2013 · 4 comments
Closed

column中のtableがpdfに出てこない #222

yanzm opened this issue Dec 29, 2013 · 4 comments

Comments

@yanzm
Copy link

yanzm commented Dec 29, 2013

===[column] Hoge

...

//table[my_table][Fuga]{
テーマ               色         透明度
---------------------------------------
Theme.Holo          #333333     60%
Theme.Holo.Light    #FFFFFF     80%
//}

===[/column]

をPDFにすると、tableが出てきません。
columnの外に出すと出てきます。

review-pdfmaker では、次のようなエラーが出ています。

! LaTeX Error: Not in outer par mode.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...                                              

l.99 \begin{table}[h]

? 
! Undefined control sequence.
\@float@Hx ...ltovf \fi \global \setbox \@currbox 
                                                 \color@vbox \normalcolor \...
l.99 \begin{table}[h]

? 
! Missing number, treated as zero.
<to be read again> 
                  \vbox 
l.99 \begin{table}[h]

?
@takahashim
Copy link
Collaborator

これはLaTeX側の問題で、現状だとちょっとReVIEWの指定だけでは修正しづらくなってしまってますね…すみません。

文書のあるディレクトリにreview-ext.rbというファイルを置いて、以下の内容を書いてみてもらえますか?

module ReVIEW
  class LATEXBuilder
    def table_header(id, caption)
      if caption.present?
        @table_caption = true
        puts '\begin{table}[H]'
        puts macro('reviewtablecaption', compile_inline(caption))
      end
      puts macro('label', table_label(id))
    end
  end
end

ただ、この記述を追加すると、全文書中の表の位置がページの上下に移動したりせず、必ず記述した位置に置かれるようになります。そのため、他のページの表の位置がずれてしまうことがあります(とはいえ、HTML/EPUBと比べるとより同じような出力結果になるので、これはこれで好都合かもしれません)。

@kdmsnr
Copy link
Collaborator

kdmsnr commented Mar 28, 2014

これって、デフォルトで [H] にするとダメなんですっけ。

@munepi
Copy link
Contributor

munepi commented Oct 25, 2017

(Re:VIEW Meeting 2017 Autumnに向けて、)

//column のブロック要素をLaTeX側において何で実装しているかに依りますけれども、
//column に対応するブロック要素のLaTeX側実装で、こちらに対処すべきだと思います。

それから、この強制位置固定 [H] について。
LaTeXのフロート位置指定 [H] は、現状、標準的に利用可能なパッケージとして、 float.sty を利用することになります(昔は、here.styでした)。ところが、この float.sty は、余計なお節介をたくさんやってくれますので、単なる 強制位置固定の [H] だけを利用するには、このfloat.styは、無駄に大きすぎるパッケージとなります。

一方、大昔の here.sty の [H] は確かに必要な機能だけがありますけれども、(とくに商業利用する上で、)強制位置固定をした図表の前後アキと各種見出しやブロック要素とのアキ詰め処理をするには、このhere.styは非力すぎます。
ひとまず、jclasses, jsclasses系の汎用クラスファイルで強制位置固定 [H] を簡単に使う分には、 here.sty 程度で十分だと思いますので、これらの汎用クラスファイルに対しては、簡易的な [H] をどこかに定義しておけば十分だと思います。

また、 [H] の実装に依りますが、版面の上部にちょうど [H] の図表がきたときに、前アキを除けるのが良いですけれども、実装次第でそうなっていません。

それゆえ、実際には、利用する特定のクラスファイルごとに、 [H] が実装されていて、 [H] を調整するのが望ましいように思います。

@kmuto
Copy link
Owner

kmuto commented Sep 24, 2018

今のところは #1095 で入れたfloat+Hで対処済みということにしておきます。

@kmuto kmuto closed this as completed Sep 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants