FrankMittelbach / fmitex-unicodefonttable

A flexible font table generator for Unicode-encoded fonts
3 stars 0 forks source link

How to use unicodefonttable in a TUGBoat article? #7

Closed jsbien closed 1 year ago

jsbien commented 1 year ago

With the standard template I get ERROR: Package longtable Error: longtable not in 1-column mode. even if embedded in figure* environment. On the other hand the single-column template used to typeset the unicodefonttable gives a lot of strange errors for me.

FrankMittelbach commented 1 year ago

longtable want to be typeset in onecolumn and it doesn't recognize that figure* makes that box one-column (which is kind of hard for it because the figure* behavior differs depending on the number of columns).

Given that the tables are wide, one solution is to use \onecolumn or make the whole artile on-column with \documentclass[onecolumn]{ltugboat}.

Or use the two lines shown below (which may end up in a future version of unicodetable.

\documentclass
%   [onecolumn]      %<--- either typeset in one column or add the hook settings below (or both)
   {ltugboat}

% ------- fix for longtable wanting one column (might move into unicodefonttable)
\AddToHook{cmd/displayfonttable/before}{\begingroup\UseName{@twocolumnfalse}}  
\AddToHook{cmd/displayfonttable/after}{\endgroup}
% ------- fix for longtable wanting one column (might move into unicodefonttable)

\usepackage{kantlipsum}

\usepackage{fontspec}

\setmainfont{Linux Biolinum O}

\usepackage{unicodefonttable}

\begin{document}

\kant[1] Ref figure \ref{fig}.

\begin{figure*}
\displayfonttable
 [range-start=F0000,range-end=F005F,
                   nostatistics,noheader,hex-digits=block]
                 {JunicodeTwoBeta-Regular.ttf}
\caption{foo}\label{fig}
\end{figure*}

\kant[2-10]

\end{document}
jsbien commented 1 year ago

Thanks! Unfortunately there are some problems. One is the bad content of the table, I made a separate issue for it. The seocnd is that I still get the error message ongtable not in 1-column mode.

FrankMittelbach commented 1 year ago

The use in table* is supported in the next release.

jsbien commented 1 year ago

Thanks!