Giter Club home page Giter Club logo

tex's People

Contributors

chbrown avatar fintelkai avatar rawlins avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tex's Issues

\dash inordinately triggers overfull violations

\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?

Dependency on the subfigure package

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.

Add example article document

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.

lucidaot option doesn't work with system fonts

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.

Add \isdot shim for backwards compatibility with BibTeX

\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.

Fix issue with \textbullet in Lucida

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.

Omit verbose messages from generate-ojs-homepage output if stdout is a TTY

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:

  • Close &2, or redirect it to /dev/null, for the entirety of the script
  • Add -q/--quiet to the wget calls

Optimally, the user should just pipe into pbcopy or similar, as the usage (--help message) suggests.

Deprecate ExPex

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:

  • ExPex does not measure width / right margin properly (#9)
  • ExPex labeling does not support \ref{}erencing properly (#14)
    • At S&P, root level examples in footnotes are numbered with roman numerals.
    • ExPex supports this in the immediate/surface labels via \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)

Make production vs. external build-process more interchangeable

Right now, for most of the production process, there are two major configuration differences between development and production builds:

  1. Font: Times in development (or Computer Roman), because Lucida is a commercially licensed font.
    • The lucida class option is only used in production.
  2. Bibliography compiler: usually BibTeX in development, since most people already have it set up or find it easier to use than BibLaTeX (BibLaTeX is the future but honestly it's not very stable so I don't blame them)
    • In production, the biblatex class option is added, and...
    • The single BibTeX \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.

  1. 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"

  2. 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:

  • Fallback to Times when Lucida is not available. (1923755)
  • Fallback to BibTeX when BibLaTeX (well, the biblatex-sp-unified.bbx file) is not available. (633fb34)
  • Support BibLaTeX syntax/API when in BibTeX mode. (de9979b)
  • Update templates and documentation to use BibLaTeX syntax/API.
    • \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).
  • Log warning and fall back to BibTeX when BibLaTeX is requested and biblatex-sp-unified.bbx is installed but the biber backend can't be found or BibLaTeX fails for some other reason.
  • Make the [final] class option imply BibLaTeX and Lucida (since it's less dangerous now to set those).

ExPex does not measure width / right margin properly

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.

Inconsistencies in changing from times/cm to lucida

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.

ExPex labeling does not support \ref{}erencing properly

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:

ExPex output body

[...]

ExPex output footnote

Abstract placement inconsistency

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.

Link/hyperref across page break is broken

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? :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.