12:37 AM
Still in MSWord hell. :(

1:16 AM
@AlanMunn Oh no!
@egreg: Happy birthday! <3

6 hours later…
7:06 AM
2
@egreg ^^^
(there should be a lot more candles)
2

@AlanMunn I got it from the supermarket.
@egreg I'm going to have rice with the liver.
@DavidCarlisle :-) Happy birthday @egreg

7:27 AM
@AlanMunn Oh dear

8:07 AM
@Alan: speaking of Word hell, I thought I should get me Office 2016 for emergencies. But I don't want the 365 thingy, as I don't feel like getting a subscription. I decided to check the perpetual license, but they want to charge Office for Mac almost twice the price I'd pay for the Windows version. I haven't bought any, but if I end up doing so, I will probably get the Windows version and run through virtualization. :)
@egreg: happy birthday again! <3

8:27 AM
@Johannes_B it seems like every university department on the planet is going to separately upload a thesis class to ctan and texlive so it's distributed to everyone. It really makes no sense at all.

@DavidCarlisle Wow, a cake!
@PauloCereda Is it really that time of year?

@egreg It's second hand, @PauloCereda didn't eat it all:
Jun 15 '15 at 12:29, by David Carlisle

@DavidCarlisle The name is exactly the same to the former thesis class from cambridge. And the content is ... not so good.
@DavidCarlisle HDDs are cheap now. Only problem, DVD size is fixed. I propose to make a regular TeX Live dvd in the future and an extension contributed thesis templates.

8:47 AM
@Johannes_B even with kpathsea there is a run-time cost to everyone for bloating the input tree with thousands of input files that essentially no one outside the original institution will use.

@DavidCarlisle Hopefully, we can reduce the amoount of files to just one with L3?

@Johannes_B unlikely: one of the main aims of L3 is to have a sane, documented design language for tex fomats rather than the weird mix of low and high level code needed in 2e document classes, so it is intended to be easier to flood the world with thesis classes....

@DavidCarlisle Easier, right. Just one file for the layout, not distributing a whole bunch of stuff.
You see, i still have a bit of hope.

@Johannes_B ooh but I'm sure you would want a template document that showed example usage rather than just having the layout implementation and some documentation:-)

@DavidCarlisle It is unified, just one template and all are using the same meta commands.

8:53 AM
@Johannes_B you have so much faith in vapourware

And all the university thesis offices in the world are using the same standard and pigs can fly and i rule the world.

1 hour later…
10:11 AM
-4

Has anyone generated a master LaTeX file where in order to generate a document, one only has to remove the unnecessary lines and change the text prior to the PDF Latex compilation? I tried searching for it but could not find.

Why did nobody ping me? Ah right, my health.
By the way, why is that question downvoted to four? Don't we have some policy?

10:28 AM
@Johannes_B I was tempted to upvote to correct but it's such a poor question, I didn't have the heart to do that. It's not so bad as to be voted to one of the lowest on the site though.

@DavidCarlisle I really don't think the question is bad. What he is looking for is a really bad idea and non existing, but how should the OP know without the slightest clue? I think the question is very valid, proven by the amount of templates out there.

@Johannes_B yes if the question was asking for a template for a thesis, or a book or anything it's a reasonable question (even if a bad idea) but just to ask if anyone has made any document from which you could delete lines is pointless. (but it wasn't me that downvoted:-)

@DavidCarlisle Yeah, that's true.

10:53 AM
I looked and it was at -5 so I upvoted it to a -4

@DavidCarlisle I added a CW answer to that template question. Do you see any notice of that on the main page?

@Johannes_B I saw the cw answer

@DavidCarlisle On main?

@Johannes_B I almost never look at the active tab but it shows you as having answered that question 37 minutes ago

@DavidCarlisle thanks for helping me out with the beelines question. Was absolutely tearing my hair out.

10:59 AM
@AFeldman you should have used the other absolutely brilliant answer to the original question, that didn't require on an unstable beta release engine:-)

@DavidCarlisle Strange, i don't see it. :-)

@Johannes_B ^^^

@DavidCarlisle I would have, but I had this code integrated into some shell scripts that I would have had to re-write.
Plus some time pressure on a current project that has a hard deadline.

:-)
@AFeldman so are you using that in a real document?

Yes I know. I don't even have a dog, and he ate my homework.
I have a visual problem with following lines. Always have had it. When I use the gradient I can proofread much faster and with less fatigue.
So yes I am absolutely using this in the real world, with a real project, that has to get done ... or else.

11:05 AM
@AFeldman Interesting. I forget sometimes that people actually use this stuff (I've not used TeX except for chatting here since some time last century:-)
@AFeldman anyway glad you got it working!

Thanks to you. :)

1

I'm fairly new to LaTeX. I've tried to do this myself for one week and decided I need help. I don't think posting my own code will help, so I'll just get to the point. This (above) is the cover of the template. There's a horizontal bar at 1/3 of the page (color separate adjustable). Above the ...

@DavidCarlisle That is a question that deserves a good down-vote. :-(

Johannes_B, I got pretty mad about that one.
your comment on it is delicious
I love the "template generation site run by idiots" line
@wget love your user name!

11:25 AM
Hi guys!

\ClassError{wgetdoc}{You specified \@wgetdoc@title@filename as filename for the page title, but that file could not be found.}

Do you know why LaTeX complains (actually xelatex) with \@wgetdoc@title@filename
The error message I get is:
! Paragraph ended before \ClassError was complete.
and \@wgetdoc@title@filename is well defined.

@AFeldman Some users here provide their expertise for money. Generating such a template should be done for some money. And as far as i know, the prices are very good. Asking do the sh9t for me is draining the community. Providing a TikZ image is often done by the people because they simply have fun doing it. Answering biblatex questions is needed because only a limited amount of people actually know what to do. I (me personally) can't expect every user to read and digest the whole manual.

That code is actually in my own class file.

@wget \ClassError needs three arguments, not just two.

@wget Escape the command using string or something

@wget \ClassError{<class>}{<Short error message>}{<Long error message>}

11:26 AM
@egreg damn that did the trick...
Thanks. One hour I was on that issue :D

@Johannes_B Looking at that question again, and letting my paranoia free, it almost seems like a Microsoft employee is looking to do another "microsoft word vs. latex" fake study. And has the nerve to post here to get help with it.

I thought the last argument was facultative.
And my string is well expanded, no issue with that thus.
@AFeldman Haha . Thanks. curl is my best friend ;)

@egreg Happy Birthday to youuuuuu!!!

@AFeldman I don t thing the reason the question was posted is that mysterious.

@Johannes_B you are of course right. Probably somebody who wants documents to look like that, argh.

11:38 AM
2

I am trying to configure Cyrillic (namely, the Russian language) in my LaTeX template. I successfully downloaded the template like this: LaTeX book template dependent files The only change that I made to the template was in the main.tex file, which I'm showing the snippet of code below: %-----...

What could we do with that question?

0

Here is only a partial solution. I was not able to add the axes, I do not know TikZ that well. Uncommenting the \begin{axis} bits breaks the plot for me. Also, I had to inline the polynomial into the plot command because it would break and I could not know any other solution. \documentclass{arti...

Thanks all, bye!

@DavidCarlisle Quite similar question: tex.stackexchange.com/questions/237059/…

@wilx Add this to the start of the tikzpicture:
\draw[help lines, color=gray!30, dashed] (-6.2,-5.1) grid (10.1,4.5);
\draw [-stealth] (-6,0) -- (10,0);
\draw [-stealth] (0,-5.3) -- (0,4.5);
\foreach \x in {-6,...,-1,1,2,...,9}
\draw (\x,2pt) -- (\x,-2pt) node[below]{$\x$};
\foreach \y in {-5,...,-1,1,2,3,4}
\draw (2pt,\y) -- (-2pt,\y) node[left]{$\y$};
(The help lines were already there, but add the rest.)

11:57 AM
@TorbjørnT. Thanks!

@wilx No problem. I added a picture to your post as well.

1

jasa-template.zip was downloaded and now what? We do not know how to use it with our LaTeX written paper How does one unzip it?

@AFeldman :) <3

12:29 PM
And maybe you could help me with this:

\ifthenelse{\isundefined{@wgetdoc@title@maintitle} \OR \lengthtest{\@wgetdoc@title@maintitle < 1}}{

\ClassError{wgetdoc}{You did not specify a main title or it is empty}{}
}{}

xelatex complains about the < 1
It says: ! Missing number, treated as zero.
Any idea?
Btw, if you know what are the differences (except the different catcode namespaces) between \isundefined and \@ifundefined, this would be great.

@wget \lengthtest compares two dimensions, not string lengths.
@wget You probably want to use \isempty

12:45 PM
@wget \ifthenelse{\isundefined{@wgetdoc@title@maintitle} \OR \lengthtest{\@wgetdoc@title@maintitle < 1}}{ doesn't work does it? \OR doesn't short-circuit so if it isn't defined you'll get an error in the length test (even if it were a length)
@wget just initialise your class with \def\@wgetdoc@title@maintitle{} then you know it is defined and the test can be simply \ifx\@wgetdoc@title@maintitle\@empty\ClassError....\fi

nope it doesn't work due to the second statement after the \OR with the length.
But I was using an "or" because if it isn't defined, the second check statement after the or shouldn't be checked. Like in other programming languages, it should be short-cirtcuited

@wget it's very brave to assume tex behaviour based on what other programming languages do (and not all of them do that)

@wget You could use \ifdefvoid from etoolbox

@wget and the tests get passed through an edef before being evaluated so ....

@egreg yep, migrating from ifthen to etoolbox is maybe what I'll do. etoolbox is loaded by other packages I use anyways.
but migrating to it will require to convert all these check from the \ifthenelse syntax to the one from etoolbox :-(

12:54 PM
@wget Don't tell @DavidCarlisle, but etoolbox conditionals are much better than those in ifthen.

@egreg It's not my fault

:D
Yep I've read that statement everywhere... :D

Jun 12 at 17:55, by David Carlisle
@egreg excuses excuses

For example, reading the etoolbox doc, I have
\ifstrequal{hstringi}{hstringi}{htruei}{hfalsei}
"The strings are not expanded in the test"
Does this mean I'll need to \expandafter before each strings I need to compare?

@wget Yes, but there are workarounds.

12:56 PM
@wget it depends

Example with this code for babale to detect if english is loaded:
\typeout{this is english}
}{
\typeout{this is not english}
}
What should I do?
*babel

@wget is that the right test anyway? \bbl@loaded is a list:
> \bbl@loaded=macro:
->french,english.

0

I'm working on my resume (CV) and I would like to use the res documentclass. However, I can not find any document about this class and how to use it even on the CTAN website. Could you please help me to find more details or some examples showing ho to use this class?

Can anybody answer that?

@Johannes_B answer: why do you want to use an ancient undocumented class?

@DavidCarlisle Exactly. We have a bunch of such qustions tagged templates and i don't know what to do with them.

1:01 PM
@wget if you want that test, I'd just do \def\tmp{english}\ifx\bbl@loaded\tmp \typeout{english}\else\typeout{not}\fi

@DavidCarlisle I know this is the list, this was just as an example.
But it's really weird and annoying we need to use a temporary variable (command) for that :-/

@wget you could define a test command that does the def behind the scenes (that's what ifthenelse is doing) or you could use the pdftex extension \pdfstrcmp which doesn't require a def

or write that non sense :D
{
\typeout{this is english}
}{
\typeout{this is not english}
}

@wget yes although that is even less attractive if you needed to expand the second argument (english here) also of course beware missing % at ends of lines
@wget ifstrequal just does as I wrote above it does two edef one for each argument then \ifx tests them, so is defining two temporary commands less weird than defining one?
\newrobustcmd{\ifstrequal}[2]{%
\begingroup
\edef\etb@tempa{\detokenize{#1}}%
\edef\etb@tempb{\detokenize{#2}}%
\ifx\etb@tempa\etb@tempb
\aftergroup\@firstoftwo
\else
\aftergroup\@secondoftwo
\fi
\endgroup}

1:22 PM
@DavidCarlisle Hmmm
\def\foo{baz}\edef\tmp{\detokenize{\foo}}\show\tmp
> \tmp=macro:
->\foo .

@egreg I know what detokenize does:-)

@DavidCarlisle If one wants to compare the expansions

@egreg then you need expandafter as @wget showed above (or more if you want to expand both) but I was replying to the comment about needing to do a \def to use \ifx.

Around 40 template questions remaining that i cannot answer because, i don't know what they are about or what the problem might be.

@DavidCarlisle This is not the case of everyone. detokenize and expansions is still a blurry concept for me. ;-)
Damn LaTeX is becoming really a complex ecosystem nowadays :-/
Markdown solutions are not fully usable though. eg. HTML export of dillinger.io is lacking too much feature for me. Sticking to LaTeX for now. ;-)

1:33 PM
Getting LaTeX and friends closer to students; subscribe to EduTeX

1:58 PM
@wget yes you can safely ignore most arguments between @egreg and myself, I just humour him as he's even older today than usual.

@DavidCarlisle OK then ;-)
Damn. \title[maintitle=]
If I check the xkeyval key (it self defining the command \@wget@title@maintitle) with
\@ifmtarg{\@wget@title@maintitle}{
\ClassError{wgetdoc}{The main title youy specified is empty}{}
}{}
xelatex continues the compilatiokn and does not complain...
Damn that's crazy. It shpuld complain. I even used \expandafter\ifblank from etoolbox, same "issue"
Seems logical. THis is the key I need to check, not the command...

@wget first add \show\@wget@title@maintitle so you find out what value it really has, then you can design a test for that value.... (I have no idea what \@ifmtarg does, is that in xkeyval?)

Nope. That's in ifmtarg
the \isempty commands are defined as it.
> \@wget@title@maintitle=macro:
->.
Hum...

@wget honestly I'd do \ifx\@wget@title@maintitle\@empty \Classerror...\fi the keyval stuff will have stripped any white space already so all the complication of ifmtarg checking for white space is wasted

2:17 PM
Ok thanks for the detail. I'll simply use \ifx\@wget@title@maintitle\@empty then ;-)

Quack from SP!

@PauloCereda Well shaken?

@egreg Yep, shaken not stirred. :)

@wget on the other hand although it's doing extra work ifmtarg should still report that as empty if it has the value you \show-ed

2 hours later…
4:03 PM
I assume if we want to have several values for one key, xkeyval is not adapted anymore and we need to switch to pgfkeys?

4:22 PM
@wget you mean foo=1,foo=2? (keyval can handle that so i assume xkeyval can, although I haven't looked) then there is also l3keys as an alternative to pgfkeys (especially if you are loading expl3 anyway)

Nope I mean \documentclass[languages={french, english,dutch}, a4paper, foo=1,bar=2]{myclass}
something t handle my use case with the languages

@wget well in that case you just get the list as a single key value and iterate through it later

hum do you know how I can iterate over it? :D
I'm currently reading the pgfkeys manual.
I think I'll need it for my question that is still unanswered: https://tex.stackexchange.com/questions/281029/override-optional-parameters-of-newtcblisting-from-tcolorbox
Christian said to me xkeyval and pgfkeys are incompatible, so I'll need to get at it.

@wget hundreds of macros for iterating over a comma separated list \@for in the latex format for example, but expl3, or any keyval package or .. have macros to do the same with varying levels of complexity
@wget if you know how to iterate over the comma separated a4paper, foo=1,bar=2 then you know how to iterate over french, english,dutch (It's easier as there are no = but it might be simpler to use a general keyval parser anyway if you are already using that)

@wget They are independent: one can happily load both, but any key definitions are totally separate

4:35 PM
I'm not parsing manually, I'm using xkeyval which does the things for me ;-)
What harder is to make {french, english, dutch} to be recognized as a simple value. xelatex complains the value has been broken unexpectedly, cutting at {french,|
and using another syntax like [french,english,dutch], the compilation crashes completely
! LaTeX Error: File ].cls' not found.

1 hour later…

@StefanKottwitz offline for a few days.

@TRiG Interesting, I'd never heard of LingXPaper.

@wget that sounds like a bug in xkeyval? {} ought to work

6:18 PM
@DavidCarlisle Do you want me to give you my whole class file with a minimum working example (non working in that case)?

7:15 PM
@Johannes_B Ok! Satellite connection for a few days.

8:12 PM
@DavidCarlisle @greg After rereading pgfopts and pgfkeys, I don't think
\documentclass[languages={english, french}, onepage]{myClassFile}
is posssible. Latex always complains ater the first comma after english. It thinks the first class option argument is finished and the next one begins. This isn't the case actually :-/
What I used for my experiments:
http://tex.stackexchange.com/a/34318/66964
http://tex.stackexchange.com/a/167214/66964
http://tex.stackexchange.com/a/185976/66964

8:24 PM
@wget how are you getting keyval parsing in to documentclass? i would have expected any package that enabled that would have ensured that {} guarded the commas you could presumably use {{english,french}} but it's not so nice and users will get it wrong.

\newif\iflanguagesdefined
\DeclareOptionX{languages}[english]{
\PassOptionsToPackage{#1}{babel}
\show#1
\iflanguagedefined
\ClassError{wgetdoc}{A language has already been defined with the singular 'language' argument keyword}
\fi
\languagesdefinedtrue
}

\newif\iflanguagedefined
\DeclareOptionX{language}[english]{
\PassOptionsToPackage{#1}{babel}
\iflanguagesdefined
\ClassError{wgetdoc}{Languages have already been defined with the plural 'languages' argument keyword}
I tested removing the { }
\documentclass[languages=french,german]{wgetdoc}
and sometimes german is successfully passed to babel. That's weird...

@wget that's normal behaviour for class options, they are passed to all packages

if I add another unrelated languages, for example another option like a4paper, this is working too as babel does not recognize a4paper as a valid language, it got ejected.
True. Thanks for the reminder.
Damn. This means I cannot let the thing as it. As it will break with other packages... Not all packages are as conscientious as babel is

@wget no that is handled by the core.

That parsing issue is a problem. I tested with pgfkeys, and I cannot even reach the pgfkeys I defined, xelatex does not parse the { } correctly :-/

8:30 PM
@wget you didn't say how you are parsing the documentclass option 9since the standard \processoptions won't work.

\begin{document} missing blablabla

@wget yes, it does.

Actually, I don't do anything more. I'm not parsing manually, just letting xkeyval do all the parsing for me.
Just using \ProcessOptionsX
So no for loop, no string parsing, nothing more.
I thought the core of latex would allow me to do that :-/
Does it?

@wget no idea what xkeyval does but just using core packages this document
\documentclass[languages={english, french}, onepage]{myClassFile}

\stop
produces this terminal output
languages are english, french
onepage is true
showing that the {} did quote the comma list
the class file is:
\RequirePackage{keyval}

\define@key{foo}{languages}{\typeout{languages are #1}}
\define@key{foo}{onepage}[true]{\typeout{onepage is #1}}

\def\tmp{\setkeys{foo}}

\expandafter\tmp\expandafter{\@classoptionslist}
@wget keyval is by far the simplest of all the keyval packages, If it can manage this, then any of them should be able to do it without dropping the {}

Damn... With xkeyval:
\$ xelatex test.tex
This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 12 language(s) loaded.
(./wgetdoc.cls
Document Class: wgetdoc 2016/06/11 William Gathoye's documentation class
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/report.cls
Document Class: report 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/size10.clo))
With keyval:
xelatex test.tex
This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 12 language(s) loaded.
(./wgetdoc.cls
Document Class: wgetdoc 2016/06/11 William Gathoye's documentation class
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/report.cls
Document Class: report 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/size10.clo))
Notice how the output regarding the languages are difference...

8:40 PM
@wget i couldn't possibly comment.....

*different
So xkeyval seems to be buggy...

8 hours ago, by David Carlisle
@egreg It's not my fault

However, removing the trailing X from my \DeclareOption, and coming back to xkeyval,
I still have the \begin{document} parsing issue :-/

@wget you could try Heiko's kvoptions
@wget ?

Yep. To remove the \begin}document issue you meant,
?

8:45 PM
@wget what begin{document} issue

I switched back to keyval, instead of xkeyval, but I still have the latex compilation error
! LaTeX Error: Missing \begin{document}.
as if the {english, french} weren't properly interpreted :-/
I'm debugging to see what's wrong. Since with your minimal working example, this is working...

@wget they will not be if you use \processoptions that is not set up for key value at all.

What do you mean by that actually. Don't understand. I'm using \ProcessOptions like defined in your documentation.
@DavidCarlisle ^
Does keyval support default values?
According to that more up to date documentation, yes:
ftp://ftp.dante.de/tex-archive/macros/latex/required/graphics/keyval.pdf

@wget yes see above, I defaulted onepage to true

Indeed. So I understand. xkeyval uses its own \DeclareOptionX which actually adds the ability to have default values, as it:
\DeclareOption{languages}[english]{
\typeout{#1}
}

8:57 PM
@wget ProcessoOptions is designed for standard latex options like [12pt,a4paper,twoside] so no = so no values and so no values needing {} to hide commas.

And what the solution then? I see keyval does not add any parsing solution :-/

@wget yes as I say if that's broken look at texdoc kvoptions which is Heiko's code (derived from something i wrote for hyperref originally) to do the sam ething, parse options with values
@wget you could do as I posted above which is a fully working version if kvoptions or xkeyval do not do what you want

@DavidCarlisle ReEvaluating my needs: xkeyval is buggy with several values for one key, keyval does not provide default values for class options. And maybe I need pgfkeys with the issues I have with lstlisting described here: tex.stackexchange.com/q/281029/66964
Hum. That's hard. really hard.

9:20 PM
@wget you can use keyval to parse the class options with defaults as i showed above

@DavidCarlisle In that case, I would need to use a for loop etc. to parse the classoptions string?

@wget no see as i posted above I used keyval's \setkeys but @JosephWright just flew in and will tell you it's all easier with l3keys:-)
@wget or of course you could stick to standard latex syntax and not have foo=bar in the class options and have a separate \classsetup{foo=bar} command to use in the preamble

classsetup would have the same issues IFAIK
\classsetup{languages={english,french}} --> BAM xkeyval that will be kidding :-(
In your keyval solution do you have a catchall feature?

To achieve such a thin:
%\DeclareOptionX*{
% \ClassWarning{wgetdoc}{Unknown option ‘\CurrentOption’. Discarded.}%
%}

9:35 PM
In case you ever wondered what bibtex does, try doing it semi-manually. It involves two people, one with nine sheets of paper (the bibliography) laid out on the floor and a highlighter, the other reading manually entered citations from the document itself to make sure they match. Word hell finally over.
At least the formatting of the bibliography itself was done with biblatex`.

@wget yes just need to redefine \def\KV@errx#1{\PackageError{keyval}{#1}\@ehc}} from being an error to whatever you want to do. keyval is only 60 or so lines, it really isn't much code so changing it to do any related thing is likely to be a lot less code than the transcript of this conversation:-)

10:33 PM
@AlanMunn Nor had I.

10:49 PM
Is lualatex included with texlive 2016 now not compatible with pdflatex code?

11:45 PM
@AFeldman It depends. Certain packages shouldn't be loaded with luatex ever. What do you have in mind?

Which I think is not too compatible. Is there a "compatibility mode" heh
I have custom scripts I run and in moving to texlive 2016 I've experienced some problems. David Carlisle was kind enough to help me with one of them, updating the lualatex code, but then the pdflatex part now is also having problems.

@AFeldman Yes, I see. That works with TL2015 but not TL2016. There were a bunch of big changes in the latest version of LuaTeX that removed some of the pdf specials which this document is using.