@egreg I am trying to solve a problem that could take one of two approaches: 1) is there a way to add an unmatched brace (not \bgroup or \egroup) to a token list? or alternately, 2) is there a way to make macros expecting a brace, for example \fbox, to accept \bgroup...\egroup delimiters rather than require an actual brace pair?
@egreg If it is not trivial, perhaps just suggest I ask it as a question. I ask it here in chat as I figure there may be a standard, trivial approach to dealing with this problem that I don't know.
@StevenB.Segletes You can't have a token list store a single, unmatched explicit brace. Depending on what you are trying to do, you could define a helper macro with delimited parameters to get the box contents and put it into the actual box afterwards
@AlanMunn "I castori costruiscono dighe" is correct, "costruiscono le dighe" is correct only if you specify "dighe" for example "costruiscono le dighe che hai visto passeggiando lungo il fiume" (but @egreg already answered, I see :) )
@siracusa Yes, there is that approach. Perhaps that would be easiest to consider...since the result I seek will evetually be balanced after final construction.
Morning. I got a baffling problem with a new MikTex 2.9 installation, and I'm drawing empty after a day of searching for the cause
My .tex -> .dvi compiling step produces a document and a "header" file labeled filename.out.ps which is referred to with an absolute path in the dvi file, causing the translation step from .dvi to .pdf using dvips to fail. I don't know what's causing that, as it's only on a new installation
Thats exceedingly difficult tbh, as the same .tex file on my two different installations behaves differently
I can't really make a MWE without rewriting a whole bunch of code that automatically generates these latex files
It must be some config option in miktex, or some circumstance that makes it this way. The .out.ps file only contains `%! /pdfmark where{pop} {/globaldict where{pop globaldict}{userdict}ifelse/pdfmark/cleartomark load put} ifelse` which seems to me like it's a leftover config setting I need to disable
@DavidCarlisle I had a number of test failures also with luatex due to changes of line breaks, I will leave them unchanged for now, then you change check too.
@JosephWright I looked yesterday at pageattr and how dvips/dvipdfmx handles that. Apart from the curiousity that dvips puts everywhere a /Rotate 0 it works ok, but they do it only for single pages and not like pdf also for the following pages. So imho we need the shipout hook to be able to synchronize the behaviour.
@DavidCarlisle I have two real failures with oberdiek.luatex.lua' not found. Could you try l3build check -cconfig-luatex luatex-test2 and luatex-test3?
@UlrikeFischer I have that split branch, I suppose that would be worth finishing off....
All checks passed
davidc@dc-bantham /home/oberdiek
$ git status -uno
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit (use -u to show untracked files)
@DavidCarlisle the lvt compiles fine on its own, it only fails in l3build check, so perhaps I can blame @JosephWright ;-). What variable could l3build set that make it fails on finding someting in scripts?
@JosephWright It does find e.g. c:/texlive/2019/texmf-dist/tex/latex/etex-pkg/etex.sty (which indicates that we should get rid of the sty and the test anyway ...) both without and with l3build but it doesn't find the lua with l3build, which is both in the texmf-dist and in the current folder.
@StevenB.Segletes I forgot to say those macros allow the braces to be specified but you need to make sure they expand before being used or fbox will not see the }
@UlrikeFischer /home/davidc/texmf/tex/latex/l3build/regression-test.tex were you using a tl2019l3build or something from gh (not sure if they are different at the moment...)
@UlrikeFischer still passes here if I remove my locally installed l3 build
@UlrikeFischer I sent you a log file, for comparison
@DavidCarlisle I don't understand why in your log the lua is loaded from the current directory. The code does kpse.find_file("oberdiek.luatex.lua", "texmfscripts"), and in my texmf.cnf TEXMFSCRIPTS doesn't contain the current directory.
@yo' My supervisor once gave me one punch card as a souvenir. I was quite curious to know which wacky instruction my card was referring to, until I realized that I got the EXIT one. :) On a bright note, I hold the key to stop computations. :)
@DavidCarlisle ooh git speaks Italian (-uno -due -tre -quattro...)
@DavidCarlisle I feared so. The luatex.tlg shows a line break before (kvoptions.sty but I don't get it when I run the tests. I will leave the four remaining tests unchanged.
@UlrikeFischer will be the usual thing, the line above on the console is (/usr/local/texlive/2019/texmf-dist/tex/generic/ifxetex/ifxetex.sty) I guess your line is shorter
@StevenB.Segletes the start is easier than the end as you need to expose the } before you call fbox, which may or may not be easy depending. The official latex way is to use an sbox environment put \begin{sbox}{0} in the start and \end{sbox}\fbox{\usebox0} in the end
My initial (failed) attempt to put a box around "abc" was `\def\tmp{abc} \def\zz{\iftrue\expandafter\fbox\expandafter{\else}\fi} \def\zzz{\iffalse{\else\expandafter}\fi} \zz\expandafter\expandafter\expandafter\tmp\zzz`
@DavidCarlisle in most cases linebreak changes as I made the tests, in one case (rerunfilecheck-test1.luatex.diff) also linebreaks but something must have changed on your side. The embedfile-diff is due imho to different line endings in the embedded file. I thought I had setup git some month ago to avoid this, but need to check.
@PhelypeOleinik @StevenB.Segletes if @JosephWright were here he'd mutter something about using expl3 at this point: changing \tmp\zzz to \expandafter\tmp\romannumeral-0\zzz` is changing \tmp:n\zzz to \tmp:f\zzz in expl3 :-)
@UlrikeFischer @JosephWright I wonder if (since there is a texmf.cnf in the oberdiek test bundle anyway) we should increase the log line length, it didn't help much with avoiding pdftex/luatex differences but for test suites that are not sandboxed so show local paths everywhere it would probably help.
@AlanMunn well that's odd, because the one in the keypunch does masswerk.at/keypunch but magically the corner must have got filled in as you hit the enter key and it slides out....
@DavidCarlisle -- Can't read the holes directly any more, but remember how to decipher, at least for alphanumerics.
@DavidCarlisle -- oh, non-clipped corners always existed, although they weren't usual. I may still have a few. Also cards with the "opposite" corner clipped. But I never saw a card with both (top) corners clipped. (Clipped bottom corners weren't possible without corrupting the reading of the first or last column.)
@AlanMunn -- I think that the "card" as emitted has all corners restored to square. The "card" in the virtual keypunch has the top left corner clipped, and the other three corners rounded. (The reason for rounded corners was to help avoid jams after a deck of cards had been (ab)used after extended handling, dropping on floor, etc. Believe me, it was necessary. Fortunately I never dropped any full trays, but I did have to replace a number of mangled cards that did get trashed in jams.)
I tried using this example (tex.stackexchange.com/questions/54808/…) to put headers in the margins of pages. It works when I use article class but fails miserably when I goto book. Thoughts?
article class -> margins print correctly. book class -> margins disappear on odd numbered pages. text that is supposed to appear on odd numbered pages show up on even numbered pages.
I say margins... I mean "the text I want to print in the margins"
@LordStryker the heading code is identical in teh two classes, just that book deafults to twoside and article oneside, but the fragment you linked to had an explicit twoside option so that removes that difference
@LordStryker anyway don't make people guess, make an example and post it as a question on the main site:-)
@AlanMunn -- Okay. That's more a problem of graphics manipulation; an area in which I'm notably incompetent. (I think the only computer graphic I ever successfully completed was a simulation of Brownian motion. I was very proud of that result.) I'm much more proficient with a crow-quill, broad-edge, or ruling pen/french curve.
@DavidCarlisle -- Nope. Not mean, merely justifiably vindictive.
What's a good way to test if the argument of a macro is a single character. I want \foo{a} to yield a and \foo{a,b} or \foo{\bar} to yield (a,b) or whatever the expansion of \bar, even if, e.g. \bar was \emph{a} (it won't be so I don't need to distinguish that case.)
For specific characters I can do \def\foo#1{\ifx#1a#1\else(#1)\fi} but can I do this for any 1 character argument?
@bp2017 What does that do differently then \phantom?
@barbarabeeton Thanks, twitter also informed me those are double primes so I just did \3.5'') and hope that is correct. I did not know those where primes, why is an inch prime? Single prime is feet, right? Does yards have some symbol as well? @.@
@DavidCarlisle, hello, sir. What is faster, to use expl3 sequence to add a bunch (100 or so) of dimensions to it (inside a loop) and then output them after \parshape with \seq_use, or to use expl3 token list to do the same? In other words, I would like to know whether token lists are faster than sequences or not. Thank you.
@Canageek, as far as I know (and I don't know much), \phantom is used to create space which is equal to contents provided to \phantom (it contains some text) whilst \makebox can be used to create (horizontal) space by providing number (measurement) equal to that space. The difference is CONTENT-ORIENTED SPACE (\phantom) vs. MEASUREMENT-ORIENTED SPACE (\makebox). But, again, I'm no expert (you would be better off asking others).
@Canageek -- Primes are also used for geographic increments: degrees ("superscript" circle), minutes (single prime), and seconds (double prime). This usage goes back for several centuries at least, having been used in navigation tables. In plain text, the double prime can be substituted by the straight double quote, but getting the single straight quote is more of a challenge. I don't know of any accepted symbol for a shorthand :yards".
@bp2017 you can always just time it:-) token list are more primitive (they are just macros, more or less) so in principle they are the fastest except if you are doing lots of list operations the l3 sequence code is likely to be faster as there has been a lot of work optimising that. If it's only 100 entries rather than 10000 it's unlikely to make any measurable difference, do whatever looks more maintainable
@bp2017 That sounds right. So conceptually I should be using \makebox, but since I'm just putting in space until it looks right, they are the same in practice for what I need ;)
@barbarabeeton OK. American units keep surprising me. A few years ago I saw a sign saying 120# limit, and it took me a minute to figure out that the number sign was hte pound sign on more then just telephones
@DavidCarlisle, I've tried \hspace{5mm} and it didn't work so I figured I would rather try something else. That's where I must've skipped \hspace*{5mm}. But what do I know...
So texstudio has autocompletion suggestions. When I type \labe I get the suggestion \label[type]{labellist}. What is this mysterious optional "type"? Search engines are confused by my queries and I don't get meaningful results.
@Canageek -- At least there's a symbol for pounds (avoirdupois). But you're out of luck when you get to barrels, bushels or hogsheads. (Or even tons.) I think there is a symbol for scruples, but I'd have to look it up. (Oh. These are "English" units, not "American".)
@DavidCarlisle Well it didn't get to be called that for nothing. :) As a prefix it means number, as a suffix it means pound. Usage goes back at least to the very early 20th c. in the US.
@AlanMunn -- At least, the quantity it represents is understood as the same amount everywhere, as far as I'm aware. Compare this with "ton": you've got "short ton", "long ton", "tonne", "metric ton"; "short" = 2000 lb., "long" = 2200 lb., and I'd have to look up the other two to be sure.
With biblatex is there an easy way to copy the "data model" from an existing entrytype (e.g., article) to a new entrytype or do i just need to copy and paste from blx-dm.def?
@DavidCarlisle -- Unless there's a big re-education program, a lot of people aren't going to understand which "pence" is being referred too. (Other than it's not the current U.S. vice president.)
@barbarabeeton A friend of mine on FB posted a "mental arithmetic test" from her English school days in the 1950s. They had 20 minutes to do 20 questions. I could do all of them except the ones that dealt with old money and weight in stones. :)
@DavidCarlisle -- Oh! I didn't realize that's why I was forced to memorize the 12 times table when I was a kid. But it's probably true. (Is anyone even taught any times tables any more?)
@AlanMunn -- Is there a concept of "dozen" in any metric country? And did France once require a 20 times table? That's still part of the normal numbering system (quatre-vingt-dix, etc.).
@barbarabeeton We have “dozzina” (it seems we borrowed it from French too) and also “grossa” (twelve dozens). The latter term is now disused. Something is traditionally sold by the dozen: eggs, roses (either 12 or an odd number), handkerchiefs, glasses; it can mean an indeterminate number (above but not much bigger than ten).
Something is “dozzinale” if made without care (particularly if in great quantity): the composer Donizetti was sometimes called “Dozzinetti” because he wrote several operas in haste.
@barbarabeeton @AlanMunn For a unit people actually care about and use, look up how a pint varies depending on where you are. If you order a pint in English in Canada they are legally required to serve you 568 mL, but if you order in French it is 1136 mL, and in the US it is 473 mL (you get ripped off!), but the Imperial pint is 568 mL (What the English Canadian pint is based on)
@AlanMunn I was buying a book at Lelo in Porto and, after replying to the cashier that I was Brazilian, she gave me the puzzled look and say, "quite curious, you do not behave like a Brazilian!"
@AlanMunn Legally if you order "une pinte de bière" they have to give you the French pint, but no one outside of Quebec is likely to know that, and as of a few years ago the office in charge of ensuring a pints proper size had never had a copleint even though bars often shortchange a pint
@AlanMunn Still costs more and has more chance of rejection then when I went to Poland a few years ago, that was just get on the flight, show passport when you arrive
@AlanMunn I cross a lot, but I have to wait for the rest of the people on the bus every time. Plus I morally object to rich people getting provided better service by our government.
Is there a way to print out what LaTeX is using for a variable? I want to know what the default \ellipsisgap is
@AlanMunn All the rich people I know get it since it is so convenient, none of the grad students I know have one as it is expensive and some of us need weekend jobs to make ends meet
@Canageek -- You're not the only one. We now have to carry passports in Canada. And not because Canada is any less welcoming. (When we clear U.S. customs in a Canadian airport on our return, I often get the feeling that the customs agent is really happy to be able to live in Canada.)
@egreg -- I've never tried to cross a border on a two-wheeled vehicle. And I expect I won't be likely to, though I'm licensed to drive one. Hope you have good weather this summer, and uncrowded roads.
@egreg Many years back they had border stations between Slowenia and Italy which were only for Italians and Slowenians, but they would only tell you once you are there.
@egreg Trains are different. But in the mountain area it was impossible to check anyway. And there are several trails in which you have one foot in either country. (Interestingly they are marked "B" and "Ö" rather than "D" and "Ö" .;-)
@marmot -- The weirdest border crossing I ever "enjoyed" was on a trip to a TUG meeting in Greece. I flew into Schiphol, where they bundled me off to "Connections" without checking my passport. When I got to Thessaloniki, they bundled me through the EU arrivals gate, no passport check. Okay. No problems until I went to the airport to return home. "You don't have any evidence of entry!" But they let me go anyhow; probably less of a nuisance for them than keeping me there.
@barbarabeeton Yes, these travel laws are crazy. I had to wait, together with some Canadians and Australians, at our local airport for quite some while because their fingerprinting machine did not work. After a long while they decided to waive it....
@egreg Man muss Gott für Alles danken, manchmal sogar für einen Franken. ;-)
@AlanMunn not that sad though. My keyboard layout is already optimized for programming and the German language (and works pretty well with English as the probabilities are similar)
@JosephWright I think dvips needs/can use this for pagesattr, but how does it translate in backend code? \special{ps: [/ABC /EFG /Rotate -90 /PAGES pdfmark}
@JosephWright The "values" (ABC /EFG /Rotate -90) are variable, I only need the surrounding, so something to do \special{ps:[#1 /PAGES pdfmark} (I hope I got the syntax right but it seems to work). For xdvipdfmx it is something like \special{pdf:put @pages <</ABC /CDE /FGH /XYZ /Rotate 0>>}, there I used \@@_backend:n{put~@pages~<<#1>>} which seems to work fine.
For single page (pageattr) it is \special{pdf: put @thispage << /ABC /XYZ >>} and \special{ps: [{ThisPage}<</Rotate 90>> /PUT pdfmark}. (both backends are in some respect better than the pdfmode backend: they remove duplicate entries.)
@PolineSandra There are two ways; I'm not sure which one works for Arabic: \addto\captionsarabic{\renewcommand\chaptername{فصل؟}} or \renewarabicchaptername{فصل؟} (but does babel work properly with arabic in the first place?)