Author Topic: File listing in BibTex format  (Read 6603 times)

HSE

  • Member
  • *****
  • Posts: 2194
  • AMD 7-32 / i3 10-64
File listing in BibTex format
« on: January 30, 2021, 01:18:23 AM »
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--

  • Administrator
  • Member
  • ******
  • Posts: 9766
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: File listing in BibTex format
« Reply #1 on: January 30, 2021, 08:11:14 AM »
Hi Hector,

I have heard the name but don't know anything about BibTex format. What is it ?
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

Gunther

  • Member
  • *****
  • Posts: 4086
  • Forgive your enemies, but never forget their names
Re: File listing in BibTex format
« Reply #2 on: January 30, 2021, 08:23:27 AM »
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
Get your facts first, and then you can distort them.

HSE

  • Member
  • *****
  • Posts: 2194
  • AMD 7-32 / i3 10-64
Re: File listing in BibTex format
« Reply #3 on: January 30, 2021, 09:03:58 AM »
Hi Hutch!

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:
Code: [Select]
@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

Code: [Select]
@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--

  • Administrator
  • Member
  • ******
  • Posts: 9766
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: File listing in BibTex format
« Reply #4 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.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

Gunther

  • Member
  • *****
  • Posts: 4086
  • Forgive your enemies, but never forget their names
Re: File listing in BibTex format
« Reply #5 on: January 31, 2021, 08:06:46 PM »
Steve,

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
Get your facts first, and then you can distort them.

jj2007

  • Member
  • *****
  • Posts: 12965
  • Assembler is fun ;-)
    • MasmBasic
Re: File listing in BibTex format
« Reply #6 on: January 31, 2021, 08:52:05 PM »
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

  • Member
  • *****
  • Posts: 4086
  • Forgive your enemies, but never forget their names
Re: File listing in BibTex format
« Reply #7 on: January 31, 2021, 09:58:49 PM »
Jochen,

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
Get your facts first, and then you can distort them.

Biterider

  • Member
  • ****
  • Posts: 975
  • ObjAsm Developer
    • ObjAsm
Re: File listing in BibTex format
« Reply #8 on: January 31, 2021, 10:22:25 PM »
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

  • Member
  • *****
  • Posts: 12965
  • Assembler is fun ;-)
    • MasmBasic
Re: File listing in BibTex format
« Reply #9 on: January 31, 2021, 10:54:11 PM »
But 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.

Many publishers require their authors to have manuscripts written in LATEX.

Gunther

  • Member
  • *****
  • Posts: 4086
  • Forgive your enemies, but never forget their names
Re: File listing in BibTex format
« Reply #10 on: February 01, 2021, 06:04:09 AM »
Jochen,

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

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
Get your facts first, and then you can distort them.

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 9766
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: File listing in BibTex format
« Reply #11 on: February 01, 2021, 11:16:50 AM »
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:
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

Gunther

  • Member
  • *****
  • Posts: 4086
  • Forgive your enemies, but never forget their names
Re: File listing in BibTex format
« Reply #12 on: February 01, 2021, 07:27:48 PM »
Biterider,

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:
Code: [Select]
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: 
Code: [Select]
dvips -Ppdf lamoe.dviThe 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
Get your facts first, and then you can distort them.

FORTRANS

  • Member
  • *****
  • Posts: 1190
Re: File listing in BibTex format
« Reply #13 on: February 02, 2021, 01:06:32 AM »
Hi,

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

  • Member
  • ****
  • Posts: 975
  • ObjAsm Developer
    • ObjAsm
Re: File listing in BibTex format
« Reply #14 on: February 02, 2021, 05:05:45 AM »
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