« first day (2335 days earlier)      last day (2589 days later) » 

9:15 AM
and today's entry in the @Johannes_B role of honour for helpful publisher templates is: tex.stackexchange.com/a/359978/1090
 
9:52 AM
@Canageek roger that. :)
 
10:17 AM
@KristianNordestgaard I won't. :(
 
10:45 AM
@egreg: Felipe Melo scored yesterday, what a joy... :D
 
11:28 AM
@PauloCereda own goal?
 
@DavidCarlisle no. :)
 
@Sebastiano Regarding my comment -- it's a bit sarcastic :). Don't get it wrong :).
 
@PauloCereda And he wasn't even ejected!
 
11:44 AM
@egreg amazing!
At least, it's not an old question.
 
12:17 PM
@DavidCarlisle @barbarabeeton the empheq vs amsart problem boils down to this: (a) amsart sets \displaywidth\columnwidth in \everydisplay. (b) empheq separates math and eqno into separate boxes, the later is actually a \parbox{0.5\maxdimen}{... but \columnwidth is not reset inside a \parbox. An easy fix from the empheq end is to just set \columnwidth\linewidth inside this very wide parbox.
 
@daleif -- that sounds great, thanks. if the fix can be made in empheq, it can be made public very quickly. i can't predict when an updated version of amsart et al. might be released. (send me a copy of the updated `.sty' file, and i'll run it through all the tests i've accumulated.)
 
@daleif that sounds wrong, I can't really try now, so what happens in amsart of you have display math in eg a tabular p column does it get pushed to full \columnwidth?
 
@DavidCarlisle you cannot have displayed eqn widths less than \columnwidth in amsart
\documentclass[a4paper,reqno]{amsart}
\begin{document}
\noindent
\fbox{\begin{tabular}{p{0.5\textwidth}}
test
\end{tabular}}

\fbox{\begin{tabular}{p{0.5\textwidth}}
\begin{equation}
equation
\end{equation}
\end{tabular}}
\end{document}
at least not with reqno
 
12:37 PM
@daleif Yes:
\def\fullwidthdisplay{\displayindent\z@ \displaywidth\columnwidth}
\edef\@tempa{\noexpand\fullwidthdisplay\the\everydisplay}
\everydisplay\expandafter{\@tempa}
 
@egreg I know, that is the beast I'm been trying to fight for the last week or so.
If you just move those three lines to a normal article document, one does not have to worry about what else amsart might do.
 
@DavidCarlisle: It's your turn: tex.stackexchange.com/questions/360001/…
 
BFH
12:57 PM
Is there a canonical way to make a box with text with manual line breaks (\) that scales the text instead of wrapping?
 
@MarcoDaniel I wrote something
@BFH not understood.
 
BFH
I want to manually specify linebreaks for a block of text and have it change the font size if the text overflows instead of line wrapping.
 
@DavidCarlisle By accident I ran into the following example and now wonder if verbatim could/should better work if \ExplSyntaxOn is active:
\documentclass{article}
\usepackage{expl3}
\begin{document}
\begin{verbatim}
a     c
b     c
\end{verbatim}

\ExplSyntaxOn

\begin{verbatim}
a     c
b     c
\end{verbatim}

\ExplSyntaxOff
\end{document}
 
@BFH there probably isn't a canonical way, but you could just store the text (environ if you are using an environment). saving it in a box wrapped in varwidth with a huge width. This box now has the natural width of this text, then try other fontsizes and retype or use this known length to scale the box to the width you want.
 
BFH
@daleif doesn't LaTeX track text overflow? Badness or something? Could I use that to automate the resizing?
 
1:04 PM
@BFH might be, that would be beyond me. Perhaps lualatex can help
 
BFH
@daleif Unfortunately I am using other packages which are incompatible with lualatex, so I'll have to use pure latex or tex
 
@BFH which packages are not compatible with lualatex?
 
BFH
@daleif at least algorithm2e
 
@UlrikeFischer \ExplSyntaxOn should not be used mid document (in a normal one, I mean).
 
@BFH can you give an example of that?
@BFH quick and dirty resizing:
\documentclass[a4paper]{memoir}
\usepackage{varwidth,graphicx}
\newsavebox\dlf
\newcommand\test[1]{%
\sbox\dlf{\begin{varwidth}{0.5\maxdimen}#1\end{varwidth}}%
\ifdim\wd\dlf>10cm%
\typeout{resizing}%
\resizebox{10cm}{!}{\usebox\dlf}%
\else%
\usebox\dlf%
\fi%
}
\begin{document}

\noindent\rule{10cm}{1mm}

\noindent
\test{
sdsdf\\
sdfsadf asdfds f\\
asdfsaf}

\bigskip


\noindent
\test{
sdsdf\\
sdfasd adsf dsf dsaf ds fljasdfl ;kfjdsa;lf j;sadkj ;asldjasldj ;dsapsdasdfsadf asdfds f\\
asdfsaf}

\end{document}
 
BFH
1:12 PM
@daleif example of luatex not working or of the box? I'll run your thing. just a mo.
 
@egreg That's why it was an accident ;-) (a slide with some expl3 examples and the verbatim code)
 
@BFH yes, if it is an length not available error, you just need the luatex85 package. The luatex people made "choices"
 
@daleif I love the use of choices in your sentence. <3
 
@PauloCereda is there any other way to put it?
 
@daleif no. :)
@daleif: I think Englishmen would say interesting choices. :)
 
BFH
1:18 PM
@daleif Actually, I seem to recall it's a problem with a unicode character in a non-unicode package that XeLaTeX lets slide but LuaLaTeX does not...
 
@BFH we still need examples. At least such that we can get such things fixed (though I do not use lualatex myself)
@PauloCereda not english
 
BFH
with the algorithm2e thing?
 
@daleif sorry, I was just pointing out that I really liked the use of choices, knowing that much of LuaTeX stuff keep changing over time.
 
BFH
@daleif Huh. It just compiled just fine in LuaLaTeX. Maybe I misremembered and it was a different package I'm not using anymore or maybe it was fixed.
 
@PauloCereda not meant like that, and I agree what a true englishman would say
 
1:25 PM
@daleif oh <3
 
BFH
It errored when I did a full recompile of my document
 
@MarcoDaniel we should have a standard answer for that to be closed as dup
@BFH odd thing to want but use a one column tabular then resizebox
@daleif that's sub-optimal :( (<<<<@barbarabeeton)
 
1:43 PM
@DavidCarlisle Indeed. Have fun: tex.stackexchange.com/questions/360035/…
:-)
 
@MarcoDaniel I found one that will do and have voted already:-)
@MarcoDaniel I wonder do people on C forums assume if they write C in an editor that it will compile itself to an executable without using a C compiler?
 
@DavidCarlisle oh my
 
@DavidCarlisle Install an editor and every language will be available out of the box. (Puh)
 
@PauloCereda probably they write the C in vim then never find out it doesn't compile on save as they never figure out how to save a file.
 
@DavidCarlisle :)
 
1:51 PM
@DavidCarlisle well there is not much else I can do from the empheq side of things.
 
@daleif agreed, putting a correction there is likely to be more effective than waiting for ams to figure out if there is a compatible way to fix it in amsart
 
@DavidCarlisle hehe, just had a vim user the other day, I got a new Ubuntu and now the menues did not work anymore. Turned out he did not notice he was inside a terminal and it was the menus from gnome-terminal he was refering to.
@DavidCarlisle I wonder how much of peoples own code I'm going to break if I finish the proper name scoping in empheq and mathtools, there are some macro names that are shared with expl3 (Morten had his own variants in mhsetup, made before expl3 was really up and rolling). I'm not going to make it depend on expl3 anytime soon, so properly prefixing macro names seems the best choice.
Wrote a script to find these strings
 
BFH
I used one of your previous answers on the main site. Shall I credit you?
\documentclass{report}
\usepackage{graphicx}
\begin{document}

\noindent\rule{\linewidth}{1mm}

\noindent
\centering

\large
\resizebox{\ifdim\width>\linewidth\linewidth\else\width\fi}{!}{%
\begin{tabular}{c}
This text is short.\\
This is a medium sized line of text.\\
Very short.
\end{tabular}
}

\bigskip

\resizebox{\ifdim\width>\linewidth\linewidth\else\width\fi}{!}{%
\begin{tabular}{c}
This text is short.\\
This is a very long line of text that will not normally fit on one single line without wrapping.\\
 
@BFH who are you asking?
 
@BFH if you want, no particular need to, though:-)
 
BFH
2:02 PM
@daleif I was asking David.
 
@daleif me I guess, replying to my comment above
8
A: Relicensing code from answers

David CarlisleAny code of mine that I publish on http://tex.stackexchange.com/ I hereby place in the public domain to the extent governable by law. Explicitly, I place it under the CC0.

 
BFH
@DavidCarlisle Thanks very much
 
2:28 PM
 
2:47 PM
@daleif I doubt anyone is using any internals of the package so I'd have thought ypu could rename any way you wish. (anyone who is using the internals will be able to cope;-)
 
@DavidCarlisle my thought as well
 
 
2 hours later…
5:22 PM
@DavidCarlisle \centerline is always a good idea.
;-)
 
@PauloCereda :-)
 
Folks, any ideas on how this thesis was typeset?
 
@EmilioPisanty According to exiftool with MikTeX. And really ugly stuff.
 
@Johannes_B yeah, that's in the pdf properties, but it's as informative as saying that it was typeset on Windows
 
5:31 PM
@Johannes_B Sans...
 
@PauloCereda Sí Señor.
 
I was wondering if folks could identify the templates/packages in use
 
@EmilioPisanty granted, you weren't too specific in your question too. :)
 
@PauloCereda granted
 
@EmilioPisanty Like asking what the exact recipe is for the picture of a stew somebody just posted.
 
5:32 PM
@Johannes_B Información importante acerca de las llamas!
@EmilioPisanty I looked at the fonts with pdffonts, but nothing ringed a bell. :(
@EmilioPisanty: the sans font looks suspiciously like Fira Sans.
 
@PauloCereda good to know
is that via some package?
 
@EmilioPisanty I found tug.dk/FontCatalogue/firasans, but I am not sure about the needed hooks.
 
@PauloCereda thanks
 
I had to look about sans typesetting, as ABNT (/shakes fist) has some entries on thesis written in sans...
 
it's a good tool for the toolbox
@PauloCereda what?
 
5:38 PM
@EmilioPisanty ABNT is the Brazilian Standards Organization and regulates how technical/academic documents should be produced around here. And they had some requirements regarding thesis typeset entirely in sans. Thankfully, I could use normal serif stuff, but there are some areas that are forced to use the sans fonts.
 
@PauloCereda some parts of each thesis on sans, or some fields must have the whole thesis on sans?
 
@EmilioPisanty the whole thesis!
 
@PauloCereda learn to love the sans
 
@EmilioPisanty :)
 
@daleif mathtools should definitely be made expl3 compliant
 
6:01 PM
@egreg Doable if required ...
@egreg I believe at least one issue is that this would introduce a dependency
 
@egreg @JosephWright compliant in this case means it will not have any command names in common. It is just some command structures that are named in the same manner as in expl3, I think they even point to the same tex core macros
 
@JosephWright It should. It makes little sense to reinvent the wheel.
@JosephWright I think, for instance, to
\def\MH_let:cc #1#2{
  \expandafter\MH_let:NwN\csname#1\expandafter\endcsname
  \csname#2\endcsname}
 
 
1 hour later…
BFH
7:26 PM
Any way to only use fontspec if a font is installed on the computer?
 
@BFH Not really: the point of TeX is to produce 'known' output, which is tricky if the fonts are missing ...
 
BFH
@JosephWright Unfortunate but not unexpected
Actually seems to be possible:
\IfFontExistsTF{⟨font name⟩}{⟨true branch⟩}{⟨false branch⟩}
 
@EmilioPisanty the person who's email is on this page could tell you exactly, why don't you just ask him? gla.ac.uk/schools/physics/research/groups/qtg/people/robcameron
@BFH there is an answer on site here about testing for a font and using a different one
 
BFH
@DavidCarlisle I think I saw it. It was about selecting from a list of possible fonts, though.
 
@BFH oh yes I think Will added it following
13
A: How can you check if fontspec (with LuaLaTeX) can load a font?

David CarlisleYou can trap the error and make it a warning, just setting a flag, then test for that and load something else, see the code below. Note this is poking into internal interfaces so if it breaks at a fontspec update, don't complain:-) \documentclass{article} \usepackage{fontspec} \newif\ifgoodfon...

@BFH isn't that what you want to do?
 
BFH
7:40 PM
@DavidCarlisle That is indeed. I think I'll see if I can get the built in fontspec command working first, though
"The \IfFontExistsTF command is a synonym for the programming interface
function \fontspec_font_if_exist:nTF"
 
@BFH yes but I think that's all newer than the answer linked to above, the test was added to fontspec to address the issue. so use the fontspec one not the earlier hacked in version
@BFH what I mean was isn't what you want to do is load a font from a list of possibilities, not as you said at the start use or not use fontspec?
 
BFH
I actually want it to just use a built in font if the requested font is not present. I may end up using your solution since the IfFontExists command is so new.
 
7:56 PM
@BFH hmm well you've already loaded fontspec to get the iffontexists function so if the font isn't there you can't really unload it. (that doesn't change the default font in a 2017 latex, but it does in older releases)
 
BFH
@DavidCarlisle I ended up using the following monstrosity:
\usepackage{iftex}
\ifxetex\def\x{1}\fi
\ifluatex\def\x{1}\fi
\@ifundefined{x}{
\usepackage{times}
}{
\usepackage{fontspec}
\IfFontExistsTF{Adobe Garamond Pro}{\setmainfont[Ligatures=TeX,Scale=1]{Adobe Garamond Pro}}{\usepackage{times}}
}
 
you don't really need all that \x stuff just \@ifundefined{Umathchardef}{\usepackage{times}% really?}{fontspec stuff}
 
BFH
@DavidCarlisle Is Umathchardef only available in luatex and xetex?
 
@BFH yes U=Unicode
 
BFH
@DavidCarlisle Also, which native LaTeX font do you recommend instead of times? I too dislike it.
 
8:10 PM
@BFH it wasn't so much times the font I was commenting on but the times package which is very minimal package aimed at making postscript documents with no embedded fonts, printable with an apple laser writer circa 1990, it isn't really an important use case these days
 
@egreg -- please, only if it won't require any changes in any of the ams document classes or packages. mathtools must remain compatible with amsmath, and amsmath must remain compatible with the ams classes. otherwise the ams will have to reinvent its entire production stream, which would likely require at least two years. you don't want the ams to stop publishing, or double the price of its publications, do you?
 
BFH
@DavidCarlisle Is there an equivalent more modern font? tgtermes?
 
@BFH yes I was going to suggest that (and also use tex gyre via fontspec in the unicode tex without garamond case, or for example even for pdftex there are garamond clones eg:
5
Q: Installing EB Garamond for pdfLaTeX (encore)

RubenAt the moment I try to get the EB Garamond font to work on my windows machine (under MikTeX 2.9), but I failed. By searching TeX.SX I found this two questions: EB Garamond on LaTeX Installing EBGaramond for pdfLaTeX The first solution is too generic because it only points out the existence of...

@barbarabeeton the fact that mathtools uses (old) latex3 code internally doesn't I think have much affect on its amsmath compatibility, if it was updated as @egreg suggests it would just make it more maintainable probably. Actually it would be easier to check amsmath compatibility and back port some of its fixes if it was written in classic 2e style.
 
BFH
@DavidCarlisle EBGaramond seems to be amusingly broken in pdfLaTeX: "Master's" shows up as "Masterfis"
 
@DavidCarlisle -- well, amsmath is now in your bailiwick, and we've got to trust you to keep it compatible with the ams document classes and amsthm. (have you given any thought to converting or rewriting amsmath using current "3" methods? just curious.)
 
8:22 PM
@BFH details details (I suppose I could try:-)
@barbarabeeton me? no I don't understand any of this _ and :nnn stuff.
 
8:43 PM
@ChristianHupfer now who wants to try a vector of vectors?:-)
@ChristianHupfer actually your added list version is I think the right way, rather than mine, although see the comment I just made to barbara...
 
9:31 PM
@DavidCarlisle Is it ironic? I can't see a smile or something else.
 
@MarcoDaniel not entirely! You turn your back for 15 years and these youngsters come along and change things
6
 
9:45 PM
@DavidCarlisle :)
 
@DavidCarlisle :-)
 
@DavidCarlisle I understand the _ and :nnn stuff. So I'm among the youngsters, it seems.
3
 
@egreg In Team years ...
 
@egreg you probably cheated by reading the documentation rather than trying to remember the 1990s implementation and bluff your way through subsequent changes.
 
@DavidCarlisle I cheat by having largely written the documentation :)
 
9:56 PM
@egreg Tomorrow I will make a small introduction in expl3 at the Dante meeting and for my last slide I made a screenshot of the last slide of your TUG-video ;-) (with attribution naturally)
 
@UlrikeFischer Cantor's Paradise? :)
 
@UlrikeFischer Cool
 
user image
5
@UlrikeFischer ^^^^^ better than a screen shot from the video
 
@egreg Yes. But the screenshot looks more real ;-) and it is really from the video (I wrote below a caption mentioning the video.)
@egreg @JosephWright we already spoke a bit today at the dinner about expl3. Some have already used it but others were quite impressed that the fp-module can do square roots ...
 
@UlrikeFischer I guess you pointed out that's available as xfp ...
 
10:09 PM
@JosephWright Not yet but I will mention it tomorrow.
 
@UlrikeFischer Cool
 

« first day (2335 days earlier)      last day (2589 days later) »