News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

File listing in BibTex format

Started by HSE, January 30, 2021, 01:18:23 AM

Previous topic - Next topic

HSE

Hi all!

This is a little extension of FTree.asm Masm32Sdk example, also in 32 bits.

You can build to read command line like ftree, buts it's more usefull with harcode control.

With hardcode control it's possible to list several directories and files extentions to same list.

I'm listing paper files with ".pdf" and ".doc" extentions, but perhaps can exist more interest in to list ".asm", ".inc", ".rc", etc.

Regards, HSE.
Equations in Assembly: SmplMath

hutch--

Hi Hector,

I have heard the name but don't know anything about BibTex format. What is it ?

Gunther

Steve,

BibTex comes mostly together with LATEX. This has nothing to do with varnish and leather, but is a professional typesetting program, written by Donald Knuth, the algorithm pope. Many publishers require their authors to have manuscripts written in LATEX.
The purpose of BibTeX is to make it easy to cite sources in a consistent manner, by separating bibliographic information from the presentation of this information, similarly to the separation of content and presentation/style supported by LaTeX itself. I'm
using LATEX on a daily basis since 2 decades.

Gunther
You have to know the facts before you can distort them.

HSE

Hi Hutch!

Quote from: hutch-- on January 30, 2021, 08:11:14 AM
I have heard the name but don't know anything about BibTex format. What is it ?

The specification in https://www.bibtex.com is very simple. As Gunther explain, is a classic.

Essentially is an ascii text were entries are book, techreport, inproceeding, etc which contains a key and some fields:@techreport{arrow48,
  author = {Arrow, Kenneth J.},
  title = {The possibility of a universal social welfare function},
  institution = {RAND Corporation},
  year = {1948},
  number = {P-41},
  type = {Report}
}


Program here follow BibTex idea. More formal and more complete treatment is in ObjAsm subforum topic: BibTex routines

@unknownfile{asm_machine1_4,
   location={B:\masm32\projects\ftree\TreeBib.asm},
   store={machine1},
   path={B:\masm32\projects\ftree},
   fname={TreeBib.asm},
   extention={asm}
}
Equations in Assembly: SmplMath

hutch--

Thanks Hector and Gunther, I don't have a background in publishing so its not something that I have used even though the name is familiar.

Gunther

Steve,

Quote from: hutch-- on January 31, 2021, 04:07:19 PM
Thanks Hector and Gunther, I don't have a background in publishing so its not something that I have used even though the name is familiar.

This is not just for classic publications. I write all my lecture notes, collections of exercises, etc. with it. I even developed a template for letters (with letterhead). LATEX is a powerful tool and comes as public domain.

However, the whole truth is this: Donald Knuth developed TEX as a program to replace the classic typesetter in printing. But this is quite difficult to handle. TEX has over 900 commands (compare that with C). So Laslie Lamport (the buddy with the Lamport timestamp) wrote a set of macros that allows ordinary people like me to work with it. Hence the name: LA stands for Lamport.

It's definitely worth taking a look at LATEX. For Windows there is a very stable distribution called MIKTEX. Here, for example, is a relatively good tutorial as starting point. There are still a lot of interesting applications, e.g. music notes or electrical circuits with LATEX. These images are not ordinary graphics that you embed in Word, for example. No, these images are created from ASCII text which is compiled by the LATEX compiler. As an assembly language programmer one simply has to be enthusiastic about these possibilities. I've been writing my LATEX source code with your MASM editor for years (I'm not kidding).

Please understand me correctly: normally I am not a big friend of Wikipedia, but in this case the entries are relatively ok.

Gunther
You have to know the facts before you can distort them.

jj2007

Gunther,

I never touched Latex, and was never urged to do so by a publisher. They all accepted MS Word format. Perhaps it is more important for scientists who use lots of math?

The RichEdit guys have made huge efforts to implement that in their control, but I haven't seen many usage examples, if any. However, it does work with some versions of RichEd20.dll - kind of, see the red warning. Murray's doc is here.


Gunther

Jochen,

Quote from: jj2007 on January 31, 2021, 08:52:05 PM
Perhaps it is more important for scientists who use lots of math?

yes, of course. But also for chemists with their formulas, for electrical engineers with their circuits, for computer scientists with their UML diagrams and structure diagrams, for musicians with their sheet music, for presesntations, creation of own diagrams (bar charts, pie charts etc.), for creating index tabs in longer texts etc. etc. The sky is the limit.

But I stopped trying to convince other people years ago. I no longer proselytize. It's a bit like with the assembly language. Programmers in the high level language have to be open to such things, otherwise there's no point.

Gunther
You have to know the facts before you can distort them.

Biterider

Hi Gunther
Latex has been around for a while.
Perhaps you can start a thread that explains how to install and use it in Win32 from an assembly language perspective?
That would be cool.  :biggrin:

Biterider



jj2007

Quote from: Gunther on January 31, 2021, 09:58:49 PMBut I stopped trying to convince other people years ago. I no longer proselytize.

Gunther,

By all means, don't feel offended, please :thup:

LaTex is surely a very important tool. It was just an observation of mine that none of my publishers ever asked for it (and I published four books and dozens of peer-reviewed papers, with plenty of graphics). You cited some examples of professions that need it; maybe economists doing lots of math use it, too.

Quote from: Gunther on January 30, 2021, 08:23:27 AMMany publishers require their authors to have manuscripts written in LATEX.

Gunther

Jochen,

Quote from: jj2007 on January 31, 2021, 10:54:11 PM
By all means, don't feel offended, please :thup:

Don't worry, I don't feel attacked. It's just the experiences I've had over the years. You simply cannot force a person to be happy. Anyone who tries to do so will probably fail. (Ständig lehrt die Geschichte, doch sie findet keine Schüler).

Quote from: jj2007 on January 31, 2021, 10:54:11 PM
LaTex is surely a very important tool. It was just an observation of mine that none of my publishers ever asked for it (and I published four books and dozens of peer-reviewed papers, with plenty of graphics). You cited some examples of professions that need it; maybe economists doing lots of math use it, too.

That is certainly not the case everywhere. But at Springer (I mean the science publisher), there are LATEX templates for authors. The well-known physics book "Gerthsen" is written according to this template and provides a good visual impression. I wrote my PhD thesis using LATEX and have stuck with it ever since. When I translated a book by Yuval Fisher for Springer years ago, I also had to work with LATEX. But as I said, these are just my experiences.

Gunther
You have to know the facts before you can distort them.

hutch--

Gunther,

> It's a bit like with the assembly language. Programmers in the high level language have to be open to such things, otherwise there's no point.

Hit 'em with some missile ware, weaponised MASM is a ton of fun.  :tongue:

Gunther

Biterider,

Quote from: Biterider on January 31, 2021, 10:22:25 PM
Latex has been around for a while.
Perhaps you can start a thread that explains how to install and use it in Win32 from an assembly language perspective?
That would be cool.  :biggrin:

I'm not sure if that's a good idea. LATEX and assembly language have little to do with each other. Of course, with both, the learning curve is pretty steep.

In the LATEX world, everyone has their problems at the beginning. That's why there are a lot of tutorials, videos and forums. There is the right place to go.
But anyway, I've done the following. Decades ago I wrote a guide for my students showing some - by no means all - of the possibilities with LATEX. I have revised and re-compiled this.

First there is the source code lamoe.tex. This is pure ASCII code and you can read it with any halfway usable editor; the file size is 19 018 bytes. The source code starts with some declarations: These are the lines 1 up to 24. This is similar to the *.inc files and .code, .data etc. in assembly language. I will not explain all of them now, but only a few essential commands. Line 25 then says \begin{document}. There the actual text begins, which still has to be compiled. It then ends in line 513 with \end{document}. Line 26 contains \title{Möglichkeiten mit \LaTeX}, which makes the title page; line 27 says \author{Gunther}. In connection with this is line 28 \maketitle; both commands make the title. Line 29 is \tableofcontents. As the name suggests, the table of contents is created here. This is done by the LATEX compiler independently at runtime; the author does not need to take care of it. Enough now about the source code.

Once the text is written, it still needs to be compiled. I've done this via command line with:

latex lamoe.tex

As a result, a number of files are created. The most important one is lamoe.dvi with a size of 87 876 bytes; the other files are for the compiler and advanced users only. The extension DVI stands for device independent. I will try to explain this with an example. The files created with a word processor of an Office - say *.doc - are not device independent. In these files the installed printer is hard coded and therefore they look like this only on this printer. 

Fifteen years ago, I had a student who didn't listen to me; he wrote his master thesis using Word. The student had only a cheap inkjet printer at home. His idea was to print the file at the university on a very good laser printer, to have them copied and bound in a copy store. His surprise was great: the text on the laser printer was 2 pages shorter than on his printer at home, without changing one Bit of the file. He therefore had to manually revise all forward and backward references in the text. At the same time, the dead line was breathing down his neck. He had a lot of stress on his hands.

Back to the DVI file. This can be output and will look the same on any printer - whether it is the latest laser printer or an old 9-pin dot matrix printer. However, you need a DVI viewer, which is part of the LATEX installation. This file is therefore not part of the archive. I therefore used a command line utility, also part of the LATEX installation, to convert the DVI file to a Postscript file: 
dvips -Ppdf lamoe.dvi
The result was the file lamoe.ps with a size of about 6 MB. But we need it only to create a PDF file in the next step. PS plays a similar role as the OBJ file. In the end, I converted the PS file into a PDF file with a resolution of 720 dpi using the GhostScript viewer GSVIEW64. The new file is then latest.pdf and has a size of 135 KB and is included in the archive.

Finally, a few words about the content of the PDF file. The text is German, because I don't have time to translate at the moment. But the essential elements are recognizable. Page 1 shows the title page with table of contents. Pages 3 and 4 deal with typefaces, e.g. calligraphic lettering or Fraktur typeface. On p. 5 we talk about itemize, enumerate and tables. Formulas are shown on p. 6. Pages 7 to 10 are about graphics. Simple pictures can be written with the picture environment of LATEX. More complex graphics, such as coordinate systems or grids can be realized with the PICTEX package (p. 8). A conversion scale between centimeters and inches is shown on p. 9; only 14 lines of source code are required for this image. Writing a logarithmic scale is not a big problem either; you can see the result on p. 9. The last two images were created with PSTricks (post script tricks). This is a very powerful tool. On p. 9 the series connection of two resistors with the voltages is shown. Then on p. 10 the parallel connection of two resistors with the currents.

Maybe this can give a first impression about the manifold possibilities of LATEX and lure one or the other into this world.

Gunther
You have to know the facts before you can distort them.

FORTRANS

Hi,

Quote from: Gunther on February 01, 2021, 07:27:48 PM
I'm not sure if that's a good idea. LATEX and assembly language have little to do with each other. Of course, with both, the learning curve is pretty steep.

In the LATEX world, everyone has their problems at the beginning. That's why there are a lot of tutorials, videos and forums. There is the right place to go.

   I think Gunther is correct in what he says.  I installed LaTEX
in '03.  The installation was not onerous and the documentation
was adequate.  I wrote one example document, a math formula,
and decided that the learning curve was a bit steep for me.  At
the time I was programming in PostScript on say a weekly basis.
And I decided that for what I was doing, that was easier.  That
was due to much more experience, having years of practice.

   I don't see assembly and either LaTEX or PostScript compli-
menting each other.  The paradigms are too different for me
to see how any normal level of effort trying to combine them
would pay off.

   LaTEX is a good tool but you need to have a real need for
it before it would be useful to learn.  Publishers requiring
authors to use it, or a teacher wanting students to turn in
assignments using it would provide the incentive.

Regards,

Steve N.

Biterider

Hello Gunther
Thanks for the good explanation.
As Fortrans said, after reading your post, I don't see any immediate use of latex in combination with assembly.
At least I've learned something new and I know who to ask about it  :biggrin:

Thank you, Biterider