[texhax] Running tex from a command line

Michael Barr barr at math.mcgill.ca
Sun Sep 3 21:08:51 CEST 2017


I have not run tex other than from a command line ever.  When I install texlive from CTAN (although I just got a disk from tug, it is useless as my computers don't have readers) it adds it to the path.  I can certainly say on the command line
latex filename, but I actually have three tiny batch files.  Each one looks to see if a filename is supplied.  If it is, it sets a variable dfile = filename (no filetype).  If not, it uses dfile.  The other batch files load my editor and load the pdf reader (I use Sumatra.pdf), all using (or setting) the dfile.  This is under Windows (although it goes back to my DOS days) and cannot be implemented under any version of Linux I have ever tried since there is no way to set the dfile that doesn't go away when the batch file terminates.

Michael
----- Original Message -----
From: texhax-request at tug.org
To: "<Unknown>" <texhax at tug.org>
Sent: Sunday, September 3, 2017 2:46:50 PM
Subject: texhax Digest, Vol 2017, Issue 98

Send texhax mailing list submissions to
	texhax at tug.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://tug.org/mailman/listinfo/texhax
or, via email, send a message with subject or body 'help' to
	texhax-request at tug.org

You can reach the person managing the list at
	texhax-owner at tug.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of texhax digest..."


Today's Topics:

   1. Re: Disable hyphenation after - everywhere (Aleksandar Zec)
   2. Latex on command line (???)
   3. Re: Latex on command line (Philip TAYLOR)
   4. Re: Latex on command line (William F Hammond)
   5. Re: Latex on command line (Schneider, Thomas (NIH/NCI) [E])


----------------------------------------------------------------------

Message: 1
Date: Sun, 3 Sep 2017 13:30:30 +0000
From: Aleksandar Zec <zealeksanman at gmail.com>
To: TeXhax <texhax at tug.org>
Subject: Re: [texhax] Disable hyphenation after - everywhere
Message-ID:
	<CAPHVBTWUtQMxs47kHQ-O1Pkm6m+hOexwea1s2Uw7Owjvvn1WFw at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

On 2 September 2017 at 22:01, Aleksandar Zec <zealeksanman at gmail.com> wrote:
> Just out of curiosity, can you think of any disadvantage of this luatex method?

To be more precise. \babelhyphen{nohyphen} does the job, but
hyphenation points at ordinary "-"s are still there. So, as far as I
conclude from my humble experiments, only a combination of a lua
filter (to disable all hyphenations at -) and a special command (to
enable hyphenation of compound words everywhere except at -) does the
whole job.

Please consider this core. Two questions:
1. will lua filter do any harm?
2. can you think of any improvements or this concept?

\documentclass{article}
\usepackage{luatexbase,luacode}
\usepackage[english]{babel}
\usepackage{hyphenat}
\usepackage{multicol}

\begin{luacode}
no_hyphenation_points = function (head)
  for n in node.traverse(head) do
    if (n.id == node.id('glyph') and n.char == 0x2d and n.next.id ==
node.id('disc')) then
      node.remove(head,n.next)
    end
  end
  return head
end
\end{luacode}

\begin{document}
\parindent=0pt
\begin{multicols}{2}
\textbf{Without lua filter}\par\bigskip
simple - (wrong, hyphenates at -):\par
\fbox{\parbox{1.2cm}{%
begin antidisestablish-mentarianism end
}}\qquad\qquad\null\par\bigskip

\verb|\hyp{}| (wrong, hyphenates at -):\par
\fbox{\parbox{1.2cm}{%
begin antidisestablish\hyp{}mentarianism end
}}\qquad\qquad\null\par\bigskip

\verb|\babelhyphen{nobreak}| (correct):\par
\fbox{\parbox{1.2cm}{%
begin antidisestablish\babelhyphen{nobreak}mentarianism end
}}\qquad\qquad\null\par\bigskip

\directlua{luatexbase.add_to_callback("pre_linebreak_filter",no_hyphenation_points,"no
hyph points")}

\textbf{With lua filter}\par\bigskip
simple - (correct):\par
\fbox{\parbox{1.2cm}{%
begin antidisestablish-mentarianism end
}}\qquad\qquad\null\par\bigskip

\verb|\hyp{}| (correct):\par
\fbox{\parbox{1.2cm}{%
begin antidisestablish\hyp{}mentarianism end
}}\qquad\qquad\null\par\bigskip

\verb|\babelhyphen{nobreak}| (correct):\par
\fbox{\parbox{1.2cm}{%
begin antidisestablish\babelhyphen{nobreak}mentarianism end
}}\qquad\qquad\null\par\bigskip
\end{multicols}
\vfill
\end{document}


------------------------------



More information about the texhax mailing list