Code Monkey home page Code Monkey logo

hint's Introduction

HINT

Sources and Documentation for the HINT project. The HINT projects home page is at https://hint.userweb.mwn.de/

Directories

examples

example tex and latex files and the resulting HINT files (*.hnt)

hilatex

hilatex loads a format file to enable hitex to process standard LaTeX documents. The directory contains test cases, and supplemental code for using hilatex. The LaTeX support of hitex is still in its infancy, but growing.

hintview

hintview is a family of viewing applications for HINT files. the code for hintview is maintained in this directory. If you are looking for ready to use stable versions you should go to https://hint.userweb.mwn.de/hint/hintview.html and were you can get setup files or links to app-stores.

texprof

texprof is a profiler for TeX. It maps the runtime of TeX to
the files, lines, and macros of TeX's input files.

LICENSE

In this repository you find artifacts, notably source code, from several sources that have different licenses attached.

  • The files in hintview/external/ come from other projects and are here just for convenience. Each subdirectory there specifies its own license requirements.

  • The files in hintview/backend/ fall into several categories:

    • stb_imgage.h is from the http://nothings.org/stb project and is in the public domain.

    • htex.w
      htex.w is a derived work from D. E. Knuths tex.web and contains the license from the original tex.web file.

    • htex.c and htex.h
      The files htex.c and htex.h are generated from htex.w using the program ctangle and are considered to be under the same license as htex.w

    • format.w and hint.w
      These files are source files from the HINT project and contain an MIT/X11 license as in the file LICENSE.

    • Other files in hintview/backend/
      All other files in hintview/backend are generated using the program ctangle from either format.w or hint.w and are considered to be under the same license as format.w or hint.w

  • The files in Linux/, Android/, MacOS/, iOS/, and Win64/
    These files implement the user interface of the various HINT file viewers. They currently have an MIT/X11 license included as in the file LICENSE; but future implementations of viewers might have different licenses attached.

  • The artwork in hintview/resources/ is again under an MIT/X11 license as in the file LICENSE, but with the additional restriction that the use of the artwort is restricted to programs that have the sole purpose of displaying HINT files. All other uses require the written permission of the copyright holders.

  • Any files not covered by the above that do not explicitly contain a different license statement are under an MIT/X11 license as in the file LICENSE.

hint's People

Contributors

ascherer avatar daniel-seifert avatar dcseifert avatar gsocher avatar ruckertm avatar u-fischer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ascherer

hint's Issues

use of ~... for indicating depth

Most engines use ~... to indicate the nesting depth in log files. hitex doesn't. This makes it difficult to compare log files.

Include link text in `hyper@linkurl` for `hyperref` driver

There is a blank implementation for hyper@linkurl which means that adding a \href to a document will display nothing. I realise that it might not be possible to create the proper link in the HINT file format, but would it be possible to include the link text (#1) so that the document reads properly even without a functioning link.

I don't really know what I'm doing, but I guess that changing hilatex/base/hhitex.def so:

\def\hyper@linkurl#1#2{}%

reads something like

\def\hyper@linkurl#1#2{#1}%

might fix it. It also looks like the same fix might be needed for hyper@linkfile and possibly elsewhere.

Example

\href{https://github.com}{GitHub}

using penalties less than -10000

Penalties less than -10000 as output penalties are used to signal the output routine when to use some special output. This does not work in example ltxlinks1.tex which does not call special output.
This example also produces an empty page at the end of the document. This effect might be related to the first problem.

compare hilatex lxtlinks1.log:
{globally changing \outputpenalty=-10000}
{into \outputpenalty=0}
\output->{\let \par @@Par \ifnum \outputpenalty <-@m @specialoutput \else @
to pdflatex ltxlinks1.log:
{globally changing \outputpenalty=-10000}
{into \outputpenalty=-10001}
\output->{\let \par @@Par \ifnum \outputpenalty <-@m @specialoutput \else @

License statement is confusing

The main page of that repository states that the license of the code is LGPL-2.1 license, although large parts of the code are MIT/X11. Would be nice if this could be fixed (if possible). Thanks!

Detail graphic 'drawing' support

Currently, the manual gives no information on what type of 'drawing' support is available via \special. Other backends offer some approach to creating basic constructs such as lines, paths, fills, etc.

Hintview logo should have alpha=0

I've noticed that the Hintview logo for the MacOS program has a grey background. In the MacOS Dock it would be nicer if the logo were transparent around the "flying book".

hintview

Support fo rotation, scaling and clipping of content

Linked to #5 in some ways, there are currently no details of how to scale/rotate content or to clip it. This can be done in some backends using dedicated support, and in others using general 'drawing' primitives (e.g. in pdfTeX where PDF provides such ideas). Although absolute graphics scale in HINT is not of the same importance as for other output formats, the relative sizes of content could well be important.

full file names

Most engines display full file names in the log file. hitex doesn't. This makes it difficult to compare log files.

graphics inclusion

in hint branches I have started to sketch a graphics.cfg to default hitex backend if latex is used , and a hitex.def backend file for latex color and graphicx packages.

https://github.com/latex3/graphics-cfg/blob/hint/graphics.cfg

https://github.com/latex3/graphics-def/blob/hint/hitex.def

Latex supports

\includegraphics[height=5cm]{example-image.png}

and

\includegraphics[scale=2]{example-image.png}

For most backends height is not supported and so latex converts height=5cm to scale=(5cm/<natural height>)

similarly if scale is not supported (as is the case with hitex) latex would convert scale=2 to height=(2*<natural height>)

Either way, latex currently assumes it can get the natural height (the natural size can be passed as an option, but such an option is not needed by currently used back ends)

Is it possible to get the natural size of an image?

Using copies of /usr/local/texlive/2023/texmf-dist/tex/latex/mwe/example-image{.jpg,.png} for testing,

these images are 400bp by 300bp.

I hoped

\setbox0\hbox{\HINTimage=example-image.jpg}

might work, but


aaa

\setbox0\hbox{\HINTimage=example-image.jpg}
\showthe\wd0

xxx

\bye

gives

> 8.75002pt.
l.5 \showthe\wd0
                
? 
! Missing } inserted.
<inserted text> 
                }
<to be read again> 
                   \vfill 
\bye ->\par \vfill 
                   \supereject \end 
l.9 \bye
        
? 

and if I explicitly terminate the \HINTimage with \relax I get no error but 0pt:

aaa

\setbox0\hbox{\HINTimage=example-image.jpg\relax}
\showthe\wd0

xxx

\bye

produces no error but

> 0.0pt.
l.5 \showthe\wd0

To avoid division by zero errors the draft hitex.def arbitrarily sets the natural size to 1in x 1in, this allows

1 \includegraphics{example-image.png}

2 \includegraphics[height=5cm]{example-image.png}

to include the image, and a scaled version, but the actual sizes are wrong.

Not directly related but the color mapping in the windows hintview seems off for png files,


aaa

\HINTimage=example-image.jpg  width 1in height 1in \relax

bbb

\HINTimage=example-image.png width 1in height 1in \relax

\bye

views as a brown png:

image

Detail colour support available

Currently the manual does not specify what form of \special (if any) is supported for colouring the output. This would likely include details of any colour stack system available, whether stroke and non-stroke colour are supported separately, etc.

png files show wrong colors

aaa

\HINTimage=example-image.jpg width 1in height 1in \relax

bbb

\HINTimage=example-image.png width 1in height 1in \relax

\bye

views as a brown png:

233046401-d3ecb3fa-065c-48e5-b2af-436da1f17d4a

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.