Anon-Planet / thgtoa

The comprehensive guide for online anonymity and OpSec.
https://anonymousplanet.org/
Other
384 stars 41 forks source link

Fix footnotes in doc #119

Closed nopeitsnothing closed 2 years ago

nopeitsnothing commented 2 years ago

The footnotes at the bottom of the document are not displayed properly.

Solution:

They should be re-numbered to avoid skips and no longer trigger Pandoc errors.

Notes:

Need to number footnotes ^273 and on; since ^274 was removed, and it wasn't re-numbered in that commit.

I did accomplish this with regex and sed but I checked the links afterward and they're fine:

#!/bin/bash

sed -i 's/\[\^329\]/\[\^328\]/g' guide.md
sed -i 's/\[\^330\]/\[\^329\]/g' guide.md
sed -i 's/\[\^331\]/\[\^330\]/g' guide.md
... snip ...
sed -i 's/\[\^538\]/\[\^537\]/g' guide.md

Fixes #117 - this may also fix the references at the end not showing in PDF format

ghost commented 2 years ago

On my side:

First online:

image

image

So it's correct.

Then offline rendering:

image

then:

image

Again correct both online and offline

Now in the MD (current online version)

First

image

Then

image

huh?

I checked with number 274, 275

Everything is fine from my POV ? Am I blind to something ?

nopeitsnothing commented 2 years ago

Yes, you're missing the fact that the error is in the PDF. Open the master branch PDF and scroll all the way to the bottom - it doesn't show any of the footnotes.

ghost commented 2 years ago

As from 274 , the PDF shifts all numbers because it's missing ? I mean pandoc shift and re-numbers them sequentially? And 275 becomes 274 And if there are other missing later, again, shifts again? Is that it ? it renumbers them all en therefore shifts the references ?

Because if that's it ... then we cannot fix (re-number) the MD file and leave the missing reference in the repo. It can only be done as part of the PDF making. But certainly not altering the repo MD.

If we re-number the MD when a reference is deleted. All references are changed. Which mean each line with a reference is changed. Which means the entire document is changed. Which creates a nightmare for translators. As their tool will mark the whole document as changed and to be reviewed.

Basically, the makefile has to do this as part of a script without ever changing the numbering in the repo MD.

And your commit here wants to re-number all the references in guide.md ... Nightmare for translators/proofreaders.

nopeitsnothing commented 2 years ago

For the last time, the numbering in the source is missing numbers, I fixed it, and yes, I checked everything twice. I wouldn't have made a PR that I knew was going to take me hours to do, if I didn't think it would be necessary. This DOES fix how WE numbered the document references, and therefore DOES fix how Pandoc is parsing it.

NobodySpecial256 commented 2 years ago

Another solution needs to be found. The repo MD cannot be changed to not make the work of potential translators/proofreaders a nightmare. The makefile should do this if needed.

If you change even a single character on a line, it marks the entire line as needing review. If we ever want this project to be able to be translated, this is unacceptable, as translators would have to re-review the entire document with every update.

I'm closing this PR