Live data from Hacker News

Designing a Business Card in LaTeX

olivierpieters.be

211–220 of 223 posts

Re: Designing a Business Card in LaTeX

#211
post #71

Earlier quoted context omitted.

For longer documents in TeX, I wrote a collection of TeX macros for to make cross referencing easy. The collection was a little tricky to write but is fairly easy to use and works great. The package is based on some logical names that serve as, say, pointers ; then in one place define such a name and in other places refer to it and get the page number, etc. inserted where the reference is made. Given some simple exam…

Your cross-referencing macros sound interesting. Are they publicly available anywhere?

Part III

      \def\SNP#1{{\write\XREFileOut{\string#1}%
      \def\JUNKA{\SNChapterPrefix\the\SNChapter\space\the\SNUnit}%
      {\edef\JUNKB{\write\XREFileOut{\JUNKA}}\JUNKB}%
      \write\XREFileOut{\the\count0}}}%
      %
      % END Modified at 04:16:31 on Tuesday, December 29th, 2015.
      %
      % Define a table tag:
      %
      \def\SNT#1{{\global\advance\SNTable by1
      \write\XREFileOut{\string#1}%
      \def\JUNKA{\the\SNTable\space JUNK}%
      {\edef\JUNKB{\write\XREFileOut{\JUNKA}}\JUNKB}%
      \write\XREFileOut{\the\count0}%
      \the\SNTable}}
      %
      % Define a figure tag:
      %
      \def\SNF#1{{\global\advance\SNFigure by1
      \write\XREFileOut{\string#1}%
      \def\JUNKA{\the\SNFigure\space JUNK}%
      {\edef\JUNKB{\write\XREFileOut{\JUNKA}}\JUNKB}%
      \write\XREFileOut{\the\count0}%
      \the\SNFigure}}
      %
      % Get all the sequence number data from file \jobname.XRF:
      %
      \def\GetSN{{\openin\XREFileIn=\jobname.XRF
      \pushCount\InChapter
      \pushCount\InUnit
      \pushCount\InPage
      \pushCount\MoreFlag
      \ifeof\XREFileIn\MoreFlag=0 \else\MoreFlag=1 \fi\relax    % \jobname.XRF exists?
      \ifnum\MoreFlag=1 \relax
        \loop
          \read\XREFileIn to\LineIn
          \ifeof\XREFileIn\MoreFlag=0 \else\MoreFlag=1 \fi
          \ifnum\MoreFlag=1
            \let\InTag=\LineIn
            \read\XREFileIn to\LineIn
            \edef\InValues{\LineIn}
            \read\XREFileIn to\LineIn
            \InPage=\LineIn
            \edef\JUNK{\InValues\the\InPage}%
            \global\expandafter\let\InTag=\JUNK
        \repeat
      \fi
      \closein\XREFileIn
      }}
      %
      % Get cross-references on 'chapters':
      %
      \def\SNCGetChapter#1{\ifx#1\undefined
      \edef#1{\SNUNone}\else\fi
      \expandafter\First#1 }
      %
      \def\SNCGetPage#1{\ifx#1\undefined
      \edef#1{\SNUNone}\else\fi
      \expandafter\Third#1 }
      %
      % Get cross-references on 'units':
      %
      \def\SNUGetChapter#1{\ifx#1\undefined
      \edef#1{\SNUNone}\else\fi
      \expandafter\First#1 }
      %
      \def\SNUGetUnit#1{\ifx#1\undefined
      \edef#1{\SNUNone}\else\fi
      \expandafter\Second#1 }
      %
      \def\SNUGetPage#1{\ifx#1\undefined
      \edef#1{\SNUNone}\else\fi
      \expandafter\Third#1 }
      %
      % Get cross-references on tables:
      %
      \def\SNTGetTable#1{\ifx#1\undefined
      \edef#1{\SNTNone}\else\fi
      \expandafter\First#1 }
      %
      \def\SNTGetPage#1{\ifx#1\undefined
      \edef#1{\SNTNone}\else\fi
      \expandafter\Third#1 }
      %
      % Get cross-references on figures:
      %
      \def\SNFGetFigure#1{\ifx#1\undefined
      \edef#1{\SNFNone}\else\fi
      \expandafter\First#1 }
      %
      \def\SNFGetPage#1{\ifx#1\undefined
      \edef#1{\SNFNone}\else\fi
      \expandafter\Third#1 }
      %
      %    Read file \jobname.XRF here, now, before anything else.
      %    Get this reading done before any hint of a need to write
      %    to that file.
      %
      % Modified at 08:13:46 on Monday, January 4th, 2016.
      %
      %    If a TeX file has
      %
      %         {\bf \SNU{} Theorem:}\ \
      %
      %    instead of, say,
      %
      %         {\bf \SNU{\SNTagDA} Theorem:}\ \
      %
      %    the TeX can die here:
      %
      \GetSN
      %
      %    Important:  First read file \jobname.XRF.  Then open it
      %    for writing.  This open will give the file length 0 and,
      %    thus, destroy the data, if any, just read.  If
      %    execute
      %
      %         \write\XREFileOut{\string#1}
      %
      %    etc. without doing an open, then output will go to
      %    console.
      %
      %    From some fairly careful experiments, commands
      %
      %         \newread\XREFileIn
      %         \newwrite\XREFileOut
      %         \openout\XREFileOut=\jobname.XRF
      %         \closein\XREFileIn
      %
      %    seem to ignore TeX block nesting and to be fully 'global'
      %    across blocks.
      %
      \openout\XREFileOut=\jobname.XRF
      %
      % ======================================================================

Re: Designing a Business Card in LaTeX

#212

Earlier quoted context omitted.

Part I I tried a grad math department and didn't like it: (1) In a course in real analysis, early on the prof discussed some set theory. The summer before I'd had an NSF thing in axiomatic set theory, Suppes, von Neumann, an appendix in Kelley, etc. His first test had a problem, and at the last minute I saw a solution and wrote it down. He called me on the carpet -- nasty guy. I apologized for using little omega for…

Part II My software now is 100,000 lines of typing with about 25,000 programming language statements and the rest voluminous comments. About 80,000 of the 100,000 are for on-line, and the rest are for off-line, occasional batch runs for some of the data manipulations. There is some light usage of SQL Server. I am basing on Windows and the .NET Framework. For the Web site, that is Microsoft's IIS (Internet Information…

Thank you so very much, graycat. Incredibly helpful, and I appreciate the time you put into the discussion. I feel as if I need to read your post 3-4 times to absorb it all.

I am working in numerical methods for PDE so some of this was far afield but it does make sense that those are the areas ripe for opportunity.

Seriously, appreciate it.

Re: Designing a Business Card in LaTeX

#213
post #66

If you're going to go through all the trouble of typesetting a business card in LaTeX, you really ought to use Computer Modern Roman so that folks know you typeset it in LaTeX. (Related; resumes in CMR always have +10 credibility.)

Computer Modern is a hideous font. It's particularly terrible when rendered in Postscript/PDF, which is how almost all documents produced with it actually get read. But the +10 credibility is absolutely true. It's like CS grunge style: when you wear ugly clothes, you look more authentic.

Heh, I was assuming NelsonMinar was being sarcastic. But yeah -- it's all about the audience. :)

Re: Designing a Business Card in LaTeX

#214
post #77

Earlier quoted context omitted.

As an iOS user, I always assumed QR code reading was just built into Android's camera app. Is that not so?

Nope. Can't read QR code an android out of the box. You need to get 1 out of 100 applications from the app store, that competes for the one who can shows the most ads and be the least effective at decoding the picture. Are you saying that the iPhone camera can read QR code out of the box?

> Are you saying that the iPhone camera can read QR code out of the box?

No, I meant that iOS doesn't have any built-in apps for it, so I always assumed Android must since QR codes are so prevalent.

Re: Designing a Business Card in LaTeX

#215
I have a problem trying to generate the document with: xelatex src/front.tex

It is generated but without icons. If I see the file front.log I think it's trying to write the icons using Fira Sans:

  Missing character: There is no  in font Fira Sans/OT:script=latn;language=DFLT;mapping=tex-text;!
(The line shows 9 times and there are 9 icons too)

I tried everything but I have never used before Latex, so it's really complicated. Any comment will be very welcome.

Thanks.

Re: Designing a Business Card in LaTeX

#216

Earlier quoted context omitted.

Word kerning and hyphenation still sucks, so -10. Seriously, there are many places (CS publishing) where there are biases against papers written in Word.

Very true. I'm unlikely to take an arXiv article seriously if it hasn't been typeset in LaTeX.

And yet, in other disciplines, Word is the standard and you get very, very strange looks if you use anything different.

Source: wrote a psychology PhD in LaTeX.

Re: Designing a Business Card in LaTeX

#217
post #54
post #4

Serious question: Is LaTeX used outside academia these days?

I work on supply chain optimization at Target, and we write lots of internal documents in TeX. Admittedly the team has a relatively academic background—many PhDs in math, CS and OR—but it's still industry use :). Some Word/PowerPoint creeps in as well, but I highly prefer the TeX documents. They look better, are easier to edit/reuse and slot neatly into Git. I really wish more people used it (or Markdown or whatever)…

Completely agreed (happy LaTeX user in industry). However, I have recently been using org-mode for emacs and treating LaTeX as one possible output format. Being able to output to HTML/markdown is really useful for automating import into more commonly used tools.

For anything with non-trivial maths or structure, I'd still use LaTeX, but it's very nice to have an (easier, more portable) choice of output formats.

Re: Designing a Business Card in LaTeX

#218

Earlier quoted context omitted.

Don't travel to Japan without business cards. It's really awkward when everyone gives you one and asks for one back, as I think exchanging them is an important part of meeting someone there.

Indeed. Remember: accept them with both hands and briefly inspect them. It's the polite thing to do.

Absolutely. You can also ask about the name pronunciation, etc. This is Japanese small talk.

Re: Designing a Business Card in LaTeX

#219

Earlier quoted context omitted.

Very true. I'm unlikely to take an arXiv article seriously if it hasn't been typeset in LaTeX.

And yet, in other disciplines, Word is the standard and you get very, very strange looks if you use anything different. Source: wrote a psychology PhD in LaTeX.

Isn't using LaTeX instead of Word in the DSM-5 already, right next to vi and Linux?

Re: Designing a Business Card in LaTeX

#220
Once I wrote a ten-line TeX program to add serial numbers to a large stack of Scantron forms. It worked well enough, but that's when I learned that laser printers are much less precise than I thought when it comes to positioning relative to the edges of the paper.
Post reply on HN