« first day (3602 days earlier)      last day (1334 days later) » 

12:56 AM
Hello. I was wondering if I could interact with a LaTeX expert here. I have to follow a template, but my text in one box is a bit longer and it disappears on the end of the first page. The template is built made from boxes, I think. I tried to move the commands around, but this did not work.
Everything is hidden in a .sty file.
As it is so long, I don't even know really how to make a minimum example with a .sty.
 
 
6 hours later…
6:45 AM
@AlanMunn :)
 
7:16 AM
@Anush start shameless self-promotion have you checked circledsteps.sty? mirror.las.iastate.edu/tex-archive/macros/latex/contrib/… ? end plug
Although probably it doesn't fit, now that I see the question on topanswers
 
7:48 AM
@Rmano thanks! Could you add an answer on top answers?
 
@Anush I'll try, but got no time now... you know, the pesky employers that want you to do real work...
 
8:29 AM
@AlanMunn The window is a bit bigger than 30 seconds, to account for clock drift and the user's tardiness in typing in the number. But it is surely a few minutes at most.
 
9:27 AM
@Rmano swines :)
 
cis
@Skillmonlikestopanswers.xyz Don't be so bureaucratic. Whom it concerned knew it, based on the previous discussion.
 
10:17 AM
I noticed earlier that my patches for the Libertinus math font don't work with TL2020. I finally got around to investigate. Looking at the data provided by the luaotfload.patch_font callback, I see some differences from TL2019, when applied to the LibertinusMath-Regular font: nomath has changed from false to true, and the two tables MathConstants and mathparameters are gone. Does anyone know why? (Most likely @UlrikeFischer)
 
cis
@VincentMiaEdieVerheyen
I added a very small cosmetic correction "vcenter" to the "Thumbnails" in the 2nd table.
% arara: pdflatex
% arara: pdflatex
% arara: pdflatex
% arara: ghostscript: {  resolution: 166  , device: png16m, allpages: true}

\begin{filecontents*}[overwrite]{\jobname-data.txt}
Object Date     North  East  Wight Vol  Dens   ImageLeft  ImageRight
1        2020.08  51.2   49.1  55    120    0.65   name1         name2
2        2020.09  61.2   59.1  66    121    0.75   name3         name4
3        2020.11  71.2   69.1  77    122    0.65   name5         name6
4        2020.08  81.2   79.1  56    120    0.65   name7         name8
 
@AlanMunn unless...
user image
5
@AlanMunn ^^ this could be your token generator. :)
 
@HaraldHanche-Olsen more likely @MarcelKrüger ;-). There were some changes in math, to avoid problems with incomplete math table. At best show an example.
 
cis
10:33 AM
@DavidCarlisle Yes that is true. I actually wanted to put my problem in as a normal table yesterday - because that wasn't a pgfplotstable problem in itself.
Then I didn't do it.

However, it is amazing that centering table cells vertically appears to be a non-trivial problem.
 
10:45 AM
@cis centering vertically is generally more difficult than horizontal centering, as boxes have horizontally only a width, but vertically a height and a depth. And there is more than one line along which you could define "center": the baseline, the math axis, the half of "height+depth" of the largest box. "center" has not an exact definition here.
2
 
@UlrikeFischer See xbox :)
 
@cis another reason to not do it. It is fine to ask for help, but asking for help to get help to get help is a bit over the top, don't you think?
 
@cis vertical centering of text is almost never wanted though and vertical centering of images is trivial once you add the valign=c key to includegraphics, then you have the centre of the image on the baseline of the text and normally that's enough, so no special table code is required.
 
@UlrikeFischer At least, you know enough to name names. ;-) Thanks, I'll wait and see if he speaks up. And I'll dig around and see if I can find any relevant docs.
 
@UlrikeFischer @DavidCarlisle the updated memoir has been uploaded to CTAN, a month delayed due to a very stressfull start of the new semester.
 
cis
11:07 AM
@DavidCarlisle I see. You mean

% \usepackage[export]{adjustbox}
\includegraphics[valign=c]{example-image}

That's not bad, but then I have again the problem that I get no additional space above / below the image in the table cell.
 
@cis bookmarks horizontal rules have vertical space......
 
[ 1/70, ??:??/??:??] update: adjustbox [765k] (56140 -> 56291) ... done 70! wow
 
cis
@DavidCarlisle Aha, I do not understand that.
 
@cis like the version I posted, which you didn't like as it broke vertical rules
 
@DavidCarlisle the problem is that @cis wants vertical rules ;-). Really the type of constraints call for a TikZ matrix, in my opinion, more than a tabular.
@daleif I am full in it... I really understand you.
 
cis
11:22 AM
@DavidCarlisle @Rmano Yes, I think solutions should work in all cases, not just in special cases; even if the special case may be the standard.

E.g. \addlinespace[2ex] is not bad, but only works as long as you don't use vertical lines in the table.

PS: With TikZ-matrix I can manage the arrangement without any problems, but I would also like to have a few features of the tables or of pgfplotstable.
 
@HaraldHanche-Olsen The change is that we require fonts to be loaded with Math script in order to add math tables. If you have a real Math font, you probably want to set Script=Math anyway to enable the right features. Then the luaotfload change automatically disappears.
 
@cis Vertical rules are bad in tables, the booktabs author gave a solution that's not a general solution, but a solution for tables which don't have vertical rules. Either stop using vertical rules or stop using booktabs.
 
hi all
 
@cis May (or may not) be helpful tex.stackexchange.com/a/224418/38080
 
cis
11:37 AM
@Skillmonlikestopanswers.xyz
"Vertical rules are bad in tables, ..." That may be, but it is irrelevant for the problem: a good solution works regardless of whether you use v-rules or not.
 
@cis no, a good solution works flawlessly in the situation it was designed for. You don't expect a Fiat 500 to be a good choice to transport a piano, but it's a car after all, and there are cars designed to be able to transport a piano, so a Fiat 500 should be able, too.
 
@cis or tex.stackexchange.com/questions/448246/… --- once you have your data in a matrix you can do a lot of things. Even diagonal rules ;-)
@samcarter_is_at_topanswers.xyz how do you fit four elephants in a FIAT 500?
;-))))
 
@Rmano Four??? The images with one where already impressive i.pinimg.com/originals/d7/f0/49/…
2
 
@cis you could look in the documentation of adjustbox. Surprisingly it offers keys to adjust the padding.
 
11:51 AM
Hi. Do I see it correctly that it is not possible to put a figure environment into a parbox?
 
@samcarter_is_at_topanswers.xyz Two in the front seat row and two in back one. (Very, very old and very, very bad classical italian joke)
 
The template I have, has put a parbox over the whole page.
 
cis
@Rmano I can handle TikZ and TikZ-matrix very well; I could easily have done that with it.
But from theoretical considerations, I wanted to implement that as a table.
 
@Gudrun no. Why would you want to?
 
@Gudrun correct. But you can use \captionof{figure}{<caption>} in the \parbox to get basically the same results.
 
11:52 AM
@Gudrun yes, it would have no way of working as the only reason to use figure is to take the content out of the document flow and add in a different place.
 
@cis Ah, sorry. So it's a case of "doctor, it hurts if I touch here..." ;-))))
 
I suffer from this Latex template somebody created years ago. I am really thinking to transfer it to the offical word template. Not sure if the latex version is still supported
 
@Gudrun then perhaps drop the template.
 
@Skillmon thank you
I would like to clarify: I don't suffer from LaTeX, but this strangely arranged template.
 
11:53 AM
@Gudrun If you get an undefined control sequence error, put \usepackage{capt-of} in your preamble. \captionof is provided in the KOMA-script classes, by the caption package, and the capt-of package. The last one is the least intrusive alternative.
 
@Gudrun that is common, but it's usually best to ignore anything called a "template", just start from a well known class such as article or memoir or whatever, and add packages as needed
 
@David: It is a proposal for beamtime and they have a strict layout
and did not really bother to provide a nice LaTeX template
the two pages are two picture enviroments where the person placed on each page a parbox
 
@Gudrun that's not actually unreasonable but you would never want a figure in such a docuemnt.
 
@Gudrun Notice that you do not need a figure to put a picture in the document. They are different things.
 
@Gudrun \includegraphics is all you need to include an image, the figure environment is unrelated to images (it can have any content) and is all about automatic page breaking and insertion of floating content, so in a two page docuemnt with a manual page break it serves no purpose.
 
@Rmano you are right.
But another problem is when I do \includegraphics[keepaspectratio]{Graphics/Overview.png}, half of the picture disappears out of the page on the top. I I put a \vspace{0em} above the \includegraphics, the image is fully seen, but lots of white space over it.
 
@PauloCereda SO CUTE!
 
I am so sorry, I wished I could give somehow a minimum example.
 
@samcarter_is_at_topanswers.xyz <3
 
@PauloCereda I hope this won't provoke some comment about lunch from @DavidCarlisle
 
12:04 PM
@samcarter_is_at_topanswers.xyz ooh
 
@Gudrun But you can use wrapfig...
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{wrapfig}
\begin{document}
    \centering
    \parbox{10cm}{%
        lalla yalla

        \begin{wrapfigure}{r}{0.5\linewidth}
            \centering
            \includegraphics[width=0.95\linewidth]{example-image}
            \caption{example-image}
            \label{fig:example-image}
        \end{wrapfigure}
        Ulla lilla malla malla
    }
\end{document}
 
@Rmano thank you, i will try this out. What is the advantage of it, please?
I try to make a minimum example.....
 
@Gudrun No special advantage in this case. Easy to know if you need it, otherwise it's just a matter of putting the figure with the correct alignment. adjustbox can be of great help.
 
@Rmano Does this wrapfigure offer by chance to place the caption right of the picture, please?
@Rmano: I will save your example definitve
 
@Gudrun I do not know...
 
cis
12:09 PM
@Rmano I have already made such arrangements with TikZ-matrix. This has not only advantages, because you have to make a lot of adjustments (with pgflinewidth etc.).

It would be interesting whether tcolorbox / tbcitemize can be used to create a table layout and reads in raw data from a txt-data-table.
 
But I think that no, it doesn't.
 
@Gudrun Which one?
 
cis
@DavidCarlisle A column type like @{\vskip{2mm}}l@{\vskip{2mm}} is not usable?
 
@Jospeh: I meant to save Rmanos snippet on wrapfigure, still working on this example...
I have no a working example, but it is not minimum and it is based on two files, .sty and a .tex file.
Would maybe somebody willing to have a look and could help me to understand why is the behaviour like this, please?
@Rmano Tried your wrapfigure in my parbox, but its put out on page 3, not on page 2. I can only have 2 pages
 
12:38 PM
\newcommand{\TechniquesContinued}[1]{\def\ProTechniquesContinued{#1}}

\begin{picture}(190,280)(0,0)

% Frame and main text
\put (3,265){\parbox[t]{184mm}{%
{\ProTechniquesContinued}
}

Could somebody maybe explain how this works? Why does \ProTechniquesContinued not have an argument, please?
You can see here, that my page is a big picture on which a parbox is placed. That is what I understand.
 
12:51 PM
@Gudrun because \TechniquesContinued is the command with the argument. Is your graphic at the start of the parbox? Then instead of the \vspace{0pt} you can simply use e.g. \vspace{-3cm} or some other value until it fits.
 
@UlrikeFischer: Yes, that is right.
Dummy text looks like this:
\TechniquesContinued{

\includegraphics[width=3cm, height=6cm]{example-image}

}
I just did not understand why is required in first place any vspace command. Without it half of the image is pushed out of the page.
@UlrikeFischer: That worked, the picture moved up, there is less space.
 
1:13 PM
@cis you can't have a vskip in an @ expression (it's like an \mbox)
 
cis
1:31 PM
@DavidCarlisle A column type could be declared with your method like
\documentclass{article}
\usepackage{array}
\usepackage{collcell}
\newcommand\MakeVcenter[1]{$\vcenter{\vskip4pt\hbox{#1}\vskip4pt}$}
\newcolumntype{K}{>{\collectcell{\MakeVcenter}}c<{\endcollectcell}}

\begin{document}
\begin{tabular}{c| c | K}
\hline
1&2&3  \\  \hline
a&b&c  \\  \hline
{\tiny a} & b & {\Huge C}  \\  \hline
a&b&c  \\   \hline
\end{tabular}
\end{document}
 
1:43 PM
@Gudrun probably because there was too little space. Sorry, it's very difficult to try to help without a kind of example...
 
@cis that's why I provided \newcolumntype :-)
 
cis
@DavidCarlisle Seems pgfplotstable don't like collcell; but this could have multiple reasons
 
@cis well as I said using pgfplotstable seems to be making it a lot more complicated for little advantage, but whatever.
 
 
1 hour later…
3:15 PM
@Rmano, yes. I understand fully. Even my example was long. It was too artificially created imho. I will work on another minimum example.
 
yo'
4:05 PM
Can anyone explain me why Windows 10 include a PATH-searchable python.exe file that's empty?!
 
@yo' No. :)
 
yo'
@AlanMunn thanks. This is reassuring. :)
 
@yo' It's not reassuring, it's Windows. :)
 
yo'
@AlanMunn it's reassuring me that I might not be as much of an idiot as I feel.
@PauloCereda Do you have a reasonably working svg to tikz conversion tool?
 
@yo' I do! Would you like the link? :)
 
yo'
4:09 PM
@PauloCereda yep please!
 
@yo' gimme a minute...
 
yo'
@PauloCereda ah one of the about half a dozen tools called svg2tikz :D
 
@yo' LOL
 
yo'
@PauloCereda no LOLZ: github.com/paagu
 
@yo' oh
 
yo'
4:14 PM
and how in the world do you use it?
sometimes I believe I'm not a person for the 21st century :(
 
@yo' \node(A){\includesvg{file.svg}} ?
 
yo'
@DavidCarlisle well, if I wanted that, I could have done \includegraphics :)
but I managed to get the tikz code finally now, and I'm happy :)
 
@yo' but I did the authentic tikz node thing as well :(
 
@yo' to make installing python easier on windows: devblogs.microsoft.com/python/…
 
yo'
4:34 PM
@UlrikeFischer didn't work for me, apparently. No installer or anything was launched when I first tried. And I had to manually delete the file from a folder that's not accessible via the Explorer.
 
snakes are mean
 
@yo' worked fine for me. The store is launched (I had to go in the folder as there a python before in the path).
@PauloCereda I did it ;-)
 
@UlrikeFischer ooh
@UlrikeFischer ooh miscellaneous
 
@PauloCereda I thought "Fun" wouldn't fit, the content is too dramatic ;-) And perhaps more will be added later.
 
cis
3 hours ago, by David Carlisle
@cis well as I said using pgfplotstable seems to be making it a lot more complicated for little advantage, but whatever.
@DavidCarlisle I have a table here. There is so much calculation and distinction and ... in it. For me that would break the dam with plain LaTeX. I like to have a professional tool (pgfplotstable) there.
 
Anonymous
4:51 PM
@cis Thank you for letting me know!
 
@yo' -- You're not alone.
 
@cis but all pgfplotstable is doing for you is parsing the comma separated value list and then writing out the latex tabular syntax that you specify, and the only reason that it needs to do that is because you entered it with , instead of & between the entries, unless I miss something, but no matter whatever works for you is fine.
 
@PauloCereda -- Not all. There are friendly little green garden snakes that keep the place free of rodents.
 
@cis pgfplotstable is quite nice for some things. But it has the problem that processing and calculation of the data and the formatting of the output are intertwined, and that makes it quite difficult to know in which part of the processing you are and so to create complex formatting. And debugging it is real pain. If you look at the documentation you will see that all examples are quite straightforward tables.
 
cis
@DavidCarlisle Yesn't. There are versions of this table that calculate the cell values. With pgfmath. And pgfplotstable goes arm in arm with pgfmath, so ...

But at some point the calculation accuracy was no longer sufficient, so I took Mathematica for the raw data. But e.g. search cells and create the gaps ("value very exactly equal to 1") continued to be based on pgfmath.
So still worth using pgfplotstable.
 
5:06 PM
@cis quite possibly:-) The one you show here is rather fancier than the earlier MWE:-)
 
@barbarabeeton Ouch! :_;
wrong smiley ;-)
 
One thing I'm learning from all this online teaching stuff is that fancily formatted LaTeX documents in PDF form are a total non-starter for conversion to other formats. So things that I would normally hand out in class on paper for students to work on can't be used electronically very easily at all unless they have some sort of tablet.
 
6:11 PM
Does htlatex work with LuaTeX? If so how. I can't seem to find any documentation that discusses engine choice.
 
@AlanMunn make4ht -l uses luatex.
@AlanMunn search for answers of michal.h21 on the main site.
 
cis
I find the method (for vertically centered columns or cells, without (!) Mandatory length [m {3.45cm}])

$\vcenter{\vskip3pt\hbox{#1}\vskip3pt}$

so good.

I think you should issue a 1-command package.
 
@cis we are (as far as possible) removing all such hidden uses of math and doing things like centering by explicit raising and measuring of boxes this gives other possibilities like centering on the baseline or x height rather than the math axis, and axis loading math fonts.
 
6:30 PM
@DavidCarlisle hm, should the second axis be read as "avoids"?
 
@UlrikeFischer er yes
 
@DavidCarlisle ;-) three chars are right ;-)
 
@UlrikeFischer that's Ok then
 
@DavidCarlisle yes, it was enough to guess the meaning
 
cis
@DavidCarlisle Yes, I also find it strange that the trip goes into math mode and back again.
Obviously, nobody has wanted a vertically centered cell since the 1970s. And the m column, unlike the l, r, c column, requires a mandatory argument that I may not even know.

So I'm afraid you have to write 'tabularz'. But without a mandatory length measure for the overall table; because I don't necessarily know the total width either.
 
7:15 PM
@MarcelKrüger Thanks; adding [Script=Math] is likely a good idea, though it didn't cure the problem in my case. Rather, it turns out that running \setmathfont[Script=Math]{Libertinus Math} results in multiple calls to the callback, some of them due to the different sizes needed. And in the first two, nomath is true. In the remaining instances, it is false. So the cure is simply to not try to patch the math parameters of the font unless nomath is false. (A.k.a. defensive programming.)
 
@cis m is just the same as the standard p except that it (used to) use \vcenter instead of \vtop so like \parbox instead of \parbox[t] so like parbox has to have a length, for line breaking.
@cis if you don't want to specify a total table width just use tabular
@UlrikeFischer you only needed to guess a couple of letters, easier than German where you have to guess all the word divisions
 
 
1 hour later…
8:43 PM
@HaraldHanche-Olsen IIRC if you use fontspec or similar, the font is first loaded without features and scripts (to detect feature availability and similar). You could request that the math parameters should always be added, but this again would be a feature and therefore ignored for this script... But you could avoid this by making your patch a feature too. But yes, as a simple solution checking the font is probably best, but I would check for the existence of mathparameters instead of nomath.
 
8:57 PM
Thank you again for your help. I submitted it and I could solve the problems.
 
 
2 hours later…
cis
10:58 PM
4 hours ago, by David Carlisle
@cis if you don't want to specify a total table width just use tabular
With this statement we would be back at the beginning.

Again: I want to create a table

· with variable overall width (i.e. nothing tabularx or similar)

· in which the columns, rows or cells are centered vertically.


There is no trivial solution to this.

One have to make weird contractions here by switching to math mode and using vcenter and hbox.

All in all, this is an incompleteness of the table creation of LaTeX.
Just because nobody else seems to care or everyone is satisfied with m-columns with a mandatory fixed width does not mean that the problem has been solved.
PS: And is not a solution to say that there is an option vcenter = c for images via adjustbox. A real solution is independent of the content.
 
@cis I don't see why that is an issue at all, just use tabular, and for vertical centering the solutions are unrelated to the table, just any way that you can center any item as you could in normal text, vcenter, a one-item table, \raisebox, adjustbox valign=c, whichever you find convenient, apart from images, and headings (for which a nested tabular works well) vertically centering cells is pretty uncommon anyway.
@cis you can use adjustbox vcenter key for any content, not just images, if you wish.
@cis it seems basically you are just asking to wrap each cell in \zzz{...} where \zzz is defined by \newcommand\zzz[1]{\begin{tabular}{@{}c@{}}#1\end{tabular}
@cis that \zzz usually gets called \hd (for heading) in answers eg this one tex.stackexchange.com/questions/325789/…
 
11:23 PM
@cis There you go, two variants to vertically centre the cells of a column, one based on \vcenter, one based on box dimensions.
\documentclass[]{article}

\usepackage{array}
\usepackage{grabbox}

\newcolumntype\vcenter[1]{>{$\vcenter\bgroup\hbox\bgroup}#1<{\egroup\egroup$}}

\makeatletter
\newsavebox\vcenterbox@box
\newcolumntype\vcenterbox[1]
  {%
    >{%
      \@grabbox{}\vcenterbox@box{}\hbox{}
        {%
          \raise
            .5\dimexpr\dp\vcenterbox@box-\ht\vcenterbox@box\relax
            \box\vcenterbox@box
        }%
      \bgroup
     }%
   #1%
   <{\egroup}%
  }
\makeatother

\begin{document}
\begin{tabular}{\vcenter{l}\vcenter{c}\vcenter{r}}
 

« first day (3602 days earlier)      last day (1334 days later) »