semprag / tex Goto Github PK
View Code? Open in Web Editor NEWS&P LaTeX and BibTeX sources
License: The Unlicense
S&P LaTeX and BibTeX sources
License: The Unlicense
\dash
, which is how it's used in most cases, and it's used quite a lot, really doesn't like to line-break before the following word. I agree that line-breaking directly after should be avoided, but there's not the same potential for ambiguity as with a single hyphen, and I think avoiding "overfull \hbox" should be a much greater priority.
\dash{}
resolves this, allowing line breaks directly after the spaced em-dash (with the em-dash flush right against the margin, so that's good). Is there a way to get \dash to act the same in both cases? Would a simple \xspace do the trick?
It would be great to switch to subcaption, as subfigure hasn't been updated since 2005 and causes a lot of errors. Maybe making it an option for backward compatibility.
The template/boilerplate at examples/sp-template.tex
is useful, but it might be good to provide a full article as an example as well.
When the Lucida OT fonts are in a local ./fonts directory, typesetting basic.tex
(changed to lucidaot
option) with XeLaTeX succeeds. But when the fonts are either in /Library/Fonts
or in ~/Library/Fonts
, the following error happens:
(/usr/local/texlive/2018/texmf-dist/tex/latex/unicode-math/unicode-math-table.t
ex)))kpathsea:make_tex: Invalid filename `[LucidaBrightOT.otf]/OT', contains '['
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! fontspec error: "font-not-found"
!
! The font "LucidaBrightOT" cannot be found.
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.107 BoldItalicFont=*-DemiItalic]
FWIW, typesetting lucidaot-sys-example.tex
with XeLaTeX works just fine, so something in sp.cls
is not letting fontspec
find the system fonts.
\isdot
is a command provided by BibLaTeX to avoid extra spacing between double punctuation, e.g., when a paper title ends in "et al.". In such cases, you would add \isdot
after the initial dot in your .bib
file, but if you use BibTeX + LaTeX, the LaTeX compiler chokes with an "Undefined control sequence" error when it hits any \isdot
calls.
AFAICT, a simple \newcommand\isdot{}
seems to do the trick, but perhaps there are other cases where something fancier might be more appropriate?
The shim could be added to the begin.bib
function in sp.bst
or to the non-BibLaTeX option loader in sp.cls
; I'm not sure which location makes more sense.
In sp.cls
, when the Lucida option is chosen, the following replaces the tiny \textbullet
:
\DeclareTextCommand{\textbullet}{\encodingdefault}{\UseTextSymbol{OMS}\textbullet} % the default is tiny
This is cribbed from the definition of a now deprecated option "altbullet" for lucidabr.sty (https://tug.org/pipermail/yandytex/2006-February/001200.html). It works, ish, but what actually happens is that latex first tries to find an OMS-encoding for Lucida, which doesn't exist, and then falls back to Computer Modern.
LaTeX Font Warning: Font shape
OMS/hlhj/m/n' undefined(Font) using
OMS/cmsy/m/n' instead(Font) for symbol `textbullet' on input line
So, it would seem we should supply the character directly, without sending the system on a wild goose chase.
Note, though, the following in the documentation for lucimatx.sty
:
altbullet: The option is no longer provided. Instead of patching the font definitions, redefine \labelitemi appropriately, if you donβt like the shape of the default item label \textbullet.
So, I guess, Walter Schmidt wants us to redefine \labelitemi
.
Of course, if we switch tout court to LucidaOT, this is all moot.
wget
will print messages (to /dev/stderr
) about downloading (1st run) or not clobbering existing files (subsequent runs). If the user manually selects the result (/dev/stdout
) and copies the whole thing, these messages will be interlaced in the copied HTML, which is ugly.
generate-ojs-homepage
should detect if /dev/stdout
is a TTY, and if it is, proceed with one of two options:
&2
, or redirect it to /dev/null
, for the entirety of the script-q
/--quiet
to the wget
callsOptimally, the user should just pipe into pbcopy
or similar, as the usage (--help
message) suggests.
Or at least strongly recommend using gb4e-emulate
or linguex
.
ExPex is powerful, partly due to it doing everything its own way (for example, references), but that means it's easy to break from the standard aesthetic.
List of grievances:
\ref{}
erencing properly (#14)
\lingset{exnotype=roman}
, but references to these examples use the default arabic numbering (for both \ex
and \pex
root level examples, as well as \pex ... \a
subexamples)Right now, for most of the production process, there are two major configuration differences between development and production builds:
lucida
class option is only used in production.biblatex
class option is added, and...\bibliography{myfile}
is replaced with \printbibliography
, along with a adding \addbibresource{myfile.bib}
to the preamble.Sometimes when we send document sources back to the author for revisions, we forget to switch the production flags off. This is unfortunate, because neither of these cases degrade gracefully when 1) Lucida, or 2) the required BibLaTeX styles / compiler, are not available.
Recovering when Lucida is missing is close β we can simply set \@times
to true in the \IfFileExists{lucimatx.sty}{}{ ... here ... }
else clause in sp.cls
, in addition to the current fallback of logging a warning saying "Requested fonts not present"
Recovering from BibLaTeX is going to be harder. It's easy to define fake BibLaTeX API commands that call out to the BibTeX commands, but harder to go the other way around, since BibLaTeX insists on knowing what files are in going to be in the bibliography before the preamble ends.
So I propose that we change the template + instructions to use \addbibresource{}
and \printbibliography
commands instead of the usual single BibTeX \bibliography{}
command, and add shims for those commands to the \else
side of the \if@biblatex
conditional in sp.cls
. My initial hack of a solution looks like this:
\def\@bibresource{\relax}
\newcommand{\addbibresource}[1]{\gdef\@bibresource{#1}}
\newcommand{\printbibliography}{\bibliography{\@bibresource}}
I'm not sure how to check for BibLaTeX+biber and that the required bbx/cbx files are around when biblatex
is used, and give some legible warning if anything is missing, but that would be nice in terms of user experience.
Even more simply, I'd like to propose that we replace the [lucida]
and [biblatex]
class options by hooking into the standard [final]
option, which would effectively set both of those to true and degrade gracefully, but with blaring warnings, if it can't import and use them properly.
Then all we would have to do when turning around LaTeX sources would be to remove the final
option, and even if we forgot to do that, it would just add a couple warnings to the author's logs, instead of breaking completely.
Checklist:
biblatex-sp-unified.bbx
file) is not available. (633fb34)\bibliography{...}
will continue to work when in BibTeX mode, so it's fully backward compatible as long as users haven't defined their own \addbibresource
or \printbibliography
commands (which would be weird).biblatex-sp-unified.bbx
is installed but the biber
backend can't be found or BibLaTeX fails for some other reason.[final]
class option imply BibLaTeX and Lucida (since it's less dangerous now to set those).AFAICT, Rothschild 2011 is the only article to use the \spj
macro. \emph{S\&P}
is simply a lot easier to remember.
I propose removing \spj
from sp.cls
.
Gloss translations in expex root level examples tend to overflow (overfull violation) the right margin by 1pt or so. Not always a problem, but this makes right-alignment with hfill impossible. Somehow, gloss translations in subexamples seem to behave properly. But \gla and \glb lines in subexamples sometimes also overflow.
See FocusFronting.pdf
for plenty of examples.
sp.cls
should set the following skips to be more compact than the default:
\abovedisplayskip
\belowdisplayskip
\abovedisplayshortskip
\belowdisplayshortskip
sp.cls
imports different packages based on what font option is supplied in the documentclass.
The means an author can use commands from, for example, stmaryrd
, without explicitly importing that package, but this breaks when moving to production and adding the lucida flag.
It's an easy fix to explicitly \usepackage the previously implicitly required package in the article's preamble, but that seems sub-optimal.
References to ExPex examples ignore (are not told about) changes to the exnotype
configuration parameter:
\documentclass[expex]{sp}
% the expex class option sets \lingset{exnotype=roman} inside footnotes
\begin{document}
Outer paragraph.\footnote{N.b. the example in (\ref{fn:1i}):
\ex \label{fn:1i}
Example text
\xe
}
\end{document}
Produces:
[...]
Some articles (e.g., sp.8.14) have Abstract as the first word in the first line of their abstract, while others (e.g., sp.8.13) have Abstract on its own line.
This depends on whether there is a blank line between \begin{abstract}
and the content of the abstract.
I prefer the former output, where Abstract is not allotted its own line, but either way, we should choose one, and the behavior of the abstract environment's header should not depend on whitespace in the abstract itself.
At least, when that hyperref'd link (in my case, a citation) is in a footnote, and there's another link on the same page, not in the footnote, which spans the same page break.
The result: the whole page is blue (hyperref-colored) and hyperlinked to the main text link's reference. If there's only the footnote link spanning the page-break, but no main text link, the whole page is hyperlinked to the footnote link's reference, but it's not blue. Bizarre.
This isn't technically an S&P issue; maybe it's a no-fix for us. But we might offer some kind of work-around? At least, this is something to watch out for and document somewhere if we don't want to fix
Reference with a (different) full example: http://tex.stackexchange.com/questions/54136/hyperref-link-spans-a-pagebreak-looks-ugly
P.S. Aren't pages obsolete anyway? :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.